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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benson [draw.io] <david@jgraph.com>2021-09-09 17:48:28 +0300
committerDavid Benson [draw.io] <david@jgraph.com>2021-09-09 17:48:28 +0300
commit9f490c1db59b853546ce0815749fb35edd623062 (patch)
tree6824ad2759cdf765d5472e0afa457842b62926df
parentb716711aa526f744667afea369db9cd7e8324236 (diff)
15.1.4 releasev15.1.4
-rw-r--r--ChangeLog8
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/js/app.min.js2649
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js54
-rw-r--r--src/main/webapp/js/diagramly/Editor.js419
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js529
-rw-r--r--src/main/webapp/js/diagramly/GraphViewer.js87
-rw-r--r--src/main/webapp/js/diagramly/Menus.js14
-rw-r--r--src/main/webapp/js/diagramly/vsdx/importer.js11
-rw-r--r--src/main/webapp/js/extensions.min.js52
-rw-r--r--src/main/webapp/js/grapheditor/Dialogs.js110
-rw-r--r--src/main/webapp/js/grapheditor/Editor.js130
-rw-r--r--src/main/webapp/js/grapheditor/EditorUi.js5
-rw-r--r--src/main/webapp/js/viewer-static.min.js2875
-rw-r--r--src/main/webapp/js/viewer.min.js2875
-rw-r--r--src/main/webapp/mxgraph/mxClient.js2
-rw-r--r--src/main/webapp/service-worker.js2
-rw-r--r--src/main/webapp/service-worker.js.map2
18 files changed, 4958 insertions, 4868 deletions
diff --git a/ChangeLog b/ChangeLog
index 04dd6063..44a25039 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+09-SEP-2021: 15.1.4
+
+- Fixes spacing and sizes in tags dialog
+- Adds tags to viewer, SVG icons to layers dialog
+- [vsdx import] Fixes invalid attribute error when input data is not suitable for html
+- Fixes text overflow in dialogs
+- Uses static viewer with no dynamic loading
+
08-SEP-2021: 15.1.3
- Internal release
diff --git a/VERSION b/VERSION
index a9e11086..5f456472 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-15.1.3 \ No newline at end of file
+15.1.4 \ No newline at end of file
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index cf9b5f1a..c9c10a77 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -234,7 +234,7 @@ null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.1.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+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||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.1.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||
0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),
@@ -2038,18 +2038,25 @@ function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6=
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
Editor=function(a,c,b,e,d){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=e||this.createGraph(c,b);this.editable=null!=d?d:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
function(){return this.status};this.graphChangeListener=function(a,b){var c=null!=b?b.getProperty("edit"):null;null!=c&&c.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
-(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(c){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
-Editor.moveImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=":IMAGE_PATH+
-"/move.png";Editor.rowMoveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/thumb_horz.png";
-Editor.lightHelpImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+":IMAGE_PATH+
-"/help.png";
+(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(c){}})();Editor.defaultHtmlFont="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
+Editor.rowMoveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/thumb_horz.png";
Editor.lightCheckmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+
"/checkmark.gif";Editor.darkHelpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=";Editor.darkCheckmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==";
-Editor.maximizeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAADgKxmiAAAABXRSTlMA758vX1Pw3BoAAABJSURBVAjXY8AJQkODGBhUQ0MhbAUGBiYY24CBgRnGFmZgMISwgwwDGRhEhVVBbAVmEQYGRwMmBjIAQi/CTIRd6G5AuA3dzYQBAHj0EFdHkvV4AAAAAElFTkSuQmCC";Editor.zoomOutImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCxxcXEhISFgYGChjTUxAAAAAXRSTlMAQObYZgAAAEdJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITgLJZXFxgbIQ4Qj3CHIT5ggoIe5kgNkM1KSDYKBKqxPkDAPo5BAZBE54hAAAAAElFTkSuQmCC";
-Editor.zoomInImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCwhISFxcXFgYGBavKaoAAAAAXRSTlMAQObYZgAAAElJREFUCNdjIAMwCQrB2YKCggJQJqMIA4sglK3owMzgqABVwsDMwCgAZTMbG8PYCHGEeoQ5CPMFFRD2MkFshmpSQLBRJFSJ8wcAEqcEM2uhl2MAAAAASUVORK5CYII=";Editor.zoomFitImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAD1BMVEUAAAAAAAAwMDBwcHBgYGC1xl09AAAAAXRSTlMAQObYZgAAAEFJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITwMdGqEeYgzBfUAFhLxPEZqgmBQQbRUKFOH8AAK5OA3lA+FFOAAAAAElFTkSuQmCC";
-Editor.layersImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAAaVBMVEUAAAAgICAICAgdHR0PDw8WFhYICAgLCwsXFxcvLy8ODg4uLi4iIiIqKiokJCQYGBgKCgonJycFBQUCAgIqKiocHBwcHBwODg4eHh4cHBwnJycJCQkUFBQqKiojIyMuLi4ZGRkgICAEBATOWYXAAAAAGnRSTlMAD7+fnz8/H7/ff18/77+vr5+fn39/b28fH2xSoKsAAACQSURBVBjTrYxJEsMgDARZZMAY73sgCcn/HxnhKtnk7j6oRq0psfuoyndZ/SuODkHPLzfVT6KeyPePnJ7KrnkRjWMXTn4SMnN8mXe2SSM3ts8L/ZUxxrbAULSYJJULE0Iw9pjpenoICcgcX61mGgTgtCv9Be99pzCoDhNQWQnchD1mup5++CYGcoQexajZbfwAj/0MD8ZOaUgAAAAASUVORK5CYII=";
-Editor.previousImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAAh0lEQVQ4je3UsQnCUBCA4U8hpa1NsoEjpHQJS0dxADdwEMuMIJkgA1hYChbGQgMi+JC8q4L/AB/vDu7x74cWWEZhJU44RmA1zujR5GIbXF9YNrjD/Q0bDRY4fEBZ4P4LlgTnCbAf84pUM8/9hY08tMUtEoQ1LpEgrNBFglChFXR6Q6GfwwR6AGKJMF74Vtt3AAAAAElFTkSuQmCC";Editor.nextImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAAi0lEQVQ4jeXUIQ7CUAwA0MeGxWI2yylwnALJUdBcgYvM7QYLmjOQIAkIPmJZghiIvypoUtX0tfnJL38X5ZfaEgUeUcManFBHgS0SLlhHggk3bCPBhCf2keCQR8wjwYTDp6YiZxJmOU1jGw7vGALescuBxsArNlOwd/CM1VSM/ut1qCIw+uOwiMJ+OF4CQzBCXm3hyAAAAABJRU5ErkJggg==";
-Editor.editImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCwALAIABAFdXV////yH5BAEAAAEALAAAAAALAAsAAAIZjB8AiKuc4jvLOGqzrjX6zmkWyChXaUJBAQA7":IMAGE_PATH+"/edit.gif";Editor.zoomOutLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6TTcgOWg1djFIN3oiLz48L3N2Zz4=";
+Editor.lightHelpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+";
+Editor.moveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=";
+Editor.maximizeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1IDNsMi4zIDIuMy0yLjg5IDIuODcgMS40MiAxLjQyTDE4LjcgNi43IDIxIDlWM2gtNnpNMyA5bDIuMy0yLjMgMi44NyAyLjg5IDEuNDItMS40Mkw2LjcgNS4zIDkgM0gzdjZ6bTYgMTJsLTIuMy0yLjMgMi44OS0yLjg3LTEuNDItMS40Mkw1LjMgMTcuMyAzIDE1djZoNnptMTItNmwtMi4zIDIuMy0yLjg3LTIuODktMS40MiAxLjQyIDIuODkgMi44N0wxNSAyMWg2di02eiIvPjwvc3ZnPg==";
+Editor.zoomOutImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6TTcgOWg1djFIN3oiLz48L3N2Zz4=";
+Editor.zoomInImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6bS41LTdIOXYySDd2MWgydjJoMXYtMmgyVjloLTJ6Ii8+PC9zdmc+";
+Editor.zoomFitImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTUgMTVIM3Y0YzAgMS4xLjkgMiAyIDJoNHYtMkg1di00ek01IDVoNFYzSDVjLTEuMSAwLTIgLjktMiAydjRoMlY1em03IDNjLTIuMjEgMC00IDEuNzktNCA0czEuNzkgNCA0IDQgNC0xLjc5IDQtNC0xLjc5LTQtNC00em0wIDZjLTEuMSAwLTItLjktMi0ycy45LTIgMi0yIDIgLjkgMiAyLS45IDItMiAyem03LTExaC00djJoNHY0aDJWNWMwLTEuMS0uOS0yLTItMnptMCAxNmgtNHYyaDRjMS4xIDAgMi0uOSAyLTJ2LTRoLTJ2NHoiLz48L3N2Zz4=";
+Editor.layersImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTExLjk5IDE4LjU0bC03LjM3LTUuNzNMMyAxNC4wN2w5IDcgOS03LTEuNjMtMS4yN3pNMTIgMTZsNy4zNi01LjczTDIxIDlsLTktNy05IDcgMS42MyAxLjI3TDEyIDE2em0wLTExLjQ3TDE3Ljc0IDkgMTIgMTMuNDcgNi4yNiA5IDEyIDQuNTN6Ii8+PC9zdmc+";Editor.previousImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjQxIDcuNDFMMTQgNmwtNiA2IDYgNiAxLjQxLTEuNDFMMTAuODMgMTJsNC41OC00LjU5eiIvPjwvc3ZnPg==";
+Editor.nextImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEwIDZMOC41OSA3LjQxIDEzLjE3IDEybC00LjU4IDQuNTlMMTAgMThsNi02LTYtNnoiLz48L3N2Zz4=";Editor.editImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE0LjA2IDkuMDJsLjkyLjkyTDUuOTIgMTlINXYtLjkybDkuMDYtOS4wNk0xNy42NiAzYy0uMjUgMC0uNTEuMS0uNy4yOWwtMS44MyAxLjgzIDMuNzUgMy43NSAxLjgzLTEuODNjLjM5LS4zOS4zOS0xLjAyIDAtMS40MWwtMi4zNC0yLjM0Yy0uMi0uMi0uNDUtLjI5LS43MS0uMjl6bS0zLjYgMy4xOUwzIDE3LjI1VjIxaDMuNzVMMTcuODEgOS45NGwtMy43NS0zLjc1eiIvPjwvc3ZnPg==";
+Editor.duplicateImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE2IDFINGMtMS4xIDAtMiAuOS0yIDJ2MTRoMlYzaDEyVjF6bTMgNEg4Yy0xLjEgMC0yIC45LTIgMnYxNGMwIDEuMS45IDIgMiAyaDExYzEuMSAwIDItLjkgMi0yVjdjMC0xLjEtLjktMi0yLTJ6bTAgMTZIOFY3aDExdjE0eiIvPjwvc3ZnPg==";Editor.addImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEzaC02djZoLTJ2LTZINXYtMmg2VjVoMnY2aDZ2MnoiLz48L3N2Zz4=";
+Editor.crossImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDYuNDFMMTcuNTkgNSAxMiAxMC41OSA2LjQxIDUgNSA2LjQxIDEwLjU5IDEyIDUgMTcuNTkgNi40MSAxOSAxMiAxMy40MSAxNy41OSAxOSAxOSAxNy41OSAxMy40MSAxMiAxOSA2LjQxeiIvPjwvc3ZnPg==";Editor.verticalDotsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDhjMS4xIDAgMi0uOSAyLTJzLS45LTItMi0yLTIgLjktMiAyIC45IDIgMiAyem0wIDJjLTEuMSAwLTIgLjktMiAycy45IDIgMiAyIDItLjkgMi0yLS45LTItMi0yem0wIDZjLTEuMSAwLTIgLjktMiAycy45IDIgMiAyIDItLjkgMi0yLS45LTItMi0yeiIvPjwvc3ZnPg==";
+Editor.trashImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE2IDl2MTBIOFY5aDhtLTEuNS02aC01bC0xIDFINXYyaDE0VjRoLTMuNWwtMS0xek0xOCA3SDZ2MTJjMCAxLjEuOSAyIDIgMmg4YzEuMSAwIDItLjkgMi0yVjd6Ii8+PC9zdmc+";Editor.hiddenImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNS0uNTkgMS4yMi0xLjQyIDIuMjctMi40MSAzLjEybDEuNDEgMS40MWMxLjM5LTEuMjMgMi40OS0yLjc3IDMuMTgtNC41M0MyMS4yNyA3LjExIDE3IDQgMTIgNGMtMS4yNyAwLTIuNDkuMi0zLjY0LjU3bDEuNjUgMS42NUMxMC42NiA2LjA5IDExLjMyIDYgMTIgNnptLTEuMDcgMS4xNEwxMyA5LjIxYy41Ny4yNSAxLjAzLjcxIDEuMjggMS4yOGwyLjA3IDIuMDdjLjA4LS4zNC4xNC0uNy4xNC0xLjA3QzE2LjUgOS4wMSAxNC40OCA3IDEyIDdjLS4zNyAwLS43Mi4wNS0xLjA3LjE0ek0yLjAxIDMuODdsMi42OCAyLjY4QzMuMDYgNy44MyAxLjc3IDkuNTMgMSAxMS41IDIuNzMgMTUuODkgNyAxOSAxMiAxOWMxLjUyIDAgMi45OC0uMjkgNC4zMi0uODJsMy40MiAzLjQyIDEuNDEtMS40MUwzLjQyIDIuNDUgMi4wMSAzLjg3em03LjUgNy41bDIuNjEgMi42MWMtLjA0LjAxLS4wOC4wMi0uMTIuMDItMS4zOCAwLTIuNS0xLjEyLTIuNS0yLjUgMC0uMDUuMDEtLjA4LjAxLS4xM3ptLTMuNC0zLjRsMS43NSAxLjc1Yy0uMjMuNTUtLjM2IDEuMTUtLjM2IDEuNzggMCAyLjQ4IDIuMDIgNC41IDQuNSA0LjUuNjMgMCAxLjIzLS4xMyAxLjc3LS4zNmwuOTguOThjLS44OC4yNC0xLjguMzgtMi43NS4zOC0zLjc5IDAtNy4xNy0yLjEzLTguODItNS41LjctMS40MyAxLjcyLTIuNjEgMi45My0zLjUzeiIvPjwvc3ZnPg==";
+Editor.visibleImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNUMxOS4xNyAxNC44NyAxNS43OSAxNyAxMiAxN3MtNy4xNy0yLjEzLTguODItNS41QzQuODMgOC4xMyA4LjIxIDYgMTIgNm0wLTJDNyA0IDIuNzMgNy4xMSAxIDExLjUgMi43MyAxNS44OSA3IDE5IDEyIDE5czkuMjctMy4xMSAxMS03LjVDMjEuMjcgNy4xMSAxNyA0IDEyIDR6bTAgNWMxLjM4IDAgMi41IDEuMTIgMi41IDIuNVMxMy4zOCAxNCAxMiAxNHMtMi41LTEuMTItMi41LTIuNVMxMC42MiA5IDEyIDltMC0yYy0yLjQ4IDAtNC41IDIuMDItNC41IDQuNVM5LjUyIDE2IDEyIDE2czQuNS0yLjAyIDQuNS00LjVTMTQuNDggNyAxMiA3eiIvPjwvc3ZnPg==";
+Editor.lockedImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PGcgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6Ii8+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBvcGFjaXR5PSIuODciLz48L2c+PHBhdGggZD0iTTE4IDhoLTFWNmMwLTIuNzYtMi4yNC01LTUtNVM3IDMuMjQgNyA2djJINmMtMS4xIDAtMiAuOS0yIDJ2MTBjMCAxLjEuOSAyIDIgMmgxMmMxLjEgMCAyLS45IDItMlYxMGMwLTEuMS0uOS0yLTItMnpNOSA2YzAtMS42NiAxLjM0LTMgMy0zczMgMS4zNCAzIDN2Mkg5VjZ6bTkgMTRINlYxMGgxMnYxMHptLTYtM2MxLjEgMCAyLS45IDItMnMtLjktMi0yLTItMiAuOS0yIDIgLjkgMiAyIDJ6Ii8+PC9zdmc+";
+Editor.unlockedImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE4IDhoLTFWNmMwLTIuNzYtMi4yNC01LTUtNVM3IDMuMjQgNyA2aDJjMC0xLjY2IDEuMzQtMyAzLTNzMyAxLjM0IDMgM3YySDZjLTEuMSAwLTIgLjktMiAydjEwYzAgMS4xLjkgMiAyIDJoMTJjMS4xIDAgMi0uOSAyLTJWMTBjMC0xLjEtLjktMi0yLTJ6bTAgMTJINlYxMGgxMnYxMHptLTYtM2MxLjEgMCAyLS45IDItMnMtLjktMi0yLTItMiAuOS0yIDIgLjkgMiAyIDJ6Ii8+PC9zdmc+";
+Editor.zoomOutLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6TTcgOWg1djFIN3oiLz48L3N2Zz4=";
Editor.zoomInLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6bS41LTdIOXYySDd2MWgydjJoMXYtMmgyVjloLTJ6Ii8+PC9zdmc+";
Editor.actualSizeLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTUgMTVIM3Y0YzAgMS4xLjkgMiAyIDJoNHYtMkg1di00ek01IDVoNFYzSDVjLTEuMSAwLTIgLjktMiAydjRoMlY1em03IDNjLTIuMjEgMC00IDEuNzktNCA0czEuNzkgNCA0IDQgNC0xLjc5IDQtNC0xLjc5LTQtNC00em0wIDZjLTEuMSAwLTItLjktMi0ycy45LTIgMi0yIDIgLjkgMiAyLS45IDItMiAyem03LTExaC00djJoNHY0aDJWNWMwLTEuMS0uOS0yLTItMnptMCAxNmgtNHYyaDRjMS4xIDAgMi0uOSAyLTJ2LTRoLTJ2NHoiLz48L3N2Zz4=";
Editor.printLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDhoLTFWM0g2djVINWMtMS42NiAwLTMgMS4zNC0zIDN2Nmg0djRoMTJ2LTRoNHYtNmMwLTEuNjYtMS4zNC0zLTMtM3pNOCA1aDh2M0g4VjV6bTggMTJ2Mkg4di00aDh2MnptMi0ydi0ySDZ2Mkg0di00YzAtLjU1LjQ1LTEgMS0xaDE0Yy41NSAwIDEgLjQ1IDEgMXY0aC0yeiIvPjxjaXJjbGUgY3g9IjE4IiBjeT0iMTEuNSIgcj0iMSIvPjwvc3ZnPg==";
@@ -2086,11 +2093,7 @@ e);y=d.x;x=d.y;B.style.left=y+"px";B.style.top=x+"px";B.style.width=b+"px";B.sty
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":
IMAGE_PATH+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
-"/clear.gif";
-Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCODExNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCODIxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3RjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI4MDE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvqMCFYAAAAVUExURZmZmb+/v7KysqysrMzMzLGxsf///4g8N1cAAAAHdFJOU////////wAaSwNGAAAAPElEQVR42lTMQQ4AIQgEwUa0//9kTQirOweYOgDqAMbZUr10AGlAwx4/BJ2QJ4U0L5brYjovvpv32xZgAHZaATFtMbu4AAAAAElFTkSuQmCC":IMAGE_PATH+
-"/locked.png";
-Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
-"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,c){return new mxPoint(a,c)};Dialog.prototype.close=function(a,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
+"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,c){return new mxPoint(a,c)};Dialog.prototype.close=function(a,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
var ErrorDialog=function(a,c,b,e,d,f,k,h,g,l,m){g=null!=g?g:!0;var p=document.createElement("div");p.style.textAlign="center";if(null!=c){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="10px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";n.style.whiteSpace="nowrap";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxUtils.write(n,c);n.setAttribute("title",c);p.appendChild(n)}c=
document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=b;p.appendChild(c);b=document.createElement("div");b.style.marginTop="12px";b.style.textAlign="center";null!=f&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",b.appendChild(l));var r=mxUtils.button(e,function(){g&&a.hideDialog();null!=d&&d()});
r.className="geBtn";b.appendChild(r);null!=k&&(e=mxUtils.button(k,function(){g&&a.hideDialog();null!=h&&h()}),e.className="geBtn gePrimaryBtn",b.appendChild(e));this.init=function(){r.focus()};p.appendChild(b);this.container=p},PrintDialog=function(a,c){this.create(a,c)};
@@ -2218,32 +2221,32 @@ function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils
"border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var f=mxUtils.bind(this,function(){var b=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top=
"0":this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",f);f();var k=0,f=mxUtils.bind(this,function(a,b,c){k++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=c&&d.setAttribute("title",c);a=document.createElement("img");a.setAttribute("border","0");
a.setAttribute("src",b);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=d.backBtn&&f(mxUtils.bind(this,function(a){window.location.href=d.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var h=f(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),g=document.createElement("div");g.style.display="inline-block";
-g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="10px";g.style.fontSize="14px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var l=f(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+
-this.pages.length))});h.style.paddingLeft="0px";h.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",h.style.display="",g.style.display="inline-block"):(l.style.display="none",h.style.display="none",g.style.display="none");m()});this.editor.addListener("resetGraphView",p);this.editor.addListener("pageSelected",m)}f(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();
+g.style.verticalAlign="top";g.style.fontFamily=Editor.defaultHtmlFont;g.style.marginTop="10px";g.style.fontSize="14px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var l=f(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+
+" / "+this.pages.length))});h.style.paddingLeft="0px";h.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",h.style.display="",g.style.display="inline-block"):(l.style.display="none",h.style.display="none",g.style.display="none");m()});this.editor.addListener("resetGraphView",p);this.editor.addListener("pageSelected",m)}f(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();
mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");f(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");f(mxUtils.bind(this,function(b){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var n=null,r=null,t=mxUtils.bind(this,
function(a){null!=n&&(window.clearTimeout(n),n=null);null!=r&&(window.clearTimeout(r),r=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;r=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";r=null}),600)}),a||200)}),v=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),n=null);null!=r&&(window.clearTimeout(r),r=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,
a||30)});if("1"==urlParams.layers){this.layersDialog=null;var u=f(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var c=u.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius",
-"5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),y=a.getModel();y.addListener(mxEvent.CHANGE,function(){u.style.display=1<y.getChildCount(y.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(f);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||f(mxUtils.bind(this,function(b){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():
-"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(p=0;p<this.lightboxToolbarActions.length;p++){var x=this.lightboxToolbarActions[p];x.elem=f(x.fn,x.icon,x.tooltip)}null!=d.refreshBtn&&f(mxUtils.bind(this,function(a){d.refreshBtn.url?window.location.href=d.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),
-Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=d.fullscreenBtn&&window.self!==window.top&&f(mxUtils.bind(this,function(b){d.fullscreenBtn.url?a.openLink(d.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(d.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&f(mxUtils.bind(this,function(a){"1"==urlParams.close||
-d.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||v(30),t())}));mxEvent.addListener(this.chromelessToolbar,
-mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():v(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():v(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||v(30)}));var B=a.getTolerance();a.addMouseListener({startX:0,
-startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(c,d){mxEvent.isTouchEvent(d.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<B&&Math.abs(this.scrollTop-a.container.scrollTop)<B&&Math.abs(this.startX-d.getGraphX())<B&&Math.abs(this.startY-d.getGraphY())<B&&(0<parseFloat(b.chromelessToolbar.style.opacity||0)?
-t():v(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var E=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}E.apply(this,arguments)};if(!a.isViewer()){var G=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=
-this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?G.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=
-Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var A=a.view.getBackgroundPane(),F=a.view.getDrawPane();a.cumulativeZoomFactor=1;var z=null,H=null,L=null,M=null,O=null,K=function(d){null!=z&&window.clearTimeout(z);window.setTimeout(function(){if(!a.isMouseDown||M)z=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&
-null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),F.style.transformOrigin="",A.style.transformOrigin="",mxClient.IS_SF?(F.style.transform="scale(1)",A.style.transform="scale(1)",window.setTimeout(function(){F.style.transform="";A.style.transform=""},0)):(F.style.transform="",A.style.transform=""),a.view.getDecoratorPane().style.opacity="",
-a.view.getOverlayPane().style.opacity="");var d=new mxPoint(a.container.scrollLeft,a.container.scrollTop),e=mxUtils.getOffset(a.container),f=a.view.scale,g=0,k=0;null!=H&&(g=a.container.offsetWidth/2-H.x+e.x,k=a.container.offsetHeight/2-H.y+e.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=L&&(g+=d.x-L.x,k+=d.y-L.y),null!=c&&b.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),k*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==g&&0==k||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-
-1),a.container.scrollTop-=k*(a.cumulativeZoomFactor-1)));null!=O&&F.setAttribute("filter",O);a.cumulativeZoomFactor=1;O=M=H=L=z=null}),null!=d?d:a.isFastZoomEnabled()?b.wheelZoomDelay:b.lazyZoomDelay)},0)},U=Date.now();a.lazyZoom=function(c,d,e){(d=d||!a.scrollbars)&&(H=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-U)){U=Date.now();c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
-(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==O&&""!=F.getAttribute("filter")&&(O=F.getAttribute("filter"),F.removeAttribute("filter"));L=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=d?a.container.scrollLeft+a.container.clientWidth/2:H.x+a.container.scrollLeft-a.container.offsetLeft;var f=d?a.container.scrollTop+a.container.clientHeight/2:H.y+a.container.scrollTop-a.container.offsetTop;F.style.transformOrigin=c+"px "+f+"px";F.style.transform="scale("+
-this.cumulativeZoomFactor+")";A.style.transformOrigin=c+"px "+f+"px";A.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(d?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":H.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(d?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":H.y+
-a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=b.hoverIcons&&b.hoverIcons.reset()}K(e)}};mxEvent.addGestureListeners(a.container,function(a){null!=z&&window.clearTimeout(z)},null,function(b){1!=a.cumulativeZoomFactor&&K(0)});mxEvent.addListener(a.container,"scroll",function(b){null==z||a.isMouseDown||1==a.cumulativeZoomFactor||
-K(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c,d,e,f){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!d&&a.isScrollWheelEvent(b))d=a.view.getTranslate(),e=40/a.view.scale,mxEvent.isShiftDown(b)?a.view.setTranslate(d.x+(c?-e:e),d.y):a.view.setTranslate(d.x,d.y+(c?e:-e));else if(d||a.isZoomWheelEvent(b))for(var g=mxEvent.getSource(b);null!=g;){if(g==a.container)return a.tooltipHandler.hideTooltip(),H=null!=e&&null!=f?new mxPoint(e,
-f):new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),M=d,a.lazyZoom(c),mxEvent.consume(b),!1;g=g.parentNode}}),a.container);a.panningHandler.zoomGraph=function(b){a.cumulativeZoomFactor=b.scale;a.lazyZoom(0<b.scale,!0);mxEvent.consume(b)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
-EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};
-EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
+"5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),y=a.getModel();y.addListener(mxEvent.CHANGE,function(){u.style.display=1<y.getChildCount(y.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(f);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||f(mxUtils.bind(this,
+function(b){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(p=0;p<this.lightboxToolbarActions.length;p++){var x=this.lightboxToolbarActions[p];x.elem=f(x.fn,x.icon,x.tooltip)}null!=d.refreshBtn&&f(mxUtils.bind(this,function(a){d.refreshBtn.url?
+window.location.href=d.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=d.fullscreenBtn&&window.self!==window.top&&f(mxUtils.bind(this,function(b){d.fullscreenBtn.url?a.openLink(d.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(d.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||
+this.container!=document.body))&&f(mxUtils.bind(this,function(a){"1"==urlParams.close||d.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
+function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||v(30),t())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():v(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():v(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||v(30)}));var B=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(c,d){mxEvent.isTouchEvent(d.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<B&&Math.abs(this.scrollTop-a.container.scrollTop)<B&&
+Math.abs(this.startX-d.getGraphX())<B&&Math.abs(this.startY-d.getGraphY())<B&&(0<parseFloat(b.chromelessToolbar.style.opacity||0)?t():v(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var E=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}E.apply(this,
+arguments)};if(!a.isViewer()){var G=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?G.apply(this,
+arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var A=a.view.getBackgroundPane(),F=a.view.getDrawPane();a.cumulativeZoomFactor=1;var z=null,H=null,L=null,M=null,O=null,K=function(d){null!=z&&window.clearTimeout(z);
+window.setTimeout(function(){if(!a.isMouseDown||M)z=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),F.style.transformOrigin="",A.style.transformOrigin="",mxClient.IS_SF?(F.style.transform="scale(1)",A.style.transform="scale(1)",window.setTimeout(function(){F.style.transform=
+"";A.style.transform=""},0)):(F.style.transform="",A.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var d=new mxPoint(a.container.scrollLeft,a.container.scrollTop),e=mxUtils.getOffset(a.container),f=a.view.scale,g=0,k=0;null!=H&&(g=a.container.offsetWidth/2-H.x+e.x,k=a.container.offsetHeight/2-H.y+e.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=L&&(g+=d.x-L.x,k+=d.y-L.y),null!=c&&b.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-
+1),k*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==g&&0==k||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=k*(a.cumulativeZoomFactor-1)));null!=O&&F.setAttribute("filter",O);a.cumulativeZoomFactor=1;O=M=H=L=z=null}),null!=d?d:a.isFastZoomEnabled()?b.wheelZoomDelay:b.lazyZoomDelay)},0)},U=Date.now();a.lazyZoom=function(c,d,e){(d=d||!a.scrollbars)&&(H=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/
+2));if(mxClient.IS_IOS||!(15>Date.now()-U)){U=Date.now();c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*
+this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==O&&""!=F.getAttribute("filter")&&(O=F.getAttribute("filter"),F.removeAttribute("filter"));L=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=d?a.container.scrollLeft+a.container.clientWidth/2:H.x+a.container.scrollLeft-a.container.offsetLeft;var f=d?a.container.scrollTop+a.container.clientHeight/
+2:H.y+a.container.scrollTop-a.container.offsetTop;F.style.transformOrigin=c+"px "+f+"px";F.style.transform="scale("+this.cumulativeZoomFactor+")";A.style.transformOrigin=c+"px "+f+"px";A.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(d?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":H.x+a.container.scrollLeft-c.offsetLeft-
+a.container.offsetLeft+"px")+" "+(d?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":H.y+a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=b.hoverIcons&&b.hoverIcons.reset()}K(e)}};mxEvent.addGestureListeners(a.container,function(a){null!=z&&window.clearTimeout(z)},null,function(b){1!=a.cumulativeZoomFactor&&
+K(0)});mxEvent.addListener(a.container,"scroll",function(b){null==z||a.isMouseDown||1==a.cumulativeZoomFactor||K(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c,d,e,f){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!d&&a.isScrollWheelEvent(b))d=a.view.getTranslate(),e=40/a.view.scale,mxEvent.isShiftDown(b)?a.view.setTranslate(d.x+(c?-e:e),d.y):a.view.setTranslate(d.x,d.y+(c?e:-e));else if(d||a.isZoomWheelEvent(b))for(var g=
+mxEvent.getSource(b);null!=g;){if(g==a.container)return a.tooltipHandler.hideTooltip(),H=null!=e&&null!=f?new mxPoint(e,f):new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),M=d,a.lazyZoom(c),mxEvent.consume(b),!1;g=g.parentNode}}),a.container);a.panningHandler.zoomGraph=function(b){a.cumulativeZoomFactor=b.scale;a.lazyZoom(0<b.scale,!0);mxEvent.consume(b)}};
+EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};
+EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var c=urlParams.border,b=60;null!=c&&(b=parseInt(c));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(b,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,c){try{var b=mxUtils.parseXml(a);this.editor.setGraphXml(b.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=c&&(this.editor.setFilename(c),this.updateDocumentTitle())}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
@@ -3676,24 +3679,26 @@ mxUtils.bind(this,function(){h.setSuspended(!0)}));this.window.addListener(mxEve
null!=b){var c=g.convertValueToString(b),c=new FilenameDialog(a,c||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&g.cellLabelChanged(b,a)}),mxResources.get("enterName"));a.showDialog(c.container,300,100,!0,!0);c.init()}}function k(){var a=G.get(g.getLayerForCells(g.getSelectionCells()));null!=a?a.appendChild(A):null!=A.parentNode&&A.parentNode.removeChild(A)}function h(){function a(a,b,c,d){var e=document.createElement("div");e.className="geToolbarContainer";
G.put(c,e);e.style.overflow="hidden";e.style.position="relative";e.style.padding="4px";e.style.height="22px";e.style.display="block";e.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";e.style.borderWidth="0px 0px 1px 0px";e.style.borderColor="#c3c3c3";e.style.borderStyle="solid";e.style.whiteSpace="nowrap";e.setAttribute("title",b);var h=document.createElement("div");h.style.display="inline-block";h.style.width="100%";h.style.textOverflow="ellipsis";h.style.overflow="hidden";
mxEvent.addListener(e,"dragover",function(b){b.dataTransfer.dropEffect="move";r=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(e,"dragstart",function(a){n=e;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(e,"dragend",function(a){null!=n&&null!=r&&g.addCell(c,g.model.root,r);r=n=null;a.stopPropagation();a.preventDefault()});var k=document.createElement("img");k.setAttribute("draggable","false");k.setAttribute("align","top");k.setAttribute("border","0");
-k.style.padding="4px";k.setAttribute("title",mxResources.get("lockUnlock"));var l=g.getCurrentCellStyle(c);"1"==mxUtils.getValue(l,"locked","0")?k.setAttribute("src",Dialog.prototype.lockedImage):k.setAttribute("src",Dialog.prototype.unlockedImage);g.isEnabled()&&(k.style.cursor="pointer");mxEvent.addListener(k,"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(l,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==
-b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});h.appendChild(k);k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("title",mxResources.get(g.model.isVisible(c)?"hide":"show"));k.style.marginLeft="4px";k.style.marginRight="6px";k.style.marginTop="4px";h.appendChild(k);g.model.isVisible(c)&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);mxEvent.addListener(k,"click",function(a){g.model.setVisible(c,!g.model.isVisible(c));mxEvent.consume(a)});
-mxUtils.write(h,b);e.appendChild(h);if(g.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)b=document.createElement("div"),b.style.display="block",b.style.textAlign="right",b.style.whiteSpace="nowrap",b.style.position="absolute",b.style.right="16px",b.style.top="6px",0<a&&(h=document.createElement("a"),h.setAttribute("title",mxResources.get("toBack")),h.className="geButton",h.style.cssFloat="none",h.innerHTML="&#9660;",h.style.width="14px",h.style.height=
-"14px",h.style.fontSize="14px",h.style.margin="0px",h.style.marginTop="-1px",b.appendChild(h),mxEvent.addListener(h,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<t-1&&(h=document.createElement("a"),h.setAttribute("title",mxResources.get("toFront")),h.className="geButton",h.style.cssFloat="none",h.innerHTML="&#9650;",h.style.width="14px",h.style.height="14px",h.style.fontSize="14px",h.style.margin="0px",h.style.marginTop="-1px",b.appendChild(h),mxEvent.addListener(h,
-"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),e.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(e.setAttribute("draggable","true"),e.style.cursor="move")}mxEvent.addListener(e,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(f(c),mxEvent.consume(a))});g.getDefaultParent()==c&&(e.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",e.style.fontWeight=g.isEnabled()?"bold":"",v=c);mxEvent.addListener(e,
-"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),mxEvent.isShiftDown(a)&&g.setSelectionCells(c.children),mxEvent.consume(a))});p.appendChild(e)}t=g.model.getChildCount(g.model.root);p.innerHTML="";G.clear();for(var b=t-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,g.convertValueToString(c)||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,b));var c=g.convertValueToString(v)||mxResources.get("background");y.setAttribute("title",mxResources.get("removeIt",
-[c]));E.setAttribute("title",mxResources.get("duplicateIt",[c]));B.setAttribute("title",mxResources.get("editData"));g.isSelectionEmpty()&&(x.className="geButton mxDisabled");k()}var g=a.editor.graph,l=document.createElement("div");l.style.userSelect="none";l.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";l.style.border="1px solid whiteSmoke";l.style.height="100%";l.style.marginBottom="10px";l.style.overflow="auto";var m=EditorUi.compactUi?"26px":"30px",p=document.createElement("div");
-p.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";p.style.position="absolute";p.style.overflow="auto";p.style.left="0px";p.style.right="0px";p.style.top="0px";p.style.bottom=parseInt(m)+7+"px";l.appendChild(p);var n=null,r=null;mxEvent.addListener(l,"dragover",function(a){a.dataTransfer.dropEffect="move";r=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(l,"drop",function(a){a.stopPropagation();a.preventDefault()});var t=null,v=null,u=document.createElement("div");
-u.className="geToolbarContainer";u.style.position="absolute";u.style.bottom="0px";u.style.left="0px";u.style.right="0px";u.style.height=m;u.style.overflow="hidden";u.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";u.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";u.style.borderWidth="1px 0px 0px 0px";u.style.borderColor="#c3c3c3";u.style.borderStyle="solid";u.style.display="block";u.style.whiteSpace="nowrap";m=document.createElement("a");m.className="geButton";
-var y=m.cloneNode();y.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';mxEvent.addListener(y,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(v);g.removeCells([v],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});
-g.isEnabled()||(y.className="geButton mxDisabled");u.appendChild(y);var x=m.cloneNode();x.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));x.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(x,"click",function(b){if(g.isEnabled()&&!g.isSelectionEmpty()){var c=mxUtils.getOffset(x);a.showPopupMenu(mxUtils.bind(this,function(a,b){for(var c=t-1;0<=c;c--)mxUtils.bind(this,function(c){var d=a.addItem(g.convertValueToString(c)||
-mxResources.get("background"),null,mxUtils.bind(this,function(){g.moveCells(g.getSelectionCells(),0,0,!1,c)}),b);1==g.getSelectionCount()&&g.model.isAncestor(c,g.getSelectionCell())&&a.addCheckmark(d,Editor.checkmarkImage)})(g.model.getChildAt(g.model.root,c))}),c.x,c.y+x.offsetHeight,b)}});u.appendChild(x);var B=m.cloneNode();B.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';B.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(B,"click",function(b){g.isEnabled()&&
-a.showDataDialog(v);mxEvent.consume(b)});g.isEnabled()||(B.className="geButton mxDisabled");u.appendChild(B);var E=m.cloneNode();E.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(E,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCell(v),g.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||
-g.selectAll(a)}});g.isEnabled()||(E.className="geButton mxDisabled");u.appendChild(E);m=m.cloneNode();m.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';m.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(m,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(m.className=
-"geButton mxDisabled");u.appendChild(m);l.appendChild(u);var G=new mxDictionary,A=document.createElement("span");A.setAttribute("title",mxResources.get("selectionOnly"));A.innerHTML="&#8226;";A.style.position="absolute";A.style.fontWeight="bold";A.style.fontSize="16pt";A.style.right="6px";A.style.top="5px";h();g.model.addListener(mxEvent.CHANGE,h);g.addListener("defaultParentChanged",h);g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?x.className="geButton mxDisabled":x.className=
-"geButton";k()});this.window=new mxWindow(mxResources.get("layers"),l,c,b,e,d,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){p.scrollTop=p.scrollHeight-p.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=h;this.window.setLocation=function(a,b){var c=window.innerHeight||
-document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var F=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,
-"resize",F);this.destroy=function(){mxEvent.removeListener(window,"resize",F);this.window.destroy()}};
+k.style.width="16px";k.style.padding="0px 6px 0 4px";k.style.marginTop="2px";k.style.cursor="pointer";k.setAttribute("title",mxResources.get(g.model.isVisible(c)?"hide":"show"));g.model.isVisible(c)?(k.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(e,75)):(k.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(e,25));Editor.isDarkMode()&&(k.style.filter="invert(100%)");h.appendChild(k);mxEvent.addListener(k,"click",function(a){g.model.setVisible(c,!g.model.isVisible(c));mxEvent.consume(a)});
+k=document.createElement("img");k.setAttribute("draggable","false");k.setAttribute("align","top");k.setAttribute("border","0");k.style.width="16px";k.style.padding="0px 6px 0 0";k.style.marginTop="2px";k.setAttribute("title",mxResources.get("lockUnlock"));var l=g.getCurrentCellStyle(c);"1"==mxUtils.getValue(l,"locked","0")?(k.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(k,75)):(k.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(k,25));Editor.isDarkMode()&&(k.style.filter="invert(100%)");
+g.isEnabled()&&(k.style.cursor="pointer");mxEvent.addListener(k,"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(l,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});h.appendChild(k);k=document.createElement("span");mxUtils.write(k,b);k.style.display="block";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.textOverflow=
+"ellipsis";k.style.position="absolute";k.style.left="52px";k.style.right="8px";k.style.top="8px";h.appendChild(k);e.appendChild(h);if(g.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)b=document.createElement("div"),b.style.display="block",b.style.textAlign="right",b.style.whiteSpace="nowrap",b.style.position="absolute",b.style.right="16px",b.style.top="6px",0<a&&(h=document.createElement("a"),h.setAttribute("title",mxResources.get("toBack")),h.className=
+"geButton",h.style.cssFloat="none",h.innerHTML="&#9660;",h.style.width="14px",h.style.height="14px",h.style.fontSize="14px",h.style.margin="0px",h.style.marginTop="-1px",b.appendChild(h),mxEvent.addListener(h,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<t-1&&(h=document.createElement("a"),h.setAttribute("title",mxResources.get("toFront")),h.className="geButton",h.style.cssFloat="none",h.innerHTML="&#9650;",h.style.width="14px",h.style.height="14px",
+h.style.fontSize="14px",h.style.margin="0px",h.style.marginTop="-1px",b.appendChild(h),mxEvent.addListener(h,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),e.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(e.setAttribute("draggable","true"),e.style.cursor="move")}mxEvent.addListener(e,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(f(c),mxEvent.consume(a))});g.getDefaultParent()==c&&(e.style.background=
+Editor.isDarkMode()?"#505759":"#e6eff8",e.style.fontWeight=g.isEnabled()?"bold":"",v=c);mxEvent.addListener(e,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),mxEvent.isShiftDown(a)&&g.setSelectionCells(c.children),mxEvent.consume(a))});p.appendChild(e)}t=g.model.getChildCount(g.model.root);p.innerHTML="";G.clear();for(var b=t-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,g.convertValueToString(c)||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,
+b));var c=g.convertValueToString(v)||mxResources.get("background");y.setAttribute("title",mxResources.get("removeIt",[c]));E.setAttribute("title",mxResources.get("duplicateIt",[c]));g.isSelectionEmpty()&&(x.className="geButton mxDisabled");k()}var g=a.editor.graph,l=document.createElement("div");l.style.userSelect="none";l.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";l.style.border="1px solid whiteSmoke";l.style.height="100%";l.style.marginBottom="10px";l.style.overflow="auto";
+var m=EditorUi.compactUi?"26px":"30px",p=document.createElement("div");p.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";p.style.position="absolute";p.style.overflow="auto";p.style.left="0px";p.style.right="0px";p.style.top="0px";p.style.bottom=parseInt(m)+7+"px";l.appendChild(p);var n=null,r=null;mxEvent.addListener(l,"dragover",function(a){a.dataTransfer.dropEffect="move";r=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(l,"drop",function(a){a.stopPropagation();
+a.preventDefault()});var t=null,v=null,u=document.createElement("div");u.className="geToolbarContainer";u.style.position="absolute";u.style.bottom="0px";u.style.left="0px";u.style.right="0px";u.style.height=m;u.style.overflow="hidden";u.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";u.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";u.style.borderWidth="1px 0px 0px 0px";u.style.borderColor="#c3c3c3";u.style.borderStyle="solid";u.style.display="block";u.style.whiteSpace=
+"nowrap";m=document.createElement("a");m.className="geButton";var y=m.cloneNode();y.innerHTML='<img width="22" border="0" src="'+Editor.trashImage+'" style="opacity:0.9;'+(Editor.isDarkMode()?"filter:invert(100%);":"")+'"/>';mxEvent.addListener(y,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(v);g.removeCells([v],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?
+g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(y.className="geButton mxDisabled");u.appendChild(y);var x=m.cloneNode();x.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));x.innerHTML='<img width="22" border="0" src="'+Editor.verticalDotsImage+'" style="opacity:0.9;'+(Editor.isDarkMode()?"filter:invert(100%);":"")+'"/>';mxEvent.addListener(x,"click",function(b){if(g.isEnabled()&&
+!g.isSelectionEmpty()){var c=mxUtils.getOffset(x);a.showPopupMenu(mxUtils.bind(this,function(a,b){for(var c=t-1;0<=c;c--)mxUtils.bind(this,function(c){var d=a.addItem(g.convertValueToString(c)||mxResources.get("background"),null,mxUtils.bind(this,function(){g.moveCells(g.getSelectionCells(),0,0,!1,c)}),b);1==g.getSelectionCount()&&g.model.isAncestor(c,g.getSelectionCell())&&a.addCheckmark(d,Editor.checkmarkImage)})(g.model.getChildAt(g.model.root,c))}),c.x,c.y+x.offsetHeight,b)}});u.appendChild(x);
+var B=m.cloneNode();B.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';B.innerHTML='<img width="22" border="0" src="'+Editor.editImage+'" style="opacity:0.9;'+(Editor.isDarkMode()?"filter:invert(100%);":"")+'"/>';B.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(B,"click",function(b){g.isEnabled()&&a.showDataDialog(v);mxEvent.consume(b)});g.isEnabled()||(B.className="geButton mxDisabled");u.appendChild(B);var E=m.cloneNode();E.innerHTML='<img width="22" border="0" src="'+
+Editor.duplicateImage+'" style="opacity:0.9;'+(Editor.isDarkMode()?"filter:invert(100%);":"")+'"/>';mxEvent.addListener(E,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCell(v),g.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(E.className="geButton mxDisabled");u.appendChild(E);m=m.cloneNode();m.innerHTML=
+'<img width="22" border="0" src="'+Editor.addImage+'" style="opacity:0.9;'+(Editor.isDarkMode()?"filter:invert(100%);":"")+'"/>';m.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(m,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(m.className="geButton mxDisabled");u.appendChild(m);l.appendChild(u);var G=
+new mxDictionary,A=document.createElement("span");A.setAttribute("title",mxResources.get("selectionOnly"));A.innerHTML="&#8226;";A.style.position="absolute";A.style.fontWeight="bold";A.style.fontSize="16pt";A.style.right="2px";A.style.top="2px";h();g.model.addListener(mxEvent.CHANGE,h);g.addListener("defaultParentChanged",h);g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?x.className="geButton mxDisabled":x.className="geButton";k()});this.window=new mxWindow(mxResources.get("layers"),
+l,c,b,e,d,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){p.scrollTop=p.scrollHeight-p.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=h;this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;
+a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var F=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",F);this.destroy=function(){mxEvent.removeListener(window,
+"resize",F);this.window.destroy()}};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
Sidebar.prototype.searchIndexData="7Z1rU+M40Kh/zVbN+wEq98vHkHDbJUxeHGDrfFEpjkh0cKwc2R6G/fVHchKGKMwuRo7Usr21xQyBzUaPW62+qfuP9tkf3bM/Go0ofg2I+POP5kB+t8Rr8kdztPq54Hi9PMWcs5fodCD/QCP2Ev7RPFvGq0D8Sl389QfhMfVxcINnJJiwiMaUiV8ZzVgcs9W7XxgEdCF/ELO1eDWKOXsmj3QeL8VrjbdXhixgXLzyR6NZS/8RP5EfrTEUX182H7Jb23y73Hzb726+pfO3NWw+89t/F9DZBz/qjuRPsxK4IU+xdQK7JS/3gZghcEcXy5IjuF9bX7+lTXBGwjjdAyglYR2DIgZGMaQboeIgdgNMCL2mGQhDHAQsicXhmMwCAoRF245+2LH43wTPgZCwtDV2JMDsjo4iET1DHJbkB2chEAj9zh6EjiGzYUi5nwSYQ6GwvyU6fTMU/kxW6xO6FQVUt49hXxj6VjA0yoohtSJxOIejIVUQHYMgvCXma3Q+X5A5uiJQD09T+vKWxf5SkPDEOnDwtlns49iXkKYhHJU1tfG1dmIBBMW+MJgKQbzXFEBA2FES4JRD14py8AISzgkHHJUxJhBbEtMXhh7xawVDwhAfmqAppgEcdWHHB/NiTtdwINiJX3vil2gkKIA+Sk2JxJRTqIZVx1B4Zk9XoivG6T8sjHFgn4clkdjj8bBdlnUaavDOkGt6j6YJB2pfmQpgbhnI1DdMEJ2GURCA7Mzdyg07o1sQkPJ/dknAieAZ3hk+jXx2OktoMKfhIjo94zj0l+j70xP1yT6NNaNhTPj5DxLG0fa1OY6EDSa+kWt5okHwfo3NTk8s54PVP6X/fEjqi8jx9jufyI8oXmBJHNBQ/E/DkPjx9gOqsNv1fRO2fQA7xfMh6/QnZztuWszPw3lZgLf2gLcPjQAjwC9JSDj10e7dio69v2971Zu2uDOxqnAlSy7Kgr5eU9zkQ5vPCPrx6L7oqDv7/lbv0N8yQtpb4SAQ8h2JDxxFRYe+82F2Gr1lB/qUBMRnq1UiPjq6YklU+KO0Xts/S3uWFMsheTQZVvDNwL8PqViWWOtr4Yk3m/uK5rA08ojEhYCvpYBHabnHWhiP6yXhOIhOr8/GaIxp+MTxqvA6RynJ/CDk/x/PYLjj+EejJkiKr5NfLPN/LjSkaOC1Uke70A+mtb85PogagHowU/aSrq3Yz2Q/oNU9DGiBeSY3eL1ZaaEfiOIFd+pwH8gY+4I+i5aFfyb9/WeS2X0w+Eyoz9l6ycLCH/O9/0zVgXkoxXc1uj1nbK7JEA3m4igRjuAQ83nRn0xH8QFBbxN0x+SP/BI8F5d2DKfblRX6ifT382xNwKe852OxksI/EeWIz575NPhE1gQ/F/+JtPdd+D7kPZKE6JHx5yjGGyLFfjK99r6PAtiR9xLx3e7HhX8uyo45vPUH5rlM8SwgcdEfiHLMtwEbXlPCVzRUy2KL90g6yiMBfKrcF9+XVzYIZI/xgc4JE278Snxb9MfS2S/R+aAsG8xjeSQzdCaLPIt/vCsFwZBDw2UyhuFlGkNBJAh2z2XF5klAotN67fIcXQzZedGfiBqG/IL2eiP49kzGG4o5Po9mvdtC30YkehaL/R80DJIoDRS//XrRn1N3/5RpfmHnGHlOf8vndBEwxqun9FZTCu0pyf+LLKP2XmjsL9Hmf1D0Z9PraFsEJp7NBeXkRdYAe4T/oD7ZPh2xqV688f8U/SEpcczeFyLLJh7S/rMp/EOpO6HVvFdx2qxKdNqo4RmgttsD5XGCg91p8+t/ir49eEN5mbHwaq2ldFbLXH6c75OaizPGjxn/ZQmchwuxCPRtiP0lQaPtzwv/XNSivsw2wY6U3lPYvcvJMMBRhC7ojBM0XMpccvD2MIr+LNRTJnNCJq9nITjQWRKTeWnQK5FlW9vghon1zEvCXKkzameuJ86HuQw+LjhL1qURdjUGmTkhrwN+mcw2xtECx8LNe5WRxtoZjsgUXSWzoqNXjttWZu9OMPpl/1xuEebyGIby9TI8A+Wec3an4XjPYNdYYfumJXsS3cyn7vGeRLUPbNIfD7yy7IG2YgVlNvqP9xQ2nRhKsBMAn8rbG+o4KM1+0G1xdLxn8TC5LctTUPzhlrWzYSW+ntbbjeLfQe/rHsdj8eWrhDvdWk3m2ygpfMcdpd4je6hHh3O3XathHqFv3Xa9WfjgsnqTzKhID3yfRBGaSKqFB71/xSL7BTEt0MPC14hpZ0n0+HpF56vIb/bmRFp8R+PC89UNtWvx9Qao3S6+AddWenFkDqtrQY6ojyacyTOv+BkMJWjywZzXo8rzHarXSmMv9xTWmR1yLdbTQdH51mu61/70AI9Rs1d85azcUcp+YV8L8kPhLTi7FvLfk6LzVV1po3zPzrzCm8iqGt61HzREmBP8LIeFn7GfRSetNNs0q4rPOJ0vCl+v3tVNomghnnrCPi5BxF5t52tUkIcyNzvGIV6Ursy/aTSOPMTF57sfuWgajVwIvsKN5mmDPRou0OYSS9GRW02NDEeja3QhvhSdsl3felj8wHJ/35bLXr2kxVf+NQ3FFR2zcim0ZdSe22AeFj4Qp10Wrw/5PqTxKzr/ueYlGH2ktgqwwDttPFN0ztr9F7U4y1nSfowG/v9LKC++q6IOrTYap9vBHu4+cqFRd3Qv5euilteGpxyH0RPjq7R71a9bxNPzwld3KaPrDIu6dzIe3BU+raIWxpj1X7zxSeEJq+2/zAbxvHs08go/WbRe2+9FmP2ChRbk+7PCFyiqAxXNVtCNSFyKi9OKx5K9G7AWZBafzFnhS5mb+4yNxkVHk2nR8SpGW/aLPVp8vZtB4UOiSqcjs7W2I9lmaszmxc9wt22q4sfRGF3QoAROttKTKPswKB3OMkWF7mi4KDrlerNjUS1fcJY2QJuXp4BcGS5rVkmnXT6Enh6s1wHFoV94Za342Gavtu56qpRGtq1ejrjC4XxJgsIPSVTqyc2WzFxN0tnsRWes1NeZtfGuULPRLDzhusVj8HpYeF9QCWZkn2Gvx7fwwftuzSZf+UlDEiMv5kQOeio67Xptv07U7CWU6+8e8m7Oig5Z7bxjNFVyXfh7VIor0jV6y+d6Mi38jL6DklujZRmC8APa1WaU5HaE1eYO1xOBe7VKQrGaEmQA1UCd4SNwgkbeTdEZd21eJb6eFv4IVPWF0fjQn2ffR0UH3FAawRi1Mf4ihW9O2doX4LrRSyeCb+ErxpXrw9knw+sAvhncopgh8UfRMasFzEYNtxu6WMYvRH5Fg8KfeXa9khsWLjjBcvTXpPCliOpMNqPKYzwofDFtbz913TAqyeNh4fm2bd7gGZ/X68W/zqrdXVwLMZnTMoQqFCOuZ9QLGRMimzmsA1z86paWzXjFmETLyn47OmSxelQvQQ9b7ZlAWphpSNHD4O+iQ27rjpvRgsxmNCAlylkrCT+jBcxjr/DunnKhxGyR1vi+8MpCyYaYjdaP/y68/Kpd240G4W4Hw/JUgfcUx9qoCXdbDSk5Ll9hIuOwDNUWysUzs/qCxBELS9CQUrkOZdRCFpBfGH/elg+tSPHHRylnoFkb7pb8TKJSdPGzrKAl5oacW3KBZ/JC1PnPmITz4mtsu01AN9zbJRBvCJy7JeCsXNrpGE2wfvdjEhSdsJI6MesTfr/16mUYl6Z2wDaan/q+TteBBivhfD/R4h+Cyn1Vs27LjnbaLHHNeOENaqVRlNl7aZPBCNWLTliZSmc2rC8JNwpPeD/QYbZIYyI8b3Tty9UVm7JSy2zWmJucFT59ojTDMJvQngyRx57iF8wLH9xXSrrMTgkVnB/onLCiQ1ZLa43mAiejwk+A2Pkgu4slNaNW8mRc/MvBjX3Chg1jzmLms60fEpShCFQxL8yOqJv8fVF0vmr3cKNBjDsck1VS+HmhVodZ3pE1wSXo86kIstnpt3L0H0HeC439ZXn69Km6w6xcTzzxb9ERW22N4RH+gwpRLjpk5cKU2eqBLeS05wtnZctMmQ3KeSRGU7Yuw4zyet3meeh5hfcElXiR2aF0nneDpoSvaFgGH1Dtvmw0xOxNC9+xT6lrNtsK2Ct+vyI1hG9WfktyT0oZ5Gy2NtF7KH4eymYQY0oC4ssufeIDlyKrumu5ZSVRImnLAc6kBHd66k1FORutw5iKpRdelq1eUJtOUAlavih5P7ORuE1RHJYrLzblTt+iiTHlif9cdMIH2tjsuZdwTgpf2lnv7NfFmb3GOn0oOt9206II35/d9euFr7y3e1HnfnyJPMJp8RMjljlX6b2j8n3ASVD4085qWOihdONIzHoeD5NbmTeVn5hXiZBjw/YKr46tCvPjoGrwclS+117hx/X19gH3jQkwm5NVhHA4R+slC0l0OsSzgKSD3FdFh66UtDSzlyin9P5o1AQ/8XWSEsznKZAgQOn7Ff0hNLUnNB/tIVzg4lcbNTq6lsnR8F8xFq/LsAXUCujsyv9oz+B6Ug4tpBg4X4iXHO0RbNvmDnxZm45K+kB6oB5IGWyj/T4SjeylZUfjn77VyVMJDudaB+zBUAolBPhgvrsoh4+mzBz6QjX80R6BbLBQDvtUewJGTs9gTdg6IKeDcM7ZgoQsidCE8KgEVYX7BSzZL/tOUnJfRz7GPnpkK1x80vt2T72W2fDRRx2WA7Vq3tTbmQNwuqwnQ9lrufig9+2YeitzlEcX9F0ShjRclIF2bz9x3c9cRqTL2qOxnIBWDiWiXAHuZ44TaNOOhVFTEtFu7Bvj2ceL5wa7FLJtDzeXbTF4dCrMn9K1A85e93m3oaXBeTAdo827VLCNwJ7ixa7rSzm4a7eL0ud+xhme+ziKS4JcbTOeObOtj1z2JhGfGe16lZQSvA0dc0kXeEbjnY7ZqZxS8rch+NeDUTlh2xD26wlKbx4vWfhaTurZm2fnQN0bXpeEtnqdJXszUX3c+2UY5eDeV6azWVDkt8PzksAGoMhvSfwUsJeyAFcG02QOHeoD342n2TVsLAt5ZcpV5usE+uRLAtq+Ttm8A7oO0VlCAxm8LTp0pcHgW2sEC9QfabxEHg2oz8KtL1p0+kpHlex9SvXhV9EW08DXuDS468qFmezzx3LgHTMux2SVg7hSfJX9rr8+8Omoyg8Zg/3AKuVtEPcj/kECEi7isqTiAPidj5QL5qWJY6kJicw1nV8nHhE/4TR+PR3KXhcUXQjyLzgo/LiAltK+JXO+2duC02Iuv0Vv71Rw5KqUZ9YreSAvi3w3lJaSmVVKHrAvcUyeCVkXX4MrI4GzX1PPBXeC+bzwpBWLMHNsNg/S19+98pyUSm+dzLer8gB+w4rfo1bp75m9nXUeoG9J/ML4c2mMkpaiuDOHY/OAPrn+uzTqRPUurUj5Nv1QGuZKNZBZZ4f/SEs9U1/nPqRPlMzRZDsFIs0sF988VGacfMUaTynq8JdTTkKxILnOqJzcs98M1+c+EjrGjxl/LQlyJb/5FU9IF/kFDUhUCtg5RLHygF0S0VZof8VW1KV9xaLCd9ZWr4N/xUTU5Xw9mT6URKpzMMh1aY+pz9kLmZVDaUMA/v2qJNIN4ITcvMOm1q0c+Uxl2FL2+tkcoMtGlJz9LIvZrcSxvpJc00bOnuIXzAk6w5Fw8cvBXenHlD11nwN32XQC8zkqg3EIQZ9vqwvLIeBKCKWXuQJLH/h9SOOy6PG2km2zED7Z1BfKeGE57HEAQcLHx8eSyHdnvx+W0Uj4Rm9vMxFp3Oo8XNDi90fVno6zPfF0mAcsKXxpSr2nNIysZVcl2qRHNHomcVx4oW7rTpDUR30xRLs3KThsJWTVym4E6sOmM+FaDpdYfM4ASSlHXjKLXqO4+E3G9Z2eHPCL43KIZ+KzFt7HVFSLDdx3JEgT9ViIOo7xDEeF1zGKZZj9qo8+9an4IRpwjotf9mZfozySGRoGSVSCeLhdwzC9Vk82fSUvZHvDXfO383gpPKlS3Lrv6Hb08LYUdR9AOZoc6IdUcsA9DHAUoRZqlwS6cg88e6vxXKArHT23DSbr9eL3ae5D0DFv/Msh8rpztfNAvu+ZXuAZp35J+B80PrQi85ckJClz9hSXw5xRskTZ+03mgf1afOIgoJvvkRfj4l/RUrMX2bNzeXD3Rrcl0S9t5bKnFd43+JVw1EB3ZMViUhLyqmb/Qnw9N/TNkjAH4aSOL/9GvVqthsZJENNoz4wv+gPQbgyfywOQ3E92ZuSmdrQc+JVZWXasmhR/kOqdUil81ZWyJ/tbg3JEpOYpOnb1nLWj9Cdnf5dEzFWLMnuWKQ/cnInXVys8C8qiXkBEhMt8mloiTle/ztOScFc0jJWD9FcoDE0uH9H4clh47B0A5+gD5XGCA3RTInkHEYPf1KxXCVYL0MsBHEY87JHx5wVnybqifnzqL9smxKcDmVINcdFhK50V39owfB72rm2zDuxLId7hHE0JX9EQF741lzLCrL77sVnod3hOGZqyl+LX4jW7ipRnbr+QB3APp7nT4l/TUMeBtDIHdXPFLS8OFP7UVHRK9qKMPJA/0pMLKocKF5229rC4fGhv36PgsBXtnf36aJ6w0Rmn8xJc/tpvLZK9L3GuzG/YpoUlGqzXAcVh8VNEfd2O57nyn3IcRmvGC38LTG3TZQf7zeAWyZpezoKg+Mb5gb+fOa71Jegc+8+neO2fDiZD5K0wj9H9xEP1Wq120pS1MA8D1Ljfhx8oPDhdLON3Cw/Ik/w2WmOfhoub9LtRva0+IvFR5uzl4+f19lQOMHX2MTUPwyJySR9Skj8Qy8yDT3uLpg0YzQfGrwk03XZKpg6YTP3QE8ufzEadDeVXVO/X2rKgieIAydph8Wvxtk/Yb2dLuwxsuNNUOsgadSdZZdVIubBq1VPxEngqZJ9C1ujX3BQvC1ux0a+7yeqDiNvxWTmqtqywalesPsmq2W+0K1afZdWqWH2SVbdTa4Ln0jFvHwguLfBcPrgmYIBLBzyXj/L3BsD0wYNp1g8j2McHU4evYRofpFOODabXbNU2ofxNWP/ku3DgQnlgbScRilX/LtQPiZ2FU2vgDVC73Wuf/I0Gc7yO6Q/yNrbRBWQWHN6BdyejunXwW9GCg7tl0wDPxp7cNMRWq+j8jg58U9GCCb1lA99c7B32VjDDxgHDqN4/vCZoAk5fHFVwqVjSNAJKBy6UesvOPurX6jW4VBotS7LSl78OlUqnfVjsfWwqAsD8rStfs9aEJDRK2ap5OEPMhffJ0UT8gMS/Sp1QQ+1eCEmMLOjh34JqA+Zkwaf6LacOZIGyYAoOcYyD1yhGLXG8f3yJExIhK1vujVCjJ8zm/S7OIfm45SckaFb23xu0VgXtS9AqQL8H1GnXmifn8BC1lPmrFrWVQNRyAJGFJOJ7RB0HENU/aIdnklEfPKFGw3yY6B2hutBFgOH0zScX3+AoXm+jhp4YR1cTQLjUe+Dmc9S/o9VspLRGJAjg8vpgJJktXq0afF5Wgisf4qrXHMAFSLzqlfLKQqtZSdeHvK7nJIx3Y7XTutCPZuGW3NG7nnio1RYKyiNhJD8wVDYW4lHb8iw08H15LXh7RxUuIgvic0t+JpHMcNfQrjHg225zoD7LGrGG8B2mu0E65z9jEs5BVwdY49RotKYTdHlesfoEq2ZjMhGbsaL1SVrTcUXrs7Ravcn/VrQ+T6vSWp9j1azVO/DCnnDoVPmpf6PTaVV0fkunXcnO7+m0BZ1Jhef3ePqdKVwuVqIBOy738OXGGp+OvHoEnY61XdWRV0ig07FQS7Gh05XNtuq1Ey9gu6olOXM4imgEl5aNq7bvcfUcw9W1iqvlFi0bF9zf0eq7RatRM1++8/3WQ/V2s9beHyY6TKKYrQjf5Q4mAY6fGF/BhWfhTNyyExp/eIO877fn032IFbR/hTYeIG90BR1Zb39olYXC+w2xVru1kbGTQ2ic/aCRQCMbMcAjeCh05svMNgw7H89MhomtoTTabdTNFwRNlq+RbBz8q2lF6x55MeNY7akOScAsOACHoD5Ua4XqNmsQW5E6OxvE1gKMzcImvR96qC2LGcF7AhasDAmn02j17ie7pJ/sTMj9XTN4qKgsaK0NqjSO6hQqC5pKoho2GmjcRJvJznDpWBIkQadW4fkXPC0X6FjbWi0nhMcank6F51/wtNxQPdbwSOlpgMdjwZJ+HJyftOsNuEwsnFaSSadicsik24LLxIJqkUy6zVbVNe4QSreCsg/l4Rw1+oC3jxWVIqC0KyiHUDoVlEMo3XalaT+iUqnaQyq9SlYUKmT2Qbt65NW7NbicbGia33BqQuYESJ46FafT5fr0aoKEA9m+/NX67n2nBECENHtJXE2+iifl4b1GMVkhPx37ex76AYsSDrgcIWsyLyc8XUfw1FtWxCfqtN3gkzW893U81+ETDekZDufoYnQHXe00zMnNhLMbcVQJfXzTadT8bUR4I05g+RhUy+/5dCo+/8qn14bKp9m1zmd0U+/U0GUPDhRd7yIXKM1GjVRUDqh0KiofUllXVA6o9IDLSlYvMy8qsGXFEpV2ReWAShv4wWwBinfTaNYiUFR61nWtgNKGDcWcpOxaCg43lcHoIiA/T+o18e8IDh0bbhGdrU6vz8aoXq/Vag8DdD/xAAHRnF4uFqZBpF2rnTQa8Klk3UV6VLrtFrph/mYvRSwgaIxDvIBclpdV9+oBuhfKBcdogkPyi9FfNK74pHyaDuiZrPPJtYB0HACSNfKtBWT+U3jOcFkYVbdCKuTBDBhH1pyaLo62TKZdPcAFYlR5CCDddiUeWxo/m8LjQeMCFd9p4mg3KxzvcVTS8R5HR0pHEy4OoyftFgdg6TCNA/hmMY2jD/iUNcyiC3lytXEW7UqJ/sLRE1rj7zZcHEY92Z/NfoXj+ZSJrwE5vSUxx9tC2r+bJ40zePd5NQPw39OFagIaTprysvxgOhzsqo6hYVKs1nrG1qK5YepWmP4T07Rfg01J9YGyTk7OD1OtgvMhnG2RpNTZcNFktXPyIbPG3EfT1kkdvOhY5rM77NGYzZMAUK0tiDP/jVPxepzkwufvljzroaOxssX+7vxCU22ufUKbbXUuWwKuOY0IGrdcOOWz5kxyp9R2gVK9ZQNTddb/G5nqlP8PQvDP96zp67zItMCTyVp9qEsmCbcue8eZ+8OGNbJCaHdXfzdt/fznmsuRKRtlhBqtNarX0OXsHBBCy3ppn+C2Spr+Q+aolZL6DcsK4AHAKqL973hSN+Wth2clR4egRjjGQyLN8O39/5m8/78dmdXsAGKlWbaSA6udWqrXpJLaMuo21hWkDyD97+jufUeJSxyTF/wKr6uEfWK7SHfjBHDhi2kLfY8LoMtkAOxzJzIjFveR4HIDF4zpMIkEs5nYhRrycpmwhgac49eK0DtC/+fCe6PUrTcKVGiWN5wmZDiG00QCzgXlBE3roC/LmFfFKZW/G3VYVBogqLSAUYEhKy3Q94ks6ZW/W52SU1nT+Sle0BiL4yc6HWz/Jv5jcSBRztWg15pRGck4/0HCONq+tiPjp0EO8YKwEWM5PfFGQTljccxW735hsP0vY7ZW+aloejUlkHOIZr35+wEZ8fpuXVEObNC3QegvGf+fiswBmSFnUXRyRvCqonNIZ0QjHyqX5uGxZIyLbKxATjYB5QmezwMClVLLovRcpt0nINOxubeuSCA/PVQ0HziVxtBcr9YkCAjYA8smmwlnsOD0FR+q2bAHZ5rwGQ3BqhtjR9Z6jTmOkwiRgKzkqk/HOFwyNc9pDYz0d/fI1LLtqN36/mjUzrcrzAOSx/xnEktXYtueTawU3bJ//gEDrrnPLePpfixsyXrNeIzOpEdHYiCo6qqIQUJ1QxZAMDXaIHfiltMdDaGAUnVWI5syPzIo75lyODvPvnaXC+T0KVmQ6HT49nep2kfEx2ltyzfP5+QlDRyxgM6RtxR2FRTToX6gvjIx/LXkvNAJh4UulshbEzIHA0kVtGxK/hiQJoQ/MSG9BJo8AUSViM8Lxo0BuOHe9BNYoQLIjKSHh3AGIcUuAe4+YTCsVtX2+zdCAK0Ci3LEVmnhPeMROkE0YqdnAXshaeLtAodQAWUUo1+LFMbntfc9B0y/3lOiesB+kqzQJFmtK2T/jQx9e5NZOKFy4MRGVPwexwswGU3gvM7/L/FjONlx4LQmNIpZWMH6FCwZvqpQfQ4Vk0ktcT7CSd+AJxZj/lrB+hSs1JeuWH2KlcyisorVjhVP41QRWnAazoVCPx1uXgEK6IMSzH/js12dgHO5XV9+hIT1zuCqc1CgrjCoaAxkVNerNfbjCtUnUP2JwZ55oDhtjM8K1X+gSt9qiHZvi8bYF69BqY2BiG1MgyDN4CSBWBH9p7IaMsGqzsWvUauOyM9Qq/T+Zzk90BnHcoUVqh2qOafiHU5H8g+gUDJe/kiXkj0x+B6EvBmT0Hnat+sMcJ2QBTDb+KZwiH+QV8YFngCsgjbM51Xakt/FquUxtv12uMSr2Sa7LDPwT/L1aqNJXlcEx+k432QFF0i2IJ0ekE0cXAhIskIbdSyEZpqsZoEUpEpBbzF5a45fKxw7HGmQ+5e8yGqxX9+N2Q8pOzvNU3ZkT4TMJbOL9M9d5glN8QzO1c56raWjgjZL+zoaeS2PcbkOHKDNm4EBo6WbjwAGfRsTsV5AufGmwqhtH9F2jz1g4dVDwWRZlDYnGKj7eCoRQ4JD41jsnuj0TJg48/TsAsKjpXU8XWzXpQGEE/wcLzlLFksgSJo9rT2jjWQY4NVa+OMXAQ4XRHgOyTqAc6uuradR9OkwASeM0hZCMIgoW6hnHEglH+9wiF2zIrI7JongiAgsKOjbiMTCdpELOxG2DHsqir2SO6jzn+tALK3i9B+cZKu7kzsS0SjGIdwwKSxMaRij2om/RSesn/m7xh5AyDS0HIjcuIyS1epV0PkBJm7Ra9sFkwhBCaCwsOxWXbEIjMetsMjWi0sfxXW4uS4EBIdCw7RgXMul+UupQ2QweBNG//YrLAHl/LEdl/iY03fhem7+eh0ioXB8SCUWtpG9wal4bHhw+kR9giay92jFJGVyR+aJD8Zi6do15e6SdZxwAmnP2A5UeCR4OhGKRBavhQt0RwKCI7JJqgBBdJi3bBlmRAMSwtlEdVWnGJcZ8VWc0BvHCAgUu66QF3NMQzASYjlAvqMB63KbZSgPYm1ASNj2lR8oeZGHzWWAowgIE800db5M0LcbOaEEUPmHrejkUpZykp8bv5DL3Fs4J2EERtP2dJSKrFOVHTzflqeNZ8QS6TtP6JqgtAr27b2B8Orr7LL8eZ0HxI859VNYYCBpGnj5Y7qgP2VjRXmsC7WEpsmMRDDlS9VT2Y62/MldYcrXNATHqf+f8xHNYoK0/YDp9P19Jm1qGmy2IFTjAII0vSd2QcNQ6K+K2ReZ/bFpYAkVnfXj8YBdwDbRNPEDsDf8oAlcGrSvYH0OlremvDDdPg3g2rNcoWKzLWTpDkQ4nKMLLquonDDwMw6oy5/aHZkJgwwMH9Wwb9qlk/YGT2VKbj1FpFAdCLTOvkxla5VgGlqjgpYdWrOC9iG0TSZvImPOINV9H9YRubG7YKJST8Z+pulb+bOaLml4ckGDFTr/gdeMA7pApDfkNn9U9ycf6CwgrIBFCu+RJ39r7lIQ2jSzFf0pUV2HJzc0JGh7T3osX4VCqK/lMaZL0ebixVh8blhc9DxpPS5/hQQDasrQtYhC/NcyfjfBMZQ70o2ODRzrZLWOTof4B41fQU3kaTT3NWwmW0cu5MssyNuwnRQIGB9W2S6drjUiYBzUxh6Rrj0iULxPazIi23iA0h9aZQI6JC5xhLZj4WCg6DYsyYQk8W7yGwwaB2WAxg6WS4I5pC3S7u5HE+qmQFwxTv9hYbxVnkBw1NvKFPi6MSBFuk+pw2FCuLzGH4gPDASFGs3tm0KRzmqCtD1Uy6JjngQYu1N1TsztEC+ZrYSbR9MaYDjCUa/tA+lmur+lB0TIBWAS9Z6xjSK7ucKZRNLfb/mWLQ+mgwHedOF+f19bGDtEHrafFRKMutLspd4ytUHQCZrT8L3vDgWJXkx4i6Q2ur7VAvM2M7nC8h7Lue+nEuOjR8YrNvts0ts1bIUXIYFjtAOBI/39ish7Ilevc46ToBKUfSw39P8ldI7+JFCuDwPhckd8uubMT0vtKzR7aDYZ/80g+grNezRpvKBCskMiB1sLzbIJoHzbqBqo9fFfxPOVidbv8WzQvPMLKj4f8HlzDyo6H9CRxl4F5gMwlcb5LZrNmn6k3crWAfbJihSm0XPOpDhbyCyyhLWpVaowfYBpz2DeGocVqA9ApTZiReY0Imuclu1Hp5d8UwPo7V76Q46dJHEcvB9FCYOYXnX/2wqzx5Hf8dqMl36Hq0KzQ7MvQvQJbOMPu3SEy/HqB4D65wGjowSXK0r/RinaXHWYcGkC0Fj+rAKWEZhUV48EjAUOjNuE8BUOxYLRON2RFaYPMckuoAmnSJiYyUyYTBWmDzGJfVYh+ggRC+icPtG0D1jAIgImdAKNjpyNULF5xyadDLvbU6UHI16TjusK+0sakuj0/GfMk3SqMLC4SF2nYYS3WaZw/8fbheZJClaYBByoCQkC4Zn8I18ENHBCjScBACVjt+A2HlRMd0yIFRijCB6m7Xui7Tuib7/uE1XQPg1tVxtcIdsi+yE2Hwmi0zMMpdZImRyUrd3Pw2Y5OhjQt2vvOxT5sAyDcxLI+NCIJ1BqgJXb7xnTRvkiASUqeo00tMEk4fN2Mk569+IsXQkUNprJRl04AorwKWKCpjh8hoJEkZeuUdUylIZLOllKbKWUivhzKCxlwqEWdnZNi8xvAaFvZ4yBiUSrnLLNFTg2p0oLfRLVDVmA7SBdr9lRTuhbGnpNBwVsKvrSv17iCFC3bcVEzDZ6SBfVdjBTdcAdgJHmIeMI2mAvrbaXulAuGPfJ/GTE8VMsyLC0yGoKqGmQcme5n+nOsjadhIfYh3KTXclhWEHRgMnC8LmdttYSnz6AIhrN/ZZBZoMSksYVC+A09OzaDNFc4eBpMxZx29pz84ZA0BzYcd1MYxt04VyHckY86PNmv12IWRfzT+w/C5tt7ojoZGquo8vmr5D5zycsiSGFPtt1i5oGUjtppZlKr2cYhNwtdwQDal6n5gkydZfRJSJrktBZEjwjTxDBCyh2it7sa10qaV474fQfoWFBq9aGWXN2wtkaDRbb4mMYSKwqFFiapGXTnH27eQUpjmQ1vr2pbxxxCubwtcxjc8Igb70kHMpBYzc+sAvlgz5kzLo2gNSHVX0qOcDOFmbrv50Pj7dsxRmOwFxDVDtEWgJTFW/8O5o7xp6ggulb5pJOqYQmO/sxk7pZH3DHSHxyOFeaDo5mC0fSFok0WyCfTj0LaEZUfkDYisYuFik1jhxVDQukLnAQEWBgFCu4Xm9Y4BKwTYsgyFvLvJ+kgAGvks0CApQsrLf2lXCmiVa5gECPNF6iCfafAbWmtUplM3wCWji72dlnYjTrLltBoG9nBFJTPyXfYR5Hau9WPFIe8k9pzz09CRdAwBlRvCJitWBKatVkqlGV8otPau9uzDh5KHsJf8I+QdfhnMpeh3DuFCvGXc8mr/NwU6N9xtPqFjAy1bHpQf2G0aYnVOpGyeHs4kyHQsvqtcff0NoiOtnVkW3Kp8AQa8AjBulKieqANow6oL8BdAdpywEUIO+ZcjgqHKQITZeyQV0grIIoCUBZBTAEiq3AZPj6+2Xz2UYw5wXkIgmCk2kyIwfn2ZBROG0xGjajYjtWEwrmeAchOx5ZUQdkp25adiLx2aJTHFKhiKPTMznwvP7fMJ5oEAxZIING4n/UrKX/iNejmLNnsvtJyNLZpl8EdQD8QK6UeaWHR1q6uA9ppT8ZbFaty6vhCC81n/zBQOijAxsR4o6A9RQr4LCy1gwvVwRsF2z6fezp+LzYAn0PhfcmtKyj1A5rp45PLfE/UXIIgtZbO4XdCXmYHzg6rgvhxqArHPvCf3l1hJsiZR8Uhxwd218kDD9T4wuRV//wBt/ReY0Ziz5RJQ4Dl2KLWRCvW4aE9o/cBGbDtvDIZ+apg6B1UMRlwdb3AhY7Y1Ps9wLpWbApvBA/O6q9rGzGGM8+0ySj4rXhNSXz+Ss6+9TAdhDMOv/ZnudozJ4Ym8vun46Q0pauC7Her2Ia4jB6uwsQEFfMiW7LJjP29EQc1V2dzEejDqkRp6GsP0SPOHYpEGZTuhRmDUeYdTsWmV3gKEbpG7gBS9mUH1RhHROW+IKm3J0YmELrg2thR6T1V0ifnNH1+0GculFdf0eiGCcch7Ezel5tjmdUZ73j5YqOV8pE6rXMUcIvAlsSHMRLH3NyOgjEZwtxOpV+TObUp6Ez21NxiTIHDa/eMGgyDIXsLUlEsSvklPPSHrkoolEqezeyGXco7TTvVfztE33nQJDs6ZppeZE845iGjkADI35DzOdUrHnhTBpOiW1kNnRzJEeQF+OnJzTgxBm91wWyW4c4XiKxOle47YvdR11ITIGTv+BK2qmrWwCUF7URwU+uMOuDYcZXOHbqcFDQZa7Pyw0dFSuLnQl+q/EQa+bI+aujrpdVZOjRoWK9pmYWLy9uF3hFg1c04dgX63BG7HRTe7nhozyK0YA6GiC3B+6ShEQswNGjwd5+3bwPOp8nm/vvjvKzJnfifbg7gfR6TTknMgeG8+XWcISbKm6Zi7tzw8aiNY1x4IzEwdmoO3KuyFxPN+mVF7nr1SoJ6T/p8eDM+QrF278On4iwhFkSoRGNCHa1ct4mwbUQPfExXQEHJXNzLT5gGMkcmAyqu0IPjtil+evAteR1tw4E4F90HhJXQpxgqN0koTt3hRRo1pzYMV6tmPiZK8l9MEou1W1ppxvxQddyfgN3BaFyk8haoHiH8IbOOHbn2i00CbwjPuNzZzQfHHxhvGk1GDhzCVC7aj83eHfXjiADE3+6JQl3KXUNRtZuk5hTlwLsutcC8wL3PfRdEjgwJ8P3JEYTpwIn7Q4QkZssMV9h3xWRazeBiNxk+RqlxpxsoInXrvBTXQlrcndHFlSs3Kk8LJRgpydeQDc4XCSfmpUNAp7a+K5nLRvrMZ+KfesR/oP67tTXQUnyeAlfuNNy66BpjTVu09HIEWZg/Igpc6fbz8EI58z3XPOidh+IYzViSehMXZ2yRa3ZJI9LQgJ/iSlHA18cDRGdBcSZ6pPdhX2gGBuOYrSm/T7G2HQEo9p6w6w0hjhOZGE75s4cINrBlNt0zV+H9Weypu7kxHq6lwB0cY3xWmzHG3cuhfVsC9gYc2e8LeusCPcTZ7ysXdt/e5uRORNF0j4YdVndknWcOFPipW2O6eKaBEnMHIHV0Y2O68Ly5B+u7ER1pKLxneiF7OUpcKdFr/W96CWhM+64dlI5D1iuON0gYLniWls3TiWsVgXrc7CmURLiFXUFl5IfNo7rnuMwccVN7LQsq60H4hAs3Tt+X4a1JmwdkNMzPHt1xnxQ3MR6rZEV1yRdtSYuVwyIrm7yQ5fWcInDRdp5MXaqpkU316vNjYViwYnvEDM1kGpc1i7ICjszp0S7B7surbE7rNSWFW/fm6Tljovd1I1H5AHLlROyqRt31oaVrFauJDTUJuzGYU3InIgVU+zMoagbTNUl5i3Zi0PjXNR6WPPKawvMFf2lBnKM+0OeWG0QOFMgoVa+Zr81rAvsPqQR+ekILjUCbdzwesRiKcJ/vGNs5YwWU9zuL/S0zhWbK7qsp1vMr08tkOO8HMHVtm2NPbKVQ25RS7vRfD68XNmNLWviFeEnEr+enlG2xP9g7krBfr2m+JKZJ2h46cK/TmyIE4cChtrZbW1cS7JKL6s+Erx2FlvmU1IX2wUOgo1t4T+7kmXTbracBzSWxMhbksCdcnLrW/SC4wV1JlDd1a2+18V1hcN5QNAjjZdOdXzU7SKnzY0uluiBBTFeuHOzrWX7INij5oxZqxuRzZWaM8V1ugVQutT+ImSNRs5c/dC+h6XL69aV4nzrJsYtC0+uWUj/SW1aPKdOFaoo4y4zx2f16aHzMHZmXwKQNuStmENRRuvu5q+cLxpyFkUOodMtstZF55o2eyvn/PJsGl1iXkDX6MqlqGNXO6ytzSxmnKA7YdbG6H7tjPvUte0IKNxccaAsajWfktAnp2JFjGNBzxmrQxvZZuUazMZ4ERJX2oB2dS+Q5MCL+sLY8NnalRia9qUbfWa3iR8Q7E6xmX5QIzdkrip/C1L2SMP5SrBwhJg6qN0ksTXjcXQ6WK2XNCbYobSTbumBl65cAxn3l+5081RFLLse08R1hiMyw85syba2EtPlRUPmJ0GJGj9pE2PCI3/BwbMrwHSvd+UALEY3OAl9Rzv9tTNXsusiG+LV2qGrEor12jWuxba8HDVd21Z4PVF3ijJsWxWS14K71LFZ8SezR6+1iYXMnfoVNXeZvVw2F1yu6C/1FnTLvAJLuy7f0CdX4ojaLfu1iQV0NXMoYamdHdflJRO8aCh0fsxfkfdMZU2Go/rsC8nLY9BzRb2psmfe/H/1A4e2qnJ4Ghe2EeUxOqPOdOlU5csCsB8OiZd2NkmXFnsJl4KEc4eAImbGjVoVnKP637xCO/9JuE+jSp99ktcF5eSFMVec84POItnrpLSBRUuXVNnBkLjsxcU5EXNGhym1eHXj2n9HbELdSfbadtIlMzQMCA4dss/2Ja1jfGtessCVCT/q+Afjtqxk5Y5oabcV0ccVzlmAHcGlPTpaF9cVFvr+MqBzd0RMYdbpGGdGn505H7Wn1+QAyyHRUoKwxg/GK8ZlMZT/jKYcU1dKoqxH/q99grbGa4Xs88i8Zxw7hGzftPjKXSVdZsK0YBx5L3S1coibbRvjTxLLeKKjuIybF3/hV+xMpaJtNXZDnwj6UxyYzlxPOgiMGWc2ZjHjM1ni6UowUREz88Urv5A13ETWNK7GJtQPqe9ayzLbVRhbalMs59I7uj07xp3MPWqO7lDzFYx3OFwQvhuu5I602S4tVrg5I2+6s+K0uTH/GTlW1Kg9aSkfaHJIgkvjvOzv0XSsxCzALgW2bZdN3bEXaeO6gks5P+vGcSWhQ0lftWON+S354Agp1Zw1XkzsYRqgM4d2onaXAm1gIY0xf0UjKl6JcODaxFDbroAnPppwoB4oeUkhOcJNe0CaPrdkhpFbxdmKrBnPcXqERPjFTVpt4wEhjwRP6DJJCzSqpHAmck5HHo0nN2UymMxkpwx3dFnHtnfuPVP0Z7JaO8JrV9Bij1dA5g7Jl3pPzngSRfAia6n5HVNmfdvKbIWDjQvlVhsb+7cmvDANAvG5s8Jm3tAQyFZs5s6kIdUFML89BTGh0hhx5yhQu0GYl7KEO3QPQG1hZh7XtkjPnbTmvq2xa8togVjDFWJKVVDmYdw5EHNnQ+p3+tekNSVhSJ3pWWnbqKhCPRlgybi1I6x2sX1rLvijUylx7flB2rTEB4vSZhgVsk8iW+KApKkkh6DZbuos+9JHbln41uWMsTm6xPGScIeoWSuMiom/PB04VPOvuyWnYsEanBz1gvqZvSAdTkO8Ihy7KlPZ20TlwMpRucoej9BiRYIATZabFbpAq6Vr1mvRYqsVdrXRtVnFLlCtE4cSabqjM7RYceZMYtumTJ3/X+K7UjGnRpkzVxpqgZK2ujuDBNX4stHNlzZIdGjeg26bLB1WY2dDpV2j1vqEvbhz8tUtnnxy9DVzBZRSoZq5RkkLlOe5gslmOGFKArKW3owznnJrP071hXRhPrxc8ZabupWo+eBqOoJLmdH81l7ZNK+WK7zqILRX2xFcVnfjvXfmCKaWbjm4DqYHOicMbYKijvBSbIiW0TPxEW+ac4+xL/50xS/s6jad+CoyjsM0T5heAz1tocclEWrMGe9HCdNkPx731q8PcED5DLuSZFWH3fWz+0T541sH2CH7X20flj1OcSyCrngE9dq+C9XOHmo9FkJXvIS+dlLtWARd8Rv0o2jHIuiKK6HdNetoBDuuENzfxV/x9Y+FsOsIQvVaYCt74UreCFezRCD0XfFDtFtU5g4w9JeMu2MP6tYtHomfK9ag9pyqI/FzxhTUrTY+Ej9nDEHtQqKc+Z1R/9V3KCADzQzc8nPnANFtqncsgM6cINp5/iMBdPQIaWfPoR0JoDNniAIQjA50JpawfwhnbyaXO8AkcvUAAXACC3iOHh4N+4eHgOfowdHM3JPpGPBcOTR6+xHorxSS5UxviB0KuyidmqwrPQnPFaWnRk3tb1xJz1WtB0L0XNF62o0jjwHvhvnOzBVU6l+slx/IFt9zMkdXdLF8wa+OYFSb1lnfwxeEc1fgKTLYsR4vkFfCYp64s4mVE8R63veC8eeAPjlz/1A5RKwXEF1id8IFHe3a5iPAc8Vy1q/aPQI8ZwxnaFVrEp4rhjM8yeMsCedIeVs3YKoWjPWc2xXmM7lwF+llb2KfOz0SUJ+t3eleogZgOtYDMG65bx1oRRt/ErJ2xgJUs23WhS+l54oJqN/8JGd6N2LrxkuWRA7VvEDbv+8YuiKHbWgG4ZitydxVEbR/CWmDzxXpA1exMWYx42nVi5sEO9YzIRMs1oGD4BV5yWxF+EKI4yMn7kRVldSIdaCyWRIWUonSXuluUuxb39iez5hD+JRqXvv4CI7RGQlcie33oF3MFADRRF6KcwQguAtd3pK66xtbjwym9JyxCqGVok5x6Ir5osYE29bDqlP8kzoCD5zVMmUvaOBOQFXhZ78iQbyfH7t0DVhpX2vd+dgBdPTosF/YJufMhc7IXxua2bzB54r0dXSnsh4HnzOVHdDusG7weS4XJYCQwZUzClB13CBYMCtn9J96gxXABk78Z3eErw9O+CQ+R6WvBUDzSXzOnL5K9137zm+Kz5XKSnC3WDf4nLm7r9ygtp5I3+BzpQlgF1zINMXnSgNA9eiwfvLeh0RAQncMOzp20H7C6IEsqexe4tSdOAWilfjfDxKcDjinP2Q7/ItA1rRFjvA7mHvyFQ9ErF8LHHtB5zhyJVOu3oL7it2SA7Hbc1d45XDS5sFL7PGlI8h2MmUb2aMjvPKoa86Bl+fMlgTCiyXVlsyIrNqSmXg9EnfsCqW1knG74gwvFnjhTL2dYoYZN1zP3KlxUkXrK16SJis+Ixx5S3cGuO/r+6+1idNjRnASvyIPB+6kUjvWoTH2jAbhXNoWAg91S+aUM9O4SpNNue7Ep8OuTC9XujN8bZSLJrJoSV29JvGlWgc9XAzHaLh053aTWh78pcmHesgSzknov6Lzn/4Sh+4YaIqsGbdnh0kkFuBKJFa10b6STdbCNWIvYRRjyl0lZlzARpyGz2nMnyXi0KSumGk7X8neqTnaJkumLHHm6GxYPjrPA/JDXmt1hFdHNc2M+wLnkfjUDhFTL1J/paIjH2BIngWuUFNOAfP78o3avTOOpmKamd+aCWeOsOopVxSMB7LPf1JnQthKAMO4RXYlzFc/cQVXu2f7iLxiMXEl1qOW+tiBha7DJ8ZXTl1wUZquGz8hr1crKl6ukGVA9kvK3LmNYTvl+x5awxFobdvVUXIIhzPx624Od/U0aUVxml+SIR9HK437X7njrUVtnEQkWblCK4eeFlq0bhmaYC4Di64Qs51V2uJy5qTs5jAGJxdgrpyS1k2LiSSDvj8J8198QmeLyixsTYfOyTzam+vBEpIlPpwjuLq2I2OytMeZZKUiW8ZtMM+p1K7tOzZTKryiGI2xv6TOtKDsWY8nbrFNEu4vceQKN+t7c5qEoTNxWOsJkfu1W2Uqii7Tk6726P8D";
Sidebar.prototype.gearImage=GRAPH_IMAGE_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.libAliases={aws2:"aws3",gcp:"gcp2"};Sidebar.prototype.defaultEntries="general;uml;er;bpmn;flowchart;basic;arrows2";Sidebar.prototype.signs="Animals Food Healthcare Nature People Safety Science Sports Tech Transportation Travel".split(" ");Sidebar.prototype.ibm="Analytics Applications Blockchain Data DevOps Infrastructure Management Miscellaneous Security Social Users VPC Boxes Connectors".split(" ");Sidebar.prototype.allied_telesis=
@@ -9788,26 +9793,26 @@ DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.shadowData=this
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;
DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(b,e):this.updateFile(b,e)};
-DrawioFile.prototype.updateFile=function(b,e,d,c){null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=k?this.mergeFile(k,b,e,c):this.reloadFile(b,e))}catch(g){null!=e&&e(g)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,d,c){var k=!0;try{this.stats.fileMerged++;var g=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),m=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=m&&0<m.length){this.shadowPages=m;this.backupPatch=this.isModified()?this.ui.diffPages(g,this.ui.pages):null;var f=[this.ui.diffPages(null!=c?c:g,this.shadowPages)];if(!this.ignorePatches(f)){var l=this.ui.patchPages(g,
-f[0]);c={};var n=this.ui.getHashValueForPages(l,c),g={},p=this.ui.getHashValueForPages(this.shadowPages,g);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",f,"checksum",p==n,n);if(null!=n&&n!=p){var q=this.compressReportData(this.getAnonymizedXmlForPages(m)),t=this.compressReportData(this.getAnonymizedXmlForPages(l)),u=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(d,f,"Shadow Details: "+JSON.stringify(c)+
-"\nChecksum: "+n+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(g)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+t,null,"mergeFile");return}this.patch(f,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=d&&d(z);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var x=this.getCurrentUser(),A=null!=x?x.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),A,z)}}catch(y){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),d=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var k=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,k,!0);d.appendChild(k)}return mxUtils.getPrettyXml(d)};
+DrawioFile.prototype.updateFile=function(b,e,d,c){null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=g?this.mergeFile(g,b,e,c):this.reloadFile(b,e))}catch(k){null!=e&&e(k)}}),e))};
+DrawioFile.prototype.mergeFile=function(b,e,d,c){var g=!0;try{this.stats.fileMerged++;var k=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),n=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=n&&0<n.length){this.shadowPages=n;this.backupPatch=this.isModified()?this.ui.diffPages(k,this.ui.pages):null;var f=[this.ui.diffPages(null!=c?c:k,this.shadowPages)];if(!this.ignorePatches(f)){var l=this.ui.patchPages(k,
+f[0]);c={};var m=this.ui.getHashValueForPages(l,c),k={},p=this.ui.getHashValueForPages(this.shadowPages,k);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",f,"checksum",p==m,m);if(null!=m&&m!=p){var q=this.compressReportData(this.getAnonymizedXmlForPages(n)),t=this.compressReportData(this.getAnonymizedXmlForPages(l)),u=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(d,f,"Shadow Details: "+JSON.stringify(c)+
+"\nChecksum: "+m+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(k)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+t,null,"mergeFile");return}this.patch(f,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=d&&d(z);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var y=this.getCurrentUser(),A=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),A,z)}}catch(x){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),d=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var g=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,g,!0);d.appendChild(g)}return mxUtils.getPrettyXml(d)};
DrawioFile.prototype.compressReportData=function(b,e,d){e=null!=e?e:1E4;null!=d&&null!=b&&b.length>d?b=b.substring(0,d)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,d,c,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);var g=mxUtils.bind(this,function(b){var f=this.compressReportData(JSON.stringify(e,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=d?d:"")+"\n\nPatches:\n"+f+(null!=b?"\n\nRemote:\n"+b:""),null,7E4)});null==c?g(null):this.getLatestVersion(mxUtils.bind(this,function(b){null!=b&&b.getCurrentEtag()==c?g(b):g(null)}),function(){})}else{var m=this.getCurrentUser(),f=null!=m?m.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+f+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
-try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+f+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(l){}}}catch(l){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,d,c){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),g=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),m=this.getCurrentUser(),f=null!=m?this.ui.hashValue(m.id):"unknown",l=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",n=this.getTitle(),p=n.lastIndexOf("."),m="xml";0<p&&(m=n.substring(p));var q=null!=d?d.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+m+")\nUser="+f+l+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
-"")+(null!=d?"\n\nError: "+d.message:"")+"\n\nStack:\n"+q+"\n\nShadow:\n"+k+"\n\nData:\n"+g,c)}catch(t){}};
-DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var d=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),d=this.ui.editor.graph.getSelectionCells(),e=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(e,c,d);null!=this.backupPatch&&this.patch([this.backupPatch]);var g=this.ui.getCurrentFile();null!=g&&(g.stats=this.stats);null!=b&&
+DrawioFile.prototype.checksumError=function(b,e,d,c,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);var k=mxUtils.bind(this,function(b){var f=this.compressReportData(JSON.stringify(e,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=d?d:"")+"\n\nPatches:\n"+f+(null!=b?"\n\nRemote:\n"+b:""),null,7E4)});null==c?k(null):this.getLatestVersion(mxUtils.bind(this,function(b){null!=b&&b.getCurrentEtag()==c?k(b):k(null)}),function(){})}else{var n=this.getCurrentUser(),f=null!=n?n.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+f+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+f+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(l){}}}catch(l){}};
+DrawioFile.prototype.sendErrorReport=function(b,e,d,c){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),k=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),n=this.getCurrentUser(),f=null!=n?this.ui.hashValue(n.id):"unknown",l=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",m=this.getTitle(),p=m.lastIndexOf("."),n="xml";0<p&&(n=m.substring(p));var q=null!=d?d.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+n+")\nUser="+f+l+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
+"")+(null!=d?"\n\nError: "+d.message:"")+"\n\nStack:\n"+q+"\n\nShadow:\n"+g+"\n\nData:\n"+k,c)}catch(t){}};
+DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var d=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),d=this.ui.editor.graph.getSelectionCells(),e=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(e,c,d);null!=this.backupPatch&&this.patch([this.backupPatch]);var k=this.ui.getCurrentFile();null!=k&&(k.stats=this.stats);null!=b&&
b()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}catch(c){null!=e&&e(c)}};DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(b){for(var e=!0,d=0;d<b.length&&e;d++)e=e&&0==Object.keys(b[d]).length;return e};
-DrawioFile.prototype.patch=function(b,e,d){var c=this.ui.editor.undoManager,k=c.history.slice(),g=c.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var f=this.changeListenerEnabled;this.changeListenerEnabled=d;var l=m.foldingEnabled,n=m.mathEnabled,p=m.cellRenderer.redraw;m.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());p.apply(this,arguments)};m.model.beginUpdate();try{for(var q=
-0;q<b.length;q++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[q],!0,e,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{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=p;this.changeListenerEnabled=f;d||(c.history=k,c.indexOfNextAdd=g,c.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)n!=
-m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(l!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}};
-DrawioFile.prototype.save=function(b,e,d,c,k,g){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=d)d({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=d)d({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(m){if(null!=d)d(m);else throw m;}};
+DrawioFile.prototype.patch=function(b,e,d){var c=this.ui.editor.undoManager,g=c.history.slice(),k=c.indexOfNextAdd,n=this.ui.editor.graph;n.container.style.visibility="hidden";var f=this.changeListenerEnabled;this.changeListenerEnabled=d;var l=n.foldingEnabled,m=n.mathEnabled,p=n.cellRenderer.redraw;n.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());p.apply(this,arguments)};n.model.beginUpdate();try{for(var q=
+0;q<b.length;q++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[q],!0,e,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{n.container.style.visibility="";n.model.endUpdate();n.cellRenderer.redraw=p;this.changeListenerEnabled=f;d||(c.history=g,c.indexOfNextAdd=k,c.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)m!=
+n.mathEnabled?(this.ui.editor.updateGraphComponents(),n.refresh()):(l!=n.foldingEnabled?n.view.revalidate():n.view.validate(),n.sizeDidChange());this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}};
+DrawioFile.prototype.save=function(b,e,d,c,g,k){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=d)d({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=d)d({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(n){if(null!=d)d(n);else throw n;}};
DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,d){};DrawioFile.prototype.saveFile=function(b,e,d,c){};
DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};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(b,e,d){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,d){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -9833,412 +9838,413 @@ DrawioFile.prototype.showRefreshDialog=function(b,e,d){null==d&&(d=mxResources.g
e)}),null,mxResources.get("synchronize"),mxUtils.bind(this,function(){this.reloadFile(b,e)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150))};
DrawioFile.prototype.showCopyDialog=function(b,e,d){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,e)}),null,mxResources.get("overwrite"),d,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150)};
DrawioFile.prototype.showConflictDialog=function(b,e){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("synchronize"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),340,150)};
-DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var d=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),c=mxResources.get("redirectToNewApp");null!=e&&(c+=" ("+e+")");var k=mxUtils.bind(this,function(){var c=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==d?window.location.reload():
-window.location.href=d});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()});null!=b?this.isModified()?this.ui.confirm(c,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(c,k,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-k)}};DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
+DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var d=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),c=mxResources.get("redirectToNewApp");null!=e&&(c+=" ("+e+")");var g=mxUtils.bind(this,function(){var c=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==d?window.location.reload():
+window.location.href=d});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()});null!=b?this.isModified()?this.ui.confirm(c,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),g,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(c,g,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+g)}};DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(b,e);else if(this.isModified()&&this.addUnsavedStatus(b),e)this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var d=this.getErrorMessage(b);null!=d&&60<d.length&&(d=d.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("error"))+
(null!=d?" ("+mxUtils.htmlEntities(d)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(b,e){var d=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(b){this.handleFileError(b,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,d,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,
-mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,d,c,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),c)});"none"==DrawioFile.SYNC?this.showCopyDialog(d,c,k):this.invalidChecksum?this.showRefreshDialog(d,c,this.getErrorMessage(b)):e?this.showConflictDialog(k,g):this.addConflictStatus(mxUtils.bind(this,
+DrawioFile.prototype.handleConflictError=function(b,e){var d=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(b){this.handleFileError(b,!0)}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,d,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,
+mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,d,c,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),c)});"none"==DrawioFile.SYNC?this.showCopyDialog(d,c,g):this.invalidChecksum?this.showRefreshDialog(d,c,this.getErrorMessage(b)):e?this.showConflictDialog(g,k):this.addConflictStatus(mxUtils.bind(this,
function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(d,c)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT&&(e=mxResources.get("timeout"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.sendFileChanges(),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(b){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=
null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(b){this.handleFileError(b)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.isOptimisticSync=function(){return!1};
DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(d){b(e,d)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.isOptimisticSync()&&this.sync.fileSaving();"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaving",[this])};
DrawioFile.prototype.sendFileChanges=function(){try{null!=this.p2pCollab&&null!=this.sync&&(this.updateFileData(),this.sync.sendFileChanges(this.ui.getPagesForNode(mxUtils.parseXml(this.getData()).documentElement),this.desc),"1"==urlParams.test&&EditorUi.debug("DrawioFile.sendFileChanges",[this]))}catch(b){console.log(b)}};
-DrawioFile.prototype.fileSaved=function(b,e,d,c,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=b,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=d&&d()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(b).documentElement),e,d,c,k)}catch(f){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=c&&c(f);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,f);else{var g=this.getCurrentUser(),m=null!=g?g.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),m,f)}}catch(l){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
-DrawioFile.prototype.autosave=function(b,e,d,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var b=this.isAutosaveRevision();b&&(this.lastAutosaveRevision=(new Date).getTime());this.save(b,mxUtils.bind(this,function(b){this.autosaveCompleted();null!=d&&d(b)}),mxUtils.bind(this,
-function(b){null!=c&&c(b)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=d&&d(null)}),b);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
+DrawioFile.prototype.fileSaved=function(b,e,d,c,g){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=b,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=d&&d()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(b).documentElement),e,d,c,g)}catch(f){this.invalidChecksum=this.inConflictState=
+!0;this.descriptorChanged();null!=c&&c(f);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,f);else{var k=this.getCurrentUser(),n=null!=k?k.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),n,f)}}catch(l){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
+DrawioFile.prototype.autosave=function(b,e,d,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var g=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==g&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var b=this.isAutosaveRevision();b&&(this.lastAutosaveRevision=(new Date).getTime());this.save(b,mxUtils.bind(this,function(b){this.autosaveCompleted();null!=d&&d(b)}),mxUtils.bind(this,
+function(b){null!=c&&c(b)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=d&&d(null)}),b);this.autosaveThread=g};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var d=b.lastIndexOf("."),c=0<d?b.substring(d):"",d=e.lastIndexOf(".");return c===(0<d?e.substring(d):"")}return b==e};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,d){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,d,c,k,g){DrawioFile.call(this,b,e);this.title=d;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=k;this.desc=g};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,d){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,d,c,g,k){DrawioFile.call(this,b,e);this.title=d;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=g;this.desc=k};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,d){this.saveAs(this.title,e,d)};LocalFile.prototype.saveAs=function(b,e,d){this.saveFile(b,!1,e,d)};LocalFile.prototype.saveAs=function(b,e,d){this.saveFile(b,!1,e,d)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,d,c,k){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;k||this.updateFileData();var g=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var m=this.getData(),f=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=d&&d()}),l=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
-function(b){this.savingFile=!1;null!=c&&c({error:b})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(b){this.fileHandle.getFile().then(mxUtils.bind(this,function(c){this.invalidFileHandle=null;this.desc.lastModified==c.lastModified?b.write(g?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){b.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){try{var c=this.desc;this.savingFile=!1;this.desc=
-b;this.fileSaved(m,c,f,e);this.removeDraft()}catch(A){e(A)}}),e)}),e)}),e):(this.inConflictState=!0,e())}),mxUtils.bind(this,function(b){this.invalidFileHandle=!0;e(b)}))}),e)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,g?"image/png":"text/xml",g);else if(d.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf("."),l=0<l?b.substring(l+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(g?"&binary=1":""))).simulate(document,
-"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));f()}});g?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){l(b)}),c,this.ui.getCurrentFile()!=this?m:null,e.scale,e.border)):l(m)};LocalFile.prototype.rename=function(b,e,d){this.title=b;this.descriptorChanged();null!=e&&e()};
+LocalFile.prototype.saveFile=function(b,e,d,c,g){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;g||this.updateFileData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var n=this.getData(),f=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=d&&d()}),l=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
+function(b){this.savingFile=!1;null!=c&&c({error:b})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(b){this.fileHandle.getFile().then(mxUtils.bind(this,function(c){this.invalidFileHandle=null;this.desc.lastModified==c.lastModified?b.write(k?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){b.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){try{var c=this.desc;this.savingFile=!1;this.desc=
+b;this.fileSaved(n,c,f,e);this.removeDraft()}catch(A){e(A)}}),e)}),e)}),e):(this.inConflictState=!0,e())}),mxUtils.bind(this,function(b){this.invalidFileHandle=!0;e(b)}))}),e)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,k?"image/png":"text/xml",k);else if(d.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf("."),l=0<l?b.substring(l+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(k?"&binary=1":""))).simulate(document,
+"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));f()}});k?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){l(b)}),c,this.ui.getCurrentFile()!=this?n:null,e.scale,e.border)):l(n)};LocalFile.prototype.rename=function(b,e,d){this.title=b;this.descriptorChanged();null!=e&&e()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,e,d){LocalFile.call(this,b,e,d)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,e,d){this.saveFile(b,!1,e,d)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,e,d){DrawioFile.call(this,b,e);this.title=d};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,e,d){this.saveAs(this.getTitle(),e,d)};StorageFile.prototype.saveAs=function(b,e,d){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,e,d)};
-StorageFile.insertFile=function(b,e,d,c,k){var g=mxUtils.bind(this,function(g){var f=function(){var f=new StorageFile(b,d,e);f.saveFile(e,!1,function(){c(f)},k)};g?b.confirm(mxResources.get("replaceIt",[e]),f,k):f()});StorageFile.getFileContent(b,e,function(b){g(null!=b)},function(){g(!1)})};StorageFile.getFileContent=function(b,e,d,c){b.getDatabaseItem(e,function(b){d(null!=b?b.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,d):null!=c&&c()}),"files")};
+StorageFile.insertFile=function(b,e,d,c,g){var k=mxUtils.bind(this,function(k){var f=function(){var f=new StorageFile(b,d,e);f.saveFile(e,!1,function(){c(f)},g)};k?b.confirm(mxResources.get("replaceIt",[e]),f,g):f()});StorageFile.getFileContent(b,e,function(b){k(null!=b)},function(){k(!1)})};StorageFile.getFileContent=function(b,e,d,c){b.getDatabaseItem(e,function(b){d(null!=b?b.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,d):null!=c&&c()}),"files")};
StorageFile.getFileInfo=function(b,e,d,c){b.getDatabaseItem(e,function(b){d(b)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,function(b){d(null!=b?{title:e}:null)}):null!=c&&c()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(b,e,d,c){if(this.isEditable()){var k=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var e=mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=d&&d()}),k=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:k.length,lastModified:Date.now(),type:this.type},{title:this.title,data:k}],e,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,k,e):null!=c&&c()}),["filesInfo",
-"files"])}catch(f){null!=c&&c(f)}});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(d){this.isRenamable()&&this.getTitle()!=b&&null!=d?this.ui.confirm(mxResources.get("replaceIt",[b]),k,c):k()}),c)}else null!=d&&d()};
-StorageFile.prototype.rename=function(b,e,d){var c=this.getTitle();c!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(k){var g=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,e)}),d)});null!=k?this.ui.confirm(mxResources.get("replaceIt",[b]),g,d):g()}),d):e()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
+StorageFile.prototype.saveFile=function(b,e,d,c){if(this.isEditable()){var g=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var e=mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=d&&d()}),g=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:g.length,lastModified:Date.now(),type:this.type},{title:this.title,data:g}],e,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,g,e):null!=c&&c()}),["filesInfo",
+"files"])}catch(f){null!=c&&c(f)}});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(d){this.isRenamable()&&this.getTitle()!=b&&null!=d?this.ui.confirm(mxResources.get("replaceIt",[b]),g,c):g()}),c)}else null!=d&&d()};
+StorageFile.prototype.rename=function(b,e,d){var c=this.getTitle();c!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,e)}),d)});null!=g?this.ui.confirm(mxResources.get("replaceIt",[b]),k,d):k()}),d):e()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
StorageFile.prototype.getLatestVersion=function(b,e){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(d){b(new StorageFile(this.ui,d,this.title))}),e)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
-StorageFile.listLocalStorageFiles=function(b){for(var e=[],d=0;d<localStorage.length;d++){var c=localStorage.key(d),k=localStorage.getItem(c);if(0<c.length&&"."!=c.charAt(0)&&0<k.length){var g=(null==b||"F"==b)&&("<mxfile "===k.substring(0,8)||"<?xml"===k.substring(0,5)||"\x3c!--[if IE]>"===k.substring(0,12)),m=(null==b||"L"==b)&&"<mxlibrary>"===k.substring(0,11);(g||m)&&e.push({title:c,type:g?"F":"L",size:k.length,lastModified:Date.now()})}}return e};
-StorageFile.migrate=function(b){var e=StorageFile.listLocalStorageFiles();e.push({title:".scratchpad",type:"L"});var d=b.transaction(["files","filesInfo"],"readwrite");b=d.objectStore("files");for(var d=d.objectStore("filesInfo"),c=0;c<e.length;c++){var k=e[c],g=localStorage.getItem(k.title);b.add({title:k.title,data:g});d.add(k)}};
-StorageFile.listFiles=function(b,e,d,c){b.getDatabaseItems(function(b){var c=[];if(null!=b)for(var k=0;k<b.length;k++)"."==b[k].title.charAt(0)||null!=e&&b[k].type!=e||c.push(b[k]);d(c)},function(){null==b.database?d(StorageFile.listLocalStorageFiles(e)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,e,d,c){b.removeDatabaseItem([e,e],d,function(){null==b.database?(localStorage.removeItem(e),d()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,e,d){StorageFile.call(this,b,e,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,e,d){this.saveFile(b,!1,e,d)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageFile.listLocalStorageFiles=function(b){for(var e=[],d=0;d<localStorage.length;d++){var c=localStorage.key(d),g=localStorage.getItem(c);if(0<c.length&&"."!=c.charAt(0)&&0<g.length){var k=(null==b||"F"==b)&&("<mxfile "===g.substring(0,8)||"<?xml"===g.substring(0,5)||"\x3c!--[if IE]>"===g.substring(0,12)),n=(null==b||"L"==b)&&"<mxlibrary>"===g.substring(0,11);(k||n)&&e.push({title:c,type:k?"F":"L",size:g.length,lastModified:Date.now()})}}return e};
+StorageFile.migrate=function(b){var e=StorageFile.listLocalStorageFiles();e.push({title:".scratchpad",type:"L"});var d=b.transaction(["files","filesInfo"],"readwrite");b=d.objectStore("files");for(var d=d.objectStore("filesInfo"),c=0;c<e.length;c++){var g=e[c],k=localStorage.getItem(g.title);b.add({title:g.title,data:k});d.add(g)}};
+StorageFile.listFiles=function(b,e,d,c){b.getDatabaseItems(function(b){var c=[];if(null!=b)for(var g=0;g<b.length;g++)"."==b[g].title.charAt(0)||null!=e&&b[g].type!=e||c.push(b[g]);d(c)},function(){null==b.database?d(StorageFile.listLocalStorageFiles(e)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,e,d,c){b.removeDatabaseItem([e,e],d,function(){null==b.database?(localStorage.removeItem(e),d()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,e,d){StorageFile.call(this,b,e,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,e,d){this.saveFile(b,!1,e,d)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
StorageLibrary.prototype.isRenamable=function(b,e,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,e,d){DrawioFile.call(this,b,e);this.title=d;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,e,d){RemoteFile.call(this,b,e,d.title);this.libObj=d};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,e,d){};
RemoteLibrary.prototype.saveAs=function(b,e,d){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,e,d){StorageFile.call(this,b,e,d);b=d;e=b.lastIndexOf("/");0<=e&&(b=b.substring(e+1));this.fname=b};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(b,e,d){return!1};UrlLibrary.prototype.saveAs=function(b,e,d){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,e,d){DrawioFile.call(this,b,e);this.desc=d||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,e,d){function c(c,g,k,p,x,A){function q(){mxEvent.addListener(t,"click",null!=A?A:function(){k!=App.MODE_GOOGLE||b.isDriveDomain()?k==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);e()})):k==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);e()})):
-(b.setMode(k,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}f++;++m>d&&(mxUtils.br(l),m=1);var t=document.createElement("a");t.style.overflow="hidden";t.style.display="inline-block";t.className="geBaseButton";t.style.boxSizing="border-box";t.style.fontSize="11px";t.style.position="relative";t.style.margin="4px";t.style.marginTop="8px";t.style.marginBottom="0px";t.style.padding="8px 10px 8px 10px";t.style.width="88px";t.style.height="100px";t.style.whiteSpace="nowrap";t.setAttribute("title",
-g);var u=document.createElement("div");u.style.textOverflow="ellipsis";u.style.overflow="hidden";u.style.position="absolute";u.style.bottom="8px";u.style.left="0px";u.style.right="0px";mxUtils.write(u,g);t.appendChild(u);if(null!=c){var v=document.createElement("img");v.setAttribute("src",c);v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.style.width="60px";v.style.height="60px";v.style.paddingBottom="6px";t.appendChild(v)}else u.style.paddingTop="5px",u.style.whiteSpace="normal",
-mxClient.IS_IOS?(t.style.padding="0px 10px 20px 10px",t.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");if(null!=x)for(c=0;c<x.length;c++)mxUtils.br(u),mxUtils.write(u,x[c]);if(null!=p&&null==b[p]){v.style.visibility="hidden";mxUtils.setOpacity(u,10);var E=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});E.spin(t);var G=window.setTimeout(function(){null==
-b[p]&&(E.stop(),t.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(f,c){null!=b[p]&&c.getProperty("client")==b[p]&&(window.clearTimeout(G),mxUtils.setOpacity(u,100),v.style.visibility="",E.stop(),q(),"drive"==p&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else q();l.appendChild(t)}d=null!=d?d:2;var k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";k.style.paddingTop="0px";k.style.paddingBottom="20px";var g=document.createElement("div");
-g.style.border="1px solid #d3d3d3";g.style.borderWidth="1px 0px 1px 0px";g.style.padding="10px 0px 20px 0px";var m=0,f=0,l=document.createElement("div");l.style.paddingTop="2px";g.appendChild(l);var n=document.createElement("p"),p=document.createElement("p");p.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(p,mxResources.get("saveDiagramsTo")+":");k.appendChild(p);k.appendChild(g);m=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",
+var StorageDialog=function(b,e,d){function c(c,k,g,p,y,A){function q(){mxEvent.addListener(t,"click",null!=A?A:function(){g!=App.MODE_GOOGLE||b.isDriveDomain()?g==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()})):g==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()})):
+(b.setMode(g,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}f++;++n>d&&(mxUtils.br(l),n=1);var t=document.createElement("a");t.style.overflow="hidden";t.style.display="inline-block";t.className="geBaseButton";t.style.boxSizing="border-box";t.style.fontSize="11px";t.style.position="relative";t.style.margin="4px";t.style.marginTop="8px";t.style.marginBottom="0px";t.style.padding="8px 10px 8px 10px";t.style.width="88px";t.style.height="100px";t.style.whiteSpace="nowrap";t.setAttribute("title",
+k);var B=document.createElement("div");B.style.textOverflow="ellipsis";B.style.overflow="hidden";B.style.position="absolute";B.style.bottom="8px";B.style.left="0px";B.style.right="0px";mxUtils.write(B,k);t.appendChild(B);if(null!=c){var u=document.createElement("img");u.setAttribute("src",c);u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";t.appendChild(u)}else B.style.paddingTop="5px",B.style.whiteSpace="normal",
+mxClient.IS_IOS?(t.style.padding="0px 10px 20px 10px",t.style.top="6px"):mxClient.IS_FF&&(B.style.paddingTop="0px",B.style.marginTop="-2px");if(null!=y)for(c=0;c<y.length;c++)mxUtils.br(B),mxUtils.write(B,y[c]);if(null!=p&&null==b[p]){u.style.visibility="hidden";mxUtils.setOpacity(B,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(t);var F=window.setTimeout(function(){null==
+b[p]&&(v.stop(),t.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(c,f){null!=b[p]&&f.getProperty("client")==b[p]&&(window.clearTimeout(F),mxUtils.setOpacity(B,100),u.style.visibility="",v.stop(),q(),"drive"==p&&null!=m.parentNode&&m.parentNode.removeChild(m))}))}else q();l.appendChild(t)}d=null!=d?d:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var k=document.createElement("div");
+k.style.border="1px solid #d3d3d3";k.style.borderWidth="1px 0px 1px 0px";k.style.padding="10px 0px 20px 0px";var n=0,f=0,l=document.createElement("div");l.style.paddingTop="2px";k.appendChild(l);var m=document.createElement("p"),p=document.createElement("p");p.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(p,mxResources.get("saveDiagramsTo")+":");g.appendChild(p);g.appendChild(k);n=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",
mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),
-App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");6>f&&null!=b.notion&&c(IMAGE_PATH+"/notion-logo.svg",mxResources.get("notion"),App.MODE_NOTION,"notion");g=document.createElement("span");g.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(g.style,
-"transform","translate(-50%,0)");mxUtils.write(g,mxResources.get("decideLater"));mxEvent.addListener(g,"click",function(){b.hideDialog();var c=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=c});k.appendChild(g);mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(n.style.padding="7px",n.style.fontSize="9pt",n.style.marginTop="-14px",
-n.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",k.appendChild(n))},5E3);this.container=k},SplashDialog=function(b){var e=document.createElement("div");e.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var d=
-b.addLanguageMenu(e,!0);null!=d&&(d.style.bottom="19px")}b.getServiceCount();var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var k=document.createElement("div");k.style.margin="8px 0px 0px 0px";k.style.padding="18px 0px 24px 0px";d="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",d=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?
+App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");6>f&&null!=b.notion&&c(IMAGE_PATH+"/notion-logo.svg",mxResources.get("notion"),App.MODE_NOTION,"notion");k=document.createElement("span");k.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(k.style,
+"transform","translate(-50%,0)");mxUtils.write(k,mxResources.get("decideLater"));mxEvent.addListener(k,"click",function(){b.hideDialog();var c=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=c});g.appendChild(k);mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(m.style.padding="7px",m.style.fontSize="9pt",m.style.marginTop="-14px",
+m.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",g.appendChild(m))},5E3);this.container=g},SplashDialog=function(b){var e=document.createElement("div");e.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var d=
+b.addLanguageMenu(e,!0);null!=d&&(d.style.bottom="19px")}b.getServiceCount();var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var g=document.createElement("div");g.style.margin="8px 0px 0px 0px";g.style.padding="18px 0px 24px 0px";d="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",d=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?
(c.src=IMAGE_PATH+"/dropbox-logo.svg",d=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",d=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(c.src=IMAGE_PATH+"/github-logo.svg",d=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",d=mxResources.get("gitlab")):b.mode==App.MODE_NOTION?(c.src=IMAGE_PATH+"/notion-logo.svg",d=mxResources.get("notion")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",d=mxResources.get("browser")):
-b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",d=mxResources.get("trello")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",k.style.paddingBottom="10px",k.style.paddingTop="30px",d=mxResources.get("device"));var g=document.createElement("button");g.className="geBigButton";g.style.marginBottom="8px";g.style.fontSize="18px";g.style.padding="10px";g.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)k.style.padding="42px 0px 56px 0px",g.style.marginBottom="12px";else{k.style.border=
-"1px solid #d3d3d3";k.style.borderWidth="1px 0px 1px 0px";var m=document.createElement("table"),f=document.createElement("tbody"),l=document.createElement("tr"),n=document.createElement("td"),p=document.createElement("td");m.setAttribute("align","center");n.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,d);p.style.textAlign="left";p.appendChild(c);l.appendChild(n);l.appendChild(p);f.appendChild(l);m.appendChild(f);
-e.appendChild(m);d=document.createElement("span");d.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,0)");mxUtils.write(d,mxResources.get("changeStorage"));mxEvent.addListener(d,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});e.appendChild(d)}mxUtils.write(g,mxResources.get("createNewDiagram"));mxEvent.addListener(g,"click",function(){b.hideDialog();
-b.actions.get("new").funct()});k.appendChild(g);mxUtils.br(k);g=document.createElement("button");g.className="geBigButton";g.style.marginBottom="22px";g.style.fontSize="18px";g.style.padding="10px";g.style.width="340px";mxUtils.write(g,mxResources.get("openExistingDiagram"));mxEvent.addListener(g,"click",function(){b.actions.get("open").funct()});k.appendChild(g);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):
-b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_NOTION?mxResources.get("notion"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(d=function(c){g.style.marginBottom="24px";var f=document.createElement("a");f.style.display="inline-block";f.style.color="gray";f.style.cursor="pointer";
-f.style.marginTop="6px";mxUtils.write(f,mxResources.get("signOut"));g.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(f,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){c()})});k.appendChild(f)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var q=b.drive.getUsersList();if(0<q.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");g.style.marginBottom="16px";k.style.paddingBottom="18px";k.appendChild(c);
-var t=document.createElement("select");t.style.marginLeft="4px";t.style.width="140px";for(d=0;d<q.length;d++)m=document.createElement("option"),mxUtils.write(m,q[d].displayName),m.value=d,t.appendChild(m),m=document.createElement("option"),m.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(m,"<"+q[d].email+">"),m.setAttribute("disabled","disabled"),t.appendChild(m);m=document.createElement("option");mxUtils.write(m,mxResources.get("addAccount"));m.value=q.length;t.appendChild(m);mxEvent.addListener(t,
-"change",function(){var f=t.value,c=q.length!=f;c&&b.drive.setUser(q[f]);b.drive.authorize(c,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(f){b.handleError(f,null,function(){b.hideDialog();b.showSplash()})},!0)});k.appendChild(t)}else d(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?d(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&
-null!=b.gitLab?d(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_NOTION&&null!=b.notion?d(function(){b.notion.logout()}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&d(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&d(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):d(function(){b.oneDrive.logout()});e.appendChild(k);this.container=e},EmbedDialog=function(b,e,d,c,k,g,m,f,l){m=
-null!=m?m:"Check out the diagram I made using @drawio";c=document.createElement("div");var n=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=g?mxUtils.write(c,g):mxUtils.write(c,mxResources.get(5E5>e.length?n?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);g=document.createElement("div");g.style.position="absolute";g.style.top="30px";g.style.right="30px";g.style.color="gray";mxUtils.write(g,b.formatFileSize(e.length));c.appendChild(g);var p=document.createElement("textarea");p.setAttribute("autocomplete",
+b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",d=mxResources.get("trello")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",g.style.paddingBottom="10px",g.style.paddingTop="30px",d=mxResources.get("device"));var k=document.createElement("button");k.className="geBigButton";k.style.marginBottom="8px";k.style.fontSize="18px";k.style.padding="10px";k.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)g.style.padding="42px 0px 56px 0px",k.style.marginBottom="12px";else{g.style.border=
+"1px solid #d3d3d3";g.style.borderWidth="1px 0px 1px 0px";var n=document.createElement("table"),f=document.createElement("tbody"),l=document.createElement("tr"),m=document.createElement("td"),p=document.createElement("td");n.setAttribute("align","center");m.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,d);p.style.textAlign="left";p.appendChild(c);l.appendChild(m);l.appendChild(p);f.appendChild(l);n.appendChild(f);
+e.appendChild(n);d=document.createElement("span");d.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,0)");mxUtils.write(d,mxResources.get("changeStorage"));mxEvent.addListener(d,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});e.appendChild(d)}mxUtils.write(k,mxResources.get("createNewDiagram"));mxEvent.addListener(k,"click",function(){b.hideDialog();
+b.actions.get("new").funct()});g.appendChild(k);mxUtils.br(g);k=document.createElement("button");k.className="geBigButton";k.style.marginBottom="22px";k.style.fontSize="18px";k.style.padding="10px";k.style.width="340px";mxUtils.write(k,mxResources.get("openExistingDiagram"));mxEvent.addListener(k,"click",function(){b.actions.get("open").funct()});g.appendChild(k);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):
+b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_NOTION?mxResources.get("notion"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(d=function(c){k.style.marginBottom="24px";var f=document.createElement("a");f.style.display="inline-block";f.style.color="gray";f.style.cursor="pointer";
+f.style.marginTop="6px";mxUtils.write(f,mxResources.get("signOut"));k.style.marginBottom="16px";g.style.paddingBottom="18px";mxEvent.addListener(f,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){c()})});g.appendChild(f)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var q=b.drive.getUsersList();if(0<q.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");k.style.marginBottom="16px";g.style.paddingBottom="18px";g.appendChild(c);
+var t=document.createElement("select");t.style.marginLeft="4px";t.style.width="140px";for(d=0;d<q.length;d++)n=document.createElement("option"),mxUtils.write(n,q[d].displayName),n.value=d,t.appendChild(n),n=document.createElement("option"),n.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(n,"<"+q[d].email+">"),n.setAttribute("disabled","disabled"),t.appendChild(n);n=document.createElement("option");mxUtils.write(n,mxResources.get("addAccount"));n.value=q.length;t.appendChild(n);mxEvent.addListener(t,
+"change",function(){var c=t.value,f=q.length!=c;f&&b.drive.setUser(q[c]);b.drive.authorize(f,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(c){b.handleError(c,null,function(){b.hideDialog();b.showSplash()})},!0)});g.appendChild(t)}else d(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?d(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&
+null!=b.gitLab?d(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_NOTION&&null!=b.notion?d(function(){b.notion.logout()}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&d(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&d(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):d(function(){b.oneDrive.logout()});e.appendChild(g);this.container=e},EmbedDialog=function(b,e,d,c,g,k,n,f,l){n=
+null!=n?n:"Check out the diagram I made using @drawio";c=document.createElement("div");var m=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=k?mxUtils.write(c,k):mxUtils.write(c,mxResources.get(5E5>e.length?m?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);k=document.createElement("div");k.style.position="absolute";k.style.top="30px";k.style.right="30px";k.style.color="gray";mxUtils.write(k,b.formatFileSize(e.length));c.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.fontFamily="monospace";p.style.wordBreak="break-all";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");c.appendChild(p);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(p.value=e,p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-p.select():document.execCommand("selectAll",!1,null)):(p.setAttribute("readonly","true"),p.value=mxResources.get("tooLargeUseDownload"))},0)};g=document.createElement("div");g.style.position="absolute";g.style.bottom="36px";g.style.right="32px";var q=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!n||navigator.standalone||!(n||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(q=mxUtils.button(null!=f?f:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),
-function(){var f=5E5>e.length?p.value:e;if(null!=k)k(f);else if(n)try{var c=b.openLink(f);null!=c&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=c&&null!=c.location.href&&c.location.href.substring(0,8)!=f.substring(0,8)&&(c.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(A){}}),d||500)}catch(A){b.handleError({message:A.message||mxResources.get("drawingTooLarge")})}else{var l=window.open(),l=null!=l?l.document:null;null!=l?(l.writeln("<html><head><title>"+
-encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),l.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),q.className="geBtn",g.appendChild(q));if(!n||7500<e.length)f=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();b.saveData(null!=l?l:"embed.txt","txt",e,"text/plain")}),f.className="geBtn",g.appendChild(f);if(n&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var t=mxUtils.button("",
-function(){try{var f="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(p.value);b.openLink(f)}catch(v){b.handleError({message:v.message||mxResources.get("drawingTooLarge")})}});f=document.createElement("img");f.setAttribute("src",Editor.facebookImage);f.setAttribute("width","18");f.setAttribute("height","18");f.setAttribute("border","0");t.appendChild(f);t.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");t.style.verticalAlign="bottom";t.style.paddingTop=
-"4px";t.style.minWidth="46px";t.className="geBtn";g.appendChild(t)}7168>e.length&&(t=mxUtils.button("",function(){try{var f="https://twitter.com/intent/tweet?text="+encodeURIComponent(m)+"&url="+encodeURIComponent(p.value);b.openLink(f)}catch(v){b.handleError({message:v.message||mxResources.get("drawingTooLarge")})}}),f=document.createElement("img"),f.setAttribute("src",Editor.tweetImage),f.setAttribute("width","18"),f.setAttribute("height","18"),f.setAttribute("border","0"),f.style.marginBottom=
-"5px",t.appendChild(f),t.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),t.style.verticalAlign="bottom",t.style.paddingTop="4px",t.style.minWidth="46px",t.className="geBtn",g.appendChild(t))}f=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});g.appendChild(f);t=mxUtils.button(mxResources.get("copy"),function(){p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");
-b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?f.className="geBtn gePrimaryBtn":(g.appendChild(t),t.className="geBtn gePrimaryBtn",f.className="geBtn"):(g.appendChild(q),f.className="geBtn",q.className="geBtn gePrimaryBtn");c.appendChild(g);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,e){function d(){var b=null!=G&&null!=G.getTitle()?G.getTitle():this.defaultFilename;if(C.checked&&""!=t.value){var f="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=b&&(f+="&title="+encodeURIComponent(b));0<E.length&&(f+="&s="+E);""!=u.value&&"0"!=u.value&&(f+="&border="+u.value);""!=q.value&&(f+="&height="+q.value);f+="&pan="+(v.checked?"1":"0");f+="&zoom="+(x.checked?"1":"0");f+="&fit="+(B.checked?"1":"0");
-f+="&resize="+(y.checked?"1":"0");f+="&x0="+Number(p.value);f+="&y0="+l;k.mathEnabled&&(f+="&math=1");z.checked?f+="&edit=_blank":A.checked&&(f+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));n.value=f}else G.constructor==DriveFile||G.constructor==DropboxFile?(f="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?f+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(f+=G.getHash().substring(1),f=G.constructor==DropboxFile?f+"&type=2":f+"&type=1"),null!=
-b&&(f+="&title="+encodeURIComponent(b)),""!=q.value&&(b=parseInt(q.value)+parseInt(p.value),f+="&height="+b),n.value=f):n.value=""}var c=document.createElement("div"),k=b.editor.graph,g=k.getGraphBounds(),m=k.view.scale,f=Math.floor(g.x/m-k.view.translate.x),l=Math.floor(g.y/m-k.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var n=document.createElement("input");n.setAttribute("type","text");n.style.marginBottom="8px";n.style.marginTop="2px";n.style.width="410px";
-c.appendChild(n);mxUtils.br(c);this.init=function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","4");p.style.marginRight="16px";p.style.marginLeft="4px";p.value=f;c.appendChild(p);mxUtils.write(c,mxResources.get("height")+":");var q=document.createElement("input");q.setAttribute("type","text");
-q.setAttribute("size","4");q.style.marginLeft="4px";q.value=Math.ceil(g.height/m);c.appendChild(q);mxUtils.br(c);g=document.createElement("hr");g.setAttribute("size","1");g.style.marginBottom="16px";g.style.marginTop="16px";c.appendChild(g);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","28");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px";t.value=e||"";c.appendChild(t);
-mxUtils.br(c);mxUtils.write(c,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";c.appendChild(u);mxUtils.br(c);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";c.appendChild(v);mxUtils.write(c,mxResources.get("pan")+" ");var x=document.createElement("input");
-x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,mxResources.get("zoom")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";A.setAttribute("title",window.location.href);c.appendChild(A);mxUtils.write(c,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,
-mxResources.get("asNew")+" ");mxUtils.br(c);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";c.appendChild(y);mxUtils.write(c,mxResources.get("resize")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";c.appendChild(B);mxUtils.write(c,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=
-"8px";c.appendChild(C);mxUtils.write(c,mxResources.get("embed")+" ");var E=b.getBasenames().join(";"),G=b.getCurrentFile();mxEvent.addListener(v,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(B,"change",d);mxEvent.addListener(A,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(C,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(t,"change",d);d();
-mxEvent.addListener(n,"click",function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn gePrimaryBtn";g.appendChild(m);c.appendChild(g);this.container=c},CreateGraphDialog=function(b,e,d){var c=document.createElement("div");c.style.textAlign="right";this.init=
-function(){var e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.width="100%";e.style.height="360px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);c.appendChild(e);var g=new Graph(e);g.setCellsCloneable(!0);g.setPanning(!0);g.setAllowDanglingEdges(!1);g.connectionHandler.select=!1;g.view.setTranslate(20,20);g.border=20;g.panningHandler.useLeftButtonForPanning=!0;var m="curved=1;";g.cellRenderer.installCellOverlayListeners=
-function(b,f,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){f.fireEvent(new mxEventObject("pointerdown","event",c,"state",b))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){f.fireEvent(new mxEventObject("pointerdown","event",c,"state",b))})};g.getAllConnectionConstraints=function(){return null};g.connectionHandler.marker.highlight.keepOnTop=
-!1;g.connectionHandler.createEdgeState=function(b){b=g.createEdge(null,null,null,null,null,m);return new mxCellState(this.graph.view,b,this.graph.getCellStyle(b))};var f=g.getDefaultParent(),l=mxUtils.bind(this,function(b){var c=new mxCellOverlay(this.connectImage,"Add outgoing");c.cursor="hand";c.addListener(mxEvent.CLICK,function(c,d){g.connectionHandler.reset();g.clearSelection();var e=g.getCellGeometry(b),n;q(function(){n=g.insertVertex(f,null,"Entry",e.x,e.y,80,30,"rounded=1;");l(n);g.view.refresh(n);
-g.insertEdge(f,null,"",b,n,m)},function(){g.scrollCellToVisible(n)})});c.addListener("pointerdown",function(b,f){var c=f.getProperty("event"),d=f.getProperty("state");g.popupMenuHandler.hideMenu();g.stopEditing(!1);var e=mxUtils.convertPoint(g.container,mxEvent.getClientX(c),mxEvent.getClientY(c));g.connectionHandler.start(d,e.x,e.y);g.isMouseDown=!0;g.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});g.addCellOverlay(b,c)});g.getModel().beginUpdate();var n;try{n=g.insertVertex(f,null,"Start",
-0,0,80,30,"ellipse"),l(n)}finally{g.getModel().endUpdate()}var p;"horizontalTree"==d?(p=new mxCompactTreeLayout(g),p.edgeRouting=!1,p.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(p=new mxCompactTreeLayout(g,!1),p.edgeRouting=!1,p.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(p=new mxRadialTreeLayout(g,!1),p.edgeRouting=!1,p.levelDistance=80):"verticalFlow"==d?p=new mxHierarchicalLayout(g,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-d?p=new mxHierarchicalLayout(g,mxConstants.DIRECTION_WEST):"organic"==d?(p=new mxFastOrganicLayout(g,!1),p.forceConstant=80):"circle"==d&&(p=new mxCircleLayout(g));if(null!=p){var q=function(b,f){g.getModel().beginUpdate();try{null!=b&&b(),p.execute(g.getDefaultParent(),n)}catch(y){throw y;}finally{var c=new mxMorphing(g);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){g.getModel().endUpdate();null!=f&&f()}));c.startAnimation()}},t=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(b,f,c,d,e){t.apply(this,arguments);q()};g.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);q()};g.connectionHandler.addListener(mxEvent.CONNECT,function(){q()})}var u=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(g.destroy(),e.parentNode.removeChild(e));b.hideDialog()})});u.className="geBtn";b.editor.cancelFirst&&c.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(f){g.clearCellOverlays();
-var c=g.getModel().getChildren(g.getDefaultParent());f=mxEvent.isAltDown(f)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(g.getBoundingBoxFromGeometry(c,!0));c=b.editor.graph.importCells(c,f.x,f.y);f=b.editor.graph.view;var d=f.getBounds(c);d.x-=f.translate.x;d.y-=f.translate.y;b.editor.graph.scrollRectToVisible(d);b.editor.graph.setSelectionCells(c);null!=e.parentNode&&(g.destroy(),e.parentNode.removeChild(e));b.hideDialog()});c.appendChild(v);v.className="geBtn gePrimaryBtn";
+p.select():document.execCommand("selectAll",!1,null)):(p.setAttribute("readonly","true"),p.value=mxResources.get("tooLargeUseDownload"))},0)};k=document.createElement("div");k.style.position="absolute";k.style.bottom="36px";k.style.right="32px";var q=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!m||navigator.standalone||!(m||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(q=mxUtils.button(null!=f?f:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),
+function(){var c=5E5>e.length?p.value:e;if(null!=g)g(c);else if(m)try{var f=b.openLink(c);null!=f&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=c.substring(0,8)&&(f.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(A){}}),d||500)}catch(A){b.handleError({message:A.message||mxResources.get("drawingTooLarge")})}else{var l=window.open(),l=null!=l?l.document:null;null!=l?(l.writeln("<html><head><title>"+
+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),l.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),q.className="geBtn",k.appendChild(q));if(!m||7500<e.length)f=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();b.saveData(null!=l?l:"embed.txt","txt",e,"text/plain")}),f.className="geBtn",k.appendChild(f);if(m&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var t=mxUtils.button("",
+function(){try{var c="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(p.value);b.openLink(c)}catch(v){b.handleError({message:v.message||mxResources.get("drawingTooLarge")})}});f=document.createElement("img");f.setAttribute("src",Editor.facebookImage);f.setAttribute("width","18");f.setAttribute("height","18");f.setAttribute("border","0");t.appendChild(f);t.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");t.style.verticalAlign="bottom";t.style.paddingTop=
+"4px";t.style.minWidth="46px";t.className="geBtn";k.appendChild(t)}7168>e.length&&(t=mxUtils.button("",function(){try{var c="https://twitter.com/intent/tweet?text="+encodeURIComponent(n)+"&url="+encodeURIComponent(p.value);b.openLink(c)}catch(v){b.handleError({message:v.message||mxResources.get("drawingTooLarge")})}}),f=document.createElement("img"),f.setAttribute("src",Editor.tweetImage),f.setAttribute("width","18"),f.setAttribute("height","18"),f.setAttribute("border","0"),f.style.marginBottom=
+"5px",t.appendChild(f),t.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),t.style.verticalAlign="bottom",t.style.paddingTop="4px",t.style.minWidth="46px",t.className="geBtn",k.appendChild(t))}f=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});k.appendChild(f);t=mxUtils.button(mxResources.get("copy"),function(){p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");
+b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?f.className="geBtn gePrimaryBtn":(k.appendChild(t),t.className="geBtn gePrimaryBtn",f.className="geBtn"):(k.appendChild(q),f.className="geBtn",q.className="geBtn gePrimaryBtn");c.appendChild(k);this.container=c};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(b,e){function d(){var b=null!=F&&null!=F.getTitle()?F.getTitle():this.defaultFilename;if(C.checked&&""!=t.value){var c="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=b&&(c+="&title="+encodeURIComponent(b));0<E.length&&(c+="&s="+E);""!=u.value&&"0"!=u.value&&(c+="&border="+u.value);""!=q.value&&(c+="&height="+q.value);c+="&pan="+(v.checked?"1":"0");c+="&zoom="+(y.checked?"1":"0");c+="&fit="+(B.checked?"1":"0");
+c+="&resize="+(x.checked?"1":"0");c+="&x0="+Number(p.value);c+="&y0="+l;g.mathEnabled&&(c+="&math=1");z.checked?c+="&edit=_blank":A.checked&&(c+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=c}else F.constructor==DriveFile||F.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?c+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(c+=F.getHash().substring(1),c=F.constructor==DropboxFile?c+"&type=2":c+"&type=1"),null!=
+b&&(c+="&title="+encodeURIComponent(b)),""!=q.value&&(b=parseInt(q.value)+parseInt(p.value),c+="&height="+b),m.value=c):m.value=""}var c=document.createElement("div"),g=b.editor.graph,k=g.getGraphBounds(),n=g.view.scale,f=Math.floor(k.x/n-g.view.translate.x),l=Math.floor(k.y/n-g.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var m=document.createElement("input");m.setAttribute("type","text");m.style.marginBottom="8px";m.style.marginTop="2px";m.style.width="410px";
+c.appendChild(m);mxUtils.br(c);this.init=function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","4");p.style.marginRight="16px";p.style.marginLeft="4px";p.value=f;c.appendChild(p);mxUtils.write(c,mxResources.get("height")+":");var q=document.createElement("input");q.setAttribute("type","text");
+q.setAttribute("size","4");q.style.marginLeft="4px";q.value=Math.ceil(k.height/n);c.appendChild(q);mxUtils.br(c);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";c.appendChild(k);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","28");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px";t.value=e||"";c.appendChild(t);
+mxUtils.br(c);mxUtils.write(c,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";c.appendChild(u);mxUtils.br(c);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";c.appendChild(v);mxUtils.write(c,mxResources.get("pan")+" ");var y=document.createElement("input");
+y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="8px";c.appendChild(y);mxUtils.write(c,mxResources.get("zoom")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";A.setAttribute("title",window.location.href);c.appendChild(A);mxUtils.write(c,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,
+mxResources.get("asNew")+" ");mxUtils.br(c);var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="16px";c.appendChild(x);mxUtils.write(c,mxResources.get("resize")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";c.appendChild(B);mxUtils.write(c,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=
+"8px";c.appendChild(C);mxUtils.write(c,mxResources.get("embed")+" ");var E=b.getBasenames().join(";"),F=b.getCurrentFile();mxEvent.addListener(v,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(B,"change",d);mxEvent.addListener(A,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(C,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(t,"change",d);d();
+mxEvent.addListener(m,"click",function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";n=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.className="geBtn gePrimaryBtn";k.appendChild(n);c.appendChild(k);this.container=c},CreateGraphDialog=function(b,e,d){var c=document.createElement("div");c.style.textAlign="right";this.init=
+function(){var e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.width="100%";e.style.height="360px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);c.appendChild(e);var k=new Graph(e);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var n="curved=1;";k.cellRenderer.installCellOverlayListeners=
+function(b,c,f){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(f.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(f){c.fireEvent(new mxEventObject("pointerdown","event",f,"state",b))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(f.node,"touchstart",function(f){c.fireEvent(new mxEventObject("pointerdown","event",f,"state",b))})};k.getAllConnectionConstraints=function(){return null};k.connectionHandler.marker.highlight.keepOnTop=
+!1;k.connectionHandler.createEdgeState=function(b){b=k.createEdge(null,null,null,null,null,n);return new mxCellState(this.graph.view,b,this.graph.getCellStyle(b))};var f=k.getDefaultParent(),l=mxUtils.bind(this,function(b){var c=new mxCellOverlay(this.connectImage,"Add outgoing");c.cursor="hand";c.addListener(mxEvent.CLICK,function(c,d){k.connectionHandler.reset();k.clearSelection();var e=k.getCellGeometry(b),m;q(function(){m=k.insertVertex(f,null,"Entry",e.x,e.y,80,30,"rounded=1;");l(m);k.view.refresh(m);
+k.insertEdge(f,null,"",b,m,n)},function(){k.scrollCellToVisible(m)})});c.addListener("pointerdown",function(b,c){var f=c.getProperty("event"),d=c.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var e=mxUtils.convertPoint(k.container,mxEvent.getClientX(f),mxEvent.getClientY(f));k.connectionHandler.start(d,e.x,e.y);k.isMouseDown=!0;k.isMouseTrigger=mxEvent.isMouseEvent(f);mxEvent.consume(f)});k.addCellOverlay(b,c)});k.getModel().beginUpdate();var m;try{m=k.insertVertex(f,null,"Start",
+0,0,80,30,"ellipse"),l(m)}finally{k.getModel().endUpdate()}var p;"horizontalTree"==d?(p=new mxCompactTreeLayout(k),p.edgeRouting=!1,p.levelDistance=30,n="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(p=new mxCompactTreeLayout(k,!1),p.edgeRouting=!1,p.levelDistance=30,n="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(p=new mxRadialTreeLayout(k,!1),p.edgeRouting=!1,p.levelDistance=80):"verticalFlow"==d?p=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+d?p=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST):"organic"==d?(p=new mxFastOrganicLayout(k,!1),p.forceConstant=80):"circle"==d&&(p=new mxCircleLayout(k));if(null!=p){var q=function(b,c){k.getModel().beginUpdate();try{null!=b&&b(),p.execute(k.getDefaultParent(),m)}catch(x){throw x;}finally{var f=new mxMorphing(k);f.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=c&&c()}));f.startAnimation()}},t=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(b,c,f,d,e){t.apply(this,arguments);q()};k.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);q()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){q()})}var u=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));b.hideDialog()})});u.className="geBtn";b.editor.cancelFirst&&c.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(c){k.clearCellOverlays();
+var f=k.getModel().getChildren(k.getDefaultParent());c=mxEvent.isAltDown(c)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(k.getBoundingBoxFromGeometry(f,!0));f=b.editor.graph.importCells(f,c.x,c.y);c=b.editor.graph.view;var d=c.getBounds(f);d.x-=c.translate.x;d.y-=c.translate.y;b.editor.graph.scrollRectToVisible(d);b.editor.graph.setSelectionCells(f);null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));b.hideDialog()});c.appendChild(v);v.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||c.appendChild(u)};this.container=c};
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(b,e,d){var c=document.createElement("div");c.style.whiteSpace="nowrap";var k=document.createElement("h2");mxUtils.write(k,mxResources.get("backgroundImage"));k.style.marginTop="0px";c.appendChild(k);var g=null!=d&&null!=d.originalSrc,k=!1,m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","geBackgroundImageDialogOption");var f=document.createElement("input");
-f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","geBackgroundImageDialogOption");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.width="320px";l.value=g||null==d?"":d.src;var n=document.createElement("select");n.style.width="320px";if(null!=b.pages)for(var p=0;p<b.pages.length;p++){var q=document.createElement("option");mxUtils.write(q,b.pages[p].getName()||
-mxResources.get("pageWithNumber",[p+1]));q.setAttribute("value","data:page/id,"+b.pages[p].getId());b.pages[p]==b.currentPage&&q.setAttribute("disabled","disabled");null!=d&&d.originalSrc==q.getAttribute("value")&&(q.setAttribute("selected","selected"),k=!0);n.appendChild(q)}g||null!=b.pages&&1!=b.pages.length||(m.style.display="none",f.style.display="none",n.style.display="none");var t=!1,u=!1,v=function(c,d){t||null!=c&&u||(f.checked?null!=d&&d(n.value):""==l.value||b.isOffline()?(x.value="",A.value=
-"",null!=d&&d("")):(l.value=mxUtils.trim(l.value),b.loadImage(l.value,function(b){x.value=b.width;A.value=b.height;null!=d&&d(l.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));x.value="";A.value="";null!=d&&d(null)})))};this.init=function(){g?n.focus():l.focus();mxEvent.addListener(n,"focus",function(){m.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});mxEvent.addListener(l,"focus",function(){f.removeAttribute("checked");
-m.setAttribute("checked","checked");m.checked=!0});if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var d=c.parentNode,e=null;mxEvent.addListener(d,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(f){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=b.highlightElement(d));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(d,
-"drop",mxUtils.bind(this,function(f){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<f.dataTransfer.files.length)b.importFiles(f.dataTransfer.files,0,0,b.maxBackgroundSize,function(b,f,c,d,e,n){l.value=b;v()},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var f=0;f<b.length;f++)b[f]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0);else if(0<=mxUtils.indexOf(f.dataTransfer.types,"text/uri-list")){var c=f.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&
-(l.value=decodeURIComponent(c),v())}f.stopPropagation();f.preventDefault()}),!1)}};c.appendChild(m);c.appendChild(l);mxUtils.br(c);p=document.createElement("span");p.style.marginLeft="30px";mxUtils.write(p,mxResources.get("width")+":");c.appendChild(p);var x=document.createElement("input");x.setAttribute("type","text");x.style.width="60px";x.style.marginLeft="8px";x.style.marginRight="16px";x.value=null==d||g?"":d.width;c.appendChild(x);mxUtils.write(c,mxResources.get("height")+":");var A=document.createElement("input");
-A.setAttribute("type","text");A.style.width="60px";A.style.marginLeft="8px";A.style.marginRight="16px";A.value=null==d||g?"":d.height;c.appendChild(A);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(l,"change",v);ImageDialog.filePicked=function(b){b.action==google.picker.Action.PICKED&&null!=b.docs[0].thumbnails&&(b=b.docs[0].thumbnails[b.docs[0].thumbnails.length-1],null!=b&&(l.value=b.url,v()));l.focus()};c.appendChild(f);c.appendChild(n);mxUtils.br(c);g?(f.setAttribute("checked","checked"),f.checked=
-!0):(m.setAttribute("checked","checked"),m.checked=!0);if(!k&&f.checked){var z=document.createElement("option");mxUtils.write(z,mxResources.get("pageNotFound"));z.setAttribute("disabled","disabled");z.setAttribute("selected","selected");z.setAttribute("value","pageNotFound");n.appendChild(z);mxEvent.addListener(n,"change",function(){null==z.parentNode||z.selected||z.parentNode.removeChild(z)})}d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";k=mxUtils.button(mxResources.get("reset"),
-function(){l.value="";x.value="";A.value="";m.checked=!0;t=!1});mxEvent.addGestureListeners(k,function(){t=!0});k.className="geBtn";k.width="100";d.appendChild(k);k=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&d.appendChild(k);applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();v(null,function(b){e(""!=b&&null!=b?new mxImage(b,x.value,A.value):null,null==b)})});mxEvent.addGestureListeners(applyBtn,function(){u=
-!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(k);c.appendChild(d);this.container=c},ParseDialog=function(b,e,d){function c(f,c,d){var e=f.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==c||"plantUmlTxt"==c){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var l=function(c,f,e,l,k){g=mxEvent.isAltDown(d)?g:n.getCenterInsertPoint(new mxRectangle(0,0,l,k));var p=null;n.getModel().beginUpdate();try{p="txt"==f?b.insertAsPreText(e,
-g.x,g.y):n.insertVertex(null,null,null,g.x,g.y,l,k,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(e)+";"),n.setAttributeForCell(p,"plantUmlData",JSON.stringify({data:c,format:f},null,2))}finally{n.getModel().endUpdate()}null!=p&&(n.setSelectionCell(p),n.scrollCellToVisible(p))},n=b.editor.graph,k="plantUmlTxt"==c?"txt":"plantUmlPng"==c?"png":"svg";"@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"==
-f&&"svg"==k?window.setTimeout(function(){b.spinner.stop();l(f,k,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(f,k,function(c,d,e){b.spinner.stop();l(f,k,c,d,e)},function(c){b.handleError(c)})}}else if("mermaid"==c)b.spinner.spin(document.body,mxResources.get("inserting"))&&(n=b.editor.graph,b.generateMermaidImage(f,k,function(c,e,l){g=mxEvent.isAltDown(d)?g:n.getCenterInsertPoint(new mxRectangle(0,0,e,l));b.spinner.stop();var k=null;n.getModel().beginUpdate();try{k=n.insertVertex(null,null,null,g.x,g.y,e,l,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-c+";"),n.setAttributeForCell(k,"mermaidData",JSON.stringify({data:f,config:EditorUi.defaultMermaidConfig},null,2))}finally{n.getModel().endUpdate()}null!=k&&(n.setSelectionCell(k),n.scrollCellToVisible(k))},function(c){b.handleError(c)}));else if("table"==c){var p=null,q=[],t=0;for(c=0;c<e.length;c++){var m=mxUtils.trim(e[c]);if("create table"==m.substring(0,12).toLowerCase())m=mxUtils.trim(m.substring(12)),"("==m.charAt(m.length-1)&&(m=mxUtils.trim(m.substring(0,m.length-1))),p=new mxCell(m,new mxGeometry(t,
-0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),p.vertex=!0,q.push(p),m=b.editor.graph.getPreferredSizeForCell(v),null!=m&&(p.geometry.width=m.width+10);else if(null!=p&&")"==m.charAt(0))t+=p.geometry.width+40,p=null;else if("("!=m&&null!=p&&(m=m.substring(0,","==m.charAt(m.length-1)?m.length-1:m.length),"primary key"!=m.substring(0,11).toLowerCase())){var u=m.toLowerCase().indexOf("primary key"),
-m=m.replace(/primary key/i,""),v=new mxCell("",new mxGeometry(0,0,160,30),"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(0<u?"1":"0")+";");v.vertex=!0;var I=new mxCell(0<u?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(0<u?"fontStyle=1;":""));I.vertex=!0;v.insert(I);m=new mxCell(m,new mxGeometry(30,
-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;"+(0<u?"fontStyle=5;":""));m.vertex=!0;v.insert(m);m=b.editor.graph.getPreferredSizeForCell(m);null!=m&&p.geometry.width<m.width+30&&(p.geometry.width=Math.min(320,Math.max(p.geometry.width,m.width+30)));p.insert(v);p.geometry.height+=30}}0<q.length&&(n=b.editor.graph,g=mxEvent.isAltDown(d)?g:n.getCenterInsertPoint(n.getBoundingBoxFromGeometry(q,!0)),n.setSelectionCells(n.importCells(q,
-g.x,g.y)),n.scrollCellToVisible(n.getSelectionCell()))}else if("list"==c){if(0<e.length){n=b.editor.graph;v=null;q=[];for(c=p=0;c<e.length;c++)";"!=e[c].charAt(0)&&(0==e[c].length?v=null:null==v?(v=new mxCell(e[c],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),v.vertex=!0,q.push(v),m=n.getPreferredSizeForCell(v),null!=m&&v.geometry.width<m.width+10&&(v.geometry.width=
-m.width+10),p+=v.geometry.width+40):"--"==e[c]?(m=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),m.vertex=!0,v.geometry.height+=m.geometry.height,v.insert(m)):0<e[c].length&&(t=new mxCell(e[c],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;"),
-t.vertex=!0,m=n.getPreferredSizeForCell(t),null!=m&&t.geometry.width<m.width&&(t.geometry.width=m.width),v.geometry.width=Math.max(v.geometry.width,t.geometry.width),v.geometry.height+=t.geometry.height,v.insert(t)));if(0<q.length){g=mxEvent.isAltDown(d)?g:n.getCenterInsertPoint(n.getBoundingBoxFromGeometry(q,!0));n.getModel().beginUpdate();try{q=n.importCells(q,g.x,g.y);m=[];for(c=0;c<q.length;c++)m.push(q[c]),m=m.concat(q[c].children);n.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{n.getModel().endUpdate()}n.setSelectionCells(q);
-n.scrollCellToVisible(n.getSelectionCell())}}}else{var v=function(b){var c=K[b];null==c&&(c=new mxCell(b,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,K[b]=c,q.push(c));return c},K={},q=[];for(c=0;c<e.length;c++)if(";"!=e[c].charAt(0)){var L=e[c].split("->");2<=L.length&&(u=v(L[0]),I=v(L[L.length-1]),L=new mxCell(2<L.length?L[1]:"",new mxGeometry),L.edge=!0,u.insertEdge(L,!0),I.insertEdge(L,!1),q.push(L))}if(0<q.length){e=document.createElement("div");e.style.visibility="hidden";
-document.body.appendChild(e);n=new Graph(e);n.getModel().beginUpdate();try{q=n.importCells(q);for(c=0;c<q.length;c++)n.getModel().isVertex(q[c])&&(m=n.getPreferredSizeForCell(q[c]),q[c].geometry.width=Math.max(q[c].geometry.width,m.width),q[c].geometry.height=Math.max(q[c].geometry.height,m.height));p=new mxFastOrganicLayout(n);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(n.getDefaultParent());t=new mxParallelEdgeLayout(n);t.spacing=20;t.execute(n.getDefaultParent())}finally{n.getModel().endUpdate()}n.clearCellOverlays();
-m=[];b.editor.graph.getModel().beginUpdate();try{q=n.getModel().getChildren(n.getDefaultParent()),g=mxEvent.isAltDown(d)?g:b.editor.graph.getCenterInsertPoint(n.getBoundingBoxFromGeometry(q,!0)),m=b.editor.graph.importCells(q,g.x,g.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(m);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());n.destroy();e.parentNode.removeChild(e)}}}function k(){return"list"==
+var BackgroundImageDialog=function(b,e,d){var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=document.createElement("h2");mxUtils.write(g,mxResources.get("backgroundImage"));g.style.marginTop="0px";c.appendChild(g);var k=null!=d&&null!=d.originalSrc,g=!1,n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","geBackgroundImageDialogOption");var f=document.createElement("input");
+f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","geBackgroundImageDialogOption");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.width="320px";l.value=k||null==d?"":d.src;var m=document.createElement("select");m.style.width="320px";if(null!=b.pages)for(var p=0;p<b.pages.length;p++){var q=document.createElement("option");mxUtils.write(q,b.pages[p].getName()||
+mxResources.get("pageWithNumber",[p+1]));q.setAttribute("value","data:page/id,"+b.pages[p].getId());b.pages[p]==b.currentPage&&q.setAttribute("disabled","disabled");null!=d&&d.originalSrc==q.getAttribute("value")&&(q.setAttribute("selected","selected"),g=!0);m.appendChild(q)}k||null!=b.pages&&1!=b.pages.length||(n.style.display="none",f.style.display="none",m.style.display="none");var t=!1,u=!1,v=function(c,d){t||null!=c&&u||(f.checked?null!=d&&d(m.value):""==l.value||b.isOffline()?(y.value="",A.value=
+"",null!=d&&d("")):(l.value=mxUtils.trim(l.value),b.loadImage(l.value,function(b){y.value=b.width;A.value=b.height;null!=d&&d(l.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));y.value="";A.value="";null!=d&&d(null)})))};this.init=function(){k?m.focus():l.focus();mxEvent.addListener(m,"focus",function(){n.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});mxEvent.addListener(l,"focus",function(){f.removeAttribute("checked");
+n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var d=c.parentNode,e=null;mxEvent.addListener(d,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(c){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=b.highlightElement(d));c.stopPropagation();c.preventDefault()}));mxEvent.addListener(d,
+"drop",mxUtils.bind(this,function(c){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxBackgroundSize,function(b,c,f,d,e,m){l.value=b;v()},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=0;c<b.length;c++)b[c]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0);else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var f=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&
+(l.value=decodeURIComponent(f),v())}c.stopPropagation();c.preventDefault()}),!1)}};c.appendChild(n);c.appendChild(l);mxUtils.br(c);p=document.createElement("span");p.style.marginLeft="30px";mxUtils.write(p,mxResources.get("width")+":");c.appendChild(p);var y=document.createElement("input");y.setAttribute("type","text");y.style.width="60px";y.style.marginLeft="8px";y.style.marginRight="16px";y.value=null==d||k?"":d.width;c.appendChild(y);mxUtils.write(c,mxResources.get("height")+":");var A=document.createElement("input");
+A.setAttribute("type","text");A.style.width="60px";A.style.marginLeft="8px";A.style.marginRight="16px";A.value=null==d||k?"":d.height;c.appendChild(A);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(l,"change",v);ImageDialog.filePicked=function(b){b.action==google.picker.Action.PICKED&&null!=b.docs[0].thumbnails&&(b=b.docs[0].thumbnails[b.docs[0].thumbnails.length-1],null!=b&&(l.value=b.url,v()));l.focus()};c.appendChild(f);c.appendChild(m);mxUtils.br(c);k?(f.setAttribute("checked","checked"),f.checked=
+!0):(n.setAttribute("checked","checked"),n.checked=!0);if(!g&&f.checked){var z=document.createElement("option");mxUtils.write(z,mxResources.get("pageNotFound"));z.setAttribute("disabled","disabled");z.setAttribute("selected","selected");z.setAttribute("value","pageNotFound");m.appendChild(z);mxEvent.addListener(m,"change",function(){null==z.parentNode||z.selected||z.parentNode.removeChild(z)})}d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";g=mxUtils.button(mxResources.get("reset"),
+function(){l.value="";y.value="";A.value="";n.checked=!0;t=!1});mxEvent.addGestureListeners(g,function(){t=!0});g.className="geBtn";g.width="100";d.appendChild(g);g=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});g.className="geBtn";b.editor.cancelFirst&&d.appendChild(g);applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();v(null,function(b){e(""!=b&&null!=b?new mxImage(b,y.value,A.value):null,null==b)})});mxEvent.addGestureListeners(applyBtn,function(){u=
+!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(g);c.appendChild(d);this.container=c},ParseDialog=function(b,e,d){function c(c,f,d){var e=c.split("\n");if("plantUmlPng"==f||"plantUmlSvg"==f||"plantUmlTxt"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var l=function(c,f,e,l,g){k=mxEvent.isAltDown(d)?k:m.getCenterInsertPoint(new mxRectangle(0,0,l,g));var p=null;m.getModel().beginUpdate();try{p="txt"==f?b.insertAsPreText(e,
+k.x,k.y):m.insertVertex(null,null,null,k.x,k.y,l,g,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(e)+";"),m.setAttributeForCell(p,"plantUmlData",JSON.stringify({data:c,format:f},null,2))}finally{m.getModel().endUpdate()}null!=p&&(m.setSelectionCell(p),m.scrollCellToVisible(p))},m=b.editor.graph,g="plantUmlTxt"==f?"txt":"plantUmlPng"==f?"png":"svg";"@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"==
+c&&"svg"==g?window.setTimeout(function(){b.spinner.stop();l(c,g,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(c,g,function(f,d,e){b.spinner.stop();l(c,g,f,d,e)},function(c){b.handleError(c)})}}else if("mermaid"==f)b.spinner.spin(document.body,mxResources.get("inserting"))&&(m=b.editor.graph,b.generateMermaidImage(c,g,function(f,e,l){k=mxEvent.isAltDown(d)?k:m.getCenterInsertPoint(new mxRectangle(0,0,e,l));b.spinner.stop();var g=null;m.getModel().beginUpdate();try{g=m.insertVertex(null,null,null,k.x,k.y,e,l,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+f+";"),m.setAttributeForCell(g,"mermaidData",JSON.stringify({data:c,config:EditorUi.defaultMermaidConfig},null,2))}finally{m.getModel().endUpdate()}null!=g&&(m.setSelectionCell(g),m.scrollCellToVisible(g))},function(c){b.handleError(c)}));else if("table"==f){var p=null,q=[],t=0;for(f=0;f<e.length;f++){var n=mxUtils.trim(e[f]);if("create table"==n.substring(0,12).toLowerCase())n=mxUtils.trim(n.substring(12)),"("==n.charAt(n.length-1)&&(n=mxUtils.trim(n.substring(0,n.length-1))),p=new mxCell(n,new mxGeometry(t,
+0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),p.vertex=!0,q.push(p),n=b.editor.graph.getPreferredSizeForCell(v),null!=n&&(p.geometry.width=n.width+10);else if(null!=p&&")"==n.charAt(0))t+=p.geometry.width+40,p=null;else if("("!=n&&null!=p&&(n=n.substring(0,","==n.charAt(n.length-1)?n.length-1:n.length),"primary key"!=n.substring(0,11).toLowerCase())){var u=n.toLowerCase().indexOf("primary key"),
+n=n.replace(/primary key/i,""),v=new mxCell("",new mxGeometry(0,0,160,30),"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(0<u?"1":"0")+";");v.vertex=!0;var I=new mxCell(0<u?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(0<u?"fontStyle=1;":""));I.vertex=!0;v.insert(I);n=new mxCell(n,new mxGeometry(30,
+0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;"+(0<u?"fontStyle=5;":""));n.vertex=!0;v.insert(n);n=b.editor.graph.getPreferredSizeForCell(n);null!=n&&p.geometry.width<n.width+30&&(p.geometry.width=Math.min(320,Math.max(p.geometry.width,n.width+30)));p.insert(v);p.geometry.height+=30}}0<q.length&&(m=b.editor.graph,k=mxEvent.isAltDown(d)?k:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0)),m.setSelectionCells(m.importCells(q,
+k.x,k.y)),m.scrollCellToVisible(m.getSelectionCell()))}else if("list"==f){if(0<e.length){m=b.editor.graph;v=null;q=[];for(f=p=0;f<e.length;f++)";"!=e[f].charAt(0)&&(0==e[f].length?v=null:null==v?(v=new mxCell(e[f],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),v.vertex=!0,q.push(v),n=m.getPreferredSizeForCell(v),null!=n&&v.geometry.width<n.width+10&&(v.geometry.width=
+n.width+10),p+=v.geometry.width+40):"--"==e[f]?(n=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;"),n.vertex=!0,v.geometry.height+=n.geometry.height,v.insert(n)):0<e[f].length&&(t=new mxCell(e[f],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;"),
+t.vertex=!0,n=m.getPreferredSizeForCell(t),null!=n&&t.geometry.width<n.width&&(t.geometry.width=n.width),v.geometry.width=Math.max(v.geometry.width,t.geometry.width),v.geometry.height+=t.geometry.height,v.insert(t)));if(0<q.length){k=mxEvent.isAltDown(d)?k:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0));m.getModel().beginUpdate();try{q=m.importCells(q,k.x,k.y);n=[];for(f=0;f<q.length;f++)n.push(q[f]),n=n.concat(q[f].children);m.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{m.getModel().endUpdate()}m.setSelectionCells(q);
+m.scrollCellToVisible(m.getSelectionCell())}}}else{var v=function(b){var c=K[b];null==c&&(c=new mxCell(b,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,K[b]=c,q.push(c));return c},K={},q=[];for(f=0;f<e.length;f++)if(";"!=e[f].charAt(0)){var L=e[f].split("->");2<=L.length&&(u=v(L[0]),I=v(L[L.length-1]),L=new mxCell(2<L.length?L[1]:"",new mxGeometry),L.edge=!0,u.insertEdge(L,!0),I.insertEdge(L,!1),q.push(L))}if(0<q.length){e=document.createElement("div");e.style.visibility="hidden";
+document.body.appendChild(e);m=new Graph(e);m.getModel().beginUpdate();try{q=m.importCells(q);for(f=0;f<q.length;f++)m.getModel().isVertex(q[f])&&(n=m.getPreferredSizeForCell(q[f]),q[f].geometry.width=Math.max(q[f].geometry.width,n.width),q[f].geometry.height=Math.max(q[f].geometry.height,n.height));p=new mxFastOrganicLayout(m);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(m.getDefaultParent());t=new mxParallelEdgeLayout(m);t.spacing=20;t.execute(m.getDefaultParent())}finally{m.getModel().endUpdate()}m.clearCellOverlays();
+n=[];b.editor.graph.getModel().beginUpdate();try{q=m.getModel().getChildren(m.getDefaultParent()),k=mxEvent.isAltDown(d)?k:b.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0)),n=b.editor.graph.importCells(q,k.x,k.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(n);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());m.destroy();e.parentNode.removeChild(e)}}}function g(){return"list"==
f.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==f.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==f.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"==f.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"==f.value||"plantUmlTxt"==f.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
-";Example:\na->b\nb->edge label->c\nc->a\n"}var g=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.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 f=document.createElement("select");if("formatSql"==d||"mermaid"==d)f.style.display="none";var l=document.createElement("option");l.setAttribute("value","list");mxUtils.write(l,mxResources.get("list"));"plantUml"!=d&&f.appendChild(l);
+";Example:\na->b\nb->edge label->c\nc->a\n"}var k=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var n=document.createElement("textarea");n.style.resize="none";n.style.width="100%";n.style.height="354px";n.style.marginBottom="16px";var f=document.createElement("select");if("formatSql"==d||"mermaid"==d)f.style.display="none";var l=document.createElement("option");l.setAttribute("value","list");mxUtils.write(l,mxResources.get("list"));"plantUml"!=d&&f.appendChild(l);
null!=d&&"fromText"!=d||l.setAttribute("selected","selected");l=document.createElement("option");l.setAttribute("value","table");mxUtils.write(l,mxResources.get("formatSql"));"formatSql"==d&&(f.appendChild(l),l.setAttribute("selected","selected"));l=document.createElement("option");l.setAttribute("value","mermaid");mxUtils.write(l,mxResources.get("formatSql"));"mermaid"==d&&(f.appendChild(l),l.setAttribute("selected","selected"));l=document.createElement("option");l.setAttribute("value","diagram");
-mxUtils.write(l,mxResources.get("diagram"));"plantUml"!=d&&f.appendChild(l);l=document.createElement("option");l.setAttribute("value","plantUmlSvg");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&l.setAttribute("selected","selected");var n=document.createElement("option");n.setAttribute("value","plantUmlPng");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var p=document.createElement("option");p.setAttribute("value",
-"plantUmlTxt");mxUtils.write(p,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==d&&(f.appendChild(l),f.appendChild(n),f.appendChild(p));var q=k();m.value=q;e.appendChild(m);this.init=function(){m.focus()};Graph.fileSupport&&(m.addEventListener("dragover",function(b){b.stopPropagation();b.preventDefault()},!1),m.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=
-b.dataTransfer.files[0];var c=new FileReader;c.onload=function(b){m.value=b.target.result};c.readAsText(b)}},!1));e.appendChild(f);mxEvent.addListener(f,"change",function(){var b=k();if(0==m.value.length||m.value==q)q=b,m.value=q});b.isOffline()||"mermaid"!=d&&"plantUml"!=d||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==d?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),l.className="geBtn",e.appendChild(l));l=mxUtils.button(mxResources.get("close"),
-function(){m.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});l.className="geBtn";b.editor.cancelFirst&&e.appendChild(l);n=mxUtils.button(mxResources.get("insert"),function(d){b.hideDialog();c(m.value,f.value,d)});e.appendChild(n);n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);this.container=e},NewDialog=function(b,e,d,c,k,g,m,f,l,n,p,q,t,u,v,x,A,z){function y(b){null!=b&&(oa=V=b?135:140);b=!0;if(null!=ka)for(;L<ka.length&&(b||
+mxUtils.write(l,mxResources.get("diagram"));"plantUml"!=d&&f.appendChild(l);l=document.createElement("option");l.setAttribute("value","plantUmlSvg");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&l.setAttribute("selected","selected");var m=document.createElement("option");m.setAttribute("value","plantUmlPng");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var p=document.createElement("option");p.setAttribute("value",
+"plantUmlTxt");mxUtils.write(p,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==d&&(f.appendChild(l),f.appendChild(m),f.appendChild(p));var q=g();n.value=q;e.appendChild(n);this.init=function(){n.focus()};Graph.fileSupport&&(n.addEventListener("dragover",function(b){b.stopPropagation();b.preventDefault()},!1),n.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=
+b.dataTransfer.files[0];var c=new FileReader;c.onload=function(b){n.value=b.target.result};c.readAsText(b)}},!1));e.appendChild(f);mxEvent.addListener(f,"change",function(){var b=g();if(0==n.value.length||n.value==q)q=b,n.value=q});b.isOffline()||"mermaid"!=d&&"plantUml"!=d||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==d?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),l.className="geBtn",e.appendChild(l));l=mxUtils.button(mxResources.get("close"),
+function(){n.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});l.className="geBtn";b.editor.cancelFirst&&e.appendChild(l);m=mxUtils.button(mxResources.get("insert"),function(d){b.hideDialog();c(n.value,f.value,d)});e.appendChild(m);m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);this.container=e},NewDialog=function(b,e,d,c,g,k,n,f,l,m,p,q,t,u,v,y,A,z){function x(b){null!=b&&(oa=V=b?135:140);b=!0;if(null!=ka)for(;L<ka.length&&(b||
0!=mxUtils.mod(L,30));){var c=ka[L++],c=E(c.url,c.libs,c.title,c.tooltip?c.tooltip:c.title,c.select,c.imgUrl,c.info,c.onClick,c.preview,c.noImg,c.clibs);b&&c.click();b=!1}}function B(){if(Y&&null!=u)d||b.hideDialog(),u(Y,ca,K.value);else if(c)d||b.hideDialog(),c(aa,K.value,ia,fa);else{var f=K.value;null!=f&&0<f.length&&b.pickFolder(b.mode,function(c){b.createFile(f,aa,null!=fa&&0<fa.length?fa:null,null,function(){b.hideDialog()},null,c,null,null!=ga&&0<ga.length?ga:null)},b.mode!=App.MODE_GOOGLE||
-null==b.stateArg||null==b.stateArg.folderId)}}function C(b,c,d,e,n,g,k){null!=Z&&(Z.style.backgroundColor="transparent",Z.style.border="1px solid transparent");P.removeAttribute("disabled");aa=c;fa=d;ga=g;Z=b;Y=e;ia=k;ca=n;Z.style.backgroundColor=f;Z.style.border=l}function E(c,f,d,e,l,n,g,k,p,q,t){function m(c,f){if(null==v){var d=c,d=/^https?:\/\//.test(d)&&!b.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;mxUtils.get(d,mxUtils.bind(this,function(b){200<=
-b.getStatus()&&299>=b.getStatus()&&(v=b.getText());f(v)}))}else f(v)}function y(f,e,l){if(null!=f&&mxUtils.isAncestorNode(document.body,u)){f=mxUtils.parseXml(f);f=Editor.parseDiagramNode(f.documentElement);var n=new mxCodec(f.ownerDocument),k=new mxGraphModel;n.decode(f,k);f=k.root.getChildAt(0).children;b.sidebar.createTooltip(u,f,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||
-document.body.clientHeight)-80,800),null!=d?mxResources.get(d,null,d):null,!0,new mxPoint(e,l),!0,function(){D=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;C(u,null,null,c,g,t)},!0)}}function O(f,d){null==c||H||b.sidebar.currentElt==u?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),b.sidebar.currentElt=u,H=!0,m(c,function(c){H&&b.sidebar.currentElt==u&&y(c,mxEvent.getClientX(f),mxEvent.getClientY(f));H=!1}))}var u=document.createElement("div");u.className="geTemplate";u.style.position=
-"relative";u.style.height=oa+"px";u.style.width=V+"px";var v=null;Editor.isDarkMode()&&(u.style.filter="invert(100%)");null!=d?u.setAttribute("title",mxResources.get(d,null,d)):null!=e&&0<e.length&&u.setAttribute("title",e);var H=!1;if(null!=n){u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";l=document.createElement("img");l.setAttribute("src",n);l.setAttribute("alt",e);l.style.maxWidth=oa+"px";l.style.maxHeight=V+"px";var A=n.replace(".drawio.xml","").replace(".drawio",
-"").replace(".xml","");u.appendChild(l);l.onerror=function(){this.src!=A?this.src=A:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,g,t)}),null,null);mxEvent.addListener(u,"dblclick",function(b){B();mxEvent.consume(b)})}else if(!q&&null!=c&&0<c.length){var x=function(b){P.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";M.spin(N);m(c,function(c){M.stop();null!=
+null==b.stateArg||null==b.stateArg.folderId)}}function C(b,c,d,e,m,k,g){null!=Z&&(Z.style.backgroundColor="transparent",Z.style.border="1px solid transparent");P.removeAttribute("disabled");aa=c;fa=d;ga=k;Z=b;Y=e;ia=g;ca=m;Z.style.backgroundColor=f;Z.style.border=l}function E(c,f,d,e,l,m,k,g,p,q,t){function n(c,f){if(null==v){var d=c,d=/^https?:\/\//.test(d)&&!b.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;mxUtils.get(d,mxUtils.bind(this,function(b){200<=
+b.getStatus()&&299>=b.getStatus()&&(v=b.getText());f(v)}))}else f(v)}function x(f,e,l){if(null!=f&&mxUtils.isAncestorNode(document.body,u)){f=mxUtils.parseXml(f);f=Editor.parseDiagramNode(f.documentElement);var m=new mxCodec(f.ownerDocument),g=new mxGraphModel;m.decode(f,g);f=g.root.getChildAt(0).children;b.sidebar.createTooltip(u,f,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||
+document.body.clientHeight)-80,800),null!=d?mxResources.get(d,null,d):null,!0,new mxPoint(e,l),!0,function(){D=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;C(u,null,null,c,k,t)},!0)}}function O(f,d){null==c||H||b.sidebar.currentElt==u?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),b.sidebar.currentElt=u,H=!0,n(c,function(c){H&&b.sidebar.currentElt==u&&x(c,mxEvent.getClientX(f),mxEvent.getClientY(f));H=!1}))}var u=document.createElement("div");u.className="geTemplate";u.style.position=
+"relative";u.style.height=oa+"px";u.style.width=V+"px";var v=null;Editor.isDarkMode()&&(u.style.filter="invert(100%)");null!=d?u.setAttribute("title",mxResources.get(d,null,d)):null!=e&&0<e.length&&u.setAttribute("title",e);var H=!1;if(null!=m){u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";l=document.createElement("img");l.setAttribute("src",m);l.setAttribute("alt",e);l.style.maxWidth=oa+"px";l.style.maxHeight=V+"px";var y=m.replace(".drawio.xml","").replace(".drawio",
+"").replace(".xml","");u.appendChild(l);l.onerror=function(){this.src!=y?this.src=y:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,k,t)}),null,null);mxEvent.addListener(u,"dblclick",function(b){B();mxEvent.consume(b)})}else if(!q&&null!=c&&0<c.length){var A=function(b){P.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";M.spin(N);n(c,function(c){M.stop();null!=
c&&(C(u,c,f,null,null,t,T),b&&B())})};e=p||TEMPLATE_PATH+"/"+c.substring(0,c.length-4)+".png";u.style.backgroundImage="url("+e+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";null!=d&&(u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+(Editor.isDarkMode()?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+
-(oa-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>");mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){x()}),null,null);mxEvent.addListener(u,"dblclick",function(b){x(!0);mxEvent.consume(b)})}else u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+
-(oa-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>",l&&C(u),mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,g)}),null,null),null!=k?mxEvent.addListener(u,"click",k):(mxEvent.addListener(u,"click",function(b){C(u,null,null,c,g)}),mxEvent.addListener(u,"dblclick",function(b){B();mxEvent.consume(b)}));if(null!=c){var J=document.createElement("img");J.setAttribute("src",Sidebar.prototype.searchImage);J.setAttribute("title",mxResources.get("preview"));
-J.className="geActiveButton";J.style.position="absolute";J.style.cursor="default";J.style.padding="8px";J.style.right="0px";J.style.top="0px";u.appendChild(J);var D=!1;mxEvent.addGestureListeners(J,mxUtils.bind(this,function(c){D=b.sidebar.currentElt==u}),null,null);mxEvent.addListener(J,"click",mxUtils.bind(this,function(b){D||O(b,J);mxEvent.consume(b)}))}N.appendChild(u);return u}function G(){function b(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));18<
-f.length&&(f=f.substring(0,18)+"&hellip;");return f+" ("+c.length+")"}function c(b,c,f){mxEvent.addListener(c,"click",function(){la!=c&&(la.style.backgroundColor="",la=c,la.style.backgroundColor=m,N.scrollTop=0,N.innerHTML="",L=0,ka=f?da[b][f]:ba[b],H=null,y(!1))})}pa&&(pa=!1,mxEvent.addListener(N,"scroll",function(b){N.scrollTop+N.clientHeight>=N.scrollHeight&&(y(),mxEvent.consume(b))}));if(0<ra){var f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";
-mxUtils.write(f,mxResources.get("custom"));ha.appendChild(f);for(var d in ea){var e=document.createElement("div"),l=d,f=ea[d];18<l.length&&(l=l.substring(0,18)+"&hellip;");e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";e.setAttribute("title",l+" ("+f.length+")");mxUtils.write(e,e.getAttribute("title"));null!=n&&(e.style.padding=n);ha.appendChild(e);(function(b,c){mxEvent.addListener(e,"click",
-function(){la!=c&&(la.style.backgroundColor="",la=c,la.style.backgroundColor=m,N.scrollTop=0,N.innerHTML="",L=0,ka=ea[b],H=null,y(!1))})})(d,e)}f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(f,"draw.io");ha.appendChild(f)}for(d in ba){var l=da[d],g=e=document.createElement(l?"ul":"div"),f=ba[d],k=b(d,f);if(null!=l){var p=document.createElement("li"),q=document.createElement("div");q.className="geTempTreeCaret";
-q.setAttribute("title",k);mxUtils.write(q,k);g=q;p.appendChild(q);k=document.createElement("ul");k.className="geTempTreeNested";k.style.visibility="hidden";for(var t in l){var u=document.createElement("li"),O=b(t,l[t]);u.setAttribute("title",O);mxUtils.write(u,O);c(d,u,t);k.appendChild(u)}p.appendChild(k);e.className="geTempTree";e.appendChild(p);(function(b,c){mxEvent.addListener(c,"click",function(){b.style.visibility="visible";b.classList.toggle("geTempTreeActive");b.classList.toggle("geTempTreeNested")&&
-setTimeout(function(){b.style.visibility="hidden"},550);c.classList.toggle("geTempTreeCaret-down")})})(k,q)}else e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",e.setAttribute("title",k),mxUtils.write(e,k);null!=n&&(e.style.padding=n);ha.appendChild(e);null==la&&0<f.length&&(la=e,la.style.backgroundColor=m,ka=f);c(d,g)}y(!1)}d=null!=d?d:!0;k=null!=k?k:!1;m=null!=m?m:"#ebf2f9";
-f=null!=f?f:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";l=null!=l?l:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";p=null!=p?p:EditorUi.templateFile;var F=document.createElement("div");F.style.userSelect="none";F.style.height="100%";var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.height="46px";d&&F.appendChild(D);var I=document.createElement("img");I.setAttribute("border","0");I.setAttribute("align","absmiddle");I.style.width="40px";I.style.height="40px";I.style.marginRight=
+(oa-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>");mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){A()}),null,null);mxEvent.addListener(u,"dblclick",function(b){A(!0);mxEvent.consume(b)})}else u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+
+(oa-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>",l&&C(u),mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,k)}),null,null),null!=g?mxEvent.addListener(u,"click",g):(mxEvent.addListener(u,"click",function(b){C(u,null,null,c,k)}),mxEvent.addListener(u,"dblclick",function(b){B();mxEvent.consume(b)}));if(null!=c){var J=document.createElement("img");J.setAttribute("src",Sidebar.prototype.searchImage);J.setAttribute("title",mxResources.get("preview"));
+J.className="geActiveButton";J.style.position="absolute";J.style.cursor="default";J.style.padding="8px";J.style.right="0px";J.style.top="0px";u.appendChild(J);var D=!1;mxEvent.addGestureListeners(J,mxUtils.bind(this,function(c){D=b.sidebar.currentElt==u}),null,null);mxEvent.addListener(J,"click",mxUtils.bind(this,function(b){D||O(b,J);mxEvent.consume(b)}))}N.appendChild(u);return u}function F(){function b(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));18<
+f.length&&(f=f.substring(0,18)+"&hellip;");return f+" ("+c.length+")"}function c(b,c,f){mxEvent.addListener(c,"click",function(){la!=c&&(la.style.backgroundColor="",la=c,la.style.backgroundColor=n,N.scrollTop=0,N.innerHTML="",L=0,ka=f?da[b][f]:ba[b],H=null,x(!1))})}pa&&(pa=!1,mxEvent.addListener(N,"scroll",function(b){N.scrollTop+N.clientHeight>=N.scrollHeight&&(x(),mxEvent.consume(b))}));if(0<ra){var f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";
+mxUtils.write(f,mxResources.get("custom"));ha.appendChild(f);for(var d in ea){var e=document.createElement("div"),l=d,f=ea[d];18<l.length&&(l=l.substring(0,18)+"&hellip;");e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";e.setAttribute("title",l+" ("+f.length+")");mxUtils.write(e,e.getAttribute("title"));null!=m&&(e.style.padding=m);ha.appendChild(e);(function(b,c){mxEvent.addListener(e,"click",
+function(){la!=c&&(la.style.backgroundColor="",la=c,la.style.backgroundColor=n,N.scrollTop=0,N.innerHTML="",L=0,ka=ea[b],H=null,x(!1))})})(d,e)}f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(f,"draw.io");ha.appendChild(f)}for(d in ba){var l=da[d],k=e=document.createElement(l?"ul":"div"),f=ba[d],g=b(d,f);if(null!=l){var p=document.createElement("li"),q=document.createElement("div");q.className="geTempTreeCaret";
+q.setAttribute("title",g);mxUtils.write(q,g);k=q;p.appendChild(q);g=document.createElement("ul");g.className="geTempTreeNested";g.style.visibility="hidden";for(var t in l){var u=document.createElement("li"),O=b(t,l[t]);u.setAttribute("title",O);mxUtils.write(u,O);c(d,u,t);g.appendChild(u)}p.appendChild(g);e.className="geTempTree";e.appendChild(p);(function(b,c){mxEvent.addListener(c,"click",function(){b.style.visibility="visible";b.classList.toggle("geTempTreeActive");b.classList.toggle("geTempTreeNested")&&
+setTimeout(function(){b.style.visibility="hidden"},550);c.classList.toggle("geTempTreeCaret-down")})})(g,q)}else e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",e.setAttribute("title",g),mxUtils.write(e,g);null!=m&&(e.style.padding=m);ha.appendChild(e);null==la&&0<f.length&&(la=e,la.style.backgroundColor=n,ka=f);c(d,k)}x(!1)}d=null!=d?d:!0;g=null!=g?g:!1;n=null!=n?n:"#ebf2f9";
+f=null!=f?f:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";l=null!=l?l:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";p=null!=p?p:EditorUi.templateFile;var G=document.createElement("div");G.style.userSelect="none";G.style.height="100%";var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.height="46px";d&&G.appendChild(D);var I=document.createElement("img");I.setAttribute("border","0");I.setAttribute("align","absmiddle");I.style.width="40px";I.style.height="40px";I.style.marginRight=
"10px";I.style.paddingBottom="4px";I.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_NOTION?IMAGE_PATH+"/notion-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";
!e&&d&&D.appendChild(I);d&&mxUtils.write(D,(null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");I=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?I=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?I=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?I=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?I=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?I=b.gitLab.extension:b.mode==
App.MODE_NOTION&&null!=b.notion?I=b.notion.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(I=b.trello.extension);var K=document.createElement("input");K.setAttribute("value",b.defaultFilename+I);K.style.marginLeft="10px";K.style.width=e?"144px":"244px";this.init=function(){d&&(K.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null));null!=N.parentNode&&null!=N.parentNode.parentNode&&mxEvent.addGestureListeners(N.parentNode.parentNode,
mxUtils.bind(this,function(c){b.sidebar.hideTooltip()}),null,null)};d&&(D.appendChild(K),z?K.style.width=e?"350px":"450px":(null!=b.editor.diagramFileTypes&&(z=FilenameDialog.createFileTypes(b,K,b.editor.diagramFileTypes),z.style.marginLeft="6px",z.style.width=e?"80px":"180px",D.appendChild(z)),null!=b.editor.fileExtensions&&(z=FilenameDialog.createTypeHint(b,K,b.editor.fileExtensions),z.style.marginTop="12px",D.appendChild(z))));var D=!1,L=0,M=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}),P=mxUtils.button(x||mxResources.get("create"),function(){P.setAttribute("disabled","disabled");B();P.removeAttribute("disabled")});P.className="geBtn gePrimaryBtn";if(q||t){var O=[],H=null,J=null,W=null,S=function(b){P.setAttribute("disabled","disabled");for(var c=0;c<O.length;c++)O[c].className=c==b?"geBtn gePrimaryBtn":"geBtn"},D=!0;x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";F.appendChild(x);
-z=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ha.style.display="";R.style.display="";N.style.left="160px";S(0);N.scrollTop=0;N.innerHTML="";L=0;H!=ka&&(ka=H,ba=J,ra=W,ha.innerHTML="",G(),H=null)});O.push(z);x.appendChild(z);var Q=function(b){ha.style.display="none";R.style.display="none";N.style.left="30px";S(b?-1:1);null==H&&(H=ka);N.scrollTop=0;N.innerHTML="";M.spin(N);var c=function(b,c,f){L=0;M.stop();ka=b;f=f||{};var d=0,e;for(e in f)d+=f[e].length;if(c)N.innerHTML=
-c;else if(0==b.length&&0==d)N.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(N.innerHTML="",0<d){ha.style.display="";N.style.left="160px";ha.innerHTML="";ra=0;ba={"draw.io":b};for(e in f)ba[e]=f[e];G()}else y(!0)};b?t(X.value,c):q(c)};q&&(z=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){Q()}),x.appendChild(z),O.push(z));if(t){z=document.createElement("span");z.style.marginLeft="10px";z.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+
-":");x.appendChild(z);var X=document.createElement("input");X.style.marginRight="10px";X.style.marginLeft="10px";X.style.width="220px";mxEvent.addListener(X,"keypress",function(b){13==b.keyCode&&Q(!0)});x.appendChild(X);z=mxUtils.button(mxResources.get("search"),function(){Q(!0)});z.className="geBtn";x.appendChild(z)}S(0)}var fa=null,ga=null,aa=null,Z=null,Y=null,ia=null,ca=null,N=document.createElement("div");N.style.border="1px solid #d3d3d3";N.style.position="absolute";N.style.left="160px";N.style.right=
-"34px";x=(d?72:40)+(D?30:0);N.style.top=x+"px";N.style.bottom="68px";N.style.margin="6px 0 0 -1px";N.style.padding="6px";N.style.overflow="auto";var R=document.createElement("div");R.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;height:22px;margin-top: 6px;white-space: nowrap";var na=document.createElement("input");na.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";na.setAttribute("placeholder",mxResources.get("search"));
+color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),P=mxUtils.button(y||mxResources.get("create"),function(){P.setAttribute("disabled","disabled");B();P.removeAttribute("disabled")});P.className="geBtn gePrimaryBtn";if(q||t){var O=[],H=null,J=null,W=null,S=function(b){P.setAttribute("disabled","disabled");for(var c=0;c<O.length;c++)O[c].className=c==b?"geBtn gePrimaryBtn":"geBtn"},D=!0;y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.height="30px";G.appendChild(y);
+z=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ha.style.display="";R.style.display="";N.style.left="160px";S(0);N.scrollTop=0;N.innerHTML="";L=0;H!=ka&&(ka=H,ba=J,ra=W,ha.innerHTML="",F(),H=null)});O.push(z);y.appendChild(z);var Q=function(b){ha.style.display="none";R.style.display="none";N.style.left="30px";S(b?-1:1);null==H&&(H=ka);N.scrollTop=0;N.innerHTML="";M.spin(N);var c=function(b,c,f){L=0;M.stop();ka=b;f=f||{};var d=0,e;for(e in f)d+=f[e].length;if(c)N.innerHTML=
+c;else if(0==b.length&&0==d)N.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(N.innerHTML="",0<d){ha.style.display="";N.style.left="160px";ha.innerHTML="";ra=0;ba={"draw.io":b};for(e in f)ba[e]=f[e];F()}else x(!0)};b?t(X.value,c):q(c)};q&&(z=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){Q()}),y.appendChild(z),O.push(z));if(t){z=document.createElement("span");z.style.marginLeft="10px";z.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+
+":");y.appendChild(z);var X=document.createElement("input");X.style.marginRight="10px";X.style.marginLeft="10px";X.style.width="220px";mxEvent.addListener(X,"keypress",function(b){13==b.keyCode&&Q(!0)});y.appendChild(X);z=mxUtils.button(mxResources.get("search"),function(){Q(!0)});z.className="geBtn";y.appendChild(z)}S(0)}var fa=null,ga=null,aa=null,Z=null,Y=null,ia=null,ca=null,N=document.createElement("div");N.style.border="1px solid #d3d3d3";N.style.position="absolute";N.style.left="160px";N.style.right=
+"34px";y=(d?72:40)+(D?30:0);N.style.top=y+"px";N.style.bottom="68px";N.style.margin="6px 0 0 -1px";N.style.padding="6px";N.style.overflow="auto";var R=document.createElement("div");R.style.cssText="position:absolute;left:30px;width:128px;top:"+y+"px;height:22px;margin-top: 6px;white-space: nowrap";var na=document.createElement("input");na.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";na.setAttribute("placeholder",mxResources.get("search"));
na.setAttribute("type","text");R.appendChild(na);var U=document.createElement("img"),ja="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";U.setAttribute("src",ja);U.setAttribute("title",mxResources.get("search"));U.style.position="relative";U.style.left="-18px";U.style.top="1px";U.style.background="url('"+b.editor.transparentImage+"')";R.appendChild(U);mxEvent.addListener(U,"click",function(){U.getAttribute("src")==Dialog.prototype.closeImage&&(U.setAttribute("src",
-ja),U.setAttribute("title",mxResources.get("search")),na.value="",null!=qa&&(qa.click(),qa=null));na.focus()});mxEvent.addListener(na,"keydown",mxUtils.bind(this,function(b){if(13==b.keyCode){var c=na.value;if(""==c)null!=qa&&(qa.click(),qa=null);else{if(null==NewDialog.tagsList[p]){var f={},d;for(d in ba)for(var e=ba[d],l=0;l<e.length;l++){var n=e[l];if(null!=n.tags)for(var g=n.tags.toLowerCase().split(";"),k=0;k<g.length;k++)null==f[g[k]]&&(f[g[k]]=[]),f[g[k]].push(n)}NewDialog.tagsList[p]=f}var q=
-c.toLowerCase().split(" "),f=NewDialog.tagsList[p];if(0<ra&&null==f.__tagsList__){for(d in ea)for(e=ea[d],l=0;l<e.length;l++)for(n=e[l],g=n.title.split(" "),g.push(d),k=0;k<g.length;k++){var t=g[k].toLowerCase();null==f[t]&&(f[t]=[]);f[t].push(n)}f.__tagsList__=!0}d=[];e={};for(l=g=0;l<q.length;l++)if(0<q[l].length){var t=f[q[l]],m={};d=[];if(null!=t)for(k=0;k<t.length;k++)n=t[k],0==g==(null==e[n.url])&&(m[n.url]=!0,d.push(n));e=m;g++}N.scrollTop=0;N.innerHTML="";L=0;f=document.createElement("div");
-f.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(f,mxResources.get(0==d.length?"noResultsFor":"resultsFor",[c]));N.appendChild(f);null!=la&&null==qa&&(la.style.backgroundColor="",qa=la,la=f);ka=d;H=null;y(!1)}mxEvent.consume(b)}}));mxEvent.addListener(na,"keyup",mxUtils.bind(this,function(b){""==na.value?(U.setAttribute("src",ja),U.setAttribute("title",mxResources.get("search"))):(U.setAttribute("src",Dialog.prototype.closeImage),U.setAttribute("title",
-mxResources.get("reset")))}));x+=23;var ha=document.createElement("div");ha.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(N,"scroll",function(){b.sidebar.hideTooltip()});var oa=140,V=140,ba={},da={},ea={},ra=0,pa=!0,la=null,qa=null;ba.basic=[{title:"blankDiagram",select:!0}];var ka=ba.basic;if(!e){var sa=function(){mxUtils.get(T,function(b){if(!ta){ta=!0;b=b.getXml().documentElement.firstChild;
-for(var c={};null!=b;){if("undefined"!==typeof b.getAttribute)if("clibs"==b.nodeName){for(var f=b.getAttribute("name"),d=b.getElementsByTagName("add"),e=[],l=0;l<d.length;l++)e.push(encodeURIComponent(mxUtils.getTextContent(d[l])));null!=f&&0<e.length&&(c[f]=e.join(";"))}else if(e=b.getAttribute("url"),null!=e){d=b.getAttribute("section");f=b.getAttribute("subsection");if(null==d&&(l=e.indexOf("/"),d=e.substring(0,l),null==f)){var n=e.indexOf("/",l+1);-1<n&&(f=e.substring(l+1,n))}l=ba[d];null==l&&
-(l=[],ba[d]=l);e=b.getAttribute("clibs");null!=c[e]&&(e=c[e]);e={url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title"),tooltip:b.getAttribute("name")||b.getAttribute("url"),preview:b.getAttribute("preview"),clibs:e,tags:b.getAttribute("tags")};l.push(e);null!=f&&(l=da[d],null==l&&(l={},da[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}M.stop();G()}})};F.appendChild(R);F.appendChild(ha);F.appendChild(N);var ta=!1,T=p;/^https?:\/\//.test(T)&&!b.editor.isCorsEnabledForUrl(T)&&
-(T=PROXY_URL+"?url="+encodeURIComponent(T));M.spin(N);null!=A?A(function(b,c){ea=b;W=ra=c;sa()},sa):sa();J=ba}mxEvent.addListener(K,"keypress",function(c){b.dialog.container.firstChild==F&&13==c.keyCode&&B()});A=document.createElement("div");A.style.marginTop=e?"4px":"16px";A.style.textAlign="right";A.style.position="absolute";A.style.left="40px";A.style.bottom="24px";A.style.right="40px";e||b.isOffline()||!d||null!=c||k||(x=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-x.className="geBtn",A.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){null!=g&&g();b.hideDialog(!0)});x.className="geBtn";!b.editor.cancelFirst||k&&null==g||A.appendChild(x);e||"1"==urlParams.embed||k||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(b,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&(c=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+encodeURIComponent(K.value)+"&create="+encodeURIComponent(c)),
+ja),U.setAttribute("title",mxResources.get("search")),na.value="",null!=qa&&(qa.click(),qa=null));na.focus()});mxEvent.addListener(na,"keydown",mxUtils.bind(this,function(b){if(13==b.keyCode){var c=na.value;if(""==c)null!=qa&&(qa.click(),qa=null);else{if(null==NewDialog.tagsList[p]){var f={},d;for(d in ba)for(var e=ba[d],l=0;l<e.length;l++){var m=e[l];if(null!=m.tags)for(var k=m.tags.toLowerCase().split(";"),g=0;g<k.length;g++)null==f[k[g]]&&(f[k[g]]=[]),f[k[g]].push(m)}NewDialog.tagsList[p]=f}var q=
+c.toLowerCase().split(" "),f=NewDialog.tagsList[p];if(0<ra&&null==f.__tagsList__){for(d in ea)for(e=ea[d],l=0;l<e.length;l++)for(m=e[l],k=m.title.split(" "),k.push(d),g=0;g<k.length;g++){var t=k[g].toLowerCase();null==f[t]&&(f[t]=[]);f[t].push(m)}f.__tagsList__=!0}d=[];e={};for(l=k=0;l<q.length;l++)if(0<q[l].length){var t=f[q[l]],n={};d=[];if(null!=t)for(g=0;g<t.length;g++)m=t[g],0==k==(null==e[m.url])&&(n[m.url]=!0,d.push(m));e=n;k++}N.scrollTop=0;N.innerHTML="";L=0;f=document.createElement("div");
+f.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(f,mxResources.get(0==d.length?"noResultsFor":"resultsFor",[c]));N.appendChild(f);null!=la&&null==qa&&(la.style.backgroundColor="",qa=la,la=f);ka=d;H=null;x(!1)}mxEvent.consume(b)}}));mxEvent.addListener(na,"keyup",mxUtils.bind(this,function(b){""==na.value?(U.setAttribute("src",ja),U.setAttribute("title",mxResources.get("search"))):(U.setAttribute("src",Dialog.prototype.closeImage),U.setAttribute("title",
+mxResources.get("reset")))}));y+=23;var ha=document.createElement("div");ha.style.cssText="position:absolute;left:30px;width:128px;top:"+y+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(N,"scroll",function(){b.sidebar.hideTooltip()});var oa=140,V=140,ba={},da={},ea={},ra=0,pa=!0,la=null,qa=null;ba.basic=[{title:"blankDiagram",select:!0}];var ka=ba.basic;if(!e){var sa=function(){mxUtils.get(T,function(b){if(!ta){ta=!0;b=b.getXml().documentElement.firstChild;
+for(var c={};null!=b;){if("undefined"!==typeof b.getAttribute)if("clibs"==b.nodeName){for(var f=b.getAttribute("name"),d=b.getElementsByTagName("add"),e=[],l=0;l<d.length;l++)e.push(encodeURIComponent(mxUtils.getTextContent(d[l])));null!=f&&0<e.length&&(c[f]=e.join(";"))}else if(e=b.getAttribute("url"),null!=e){d=b.getAttribute("section");f=b.getAttribute("subsection");if(null==d&&(l=e.indexOf("/"),d=e.substring(0,l),null==f)){var m=e.indexOf("/",l+1);-1<m&&(f=e.substring(l+1,m))}l=ba[d];null==l&&
+(l=[],ba[d]=l);e=b.getAttribute("clibs");null!=c[e]&&(e=c[e]);e={url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title"),tooltip:b.getAttribute("name")||b.getAttribute("url"),preview:b.getAttribute("preview"),clibs:e,tags:b.getAttribute("tags")};l.push(e);null!=f&&(l=da[d],null==l&&(l={},da[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}M.stop();F()}})};G.appendChild(R);G.appendChild(ha);G.appendChild(N);var ta=!1,T=p;/^https?:\/\//.test(T)&&!b.editor.isCorsEnabledForUrl(T)&&
+(T=PROXY_URL+"?url="+encodeURIComponent(T));M.spin(N);null!=A?A(function(b,c){ea=b;W=ra=c;sa()},sa):sa();J=ba}mxEvent.addListener(K,"keypress",function(c){b.dialog.container.firstChild==G&&13==c.keyCode&&B()});A=document.createElement("div");A.style.marginTop=e?"4px":"16px";A.style.textAlign="right";A.style.position="absolute";A.style.left="40px";A.style.bottom="24px";A.style.right="40px";e||b.isOffline()||!d||null!=c||g||(y=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+y.className="geBtn",A.appendChild(y));y=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();b.hideDialog(!0)});y.className="geBtn";!b.editor.cancelFirst||g&&null==k||A.appendChild(y);e||"1"==urlParams.embed||g||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(b,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&(c=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+encodeURIComponent(K.value)+"&create="+encodeURIComponent(c)),
null==b.getCurrentFile()?window.location.href=c:window.openWindow(c))},mxResources.get("url"));b.showDialog(c.container,300,80,!0,!0);c.init()}),e.className="geBtn",A.appendChild(e));Graph.fileSupport&&v&&(v=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var c=document.createElement("input");c.setAttribute("multiple","multiple");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(f){b.openFiles(c.files,!0);c.value=""});c.style.display="none";document.body.appendChild(c);
-b.newDlgFileInputElt=c}b.newDlgFileInputElt.click()}),v.className="geBtn",A.appendChild(v));A.appendChild(P);b.editor.cancelFirst||null!=c||k&&null==g||A.appendChild(x);F.appendChild(A);this.container=F};NewDialog.tagsList={};
-var CreateDialog=function(b,e,d,c,k,g,m,f,l,n,p,q,t,u,v,x,A){function z(c,f,d,l){function n(){mxEvent.addListener(g,"click",function(){var c=d;if(m){var f=C.value,l=f.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>l){var c=null!=c?c:D.value,n="";c==App.MODE_GOOGLE?n=b.drive.extension:c==App.MODE_GITHUB?n=b.gitHub.extension:c==App.MODE_GITLAB?n=b.gitLab.extension:c==App.MODE_NOTION?n=b.notion.extension:c==App.MODE_TRELLO?n=b.trello.extension:c==App.MODE_DROPBOX?n=b.dropbox.extension:c==App.MODE_ONEDRIVE?
-n=b.oneDrive.extension:c==App.MODE_DEVICE&&(n=".drawio");0<=l&&(f=f.substring(0,l));C.value=f+n}}y(d)})}var g=document.createElement("a");g.style.overflow="hidden";var k=document.createElement("img");k.src=c;k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.style.width="60px";k.style.height="60px";k.style.paddingBottom="6px";g.style.display="inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding="8px 8px 10px 8px";g.style.whiteSpace=
-"nowrap";g.appendChild(k);g.style.color="gray";g.style.fontSize="11px";var p=document.createElement("div");g.appendChild(p);mxUtils.write(p,f);if(null!=l&&null==b[l]){k.style.visibility="hidden";mxUtils.setOpacity(p,10);var t=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});t.spin(g);var u=window.setTimeout(function(){null==b[l]&&(t.stop(),g.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,
-function(){null!=b[l]&&(window.clearTimeout(u),mxUtils.setOpacity(p,100),k.style.visibility="",t.stop(),n())}))}else n();G.appendChild(g);++F==q&&(mxUtils.br(G),F=0)}function y(c){var f=C.value;if(null==c||null!=f&&0<f.length)A&&b.hideDialog(),d(f,c,C)}m=null!=m?m:!0;f=null!=f?f:!0;q=null!=q?q:4;A=null!=A?A:!0;g=document.createElement("div");g.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(g);var B=document.createElement("h2");mxUtils.write(B,k||mxResources.get("create"));B.style.marginTop=
-"0px";B.style.marginBottom="24px";g.appendChild(B);mxUtils.write(g,mxResources.get("filename")+":");var C=document.createElement("input");C.setAttribute("value",e);C.style.width="200px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};g.appendChild(C);null!=x&&(null!=b.editor.diagramFileTypes&&(k=FilenameDialog.createFileTypes(b,
-C,b.editor.diagramFileTypes),k.style.marginLeft="6px",k.style.width="80px",g.appendChild(k)),g.appendChild(FilenameDialog.createTypeHint(b,C,x)));x=null;if(null!=t&&null!=u&&"image/"==u.substring(0,6)&&("image/svg"!=u.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";k=document.createElement("img");var E=v?t:btoa(unescape(encodeURIComponent(t)));k.setAttribute("src","data:"+u+";base64,"+E);k.style.position="absolute";k.style.top="70px";k.style.right="100px";k.style.maxWidth="120px";k.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(k.style,"transform","translate(50%,-50%)");g.appendChild(k);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=u||(x=mxUtils.button(mxResources.get("copy"),function(c){c=b.base64ToBlob(E,"image/png");c=new ClipboardItem({"image/png":c,"text/html":new Blob(['<img src="data:'+u+";base64,"+E+'">'],{type:"text/html"})});navigator.clipboard.write([c]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(c){b.handleError(c)}))}),
-x.style.marginTop="6px",x.className="geBtn");l&&Editor.popupsAllowed&&(k.style.cursor="pointer",mxEvent.addGestureListeners(k,null,null,function(b){mxEvent.isPopupTrigger(b)||y("_blank")}))}mxUtils.br(g);var G=document.createElement("div");G.style.textAlign="center";var F=0;G.style.marginTop="6px";g.appendChild(G);var D=document.createElement("select");D.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(t=document.createElement("option"),t.setAttribute("value",
+b.newDlgFileInputElt=c}b.newDlgFileInputElt.click()}),v.className="geBtn",A.appendChild(v));A.appendChild(P);b.editor.cancelFirst||null!=c||g&&null==k||A.appendChild(y);G.appendChild(A);this.container=G};NewDialog.tagsList={};
+var CreateDialog=function(b,e,d,c,g,k,n,f,l,m,p,q,t,u,v,y,A){function z(c,f,d,l){function m(){mxEvent.addListener(k,"click",function(){var c=d;if(n){var f=C.value,l=f.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>l){var c=null!=c?c:D.value,m="";c==App.MODE_GOOGLE?m=b.drive.extension:c==App.MODE_GITHUB?m=b.gitHub.extension:c==App.MODE_GITLAB?m=b.gitLab.extension:c==App.MODE_NOTION?m=b.notion.extension:c==App.MODE_TRELLO?m=b.trello.extension:c==App.MODE_DROPBOX?m=b.dropbox.extension:c==App.MODE_ONEDRIVE?
+m=b.oneDrive.extension:c==App.MODE_DEVICE&&(m=".drawio");0<=l&&(f=f.substring(0,l));C.value=f+m}}x(d)})}var k=document.createElement("a");k.style.overflow="hidden";var g=document.createElement("img");g.src=c;g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.style.width="60px";g.style.height="60px";g.style.paddingBottom="6px";k.style.display="inline-block";k.className="geBaseButton";k.style.position="relative";k.style.margin="4px";k.style.padding="8px 8px 10px 8px";k.style.whiteSpace=
+"nowrap";k.appendChild(g);k.style.color="gray";k.style.fontSize="11px";var p=document.createElement("div");k.appendChild(p);mxUtils.write(p,f);if(null!=l&&null==b[l]){g.style.visibility="hidden";mxUtils.setOpacity(p,10);var t=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});t.spin(k);var u=window.setTimeout(function(){null==b[l]&&(t.stop(),k.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,
+function(){null!=b[l]&&(window.clearTimeout(u),mxUtils.setOpacity(p,100),g.style.visibility="",t.stop(),m())}))}else m();F.appendChild(k);++G==q&&(mxUtils.br(F),G=0)}function x(c){var f=C.value;if(null==c||null!=f&&0<f.length)A&&b.hideDialog(),d(f,c,C)}n=null!=n?n:!0;f=null!=f?f:!0;q=null!=q?q:4;A=null!=A?A:!0;k=document.createElement("div");k.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(k);var B=document.createElement("h2");mxUtils.write(B,g||mxResources.get("create"));B.style.marginTop=
+"0px";B.style.marginBottom="24px";k.appendChild(B);mxUtils.write(k,mxResources.get("filename")+":");var C=document.createElement("input");C.setAttribute("value",e);C.style.width="200px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};k.appendChild(C);null!=y&&(null!=b.editor.diagramFileTypes&&(g=FilenameDialog.createFileTypes(b,
+C,b.editor.diagramFileTypes),g.style.marginLeft="6px",g.style.width="80px",k.appendChild(g)),k.appendChild(FilenameDialog.createTypeHint(b,C,y)));y=null;if(null!=t&&null!=u&&"image/"==u.substring(0,6)&&("image/svg"!=u.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";g=document.createElement("img");var E=v?t:btoa(unescape(encodeURIComponent(t)));g.setAttribute("src","data:"+u+";base64,"+E);g.style.position="absolute";g.style.top="70px";g.style.right="100px";g.style.maxWidth="120px";g.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)");k.appendChild(g);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=u||(y=mxUtils.button(mxResources.get("copy"),function(c){c=b.base64ToBlob(E,"image/png");c=new ClipboardItem({"image/png":c,"text/html":new Blob(['<img src="data:'+u+";base64,"+E+'">'],{type:"text/html"})});navigator.clipboard.write([c]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(c){b.handleError(c)}))}),
+y.style.marginTop="6px",y.className="geBtn");l&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addGestureListeners(g,null,null,function(b){mxEvent.isPopupTrigger(b)||x("_blank")}))}mxUtils.br(k);var F=document.createElement("div");F.style.textAlign="center";var G=0;F.style.marginTop="6px";k.appendChild(F);var D=document.createElement("select");D.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(t=document.createElement("option"),t.setAttribute("value",
App.MODE_GOOGLE),mxUtils.write(t,mxResources.get("googleDrive")),D.appendChild(t),z(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(t,mxResources.get("oneDrive")),D.appendChild(t),b.mode==App.MODE_ONEDRIVE&&t.setAttribute("selected","selected"),z(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
"oneDrive")),"function"===typeof window.DropboxClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(t,mxResources.get("dropbox")),D.appendChild(t),b.mode==App.MODE_DROPBOX&&t.setAttribute("selected","selected"),z(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GITHUB),mxUtils.write(t,mxResources.get("github")),D.appendChild(t),z(IMAGE_PATH+
"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GITLAB),mxUtils.write(t,mxResources.get("gitlab")),D.appendChild(t),z(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),null!=b.notion&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_NOTION),mxUtils.write(t,mxResources.get("notion")),D.appendChild(t),z(IMAGE_PATH+"/notion-logo.svg",mxResources.get("notion"),
App.MODE_NOTION,"notion")),"function"===typeof window.TrelloClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_TRELLO),mxUtils.write(t,mxResources.get("trello")),D.appendChild(t),z(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==b.getCurrentFile()||(t=document.createElement("option"),t.setAttribute("value",App.MODE_DEVICE),mxUtils.write(t,mxResources.get("device")),D.appendChild(t),
b.mode!=App.MODE_DEVICE&&f||t.setAttribute("selected","selected"),p&&z(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));f&&isLocalStorage&&"0"!=urlParams.browser&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_BROWSER),mxUtils.write(f,mxResources.get("browser")),D.appendChild(f),b.mode==App.MODE_BROWSER&&f.setAttribute("selected","selected"),z(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));f=document.createElement("div");
-f.style.marginTop="26px";f.style.textAlign="center";null!=n&&(p=mxUtils.button(mxResources.get("help"),function(){b.openLink(n)}),p.className="geBtn",f.appendChild(p));p=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});p.className="geBtn";b.editor.cancelFirst&&null==c&&f.appendChild(p);null==c&&(t=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),t.className="geBtn",
-f.appendChild(t));l&&Editor.popupsAllowed&&(l=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),l.className="geBtn",f.appendChild(l));CreateDialog.showDownloadButton&&(l=mxUtils.button(mxResources.get("download"),function(){y("download")}),l.className="geBtn",f.appendChild(l),null!=x&&(l.style.marginTop="6px",f.style.marginTop="6px"));null!=x&&(mxUtils.br(f),f.appendChild(x));b.editor.cancelFirst&&null==c||f.appendChild(p);mxEvent.addListener(C,"keypress",function(c){13==
-c.keyCode?y(App.MODE_DEVICE):27==c.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});g.appendChild(f);this.container=g};CreateDialog.showDownloadButton=!0;
-var PopupDialog=function(b,e,d,c,k){k=null!=k?k:!0;var g=document.createElement("div");g.style.textAlign="left";mxUtils.write(g,mxResources.get("fileOpenLocation"));mxUtils.br(g);mxUtils.br(g);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){k&&b.hideDialog();null!=c&&c()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";g.appendChild(m);mxUtils.br(g);var f=mxUtils.button(mxResources.get("openInNewWindow"),function(){k&&b.hideDialog();null!=d&&d();b.openLink(e,
-null,!0)});f.className="geBtn gePrimaryBtn";f.style.width=m.style.width;g.appendChild(f);mxUtils.br(g);mxUtils.br(g);mxUtils.write(g,mxResources.get("allowPopups"));this.container=g},ImageDialog=function(b,e,d,c,k,g){g=null!=g?g:!0;var m=b.editor.graph,f=document.createElement("div");mxUtils.write(f,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor=
+f.style.marginTop="26px";f.style.textAlign="center";null!=m&&(p=mxUtils.button(mxResources.get("help"),function(){b.openLink(m)}),p.className="geBtn",f.appendChild(p));p=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});p.className="geBtn";b.editor.cancelFirst&&null==c&&f.appendChild(p);null==c&&(t=mxUtils.button(mxResources.get("decideLater"),function(){x(null)}),t.className="geBtn",
+f.appendChild(t));l&&Editor.popupsAllowed&&(l=mxUtils.button(mxResources.get("openInNewWindow"),function(){x("_blank")}),l.className="geBtn",f.appendChild(l));CreateDialog.showDownloadButton&&(l=mxUtils.button(mxResources.get("download"),function(){x("download")}),l.className="geBtn",f.appendChild(l),null!=y&&(l.style.marginTop="6px",f.style.marginTop="6px"));null!=y&&(mxUtils.br(f),f.appendChild(y));b.editor.cancelFirst&&null==c||f.appendChild(p);mxEvent.addListener(C,"keypress",function(c){13==
+c.keyCode?x(App.MODE_DEVICE):27==c.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});k.appendChild(f);this.container=k};CreateDialog.showDownloadButton=!0;
+var PopupDialog=function(b,e,d,c,g){g=null!=g?g:!0;var k=document.createElement("div");k.style.textAlign="left";mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var n=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&b.hideDialog();null!=c&&c()});n.className="geBtn";n.style.marginBottom="8px";n.style.width="280px";k.appendChild(n);mxUtils.br(k);var f=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&b.hideDialog();null!=d&&d();b.openLink(e,
+null,!0)});f.className="geBtn gePrimaryBtn";f.style.width=n.style.width;k.appendChild(f);mxUtils.br(k);mxUtils.br(k);mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(b,e,d,c,g,k){k=null!=k?k:!0;var n=b.editor.graph,f=document.createElement("div");mxUtils.write(f,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor=
"default";e.style.paddingRight="20px";var l=document.createElement("input");l.setAttribute("value",d);l.setAttribute("type","text");l.setAttribute("spellcheck","false");l.setAttribute("autocorrect","off");l.setAttribute("autocomplete","off");l.setAttribute("autocapitalize","off");l.style.marginTop="6px";l.style.width=(Graph.fileSupport?460:340)-20+"px";l.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";l.style.backgroundRepeat="no-repeat";l.style.backgroundPosition="100% 50%";l.style.paddingRight=
-"14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display="inline-block";d.style.top="3px";d.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){l.value="";l.focus()});e.appendChild(l);e.appendChild(d);f.appendChild(e);var n=function(f,d,e,l){var n="data:"==f.substring(0,5);!b.isOffline()||n&&
-"undefined"===typeof chrome?0<f.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(f,function(n){b.spinner.stop();b.hideDialog();var k=!1===l?1:null!=d&&null!=e?Math.max(d/n.width,e/n.height):Math.min(1,Math.min(520/n.width,520/n.height));g&&(f=b.convertDataUri(f));c(f,Math.round(Number(n.width)*k),Math.round(Number(n.height)*k))},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),
-c(f)):(f=b.convertDataUri(f),d=null==d?120:d,e=null==e?100:e,b.hideDialog(),c(f,d,e))},p=function(f,d){if(null!=f){var e=k?null:m.getModel().getGeometry(m.getSelectionCell());null!=e?n(f,e.width,e.height,d):n(f,null,null,d)}else b.hideDialog(),c(null)};this.init=function(){l.focus();if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=f.parentNode,d=null;mxEvent.addListener(c,"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();
-b.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(f){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=b.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxImageSize,function(b,c,f,d,e,l,n,g){p(b,g)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=
+"14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display="inline-block";d.style.top="3px";d.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){l.value="";l.focus()});e.appendChild(l);e.appendChild(d);f.appendChild(e);var m=function(f,d,e,l){var m="data:"==f.substring(0,5);!b.isOffline()||m&&
+"undefined"===typeof chrome?0<f.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(f,function(m){b.spinner.stop();b.hideDialog();var g=!1===l?1:null!=d&&null!=e?Math.max(d/m.width,e/m.height):Math.min(1,Math.min(520/m.width,520/m.height));k&&(f=b.convertDataUri(f));c(f,Math.round(Number(m.width)*g),Math.round(Number(m.height)*g))},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),
+c(f)):(f=b.convertDataUri(f),d=null==d?120:d,e=null==e?100:e,b.hideDialog(),c(f,d,e))},p=function(f,d){if(null!=f){var e=g?null:n.getModel().getGeometry(n.getSelectionCell());null!=e?m(f,e.width,e.height,d):m(f,null,null,d)}else b.hideDialog(),c(null)};this.init=function(){l.focus();if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=f.parentNode,d=null;mxEvent.addListener(c,"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();
+b.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(f){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=b.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxImageSize,function(b,c,f,d,e,l,m,k){p(b,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=
0;c<b.length;c++)b[c]()},!mxEvent.isControlDown(c),null,null,!0);else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var f=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(f)&&p(decodeURIComponent(f))}c.stopPropagation();c.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign="center";e=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});e.className="geBtn";b.editor.cancelFirst&&
d.appendChild(e);ImageDialog.filePicked=function(b){b.action==google.picker.Action.PICKED&&null!=b.docs[0].thumbnails&&(b=b.docs[0].thumbnails[b.docs[0].thumbnails.length-1],null!=b&&(l.value=b.url));l.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var q=document.createElement("input");q.setAttribute("multiple","multiple");q.setAttribute("type","file");mxEvent.addListener(q,"change",function(c){null!=q.files&&(b.importFiles(q.files,0,0,b.maxImageSize,function(b,c,f,d,e,l){p(b)},function(){},
function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=0;c<b.length;c++)b[c]()},!0),q.type="",q.type="file",q.value="")});q.style.display="none";document.body.appendChild(q);b.imgDlgFileInputElt=q}var t=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});t.className="geBtn";d.appendChild(t)}document.createElement("canvas").getContext&&"data:image/"==l.value.substring(0,11)&&"data:image/svg"!=l.value.substring(0,14)&&(t=mxUtils.button(mxResources.get("crop"),
function(){var c=new CropImageDialog(b,l.value,function(b){l.value=b});b.showDialog(c.container,300,380,!0,!0);c.init()}),t.className="geBtn",d.appendChild(t));mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&p(l.value)});t=mxUtils.button(mxResources.get("apply"),function(){p(l.value)});t.className="geBtn gePrimaryBtn";d.appendChild(t);b.editor.cancelFirst||d.appendChild(e);Graph.fileSupport&&(d.style.marginTop="120px",f.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",f.style.backgroundPosition=
-"center 65%",f.style.backgroundRepeat="no-repeat",e=document.createElement("div"),e.style.position="absolute",e.style.width="420px",e.style.top="58%",e.style.textAlign="center",e.style.fontSize="18px",e.style.color="#a0c3ff",mxUtils.write(e,mxResources.get("dragImagesHere")),f.appendChild(e));f.appendChild(d);this.container=f},LinkDialog=function(b,e,d,c,k,g,m){function f(b,c,f){f=mxUtils.button("",f);f.className="geBtn";f.setAttribute("title",c);c=document.createElement("img");c.style.height="26px";
-c.style.width="26px";c.setAttribute("src",b);f.style.minWidth="42px";f.style.verticalAlign="middle";f.appendChild(c);y.appendChild(f)}var l=document.createElement("div");mxUtils.write(l,mxResources.get("editLink")+":");var n=document.createElement("div");n.className="geTitle";n.style.backgroundColor="transparent";n.style.borderColor="transparent";n.style.whiteSpace="nowrap";n.style.textOverflow="clip";n.style.cursor="default";n.style.paddingRight="20px";var p=document.createElement("input");p.setAttribute("placeholder",
+"center 65%",f.style.backgroundRepeat="no-repeat",e=document.createElement("div"),e.style.position="absolute",e.style.width="420px",e.style.top="58%",e.style.textAlign="center",e.style.fontSize="18px",e.style.color="#a0c3ff",mxUtils.write(e,mxResources.get("dragImagesHere")),f.appendChild(e));f.appendChild(d);this.container=f},LinkDialog=function(b,e,d,c,g,k,n){function f(b,c,f){f=mxUtils.button("",f);f.className="geBtn";f.setAttribute("title",c);c=document.createElement("img");c.style.height="26px";
+c.style.width="26px";c.setAttribute("src",b);f.style.minWidth="42px";f.style.verticalAlign="middle";f.appendChild(c);x.appendChild(f)}var l=document.createElement("div");mxUtils.write(l,mxResources.get("editLink")+":");var m=document.createElement("div");m.className="geTitle";m.style.backgroundColor="transparent";m.style.borderColor="transparent";m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";m.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="100%";p.style.boxSizing="border-box";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";p.style.marginBottom="4px";var q=document.createElement("div");q.setAttribute("title",mxResources.get("reset"));q.style.position="relative";q.style.left="-16px";q.style.width="12px";q.style.height=
"14px";q.style.cursor="pointer";q.style.display="inline-block";q.style.top="3px";q.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(q,"click",function(){p.value="";p.focus()});var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","url");t.setAttribute("type","radio");t.setAttribute("name","geLinkDialogOption");var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value",
-"url");u.setAttribute("type","radio");u.setAttribute("name","geLinkDialogOption");var v=document.createElement("select");v.style.width="100%";var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.margin="0 6p 0 6px";null!=m&&(x.setAttribute("checked","checked"),x.defaultChecked=!0);m=null!=m?m:"_blank";x.setAttribute("title",m);g&&(p.style.width="340px");if(k&&null!=b.pages){null!=e&&Graph.isPageLink(e)?(u.setAttribute("checked","checked"),u.defaultChecked=!0):(p.setAttribute("value",
-e),t.setAttribute("checked","checked"),t.defaultChecked=!0);n.appendChild(t);n.appendChild(p);n.appendChild(q);g&&(n.appendChild(x),mxUtils.write(n,mxResources.get("openInNewWindow")));mxUtils.br(n);n.appendChild(u);k=!1;for(g=0;g<b.pages.length;g++)q=document.createElement("option"),mxUtils.write(q,b.pages[g].getName()||mxResources.get("pageWithNumber",[g+1])),q.setAttribute("value","data:page/id,"+b.pages[g].getId()),e==q.getAttribute("value")&&(q.setAttribute("selected","selected"),k=!0),v.appendChild(q);
-if(!k&&u.checked){var A=document.createElement("option");mxUtils.write(A,mxResources.get("pageNotFound"));A.setAttribute("disabled","disabled");A.setAttribute("selected","selected");A.setAttribute("value","pageNotFound");v.appendChild(A);mxEvent.addListener(v,"change",function(){null==A.parentNode||A.selected||A.parentNode.removeChild(A)})}n.appendChild(v)}else p.setAttribute("value",e),n.appendChild(p),n.appendChild(q);l.appendChild(n);var z=mxUtils.button(d,function(){b.hideDialog();c(u.checked?
-"pageNotFound"!==v.value?v.value:e:p.value,LinkDialog.selectedDocs,x.checked?m:null)});z.style.verticalAlign="middle";z.className="geBtn gePrimaryBtn";this.init=function(){u.checked?v.focus():(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(v,"focus",function(){t.removeAttribute("checked");u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(p,"focus",function(){u.removeAttribute("checked");
+"url");u.setAttribute("type","radio");u.setAttribute("name","geLinkDialogOption");var v=document.createElement("select");v.style.width="100%";var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.margin="0 6p 0 6px";null!=n&&(y.setAttribute("checked","checked"),y.defaultChecked=!0);n=null!=n?n:"_blank";y.setAttribute("title",n);k&&(p.style.width="340px");if(g&&null!=b.pages){null!=e&&Graph.isPageLink(e)?(u.setAttribute("checked","checked"),u.defaultChecked=!0):(p.setAttribute("value",
+e),t.setAttribute("checked","checked"),t.defaultChecked=!0);m.appendChild(t);m.appendChild(p);m.appendChild(q);k&&(m.appendChild(y),mxUtils.write(m,mxResources.get("openInNewWindow")));mxUtils.br(m);m.appendChild(u);g=!1;for(k=0;k<b.pages.length;k++)q=document.createElement("option"),mxUtils.write(q,b.pages[k].getName()||mxResources.get("pageWithNumber",[k+1])),q.setAttribute("value","data:page/id,"+b.pages[k].getId()),e==q.getAttribute("value")&&(q.setAttribute("selected","selected"),g=!0),v.appendChild(q);
+if(!g&&u.checked){var A=document.createElement("option");mxUtils.write(A,mxResources.get("pageNotFound"));A.setAttribute("disabled","disabled");A.setAttribute("selected","selected");A.setAttribute("value","pageNotFound");v.appendChild(A);mxEvent.addListener(v,"change",function(){null==A.parentNode||A.selected||A.parentNode.removeChild(A)})}m.appendChild(v)}else p.setAttribute("value",e),m.appendChild(p),m.appendChild(q);l.appendChild(m);var z=mxUtils.button(d,function(){b.hideDialog();c(u.checked?
+"pageNotFound"!==v.value?v.value:e:p.value,LinkDialog.selectedDocs,y.checked?n:null)});z.style.verticalAlign="middle";z.className="geBtn gePrimaryBtn";this.init=function(){u.checked?v.focus():(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(v,"focus",function(){t.removeAttribute("checked");u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(p,"focus",function(){u.removeAttribute("checked");
t.setAttribute("checked","checked");t.checked=!0});if(Graph.fileSupport){var c=l.parentNode,f=null;mxEvent.addListener(c,"dragleave",function(b){null!=f&&(f.parentNode.removeChild(f),f=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(d){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=b.highlightElement(c));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(b){null!=f&&(f.parentNode.removeChild(f),
-f=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(p.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),t.setAttribute("checked","checked"),t.checked=!0,z.click());b.stopPropagation();b.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="18px";y.style.textAlign="center";d=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});d.style.verticalAlign="middle";d.className="geBtn";y.appendChild(d);
-b.isOffline()&&!mxClient.IS_CHROMEAPP&&(d.style.display="none");d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";b.editor.cancelFirst&&y.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(b){if(b.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=b.docs;var c=b.docs[0].url;"application/mxe"==b.docs[0].mimeType||null!=b.docs[0].mimeType&&"application/vnd.jgraph."==b.docs[0].mimeType.substring(0,
+f=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(p.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),t.setAttribute("checked","checked"),t.checked=!0,z.click());b.stopPropagation();b.preventDefault()}),!1)}};var x=document.createElement("div");x.style.marginTop="18px";x.style.textAlign="center";d=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});d.style.verticalAlign="middle";d.className="geBtn";x.appendChild(d);
+b.isOffline()&&!mxClient.IS_CHROMEAPP&&(d.style.display="none");d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";b.editor.cancelFirst&&x.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(b){if(b.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=b.docs;var c=b.docs[0].url;"application/mxe"==b.docs[0].mimeType||null!=b.docs[0].mimeType&&"application/vnd.jgraph."==b.docs[0].mimeType.substring(0,
23)?c="https://www.draw.io/#G"+b.docs[0].id:"application/vnd.google-apps.folder"==b.docs[0].mimeType&&(c="https://drive.google.com/#folders/"+b.docs[0].id);p.value=c;p.focus()}else LinkDialog.selectedDocs=null;p.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&f(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();
if(null==b.linkPicker){var c=b.drive.createLinkPicker();b.linkPicker=c.setCallback(function(b){LinkDialog.filePicked(b)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&f(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(b){p.value=b[0].link;p.focus()}})});null!=b.oneDrive&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){b.oneDrive.pickFile(function(b,
c){p.value=c.value[0].webUrl;p.focus()})});null!=b.gitHub&&f(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(b){if(null!=b){b=b.split("/");var c=b[0],f=b[1],d=b[2];b=b.slice(3,b.length).join("/");p.value="https://github.com/"+c+"/"+f+"/blob/"+d+"/"+b;p.focus()}})});null!=b.gitLab&&f(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(b){if(null!=b){b=b.split("/");var c=b[0],f=b[1],d=b[2];b=b.slice(3,b.length).join("/");
-p.value=DRAWIO_GITLAB_URL+"/"+c+"/"+f+"/blob/"+d+"/"+b;p.focus()}})});mxEvent.addListener(p,"keypress",function(f){13==f.keyCode&&(b.hideDialog(),c(u.checked?v.value:p.value,LinkDialog.selectedDocs))});y.appendChild(z);b.editor.cancelFirst||y.appendChild(d);l.appendChild(y);this.container=l},FeedbackDialog=function(b,e,d,c){var k=document.createElement("div"),g=document.createElement("div");mxUtils.write(g,mxResources.get("sendYourFeedback"));g.style.fontSize="18px";g.style.marginBottom="18px";k.appendChild(g);
-g=document.createElement("div");mxUtils.write(g,mxResources.get("yourEmailAddress")+(d?"":" ("+mxResources.get("required")+")"));k.appendChild(g);var m=document.createElement("input");m.setAttribute("type","text");m.style.marginTop="6px";m.style.width="600px";var f=mxUtils.button(mxResources.get("sendMessage"),function(){var f=p.value+(n.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+
-navigator.appName+"\nplatform:\n"+navigator.platform;f.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(m.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+":\n"+f),function(c){b.spinner.stop();200<=c.getStatus()&&
-299>=c.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});f.className="geBtn gePrimaryBtn";if(!d){f.setAttribute("disabled","disabled");var l=/^(([^<>()[\]\\.,;:\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(m,"change",function(){0<m.value.length&&0<l.test(m.value)?
-f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});mxEvent.addListener(m,"keyup",function(){0<m.value.length&&l.test(m.value)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")})}k.appendChild(m);this.init=function(){m.focus()};var n=document.createElement("input");n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;d=document.createElement("p");d.style.marginTop="14px";d.appendChild(n);g=document.createElement("span");mxUtils.write(g,
-" "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(g);mxEvent.addListener(g,"click",function(b){n.checked=!n.checked;mxEvent.consume(b)});k.appendChild(d);g=document.createElement("div");mxUtils.write(g,mxResources.get("feedback"));k.appendChild(g);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("comments"));k.appendChild(p);d=document.createElement("div");d.style.marginTop=
-"26px";d.style.textAlign="right";g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";b.editor.cancelFirst?(d.appendChild(g),d.appendChild(f)):(d.appendChild(f),d.appendChild(g));k.appendChild(d);this.container=k};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(b,e,d){var c=document.createElement("div"),k=document.createElement("h3");k.style.marginTop="0px";mxUtils.write(k,mxResources.get("revisionHistory"));c.appendChild(k);k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";c.appendChild(k);var g=document.createElement("div");g.style.position="absolute";g.style.border="1px solid lightGray";g.style.left="199px";g.style.width="470px";g.style.height="376px";
-g.style.overflow="hidden";var m=document.createElement("div");m.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";g.appendChild(m);mxEvent.disableContextMenu(g);c.appendChild(g);var f=new Graph(g);f.setTooltips(!1);f.setEnabled(!1);f.setPanning(!0);f.panningHandler.ignoreCell=!0;f.panningHandler.useLeftButtonForPanning=!0;f.minFitScale=null;f.maxFitScale=null;f.centerZoom=!0;var l=0,n=null,p=0,q=f.getGlobalVariable;
-f.getGlobalVariable=function(b){return"page"==b&&null!=n&&null!=n[p]?n[p].getAttribute("name"):"pagenumber"==b?p+1:"pagecount"==b?null!=n?n.length:1:q.apply(this,arguments)};f.getLinkForCell=function(){return null};Editor.MathJaxRender&&f.addListener(mxEvent.SIZE,mxUtils.bind(this,function(c,d){b.editor.graph.mathEnabled&&Editor.MathJaxRender(f.container)}));for(var t={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},u=new Spinner(t),v=b.getCurrentFile(),x=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),A={},t=0;t<x.length;t++)A[x[t].getAttribute("id")]=x[t];var z=null,y=null,B=null,C=null,E=mxUtils.button("",function(){null!=B&&f.zoomIn()});E.className="geSprite geSprite-zoomin";E.setAttribute("title",mxResources.get("zoomIn"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");
-mxUtils.setOpacity(E,20);var G=mxUtils.button("",function(){null!=B&&f.zoomOut()});G.className="geSprite geSprite-zoomout";G.setAttribute("title",mxResources.get("zoomOut"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var F=mxUtils.button("",function(){null!=B&&(f.maxFitScale=8,f.fit(8),f.center())});F.className="geSprite geSprite-fit";F.setAttribute("title",mxResources.get("fit"));F.style.outline="none";F.style.border=
-"none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var D=mxUtils.button("",function(){null!=B&&(f.zoomActual(),f.center())});D.className="geSprite geSprite-actualsize";D.setAttribute("title",mxResources.get("actualSize"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var I=mxUtils.button("",function(){});I.className="geSprite geSprite-middle";I.setAttribute("title",mxResources.get("compare"));
-I.style.outline="none";I.style.border="none";I.style.margin="2px";mxUtils.setOpacity(I,60);var K=g.cloneNode(!1);K.style.pointerEvent="none";g.parentNode.appendChild(K);var L=new Graph(K);L.setTooltips(!1);L.setEnabled(!1);L.setPanning(!0);L.panningHandler.ignoreCell=!0;L.panningHandler.useLeftButtonForPanning=!0;L.minFitScale=null;L.maxFitScale=null;L.centerZoom=!0;mxEvent.addGestureListeners(I,function(b){b=A[n[l].getAttribute("id")];mxUtils.setOpacity(I,20);m.innerHTML="";null==b?mxUtils.write(m,
-mxResources.get("pageNotFound")):(M.style.display="none",g.style.display="none",K.style.display="",K.style.backgroundColor=g.style.backgroundColor,b=Editor.parseDiagramNode(b),(new mxCodec(b.ownerDocument)).decode(b,L.getModel()),L.view.scaleAndTranslate(f.view.scale,f.view.translate.x,f.view.translate.y))},null,function(){mxUtils.setOpacity(I,60);m.innerHTML="";"none"==g.style.display&&(M.style.display="",g.style.display="",K.style.display="none")});var M=document.createElement("div");M.style.position=
+p.value=DRAWIO_GITLAB_URL+"/"+c+"/"+f+"/blob/"+d+"/"+b;p.focus()}})});mxEvent.addListener(p,"keypress",function(f){13==f.keyCode&&(b.hideDialog(),c(u.checked?v.value:p.value,LinkDialog.selectedDocs))});x.appendChild(z);b.editor.cancelFirst||x.appendChild(d);l.appendChild(x);this.container=l},FeedbackDialog=function(b,e,d,c){var g=document.createElement("div"),k=document.createElement("div");mxUtils.write(k,mxResources.get("sendYourFeedback"));k.style.fontSize="18px";k.style.marginBottom="18px";g.appendChild(k);
+k=document.createElement("div");mxUtils.write(k,mxResources.get("yourEmailAddress")+(d?"":" ("+mxResources.get("required")+")"));g.appendChild(k);var n=document.createElement("input");n.setAttribute("type","text");n.style.marginTop="6px";n.style.width="600px";var f=mxUtils.button(mxResources.get("sendMessage"),function(){var f=p.value+(m.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+
+navigator.appName+"\nplatform:\n"+navigator.platform;f.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(n.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+":\n"+f),function(c){b.spinner.stop();200<=c.getStatus()&&
+299>=c.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});f.className="geBtn gePrimaryBtn";if(!d){f.setAttribute("disabled","disabled");var l=/^(([^<>()[\]\\.,;:\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(n,"change",function(){0<n.value.length&&0<l.test(n.value)?
+f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});mxEvent.addListener(n,"keyup",function(){0<n.value.length&&l.test(n.value)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")})}g.appendChild(n);this.init=function(){n.focus()};var m=document.createElement("input");m.setAttribute("type","checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;d=document.createElement("p");d.style.marginTop="14px";d.appendChild(m);k=document.createElement("span");mxUtils.write(k,
+" "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(k);mxEvent.addListener(k,"click",function(b){m.checked=!m.checked;mxEvent.consume(b)});g.appendChild(d);k=document.createElement("div");mxUtils.write(k,mxResources.get("feedback"));g.appendChild(k);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("comments"));g.appendChild(p);d=document.createElement("div");d.style.marginTop=
+"26px";d.style.textAlign="right";k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";b.editor.cancelFirst?(d.appendChild(k),d.appendChild(f)):(d.appendChild(f),d.appendChild(k));g.appendChild(d);this.container=g};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(b,e,d){var c=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));c.appendChild(g);g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.width="170px";g.style.height="378px";c.appendChild(g);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.left="199px";k.style.width="470px";k.style.height="376px";
+k.style.overflow="hidden";var n=document.createElement("div");n.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";k.appendChild(n);mxEvent.disableContextMenu(k);c.appendChild(k);var f=new Graph(k);f.setTooltips(!1);f.setEnabled(!1);f.setPanning(!0);f.panningHandler.ignoreCell=!0;f.panningHandler.useLeftButtonForPanning=!0;f.minFitScale=null;f.maxFitScale=null;f.centerZoom=!0;var l=0,m=null,p=0,q=f.getGlobalVariable;
+f.getGlobalVariable=function(b){return"page"==b&&null!=m&&null!=m[p]?m[p].getAttribute("name"):"pagenumber"==b?p+1:"pagecount"==b?null!=m?m.length:1:q.apply(this,arguments)};f.getLinkForCell=function(){return null};Editor.MathJaxRender&&f.addListener(mxEvent.SIZE,mxUtils.bind(this,function(c,d){b.editor.graph.mathEnabled&&Editor.MathJaxRender(f.container)}));for(var t={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},u=new Spinner(t),v=b.getCurrentFile(),y=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),A={},t=0;t<y.length;t++)A[y[t].getAttribute("id")]=y[t];var z=null,x=null,B=null,C=null,E=mxUtils.button("",function(){null!=B&&f.zoomIn()});E.className="geSprite geSprite-zoomin";E.setAttribute("title",mxResources.get("zoomIn"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");
+mxUtils.setOpacity(E,20);var F=mxUtils.button("",function(){null!=B&&f.zoomOut()});F.className="geSprite geSprite-zoomout";F.setAttribute("title",mxResources.get("zoomOut"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var G=mxUtils.button("",function(){null!=B&&(f.maxFitScale=8,f.fit(8),f.center())});G.className="geSprite geSprite-fit";G.setAttribute("title",mxResources.get("fit"));G.style.outline="none";G.style.border=
+"none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var D=mxUtils.button("",function(){null!=B&&(f.zoomActual(),f.center())});D.className="geSprite geSprite-actualsize";D.setAttribute("title",mxResources.get("actualSize"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var I=mxUtils.button("",function(){});I.className="geSprite geSprite-middle";I.setAttribute("title",mxResources.get("compare"));
+I.style.outline="none";I.style.border="none";I.style.margin="2px";mxUtils.setOpacity(I,60);var K=k.cloneNode(!1);K.style.pointerEvent="none";k.parentNode.appendChild(K);var L=new Graph(K);L.setTooltips(!1);L.setEnabled(!1);L.setPanning(!0);L.panningHandler.ignoreCell=!0;L.panningHandler.useLeftButtonForPanning=!0;L.minFitScale=null;L.maxFitScale=null;L.centerZoom=!0;mxEvent.addGestureListeners(I,function(b){b=A[m[l].getAttribute("id")];mxUtils.setOpacity(I,20);n.innerHTML="";null==b?mxUtils.write(n,
+mxResources.get("pageNotFound")):(M.style.display="none",k.style.display="none",K.style.display="",K.style.backgroundColor=k.style.backgroundColor,b=Editor.parseDiagramNode(b),(new mxCodec(b.ownerDocument)).decode(b,L.getModel()),L.view.scaleAndTranslate(f.view.scale,f.view.translate.x,f.view.translate.y))},null,function(){mxUtils.setOpacity(I,60);n.innerHTML="";"none"==k.style.display&&(M.style.display="",k.style.display="",K.style.display="none")});var M=document.createElement("div");M.style.position=
"absolute";M.style.textAlign="right";M.style.color="gray";M.style.marginTop="10px";M.style.backgroundColor="transparent";M.style.top="440px";M.style.right="32px";M.style.maxWidth="380px";M.style.cursor="default";var P=mxUtils.button(mxResources.get("download"),function(){if(null!=B){var c=mxUtils.getXml(B.documentElement),f=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(c,f,"text/xml"):(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(Graph.compress(c)),
(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml"+c)).simulate(document,"_blank"))}});P.className="geBtn";P.setAttribute("disabled","disabled");var O=mxUtils.button(mxResources.get("restore"),function(c){null!=B&&null!=C&&(mxEvent.isShiftDown(c)?null!=B&&(c=b.getPagesForNode(B.documentElement),c=b.diffPages(b.pages,c),c=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(c,null,2),function(c){if(0<c.length)try{b.confirm(mxResources.get("areYouSure"),function(){v.patch([JSON.parse(c)],
null,!0);b.hideDialog();b.hideDialog()})}catch(ca){b.handleError(ca)}},null,null,null,null,null,!0,null,mxResources.get("merge")),c.textarea.style.width="600px",c.textarea.style.height="380px",b.showDialog(c.container,620,460,!0,!0),c.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=d?d(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&v.save(!0,function(c){b.spinner.stop();b.replaceFileData(C);b.hideDialog()},function(c){b.spinner.stop();b.editor.setStatus("");b.handleError(c,
null!=c?mxResources.get("errorSavingFile"):null)})}))});O.className="geBtn";O.setAttribute("disabled","disabled");O.setAttribute("title","Shift+Click for Diff");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 J=null;mxEvent.addListener(H,"change",function(b){null!=J&&(J(b),mxEvent.consume(b))});var W=mxUtils.button(mxResources.get("edit"),
-function(){null!=B&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(B.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");null!=d&&(W.style.display="none");var S=mxUtils.button(mxResources.get("show"),function(){null!=y&&b.openLink(y.getUrl(H.selectedIndex))});S.className="geBtn gePrimaryBtn";S.setAttribute("disabled","disabled");null!=d&&(S.style.display="none",O.className="geBtn gePrimaryBtn");
-x=document.createElement("div");x.style.position="absolute";x.style.top="482px";x.style.width="640px";x.style.textAlign="right";var Q=document.createElement("div");Q.className="geToolbarContainer";Q.style.backgroundColor="transparent";Q.style.padding="2px";Q.style.border="none";Q.style.left="199px";Q.style.top="442px";var X=null;if(null!=e&&0<e.length){g.style.cursor="move";var fa=document.createElement("table");fa.style.border="1px solid lightGray";fa.style.borderCollapse="collapse";fa.style.borderSpacing=
-"0px";fa.style.width="100%";var ga=document.createElement("tbody"),aa=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(l=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var Z=function(c){var d=new Date(c.modifiedDate),k=null;if(0<=d.getTime()){var q=function(e){u.stop();m.innerHTML="";var q=mxUtils.parseXml(e),t=b.editor.extractGraphModel(q.documentElement,!0);if(null!=t){var y=function(b){null!=b&&(b=A(Editor.parseDiagramNode(b)));return b},A=function(b){var c=b.getAttribute("background");
-if(null==c||""==c||c==mxConstants.NONE)c=f.defaultPageBackgroundColor;g.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,f.getModel());f.maxFitScale=1;f.fit(8);f.center();return b};H.style.display="none";H.innerHTML="";B=q;C=e;n=parseSelectFunction=null;p=0;if("mxfile"==t.nodeName){q=t.getElementsByTagName("diagram");n=[];for(e=0;e<q.length;e++)n.push(q[e]);p=Math.min(l,n.length-1);0<n.length&&y(n[p]);if(1<n.length)for(H.removeAttribute("disabled"),H.style.display="",e=0;e<n.length;e++)q=
-document.createElement("option"),mxUtils.write(q,n[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),q.setAttribute("value",e),e==p&&q.setAttribute("selected","selected"),H.appendChild(q);J=function(){try{var c=parseInt(H.value);p=l=c;y(n[c])}catch(ba){H.value=l,b.handleError(ba)}}}else A(t);e=c.lastModifyingUserName;null!=e&&20<e.length&&(e=e.substring(0,20)+"...");M.innerHTML="";mxUtils.write(M,(null!=e?e+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());M.setAttribute("title",
-k.getAttribute("title"));E.removeAttribute("disabled");G.removeAttribute("disabled");F.removeAttribute("disabled");D.removeAttribute("disabled");I.removeAttribute("disabled");null!=v&&v.isRestricted()||(b.editor.graph.isEnabled()&&O.removeAttribute("disabled"),P.removeAttribute("disabled"),S.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(E,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(D,60);mxUtils.setOpacity(I,60)}else H.style.display="none",
-H.innerHTML="",M.innerHTML="",mxUtils.write(M,mxResources.get("errorLoadingFile")),mxUtils.write(m,mxResources.get("errorLoadingFile"))},k=document.createElement("tr");k.style.borderBottom="1px solid lightGray";k.style.fontSize="12px";k.style.cursor="pointer";var t=document.createElement("td");t.style.padding="6px";t.style.whiteSpace="nowrap";c==e[e.length-1]?mxUtils.write(t,mxResources.get("current")):d.toDateString()===aa?mxUtils.write(t,d.toLocaleTimeString()):mxUtils.write(t,d.toLocaleDateString()+
-" "+d.toLocaleTimeString());k.appendChild(t);k.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+(null!=c.fileSize?" "+b.formatFileSize(parseInt(c.fileSize)):"")+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(k,"click",function(b){y!=c&&(u.stop(),null!=z&&(z.style.backgroundColor=""),y=c,z=k,z.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",C=B=null,M.removeAttribute("title"),M.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+
-"..."),g.style.backgroundColor=f.defaultPageBackgroundColor,m.innerHTML="",f.getModel().clear(),O.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),mxUtils.setOpacity(E,20),
-mxUtils.setOpacity(G,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(D,20),mxUtils.setOpacity(I,20),u.spin(g),c.getXml(function(b){if(y==c)try{q(b)}catch(ja){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ja.message)}},function(b){u.stop();H.style.display="none";H.innerHTML="";M.innerHTML="";mxUtils.write(M,mxResources.get("errorLoadingFile"));mxUtils.write(m,mxResources.get("errorLoadingFile"))}),mxEvent.consume(b))});mxEvent.addListener(k,"dblclick",function(b){S.click();window.getSelection?
-window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(b)},!1);ga.appendChild(k)}return k}(e[t]);null!=Z&&t==e.length-1&&(X=Z)}fa.appendChild(ga);k.appendChild(fa)}else null==v||null==b.drive&&v.constructor==window.DriveFile||null==b.dropbox&&v.constructor==window.DropboxFile?(g.style.display="none",Q.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(g.style.display="none",Q.style.display="none",mxUtils.write(k,mxResources.get("noRevisions")));
-this.init=function(){null!=X&&X.click()};k=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});k.className="geBtn";Q.appendChild(H);Q.appendChild(E);Q.appendChild(G);Q.appendChild(D);Q.appendChild(F);Q.appendChild(I);b.editor.cancelFirst?(x.appendChild(k),x.appendChild(P),x.appendChild(W),x.appendChild(O),x.appendChild(S)):(x.appendChild(P),x.appendChild(W),x.appendChild(O),x.appendChild(S),x.appendChild(k));c.appendChild(x);c.appendChild(Q);c.appendChild(M);this.container=c},DraftDialog=
-function(b,e,d,c,k,g,m,f,l){var n=document.createElement("div"),p=document.createElement("div");p.style.marginTop="0px";p.style.whiteSpace="nowrap";p.style.overflow="auto";p.style.lineHeight="normal";mxUtils.write(p,e);n.appendChild(p);var q=document.createElement("select"),t=mxUtils.bind(this,function(){y=mxUtils.parseXml(l[q.value].data);B=b.editor.extractGraphModel(y.documentElement,!0);C=0;this.init()});if(null!=l){q.style.marginLeft="4px";for(e=0;e<l.length;e++){var u=document.createElement("option");
-u.setAttribute("value",e);var v=new Date(l[e].created),x=new Date(l[e].modified);mxUtils.write(u,v.toLocaleDateString()+" "+v.toLocaleTimeString()+" - "+(v.toDateString(),x.toDateString(),x.toLocaleDateString())+" "+x.toLocaleTimeString());q.appendChild(u)}p.appendChild(q);mxEvent.addListener(q,"change",t)}null==d&&(d=l[0].data);var A=document.createElement("div");A.style.position="absolute";A.style.border="1px solid lightGray";A.style.marginTop="10px";A.style.left="40px";A.style.right="40px";A.style.top=
-"46px";A.style.bottom="74px";A.style.overflow="hidden";mxEvent.disableContextMenu(A);n.appendChild(A);var z=new Graph(A);z.setEnabled(!1);z.setPanning(!0);z.panningHandler.ignoreCell=!0;z.panningHandler.useLeftButtonForPanning=!0;z.minFitScale=null;z.maxFitScale=null;z.centerZoom=!0;var y=mxUtils.parseXml(d),B=b.editor.extractGraphModel(y.documentElement,!0),C=0,E=null,G=z.getGlobalVariable;z.getGlobalVariable=function(b){return"page"==b&&null!=E&&null!=E[C]?E[C].getAttribute("name"):"pagenumber"==
-b?C+1:"pagecount"==b?null!=E?E.length:1:G.apply(this,arguments)};z.getLinkForCell=function(){return null};d=mxUtils.button("",function(){z.zoomIn()});d.className="geSprite geSprite-zoomin";d.setAttribute("title",mxResources.get("zoomIn"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);p=mxUtils.button("",function(){z.zoomOut()});p.className="geSprite geSprite-zoomout";p.setAttribute("title",mxResources.get("zoomOut"));p.style.outline="none";p.style.border=
+function(){null!=B&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(B.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");null!=d&&(W.style.display="none");var S=mxUtils.button(mxResources.get("show"),function(){null!=x&&b.openLink(x.getUrl(H.selectedIndex))});S.className="geBtn gePrimaryBtn";S.setAttribute("disabled","disabled");null!=d&&(S.style.display="none",O.className="geBtn gePrimaryBtn");
+y=document.createElement("div");y.style.position="absolute";y.style.top="482px";y.style.width="640px";y.style.textAlign="right";var Q=document.createElement("div");Q.className="geToolbarContainer";Q.style.backgroundColor="transparent";Q.style.padding="2px";Q.style.border="none";Q.style.left="199px";Q.style.top="442px";var X=null;if(null!=e&&0<e.length){k.style.cursor="move";var fa=document.createElement("table");fa.style.border="1px solid lightGray";fa.style.borderCollapse="collapse";fa.style.borderSpacing=
+"0px";fa.style.width="100%";var ga=document.createElement("tbody"),aa=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(l=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var Z=function(c){var d=new Date(c.modifiedDate),g=null;if(0<=d.getTime()){var q=function(e){u.stop();n.innerHTML="";var q=mxUtils.parseXml(e),t=b.editor.extractGraphModel(q.documentElement,!0);if(null!=t){var x=function(b){null!=b&&(b=A(Editor.parseDiagramNode(b)));return b},A=function(b){var c=b.getAttribute("background");
+if(null==c||""==c||c==mxConstants.NONE)c=f.defaultPageBackgroundColor;k.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,f.getModel());f.maxFitScale=1;f.fit(8);f.center();return b};H.style.display="none";H.innerHTML="";B=q;C=e;m=parseSelectFunction=null;p=0;if("mxfile"==t.nodeName){q=t.getElementsByTagName("diagram");m=[];for(e=0;e<q.length;e++)m.push(q[e]);p=Math.min(l,m.length-1);0<m.length&&x(m[p]);if(1<m.length)for(H.removeAttribute("disabled"),H.style.display="",e=0;e<m.length;e++)q=
+document.createElement("option"),mxUtils.write(q,m[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),q.setAttribute("value",e),e==p&&q.setAttribute("selected","selected"),H.appendChild(q);J=function(){try{var c=parseInt(H.value);p=l=c;x(m[c])}catch(ba){H.value=l,b.handleError(ba)}}}else A(t);e=c.lastModifyingUserName;null!=e&&20<e.length&&(e=e.substring(0,20)+"...");M.innerHTML="";mxUtils.write(M,(null!=e?e+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());M.setAttribute("title",
+g.getAttribute("title"));E.removeAttribute("disabled");F.removeAttribute("disabled");G.removeAttribute("disabled");D.removeAttribute("disabled");I.removeAttribute("disabled");null!=v&&v.isRestricted()||(b.editor.graph.isEnabled()&&O.removeAttribute("disabled"),P.removeAttribute("disabled"),S.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(E,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(D,60);mxUtils.setOpacity(I,60)}else H.style.display="none",
+H.innerHTML="",M.innerHTML="",mxUtils.write(M,mxResources.get("errorLoadingFile")),mxUtils.write(n,mxResources.get("errorLoadingFile"))},g=document.createElement("tr");g.style.borderBottom="1px solid lightGray";g.style.fontSize="12px";g.style.cursor="pointer";var t=document.createElement("td");t.style.padding="6px";t.style.whiteSpace="nowrap";c==e[e.length-1]?mxUtils.write(t,mxResources.get("current")):d.toDateString()===aa?mxUtils.write(t,d.toLocaleTimeString()):mxUtils.write(t,d.toLocaleDateString()+
+" "+d.toLocaleTimeString());g.appendChild(t);g.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+(null!=c.fileSize?" "+b.formatFileSize(parseInt(c.fileSize)):"")+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(g,"click",function(b){x!=c&&(u.stop(),null!=z&&(z.style.backgroundColor=""),x=c,z=g,z.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",C=B=null,M.removeAttribute("title"),M.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+
+"..."),k.style.backgroundColor=f.defaultPageBackgroundColor,n.innerHTML="",f.getModel().clear(),O.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),mxUtils.setOpacity(E,20),
+mxUtils.setOpacity(F,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(D,20),mxUtils.setOpacity(I,20),u.spin(k),c.getXml(function(b){if(x==c)try{q(b)}catch(ja){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ja.message)}},function(b){u.stop();H.style.display="none";H.innerHTML="";M.innerHTML="";mxUtils.write(M,mxResources.get("errorLoadingFile"));mxUtils.write(n,mxResources.get("errorLoadingFile"))}),mxEvent.consume(b))});mxEvent.addListener(g,"dblclick",function(b){S.click();window.getSelection?
+window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(b)},!1);ga.appendChild(g)}return g}(e[t]);null!=Z&&t==e.length-1&&(X=Z)}fa.appendChild(ga);g.appendChild(fa)}else null==v||null==b.drive&&v.constructor==window.DriveFile||null==b.dropbox&&v.constructor==window.DropboxFile?(k.style.display="none",Q.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(k.style.display="none",Q.style.display="none",mxUtils.write(g,mxResources.get("noRevisions")));
+this.init=function(){null!=X&&X.click()};g=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});g.className="geBtn";Q.appendChild(H);Q.appendChild(E);Q.appendChild(F);Q.appendChild(D);Q.appendChild(G);Q.appendChild(I);b.editor.cancelFirst?(y.appendChild(g),y.appendChild(P),y.appendChild(W),y.appendChild(O),y.appendChild(S)):(y.appendChild(P),y.appendChild(W),y.appendChild(O),y.appendChild(S),y.appendChild(g));c.appendChild(y);c.appendChild(Q);c.appendChild(M);this.container=c},DraftDialog=
+function(b,e,d,c,g,k,n,f,l){var m=document.createElement("div"),p=document.createElement("div");p.style.marginTop="0px";p.style.whiteSpace="nowrap";p.style.overflow="auto";p.style.lineHeight="normal";mxUtils.write(p,e);m.appendChild(p);var q=document.createElement("select"),t=mxUtils.bind(this,function(){x=mxUtils.parseXml(l[q.value].data);B=b.editor.extractGraphModel(x.documentElement,!0);C=0;this.init()});if(null!=l){q.style.marginLeft="4px";for(e=0;e<l.length;e++){var u=document.createElement("option");
+u.setAttribute("value",e);var v=new Date(l[e].created),y=new Date(l[e].modified);mxUtils.write(u,v.toLocaleDateString()+" "+v.toLocaleTimeString()+" - "+(v.toDateString(),y.toDateString(),y.toLocaleDateString())+" "+y.toLocaleTimeString());q.appendChild(u)}p.appendChild(q);mxEvent.addListener(q,"change",t)}null==d&&(d=l[0].data);var A=document.createElement("div");A.style.position="absolute";A.style.border="1px solid lightGray";A.style.marginTop="10px";A.style.left="40px";A.style.right="40px";A.style.top=
+"46px";A.style.bottom="74px";A.style.overflow="hidden";mxEvent.disableContextMenu(A);m.appendChild(A);var z=new Graph(A);z.setEnabled(!1);z.setPanning(!0);z.panningHandler.ignoreCell=!0;z.panningHandler.useLeftButtonForPanning=!0;z.minFitScale=null;z.maxFitScale=null;z.centerZoom=!0;var x=mxUtils.parseXml(d),B=b.editor.extractGraphModel(x.documentElement,!0),C=0,E=null,F=z.getGlobalVariable;z.getGlobalVariable=function(b){return"page"==b&&null!=E&&null!=E[C]?E[C].getAttribute("name"):"pagenumber"==
+b?C+1:"pagecount"==b?null!=E?E.length:1:F.apply(this,arguments)};z.getLinkForCell=function(){return null};d=mxUtils.button("",function(){z.zoomIn()});d.className="geSprite geSprite-zoomin";d.setAttribute("title",mxResources.get("zoomIn"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);p=mxUtils.button("",function(){z.zoomOut()});p.className="geSprite geSprite-zoomout";p.setAttribute("title",mxResources.get("zoomOut"));p.style.outline="none";p.style.border=
"none";p.style.margin="2px";mxUtils.setOpacity(p,60);e=mxUtils.button("",function(){z.maxFitScale=8;z.fit(8);z.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);u=mxUtils.button("",function(){z.zoomActual();z.center()});u.className="geSprite geSprite-actualsize";u.setAttribute("title",mxResources.get("actualSize"));u.style.outline="none";u.style.border="none";u.style.margin=
-"2px";mxUtils.setOpacity(u,60);m=mxUtils.button(m||mxResources.get("discard"),function(){k.apply(this,[q.value,mxUtils.bind(this,function(){null!=q.parentNode&&(q.options[q.selectedIndex].parentNode.removeChild(q.options[q.selectedIndex]),0<q.options.length?(q.value=q.options[0].value,t()):b.hideDialog(!0))})])});m.className="geBtn";var F=document.createElement("select");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";
-F.style.display="none";g=mxUtils.button(g||mxResources.get("edit"),function(){c.apply(this,[q.value])});g.className="geBtn gePrimaryBtn";v=document.createElement("div");v.style.position="absolute";v.style.bottom="30px";v.style.right="40px";v.style.textAlign="right";x=document.createElement("div");x.className="geToolbarContainer";x.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(b){if(null!=
-b){var c=b.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c=Editor.isDarkMode()?"transparent":"#ffffff";A.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,z.getModel());z.maxFitScale=1;z.fit(8);z.center()}return b}function c(c){null!=c&&(c=b(Editor.parseDiagramNode(c)));return c}mxEvent.addListener(F,"change",function(b){C=parseInt(F.value);c(E[C]);mxEvent.consume(b)});if("mxfile"==B.nodeName){var f=B.getElementsByTagName("diagram");E=[];for(var d=0;d<f.length;d++)E.push(f[d]);
-0<E.length&&c(E[C]);F.innerHTML="";if(1<E.length)for(F.style.display="",d=0;d<E.length;d++)f=document.createElement("option"),mxUtils.write(f,E[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),f.setAttribute("value",d),d==C&&f.setAttribute("selected","selected"),F.appendChild(f);else F.style.display="none"}else b(B)};x.appendChild(F);x.appendChild(d);x.appendChild(p);x.appendChild(u);x.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.className=
-"geBtn";f=null!=f?mxUtils.button(mxResources.get("ignore"),f):null;null!=f&&(f.className="geBtn");b.editor.cancelFirst?(v.appendChild(d),null!=f&&v.appendChild(f),v.appendChild(m),v.appendChild(g)):(v.appendChild(g),v.appendChild(m),null!=f&&v.appendChild(f),v.appendChild(d));n.appendChild(v);n.appendChild(x);this.container=n},FindWindow=function(b,e,d,c,k,g){function m(b,c,f,d){if("object"===typeof c.value&&null!=c.value.attributes){c=c.value.attributes;for(var e=0;e<c.length;e++)if("label"!=c[e].nodeName){var l=
-mxUtils.trim(c[e].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==b&&(d&&0<=l.indexOf(f)||!d&&l.substring(0,f.length)===f)||null!=b&&b.test(l))return!0}}return!1}function f(){u&&E.value?(P.removeAttribute("disabled"),O.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));E.value&&C.value?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled")}function l(c,d,e){L.innerHTML="";var n=p.model.getDescendants(p.model.getRoot()),
-k=C.value.toLowerCase(),y=G.checked?new RegExp(k):null,O=null;x=null;q!=k&&(q=k,t=null,v=!1);var B=null==t;if(0<k.length){if(v){v=!1;for(var H,J=0;J<b.pages.length;J++)if(b.currentPage==b.pages[J]){H=J;break}c=(H+1)%b.pages.length;t=null;do v=!1,n=b.pages[c],p=b.createTemporaryGraph(p.getStylesheet()),b.updatePageRoot(n),p.model.setRoot(n.root),c=(c+1)%b.pages.length;while(!l(!0,d,e)&&c!=H);t&&(t=null,e?b.editor.graph.model.execute(new SelectPage(b,n)):b.selectPage(n));v=!1;p=b.editor.graph;return l(!0,
-d,e)}for(J=0;J<n.length;J++){H=p.view.getState(n[J]);d&&null!=y&&(B=B||H==t);if(null!=H&&null!=H.cell.value&&(B||null==O)&&(p.model.isVertex(H.cell)||p.model.isEdge(H.cell))){null!=H.style&&"1"==H.style.html?(D.innerHTML=p.sanitizeHtml(p.getLabel(H.cell)),label=mxUtils.extractTextWithWhitespace([D])):label=p.getLabel(H.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var S=0;d&&g&&null!=y&&H==t&&(label=label.substr(A),S=A);var W=""==E.value,z=W;if(null==y&&(z&&
-0<=label.indexOf(k)||!z&&label.substring(0,k.length)===k||W&&m(y,H.cell,k,z))||null!=y&&(y.test(label)||W&&m(y,H.cell,k,z)))if(g&&(null!=y?(W=label.match(y),x=W[0].toLowerCase(),A=S+W.index+x.length):(x=k,A=x.length)),B){O=H;break}else null==O&&(O=H)}B=B||H==t}}if(null!=O){if(J==n.length&&F.checked)return t=null,v=!0,l(!0,d,e);t=O;p.scrollCellToVisible(t.cell);p.isEnabled()&&!p.isCellLocked(t.cell)?e||p.getSelectionCell()==t.cell&&1==p.getSelectionCount()||p.setSelectionCell(t.cell):p.highlightCell(t.cell)}else{if(!c&&
-F.checked)return v=!0,l(!0,d,e);p.isEnabled()&&!e&&p.clearSelection()}u=null!=O;g&&!c&&f();return 0==k.length||null!=O}var n=b.actions.get("findReplace"),p=b.editor.graph,q=null,t=null,u=!1,v=!1,x=null,A=0,z=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var B=g?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";
-C.style.marginBottom="6px";C.style.width=B;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";y.appendChild(C);mxUtils.br(y);var E;g&&(E=document.createElement("input"),E.setAttribute("placeholder",mxResources.get("replaceWith")),E.setAttribute("type","text"),E.style.marginTop="4px",E.style.marginBottom="6px",E.style.width=B,E.style.fontSize="12px",E.style.borderRadius="4px",E.style.padding="6px",y.appendChild(E),mxUtils.br(y),mxEvent.addListener(E,"input",f));var G=document.createElement("input");
-G.setAttribute("id","geFindWinRegExChck");G.setAttribute("type","checkbox");G.style.marginRight="4px";y.appendChild(G);B=document.createElement("label");B.setAttribute("for","geFindWinRegExChck");y.appendChild(B);mxUtils.write(B,mxResources.get("regularExpression"));y.appendChild(B);B=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");B.style.position="relative";B.style.marginLeft="6px";B.style.top="-1px";y.appendChild(B);mxUtils.br(y);var F=document.createElement("input");F.setAttribute("id",
-"geFindWinAllPagesChck");F.setAttribute("type","checkbox");F.style.marginRight="4px";y.appendChild(F);B=document.createElement("label");B.setAttribute("for","geFindWinAllPagesChck");y.appendChild(B);mxUtils.write(B,mxResources.get("allPages"));y.appendChild(B);var D=document.createElement("div");mxUtils.br(y);B=document.createElement("div");B.style.left="0px";B.style.right="0px";B.style.marginTop="6px";B.style.padding="0 6px 0 6px";B.style.textAlign="center";y.appendChild(B);var I=mxUtils.button(mxResources.get("reset"),
-function(){L.innerHTML="";C.value="";C.style.backgroundColor="";g&&(E.value="",f());q=t=null;v=!1;C.focus()});I.setAttribute("title",mxResources.get("reset"));I.style["float"]="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn";g||B.appendChild(I);var K=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(W){b.handleError(W)}});
-K.setAttribute("title",mxResources.get("find")+" (Enter)");K.style["float"]="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";B.appendChild(K);var L=document.createElement("div");L.style.marginTop="10px";if(g){var M=function(b,c,f,d,e){if(null==e||"1"!=e.html)return d=b.toLowerCase().indexOf(c,d),0>d?b:b.substr(0,d)+f+b.substr(d+c.length);var l=b;c=mxUtils.htmlEntities(c);e=[];for(var n=
--1;-1<(n=b.indexOf("<",n+1));)e.push(n);n=b.match(/<[^>]*>/g);b=b.replace(/<[^>]*>/g,"");d=b.toLowerCase().indexOf(c,d);if(0>d)return l;l=d+c.length;f=mxUtils.htmlEntities(f);b=b.substr(0,d)+f+b.substr(l);for(var k=0,g=0;g<e.length;g++){if(e[g]-k<d)b=b.substr(0,e[g])+n[g]+b.substr(e[g]);else{var p=e[g]-k<l?d+k:e[g]+(f.length-c.length);b=b.substr(0,p)+n[g]+b.substr(p)}k+=n[g].length}return b},P=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=x&&null!=t&&E.value){var c=t.cell,f=p.getLabel(c);
-p.isCellEditable(c)&&p.model.setValue(c,M(f,x,E.value,A-x.length,p.getCurrentCellStyle(c)));C.style.backgroundColor=l(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(Q){b.handleError(Q)}});P.setAttribute("title",mxResources.get("replFind"));P.style["float"]="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");B.appendChild(P);mxUtils.br(B);
-var O=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=x&&null!=t&&E.value){var c=t.cell,f=p.getLabel(c);p.model.setValue(c,M(f,x,E.value,A-x.length,p.getCurrentCellStyle(c)));P.setAttribute("disabled","disabled");O.setAttribute("disabled","disabled")}}catch(Q){b.handleError(Q)}});O.setAttribute("title",mxResources.get("replace"));O.style["float"]="none";O.style.width="120px";O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";
-O.className="geBtn gePrimaryBtn";O.setAttribute("disabled","disabled");B.appendChild(O);var H=mxUtils.button(mxResources.get("replaceAll"),function(){L.innerHTML="";if(E.value){var c=b.currentPage,f=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;p.getModel().beginUpdate();try{for(var d=0,e={};l(!1,!0,!0)&&100>d;){var n=t.cell,k=p.getLabel(n),g=e[n.id];if(g&&g.replAllMrk==z&&g.replAllPos>=A)break;e[n.id]={replAllMrk:z,replAllPos:A};p.isCellEditable(n)&&(p.model.setValue(n,M(k,x,E.value,
-A-x.length,p.getCurrentCellStyle(n))),d++)}c!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,c));mxUtils.write(L,mxResources.get("matchesRepl",[d]))}catch(Z){b.handleError(Z)}finally{p.getModel().endUpdate(),b.editor.graph.setSelectionCells(f),b.editor.graph.rendering=!0}z++}});H.setAttribute("title",mxResources.get("replaceAll"));H.style["float"]="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className=
+"2px";mxUtils.setOpacity(u,60);n=mxUtils.button(n||mxResources.get("discard"),function(){g.apply(this,[q.value,mxUtils.bind(this,function(){null!=q.parentNode&&(q.options[q.selectedIndex].parentNode.removeChild(q.options[q.selectedIndex]),0<q.options.length?(q.value=q.options[0].value,t()):b.hideDialog(!0))})])});n.className="geBtn";var G=document.createElement("select");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign="bottom";G.style.marginRight="6px";
+G.style.display="none";k=mxUtils.button(k||mxResources.get("edit"),function(){c.apply(this,[q.value])});k.className="geBtn gePrimaryBtn";v=document.createElement("div");v.style.position="absolute";v.style.bottom="30px";v.style.right="40px";v.style.textAlign="right";y=document.createElement("div");y.className="geToolbarContainer";y.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(b){if(null!=
+b){var c=b.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c=Editor.isDarkMode()?"transparent":"#ffffff";A.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,z.getModel());z.maxFitScale=1;z.fit(8);z.center()}return b}function c(c){null!=c&&(c=b(Editor.parseDiagramNode(c)));return c}mxEvent.addListener(G,"change",function(b){C=parseInt(G.value);c(E[C]);mxEvent.consume(b)});if("mxfile"==B.nodeName){var f=B.getElementsByTagName("diagram");E=[];for(var d=0;d<f.length;d++)E.push(f[d]);
+0<E.length&&c(E[C]);G.innerHTML="";if(1<E.length)for(G.style.display="",d=0;d<E.length;d++)f=document.createElement("option"),mxUtils.write(f,E[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),f.setAttribute("value",d),d==C&&f.setAttribute("selected","selected"),G.appendChild(f);else G.style.display="none"}else b(B)};y.appendChild(G);y.appendChild(d);y.appendChild(p);y.appendChild(u);y.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.className=
+"geBtn";f=null!=f?mxUtils.button(mxResources.get("ignore"),f):null;null!=f&&(f.className="geBtn");b.editor.cancelFirst?(v.appendChild(d),null!=f&&v.appendChild(f),v.appendChild(n),v.appendChild(k)):(v.appendChild(k),v.appendChild(n),null!=f&&v.appendChild(f),v.appendChild(d));m.appendChild(v);m.appendChild(y);this.container=m},FindWindow=function(b,e,d,c,g,k){function n(b,c,f,d){if("object"===typeof c.value&&null!=c.value.attributes){c=c.value.attributes;for(var e=0;e<c.length;e++)if("label"!=c[e].nodeName){var l=
+mxUtils.trim(c[e].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==b&&(d&&0<=l.indexOf(f)||!d&&l.substring(0,f.length)===f)||null!=b&&b.test(l))return!0}}return!1}function f(){u&&E.value?(P.removeAttribute("disabled"),O.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));E.value&&C.value?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled")}function l(c,d,e){L.innerHTML="";var m=p.model.getDescendants(p.model.getRoot()),
+g=C.value.toLowerCase(),x=F.checked?new RegExp(g):null,O=null;y=null;q!=g&&(q=g,t=null,v=!1);var B=null==t;if(0<g.length){if(v){v=!1;for(var H,J=0;J<b.pages.length;J++)if(b.currentPage==b.pages[J]){H=J;break}c=(H+1)%b.pages.length;t=null;do v=!1,m=b.pages[c],p=b.createTemporaryGraph(p.getStylesheet()),b.updatePageRoot(m),p.model.setRoot(m.root),c=(c+1)%b.pages.length;while(!l(!0,d,e)&&c!=H);t&&(t=null,e?b.editor.graph.model.execute(new SelectPage(b,m)):b.selectPage(m));v=!1;p=b.editor.graph;return l(!0,
+d,e)}for(J=0;J<m.length;J++){H=p.view.getState(m[J]);d&&null!=x&&(B=B||H==t);if(null!=H&&null!=H.cell.value&&(B||null==O)&&(p.model.isVertex(H.cell)||p.model.isEdge(H.cell))){null!=H.style&&"1"==H.style.html?(D.innerHTML=p.sanitizeHtml(p.getLabel(H.cell)),label=mxUtils.extractTextWithWhitespace([D])):label=p.getLabel(H.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var S=0;d&&k&&null!=x&&H==t&&(label=label.substr(A),S=A);var W=""==E.value,z=W;if(null==x&&(z&&
+0<=label.indexOf(g)||!z&&label.substring(0,g.length)===g||W&&n(x,H.cell,g,z))||null!=x&&(x.test(label)||W&&n(x,H.cell,g,z)))if(k&&(null!=x?(W=label.match(x),y=W[0].toLowerCase(),A=S+W.index+y.length):(y=g,A=y.length)),B){O=H;break}else null==O&&(O=H)}B=B||H==t}}if(null!=O){if(J==m.length&&G.checked)return t=null,v=!0,l(!0,d,e);t=O;p.scrollCellToVisible(t.cell);p.isEnabled()&&!p.isCellLocked(t.cell)?e||p.getSelectionCell()==t.cell&&1==p.getSelectionCount()||p.setSelectionCell(t.cell):p.highlightCell(t.cell)}else{if(!c&&
+G.checked)return v=!0,l(!0,d,e);p.isEnabled()&&!e&&p.clearSelection()}u=null!=O;k&&!c&&f();return 0==g.length||null!=O}var m=b.actions.get("findReplace"),p=b.editor.graph,q=null,t=null,u=!1,v=!1,y=null,A=0,z=1,x=document.createElement("div");x.style.userSelect="none";x.style.overflow="hidden";x.style.padding="10px";x.style.height="100%";var B=k?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";
+C.style.marginBottom="6px";C.style.width=B;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";x.appendChild(C);mxUtils.br(x);var E;k&&(E=document.createElement("input"),E.setAttribute("placeholder",mxResources.get("replaceWith")),E.setAttribute("type","text"),E.style.marginTop="4px",E.style.marginBottom="6px",E.style.width=B,E.style.fontSize="12px",E.style.borderRadius="4px",E.style.padding="6px",x.appendChild(E),mxUtils.br(x),mxEvent.addListener(E,"input",f));var F=document.createElement("input");
+F.setAttribute("id","geFindWinRegExChck");F.setAttribute("type","checkbox");F.style.marginRight="4px";x.appendChild(F);B=document.createElement("label");B.setAttribute("for","geFindWinRegExChck");x.appendChild(B);mxUtils.write(B,mxResources.get("regularExpression"));x.appendChild(B);B=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");B.style.position="relative";B.style.marginLeft="6px";B.style.top="-1px";x.appendChild(B);mxUtils.br(x);var G=document.createElement("input");G.setAttribute("id",
+"geFindWinAllPagesChck");G.setAttribute("type","checkbox");G.style.marginRight="4px";x.appendChild(G);B=document.createElement("label");B.setAttribute("for","geFindWinAllPagesChck");x.appendChild(B);mxUtils.write(B,mxResources.get("allPages"));x.appendChild(B);var D=document.createElement("div");mxUtils.br(x);B=document.createElement("div");B.style.left="0px";B.style.right="0px";B.style.marginTop="6px";B.style.padding="0 6px 0 6px";B.style.textAlign="center";x.appendChild(B);var I=mxUtils.button(mxResources.get("reset"),
+function(){L.innerHTML="";C.value="";C.style.backgroundColor="";k&&(E.value="",f());q=t=null;v=!1;C.focus()});I.setAttribute("title",mxResources.get("reset"));I.style["float"]="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn";k||B.appendChild(I);var K=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(W){b.handleError(W)}});
+K.setAttribute("title",mxResources.get("find")+" (Enter)");K.style["float"]="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";B.appendChild(K);var L=document.createElement("div");L.style.marginTop="10px";if(k){var M=function(b,c,f,d,e){if(null==e||"1"!=e.html)return d=b.toLowerCase().indexOf(c,d),0>d?b:b.substr(0,d)+f+b.substr(d+c.length);var l=b;c=mxUtils.htmlEntities(c);e=[];for(var m=
+-1;-1<(m=b.indexOf("<",m+1));)e.push(m);m=b.match(/<[^>]*>/g);b=b.replace(/<[^>]*>/g,"");d=b.toLowerCase().indexOf(c,d);if(0>d)return l;l=d+c.length;f=mxUtils.htmlEntities(f);b=b.substr(0,d)+f+b.substr(l);for(var g=0,k=0;k<e.length;k++){if(e[k]-g<d)b=b.substr(0,e[k])+m[k]+b.substr(e[k]);else{var p=e[k]-g<l?d+g:e[k]+(f.length-c.length);b=b.substr(0,p)+m[k]+b.substr(p)}g+=m[k].length}return b},P=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=y&&null!=t&&E.value){var c=t.cell,f=p.getLabel(c);
+p.isCellEditable(c)&&p.model.setValue(c,M(f,y,E.value,A-y.length,p.getCurrentCellStyle(c)));C.style.backgroundColor=l(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(Q){b.handleError(Q)}});P.setAttribute("title",mxResources.get("replFind"));P.style["float"]="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");B.appendChild(P);mxUtils.br(B);
+var O=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=y&&null!=t&&E.value){var c=t.cell,f=p.getLabel(c);p.model.setValue(c,M(f,y,E.value,A-y.length,p.getCurrentCellStyle(c)));P.setAttribute("disabled","disabled");O.setAttribute("disabled","disabled")}}catch(Q){b.handleError(Q)}});O.setAttribute("title",mxResources.get("replace"));O.style["float"]="none";O.style.width="120px";O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";
+O.className="geBtn gePrimaryBtn";O.setAttribute("disabled","disabled");B.appendChild(O);var H=mxUtils.button(mxResources.get("replaceAll"),function(){L.innerHTML="";if(E.value){var c=b.currentPage,f=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;p.getModel().beginUpdate();try{for(var d=0,e={};l(!1,!0,!0)&&100>d;){var m=t.cell,g=p.getLabel(m),k=e[m.id];if(k&&k.replAllMrk==z&&k.replAllPos>=A)break;e[m.id]={replAllMrk:z,replAllPos:A};p.isCellEditable(m)&&(p.model.setValue(m,M(g,y,E.value,
+A-y.length,p.getCurrentCellStyle(m))),d++)}c!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,c));mxUtils.write(L,mxResources.get("matchesRepl",[d]))}catch(Z){b.handleError(Z)}finally{p.getModel().endUpdate(),b.editor.graph.setSelectionCells(f),b.editor.graph.rendering=!0}z++}});H.setAttribute("title",mxResources.get("replaceAll"));H.style["float"]="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className=
"geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");B.appendChild(H);mxUtils.br(B);B.appendChild(I);I=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));I.setAttribute("title",mxResources.get("close"));I.style["float"]="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn";B.appendChild(I);mxUtils.br(B);B.appendChild(L)}else I.style.width="90px",
-K.style.width="90px";mxEvent.addListener(C,"keyup",function(b){if(91==b.keyCode||93==b.keyCode||17==b.keyCode)mxEvent.consume(b);else if(27==b.keyCode)n.funct();else if(q!=C.value.toLowerCase()||13==b.keyCode)try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(S){C.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(y,"keydown",function(c){70==c.keyCode&&b.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(n.funct(),mxEvent.consume(c))});
-this.window=new mxWindow(mxResources.get("find")+(g?"/"+mxResources.get("replace"):""),y,e,d,c,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?F.removeAttribute("disabled"):
-(F.checked=!1,F.setAttribute("disabled","disabled"))):p.container.focus()}));this.window.setLocation=function(b,c){var f=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,f-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};
-var J=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",J);this.destroy=function(){mxEvent.removeListener(window,"resize",J);this.window.destroy()}},FreehandWindow=function(b,e,d,c,k){var g=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow="hidden";b.style.height="100%";var m=mxUtils.button(mxResources.get("startDrawing"),function(){g.freehand.isDrawing()?
-g.freehand.stopDrawing():g.freehand.startDrawing()});m.setAttribute("title",mxResources.get("startDrawing"));m.style.marginTop="10px";m.style.width="90%";m.style.boxSizing="border-box";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.style.textAlign="center";m.className="geBtn gePrimaryBtn";b.appendChild(m);this.window=new mxWindow(mxResources.get("freehand"),b,e,d,c,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
-g.addListener("freehandStateChanged",mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,mxResources.get(g.freehand.isDrawing()?"stopDrawing":"startDrawing"));m.setAttribute("title",mxResources.get(g.freehand.isDrawing()?"stopDrawing":"startDrawing"));m.className="geBtn"+(g.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){g.freehand.isDrawing()&&g.freehand.stopDrawing()}));
+K.style.width="90px";mxEvent.addListener(C,"keyup",function(b){if(91==b.keyCode||93==b.keyCode||17==b.keyCode)mxEvent.consume(b);else if(27==b.keyCode)m.funct();else if(q!=C.value.toLowerCase()||13==b.keyCode)try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(S){C.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(x,"keydown",function(c){70==c.keyCode&&b.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(m.funct(),mxEvent.consume(c))});
+this.window=new mxWindow(mxResources.get("find")+(k?"/"+mxResources.get("replace"):""),x,e,d,c,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?G.removeAttribute("disabled"):
+(G.checked=!1,G.setAttribute("disabled","disabled"))):p.container.focus()}));this.window.setLocation=function(b,c){var f=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,f-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};
+var J=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",J);this.destroy=function(){mxEvent.removeListener(window,"resize",J);this.window.destroy()}},FreehandWindow=function(b,e,d,c,g){var k=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow="hidden";b.style.height="100%";var n=mxUtils.button(mxResources.get("startDrawing"),function(){k.freehand.isDrawing()?
+k.freehand.stopDrawing():k.freehand.startDrawing()});n.setAttribute("title",mxResources.get("startDrawing"));n.style.marginTop="10px";n.style.width="90%";n.style.boxSizing="border-box";n.style.overflow="hidden";n.style.textOverflow="ellipsis";n.style.textAlign="center";n.className="geBtn gePrimaryBtn";b.appendChild(n);this.window=new mxWindow(mxResources.get("freehand"),b,e,d,c,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
+k.addListener("freehandStateChanged",mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,mxResources.get(k.freehand.isDrawing()?"stopDrawing":"startDrawing"));n.setAttribute("title",mxResources.get(k.freehand.isDrawing()?"stopDrawing":"startDrawing"));n.className="geBtn"+(k.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){k.freehand.isDrawing()&&k.freehand.stopDrawing()}));
this.window.setLocation=function(b,c){var f=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,f-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var f=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();
-this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",f);this.destroy=function(){mxEvent.removeListener(window,"resize",f);this.window.destroy()}},TagsWindow=function(b,e,d,c,k){var g=b.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}));b=g.div;this.window=new mxWindow(mxResources.get("tags"),b,e,d,c,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.contentWrapper.style.height=
-"100%";this.window.table.style.minWidth="220px";this.window.div.style.minHeight=this.window.table.style.minHeight;this.window.div.style.minWidth=this.window.table.style.minWidth;this.window.addListener("show",mxUtils.bind(this,function(){g.refresh();this.window.fit()}));this.window.setLocation=function(b,c){var f=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-
-this.table.clientWidth));c=Math.max(0,Math.min(c,f-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var m=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",m);this.destroy=function(){mxEvent.removeListener(window,"resize",m);this.window.destroy()}},AuthDialog=function(b,e,d,c){var k=document.createElement("div");k.style.textAlign=
-"center";var g=document.createElement("p");g.style.fontSize="16pt";g.style.padding="0px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("authorizationRequired"));var m="Unknown",f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.marginRight="10px";e==b.drive?(m=mxResources.get("googleDrive"),f.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(m=mxResources.get("dropbox"),f.src=IMAGE_PATH+"/dropbox-logo-white.svg"):
-e==b.oneDrive?(m=mxResources.get("oneDrive"),f.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(m=mxResources.get("github"),f.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(m=mxResources.get("gitlab"),f.src=IMAGE_PATH+"/gitlab-logo.svg",f.style.width="32px"):e==b.notion?(m=mxResources.get("notion"),f.src=IMAGE_PATH+"/notion-logo-white.svg",f.style.width="32px"):e==b.trello&&(m=mxResources.get("trello"),f.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,
-mxResources.get("authorizeThisAppIn",[m]));var l=document.createElement("input");l.setAttribute("type","checkbox");m=mxUtils.button(mxResources.get("authorize"),function(){c(l.checked)});m.insertBefore(f,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";m.style.fontSize="18px";m.style.padding="14px";k.appendChild(g);k.appendChild(b);k.appendChild(m);d&&(d=document.createElement("p"),d.style.marginTop="20px",d.appendChild(l),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberMe")),
-d.appendChild(g),k.appendChild(d),l.checked=!0,l.defaultChecked=!0,mxEvent.addListener(g,"click",function(b){l.checked=!l.checked;mxEvent.consume(b)}));this.container=k},MoreShapesDialog=function(b,e,d){d=null!=d?d:b.sidebar.entries;var c=document.createElement("div"),k=[];if(null!=b.sidebar.customEntries)for(var g=0;g<b.sidebar.customEntries.length;g++){for(var m=b.sidebar.customEntries[g],f={title:b.getResource(m.title),entries:[]},l=0;l<m.entries.length;l++){var n=m.entries[l];f.entries.push({id:n.id,
-title:b.getResource(n.title),desc:b.getResource(n.desc),image:n.preview})}k.push(f)}for(g=0;g<d.length;g++)if(null==b.sidebar.enabledLibraries)k.push(d[g]);else{f={title:d[g].title,entries:[]};for(l=0;l<d[g].entries.length;l++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,d[g].entries[l].id)&&f.entries.push(d[g].entries[l]);0<f.entries.length&&k.push(f)}d=k;if(e){g=mxUtils.bind(this,function(c){for(var f=0;f<c.length;f++)(function(c){var d=v.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor=
-Editor.isDarkMode()?"#505759":"#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,c.title);p.appendChild(d);for(var e=0;e<c.entries.length;e++)(function(c){var d=v.cloneNode(!1);d.style.cursor="pointer";d.style.padding="4px 0px 4px 20px";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.setAttribute("title",c.title+" ("+c.id+")");var l=document.createElement("input");l.setAttribute("type","checkbox");l.checked=b.sidebar.isEntryVisible(c.id);l.defaultChecked=
-l.checked;d.appendChild(l);mxUtils.write(d," "+c.title);p.appendChild(d);var n=function(b){if(null==b||"INPUT"!=mxEvent.getSource(b).nodeName){q.style.textAlign="center";q.style.padding="0px";q.style.color="";q.innerHTML="";if(null!=c.desc){var f=document.createElement("pre");f.style.boxSizing="border-box";f.style.fontFamily="inherit";f.style.margin="20px";f.style.right="0px";f.style.textAlign="left";mxUtils.write(f,c.desc);q.appendChild(f)}null!=c.imageCallback?c.imageCallback(q):null!=c.image?q.innerHTML+=
-'<img border="0" src="'+c.image+'"/>':null==c.desc&&(q.style.padding="20px",q.style.color="rgb(179, 179, 179)",mxUtils.write(q,mxResources.get("noPreview")));null!=t&&(t.style.backgroundColor="");t=d;t.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=b&&mxEvent.consume(b)}};mxEvent.addListener(d,"click",n);mxEvent.addListener(d,"dblclick",function(b){l.checked=!l.checked;mxEvent.consume(b)});u.push(function(){return l.checked?c.id:null});0==f&&0==e&&n()})(c.entries[e])})(c[f])});
-l=document.createElement("div");l.className="geDialogTitle";mxUtils.write(l,mxResources.get("shapes"));l.style.position="absolute";l.style.top="0px";l.style.left="0px";l.style.lineHeight="40px";l.style.height="40px";l.style.right="0px";var p=document.createElement("div"),q=document.createElement("div");p.style.position="absolute";p.style.top="40px";p.style.left="0px";p.style.width="202px";p.style.bottom="60px";p.style.overflow="auto";q.style.position="absolute";q.style.left="202px";q.style.right=
-"0px";q.style.top="40px";q.style.bottom="60px";q.style.overflow="auto";q.style.borderLeft="1px solid rgb(211, 211, 211)";q.style.textAlign="center";var t=null,u=[],v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";g(d);c.style.padding="30px";c.appendChild(l);c.appendChild(p);c.appendChild(q);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right=
-"0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";var x=document.createElement("input");x.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)g=document.createElement("span"),g.style.paddingRight="20px",g.appendChild(x),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),x.checked=!0,x.defaultChecked=!0,mxEvent.addListener(g,"click",function(b){mxEvent.getSource(b)!=x&&(x.checked=!x.checked,mxEvent.consume(b))}),d.appendChild(g);g=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog()});g.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var c=[],f=0;f<u.length;f++){var d=u[f].apply(this,arguments);null!=d&&c.push(d)}b.sidebar.showEntries(c.join(";"),x.checked,!0)});l.className="geBtn gePrimaryBtn"}else{var A=document.createElement("table"),g=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";l=document.createElement("tr");A.style.width="100%";e=document.createElement("td");var k=document.createElement("td"),
-m=document.createElement("td"),z=mxUtils.bind(this,function(c,f,d){var e=document.createElement("input");e.type="checkbox";A.appendChild(e);e.checked=b.sidebar.isEntryVisible(d);var l=document.createElement("span");mxUtils.write(l,f);f=document.createElement("div");f.style.display="block";f.appendChild(e);f.appendChild(l);mxEvent.addListener(l,"click",function(b){e.checked=!e.checked;mxEvent.consume(b)});c.appendChild(f);return function(){return e.checked?d:null}});l.appendChild(e);l.appendChild(k);
-l.appendChild(m);g.appendChild(l);A.appendChild(g);for(var u=[],y=0,g=0;g<d.length;g++)for(l=0;l<d[g].entries.length;l++)y++;for(var B=[e,k,m],C=0,g=0;g<d.length;g++)(function(b){for(var c=0;c<b.entries.length;c++){var f=b.entries[c];u.push(z(B[Math.floor(C/(y/3))],f.title,f.id));C++}})(d[g]);c.appendChild(A);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";x=document.createElement("input");isLocalStorage&&(x.setAttribute("type","checkbox"),x.checked=!0,x.defaultChecked=
-!0,d.appendChild(x),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),d.appendChild(g),mxEvent.addListener(g,"click",function(b){x.checked=!x.checked;mxEvent.consume(b)}));c.appendChild(d);g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){for(var c=["search"],f=0;f<u.length;f++){var d=u[f].apply(this,arguments);null!=d&&c.push(d)}b.sidebar.showEntries(0<c.length?
-c.join(";"):"",x.checked);b.hideDialog()});l.className="geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}b.editor.cancelFirst?(d.appendChild(g),d.appendChild(l)):(d.appendChild(l),d.appendChild(g));c.appendChild(d);this.container=c},PluginsDialog=function(b,e,d){function c(){if(0==m.length)g.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{g.innerHTML="";for(var f=0;f<m.length;f++){var e=document.createElement("span");e.style.whiteSpace=
-"nowrap";var l=document.createElement("span");l.className="geSprite geSprite-delete";l.style.position="relative";l.style.cursor="pointer";l.style.top="5px";l.style.marginRight="4px";l.style.display="inline-block";e.appendChild(l);mxUtils.write(e,m[f]);g.appendChild(e);mxUtils.br(g);mxEvent.addListener(l,"click",function(f){return function(){b.confirm(mxResources.get("delete")+' "'+m[f]+'"?',function(){null!=d&&d(m[f]);m.splice(f,1);c()})}}(f))}}}var k=document.createElement("div"),g=document.createElement("div");
-g.style.height="120px";g.style.overflow="auto";var m=mxSettings.getPlugins().slice();k.appendChild(g);c();var f=mxUtils.button(mxResources.get("add")+"...",null!=e?function(){e(function(b){b&&0>mxUtils.indexOf(m,b)&&m.push(b);c()})}:function(){var f=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("builtinPlugins")+": ");f.appendChild(d);var e=document.createElement("select");e.style.width="150px";for(d=0;d<App.publicPlugin.length;d++){var l=
-document.createElement("option");mxUtils.write(l,App.publicPlugin[d]);l.value=App.publicPlugin[d];e.appendChild(l)}f.appendChild(e);mxUtils.br(f);mxUtils.br(f);d=mxUtils.button(mxResources.get("custom")+"...",function(){var f=new FilenameDialog(b,"",mxResources.get("add"),function(f){b.hideDialog();if(null!=f&&0<f.length){f=f.split(";");for(var d=0;d<f.length;d++){var e=f[d],l=App.pluginRegistry[e];null!=l&&(e=l);0<e.length&&0>mxUtils.indexOf(m,e)&&m.push(e)}c()}},mxResources.get("enterValue")+" ("+
-mxResources.get("url")+")");b.showDialog(f.container,300,80,!0,!0);f.init()});d.className="geBtn";f=new CustomDialog(b,f,mxUtils.bind(this,function(){var b=App.pluginRegistry[e.value];0>mxUtils.indexOf(m,b)&&(m.push(b),c())}),null,null,null,d);b.showDialog(f.container,300,100,!0,!0)});f.className="geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(m);mxSettings.save();
-b.hideDialog();b.alert(mxResources.get("restartForChangeRequired"))});n.className="geBtn gePrimaryBtn";var p=document.createElement("div");p.style.marginTop="14px";p.style.textAlign="right";var q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});q.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.style.display="none");p.appendChild(q);b.editor.cancelFirst?(p.appendChild(l),p.appendChild(f),p.appendChild(n)):(p.appendChild(f),p.appendChild(n),
-p.appendChild(l));k.appendChild(p);this.container=k},CropImageDialog=function(b,e,d){function c(b){null!=m&&m.destroy();m=b?new Croppie(g,{viewport:{width:150,height:150,type:"circle"},enableExif:!0,showZoomer:!1,enableResize:!1,enableOrientation:!0}):new Croppie(g,{viewport:{width:150,height:150,type:"square"},enableExif:!0,showZoomer:!1,enableResize:!0,enableOrientation:!0});m.bind({url:e})}var k=document.createElement("div"),g=document.createElement("div");g.style.width="300px";g.style.height=
-"300px";k.appendChild(g);var m=null;this.init=function(){c()};var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("id","croppieCircle");f.style.margin="5px";k.appendChild(f);var l=document.createElement("label");l.setAttribute("for","croppieCircle");mxUtils.write(l,mxResources.get("circle"));k.appendChild(l);var n,p,q,t,l=document.createElement("div");n=document.createElement("button");p=document.createElement("button");l.appendChild(n);l.appendChild(p);q=document.createElement("i");
-t=document.createElement("i");n.appendChild(q);p.appendChild(t);l.className="cr-rotate-controls";l.style["float"]="right";l.style.position="inherit";n.className="cr-rotate-l";p.className="cr-rotate-r";k.appendChild(l);n.addEventListener("click",function(){m.rotate(-90)});p.addEventListener("click",function(){m.rotate(90)});mxEvent.addListener(f,"change",function(){c(this.checked)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";l=mxUtils.button(mxResources.get("apply"),
-function(){m.result({type:"base64",size:"original"}).then(function(c){d(c);b.hideDialog()})});l.className="geBtn gePrimaryBtn";n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(f),n.appendChild(l)):(n.appendChild(l),n.appendChild(f));k.appendChild(n);this.container=k},EditGeometryDialog=function(b,e){var d=b.editor.graph,c=1==e.length?d.getCellGeometry(e[0]):null,k=document.createElement("div"),g=document.createElement("table"),
-m=document.createElement("tbody"),f=document.createElement("tr"),l=document.createElement("td"),n=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(l,mxResources.get("relative")+":");var p=document.createElement("input");p.setAttribute("type","checkbox");null!=c&&c.relative&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);this.init=function(){p.focus()};n.appendChild(p);f.appendChild(l);f.appendChild(n);m.appendChild(f);f=document.createElement("tr");l=document.createElement("td");
-n=document.createElement("td");mxUtils.write(l,mxResources.get("left")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.x:"";n.appendChild(q);f.appendChild(l);f.appendChild(n);m.appendChild(f);f=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("top")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.y:
-"";n.appendChild(t);f.appendChild(l);f.appendChild(n);m.appendChild(f);f=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c&&null!=c.offset?c.offset.x:"";n.appendChild(u);f.appendChild(l);f.appendChild(n);m.appendChild(f);f=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");
-mxUtils.write(l,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=c&&null!=c.offset?c.offset.y:"";n.appendChild(v);f.appendChild(l);f.appendChild(n);m.appendChild(f);f=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("width")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=c?c.width:"";
-n.appendChild(x);f.appendChild(l);f.appendChild(n);m.appendChild(f);f=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.height:"";n.appendChild(A);f.appendChild(l);f.appendChild(n);m.appendChild(f);f=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,
-mxResources.get("rotation")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=1==e.length?mxUtils.getValue(d.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";n.appendChild(z);f.appendChild(l);f.appendChild(n);m.appendChild(f);g.appendChild(m);k.appendChild(g);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();d.getModel().beginUpdate();
-try{for(var c=0;c<e.length;c++){var f=d.getCellGeometry(e[c]);null!=f&&(f=f.clone(),d.isCellMovable(e[c])&&(f.relative=p.checked,0<mxUtils.trim(q.value).length&&(f.x=Number(q.value)),0<mxUtils.trim(t.value).length&&(f.y=Number(t.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))),d.isCellResizable(e[c])&&(0<mxUtils.trim(x.value).length&&(f.width=
-Number(x.value)),0<mxUtils.trim(A.value).length&&(f.height=Number(A.value))),d.getModel().setGeometry(e[c],f));0<mxUtils.trim(z.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(z.value),[e[c]])}}finally{d.getModel().endUpdate()}});y.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",function(b){13==b.keyCode&&y.click()});g=document.createElement("div");g.style.marginTop="20px";g.style.textAlign="right";b.editor.cancelFirst?(g.appendChild(c),g.appendChild(y)):(g.appendChild(y),
-g.appendChild(c));k.appendChild(g);this.container=k},LibraryDialog=function(b,e,d,c,k,g){function m(b){for(b=document.elementFromPoint(b.clientX,b.clientY);null!=b&&b.parentNode!=u;)b=b.parentNode;var c=null;if(null!=b)for(var f=u.firstChild,c=0;null!=f&&f!=b;)f=f.nextSibling,c++;return c}function f(c,d,e,l,n,k,g,q,t){try{if(b.spinner.stop(),null==d||"image/"==d.substring(0,6))if(null==c&&null!=g||null==x[c]){var O=function(){K.innerHTML="";K.style.cursor="pointer";K.style.whiteSpace="nowrap";K.style.textOverflow=
-"ellipsis";mxUtils.write(K,null!=L.title&&0<L.title.length?L.title:mxResources.get("untitled"));K.style.color=null==L.title||0==L.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var H=n,D=k;if(n>b.maxImageSize||k>b.maxImageSize){var z=Math.min(1,Math.min(b.maxImageSize/Math.max(1,n)),b.maxImageSize/Math.max(1,k));n*=z;k*=z}H>D?(D=Math.round(100*D/H),H=100):(H=Math.round(100*H/D),D=100);var F=document.createElement("div");F.setAttribute("draggable","true");F.style.display=
-"inline-block";F.style.position="relative";F.style.cursor="move";mxUtils.setPrefixedStyle(F.style,"transition","transform .1s ease-in-out");if(null!=c){var M=document.createElement("img");M.setAttribute("src",B.convert(c));M.style.width=H+"px";M.style.height=D+"px";M.style.margin="10px";M.style.paddingBottom=Math.floor((100-D)/2)+"px";M.style.paddingLeft=Math.floor((100-H)/2)+"px";F.appendChild(M)}else if(null!=g){var E=b.stringToCells(Graph.decompress(g.xml));0<E.length&&(b.sidebar.createThumb(E,
-100,100,F,null,!0,!1),F.firstChild.style.display="inline-block",F.firstChild.style.cursor="")}var G=document.createElement("img");G.setAttribute("src",Editor.closeImage);G.setAttribute("border","0");G.setAttribute("title",mxResources.get("delete"));G.setAttribute("align","top");G.style.paddingTop="4px";G.style.position="absolute";G.style.marginLeft="-12px";G.style.zIndex="1";G.style.cursor="pointer";mxEvent.addListener(G,"dragstart",function(b){mxEvent.consume(b)});(function(b,c,f){mxEvent.addListener(G,
-"click",function(d){x[c]=null;for(var e=0;e<p.length;e++)if(null!=p[e].data&&p[e].data==c||null!=p[e].xml&&null!=f&&p[e].xml==f.xml){p.splice(e,1);break}F.parentNode.removeChild(b);0==p.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(G,"dblclick",function(b){mxEvent.consume(b)})})(F,c,g);F.appendChild(G);F.style.marginBottom="30px";var K=document.createElement("div");K.style.position="absolute";K.style.boxSizing=
-"border-box";K.style.bottom="-18px";K.style.left="10px";K.style.right="10px";K.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";K.style.overflow="hidden";K.style.textAlign="center";var L=null;null!=c?(L={data:c,w:n,h:k,title:t},null!=q&&(L.aspect=q),x[c]=M,p.push(L)):null!=g&&(g.aspect="fixed",p.push(g),L=g);mxEvent.addListener(K,"keydown",function(b){13==b.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(b))});O();F.appendChild(K);mxEvent.addListener(K,"mousedown",function(b){"true"!=K.getAttribute("contentEditable")&&
-mxEvent.consume(b)});E=function(c){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var f=new FilenameDialog(b,L.title||"",mxResources.get("ok"),function(b){null!=b&&(L.title=b,O())},mxResources.get("enterValue"));b.showDialog(f.container,300,80,!0,!0);f.init();mxEvent.consume(c)}else if("true"!=K.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==L.title||0==L.title.length)K.innerHTML="";K.style.textOverflow="";K.style.whiteSpace="";K.style.cursor=
-"text";K.style.color="";K.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(K.style,"user-select","text");K.focus();document.execCommand("selectAll",!1,null);y=function(){K.removeAttribute("contentEditable");K.style.cursor="pointer";L.title=K.innerHTML;O()};mxEvent.consume(c)}};mxEvent.addListener(K,"click",E);mxEvent.addListener(F,"dblclick",E);u.appendChild(F);mxEvent.addListener(F,"dragstart",function(b){null==c&&null!=g&&(G.style.visibility="hidden",K.style.visibility="hidden");
-mxClient.IS_FF&&null!=g.xml&&b.dataTransfer.setData("Text",g.xml);A=m(b);mxClient.IS_GC&&(F.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(F.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(F,30);G.style.visibility="";K.style.visibility=""},0)});mxEvent.addListener(F,"dragend",function(b){"hidden"==G.style.visibility&&(G.style.visibility="",K.style.visibility="");A=null;mxUtils.setOpacity(F,100);mxUtils.setPrefixedStyle(F.style,"transform",null)})}else C||(C=!0,b.handleError({message:mxResources.get("fileExists")}));
-else{n=!1;try{if(H=mxUtils.parseXml(c),"mxlibrary"==H.documentElement.nodeName){D=JSON.parse(mxUtils.getTextContent(H.documentElement));if(null!=D&&0<D.length)for(var I=0;I<D.length;I++)null!=D[I].xml?f(null,null,0,0,0,0,D[I]):f(D[I].data,null,0,0,D[I].w,D[I].h,null,"fixed",D[I].title);n=!0}else if("mxfile"==H.documentElement.nodeName){for(var P=H.documentElement.getElementsByTagName("diagram"),I=0;I<P.length;I++){var D=mxUtils.getTextContent(P[I]),E=b.stringToCells(Graph.decompress(D)),N=b.editor.graph.getBoundingBoxFromGeometry(E);
-f(null,null,0,0,0,0,{xml:D,w:N.width,h:N.height})}n=!0}}catch(R){}n||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(R){}return null}function l(b){b.dataTransfer.dropEffect=null!=A?"move":"copy";b.stopPropagation();b.preventDefault()}function n(c){c.stopPropagation();c.preventDefault();C=!1;z=m(c);if(null!=A)null!=z&&z<u.children.length?(p.splice(z>A?z-1:z,0,p.splice(A,1)[0]),u.insertBefore(u.children[A],u.children[z])):(p.push(p.splice(A,1)[0]),u.appendChild(u.children[A]));
-else if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxImageSize,E(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var d=decodeURIComponent(c.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(d)||/(\.png)($|\?)/i.test(d)||/(\.gif)($|\?)/i.test(d)||/(\.svg)($|\?)/i.test(d))&&b.loadImage(d,function(b){f(d,null,0,0,b.width,b.height);u.scrollTop=u.scrollHeight})}c.stopPropagation();c.preventDefault()}var p=[];d=document.createElement("div");
-d.style.height="100%";var q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.height="40px";d.appendChild(q);mxUtils.write(q,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var t=document.createElement("input");t.setAttribute("value",e);t.style.marginRight="20px";t.style.marginLeft="10px";t.style.width="500px";null==k||k.isRenamable()||t.setAttribute("disabled","true");this.init=function(){if(null==k||k.isRenamable())t.focus(),mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)};q.appendChild(t);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==p.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"));d.appendChild(v);var x={},A=null,z=null,y=null;e=function(b){"true"!=mxEvent.getSource(b).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(b))};mxEvent.addListener(u,"mousedown",e);mxEvent.addListener(u,"pointerdown",e);mxEvent.addListener(u,"touchstart",e);var B=new mxUrlConverter,C=
-!1;if(null!=c)for(e=0;e<c.length;e++)q=c[e],f(q.data,null,0,0,q.w,q.h,q,q.aspect,q.title);mxEvent.addListener(u,"dragleave",function(b){v.style.cursor="";for(var c=mxEvent.getSource(b);null!=c;){if(c==u||c==v){b.stopPropagation();b.preventDefault();break}c=c.parentNode}});var E=function(c){return function(d,e,l,n,k,g,p,q,t){null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t.name)||/(\.vs(x|sx?))($|\?)/i.test(t.name))?b.importVisio(t,mxUtils.bind(this,function(b){f(b,e,l,n,k,g,p,"fixed",mxEvent.isAltDown(c)?
-null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))})):null!=t&&!b.isOffline()&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(d,t.name)?b.parseFile(t,mxUtils.bind(this,function(d){4==d.readyState&&(b.spinner.stop(),200<=d.status&&299>=d.status&&(f(d.responseText,e,l,n,k,g,p,"fixed",mxEvent.isAltDown(c)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(f(d,e,l,n,k,g,p,"fixed",mxEvent.isAltDown(c)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g,
-" ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",l);mxEvent.addListener(u,"drop",n);mxEvent.addListener(v,"dragover",l);mxEvent.addListener(v,"drop",n);d.appendChild(u);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&c.appendChild(e);"draw.io"!=b.getServiceName()||null==k||k.constructor!=DriveLibrary&&
-k.constructor!=GitHubLibrary||(q=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&k.getPublicUrl(function(c){b.spinner.stop();if(null!=c){var f=b.getSearch("create title mode url drive splash state clibs ui".split(" ")),f=f+((0==f.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(c));c=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+f,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(c.container,
-440,240,!0);c.init()}else k.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(k.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),q.className="geBtn",c.appendChild(q));q=mxUtils.button(mxResources.get("export"),function(){var c=b.createLibraryDataFromImages(p),f=t.value;/(\.xml)$/i.test(f)||
-(f+=".xml");b.isLocalFileSave()?b.saveLocalFile(c,f,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document,"_blank")});q.setAttribute("id","btnDownload");q.className="geBtn";c.appendChild(q);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var G=document.createElement("input");G.setAttribute("multiple","multiple");G.setAttribute("type","file");mxEvent.addListener(G,"change",function(c){C=!1;
-b.importFiles(G.files,0,0,b.maxImageSize,function(b,f,d,e,l,n,k,g,p){null!=G.files&&(E(c)(b,f,d,e,l,n,k,g,p),G.type="",G.type="file",G.value="")});u.scrollTop=u.scrollHeight});G.style.display="none";document.body.appendChild(G);b.libDlgFileInputElt=G}q=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);b.libDlgFileInputElt.click()});q.setAttribute("id","btnAddImage");q.className="geBtn";c.appendChild(q)}q=mxUtils.button(mxResources.get("addImages"),function(){null!=y&&(y(),
-y=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(b,c,d){C=!1;if(null!=b){if("data:image/"==b.substring(0,11)){var e=b.indexOf(",");0<e&&(b=b.substring(0,e)+";base64,"+b.substring(e+1))}f(b,null,0,0,c,d);u.scrollTop=u.scrollHeight}})});q.setAttribute("id","btnAddImageUrl");q.className="geBtn";c.appendChild(q);this.saveBtnClickHandler=function(c,f,d,e){b.saveLibrary(c,f,d,e)};q=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=y&&(y(),y=null);this.saveBtnClickHandler(t.value,
-p,k,g)}));q.setAttribute("id","btnSave");q.className="geBtn gePrimaryBtn";c.appendChild(q);b.editor.cancelFirst||c.appendChild(e);d.appendChild(c);this.container=d},EditShapeDialog=function(b,e,d,c,k){c=null!=c?c:300;k=null!=k?k:120;var g,m,f=document.createElement("table"),l=document.createElement("tbody");f.style.cellPadding="4px";g=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";mxUtils.write(m,d);g.appendChild(m);l.appendChild(g);
-g=document.createElement("tr");m=document.createElement("td");var n=document.createElement("textarea");n.style.outline="none";n.style.resize="none";n.style.width=c-200+"px";n.style.height=k+"px";this.textarea=n;this.init=function(){n.focus();n.scrollTop=0};m.appendChild(n);g.appendChild(m);m=document.createElement("td");d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=k+4+"px";d.style.overflow="hidden";
-d.style.marginBottom="16px";mxEvent.disableContextMenu(d);m.appendChild(d);var p=new Graph(d);p.setEnabled(!1);var q=b.editor.graph.cloneCell(e);p.addCells([q]);d=p.view.getState(q);var t="";null!=d.shape&&null!=d.shape.stencil&&(t=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(n,t||"");d=p.getGraphBounds();k=Math.min(160/d.width,(k-40)/d.height);p.view.scaleAndTranslate(k,20/k-d.x,20/k-d.y);g.appendChild(m);l.appendChild(g);g=document.createElement("tr");m=document.createElement("td");
-m.setAttribute("colspan","2");m.style.paddingTop="2px";m.style.whiteSpace="nowrap";m.setAttribute("align","right");b.isOffline()||(k=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),k.className="geBtn",m.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&m.appendChild(k);var u=function(c,f,d){var e=n.value,l=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(l.documentElement),
-l=l.documentElement.getElementsByTagName("parsererror");if(null!=l&&0<l.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&b.hideDialog(),l=!c.model.contains(f),!d||l||e!=t){e=Graph.compress(e);c.getModel().beginUpdate();try{if(l){var k=b.editor.graph.getFreeInsertPoint();f.geometry.x=k.x;f.geometry.y=k.y;c.addCell(f)}c.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[f])}catch(C){throw C;}finally{c.getModel().endUpdate()}l&&
-(c.setSelectionCell(f),c.scrollCellToVisible(f))}};d=mxUtils.button(mxResources.get("preview"),function(){u(p,q,!1)});d.className="geBtn";m.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){u(b.editor.graph,e,!0)});d.className="geBtn gePrimaryBtn";m.appendChild(d);b.editor.cancelFirst||m.appendChild(k);g.appendChild(m);l.appendChild(g);f.appendChild(l);this.container=f},CustomDialog=function(b,e,d,c,k,g,m,f,l,n){var p=document.createElement("div");p.appendChild(e);e=document.createElement("div");
-e.style.marginTop="30px";e.style.textAlign="center";null!=m&&e.appendChild(m);b.isOffline()||null==g||(m=mxUtils.button(mxResources.get("help"),function(){b.openLink(g)}),m.className="geBtn",e.appendChild(m));l=mxUtils.button(l||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});l.className="geBtn";f&&(l.style.display="none");b.editor.cancelFirst&&e.appendChild(l);k=mxUtils.button(k||mxResources.get("ok"),mxUtils.bind(this,function(){n||b.hideDialog(null,null,this.container);if(null!=
-d){var c=d();if("string"===typeof c){b.showError(mxResources.get("error"),c);return}}n&&b.hideDialog(null,null,this.container)}));e.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);p.appendChild(e);this.cancelBtn=l;this.okButton=k;this.container=p},TemplatesDialog=function(b,e,d,c,k,g,m,f,l,n,p,q,t,u,v){function x(b){la.innerHTML=mxUtils.htmlEntities(b);la.style.display="block";setTimeout(function(){la.style.display="none"},4E3)}function A(){null!=S&&(S.style.fontWeight=
-"normal",S.style.textDecoration="none",Q=S,S=null)}function z(b,c,f,d,e,l,n){if(-1<b.className.indexOf("geTempDlgRadioBtnActive"))return!1;b.className+=" geTempDlgRadioBtnActive";H.querySelector(".geTempDlgRadioBtn[data-id="+d+"]").className="geTempDlgRadioBtn "+(n?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");H.querySelector("."+c).src="/images/"+f+"-sel.svg";H.querySelector("."+e).src="/images/"+l+".svg";return!0}function y(c,f,d,e){function n(c,f){if(null==g){var d=c,d=/^https?:\/\//.test(d)&&
-!b.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;mxUtils.get(d,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(g=b.getText());f(g)}))}else f(g)}function k(d,e,l){if(null!=d&&mxUtils.isAncestorNode(document.body,f)&&(d=mxUtils.parseXml(d),d=Editor.extractGraphModel(d.documentElement,!0),null!=d)){"mxfile"==d.nodeName&&(d=Editor.parseDiagramNode(d.getElementsByTagName("diagram")[0]));var n=new mxCodec(d.ownerDocument),k=new mxGraphModel;
-n.decode(d,k);d=k.root.getChildAt(0).children||[];b.sidebar.createTooltip(f,d,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=c.title?mxResources.get(c.title,null,c.title):null,!0,new mxPoint(e,l),!0,null,!0);var g=document.createElement("div");g.className="geTempDlgDialogMask";H.appendChild(g);var p=b.sidebar.hideTooltip;b.sidebar.hideTooltip=
-function(){g&&(H.removeChild(g),g=null,p.apply(this,arguments),b.sidebar.hideTooltip=p)};mxEvent.addListener(g,"click",function(){b.sidebar.hideTooltip()})}}var g=null;if(ka||b.sidebar.currentElt==f)b.sidebar.hideTooltip();else{var p=function(c){ka&&b.sidebar.currentElt==f&&k(c,mxEvent.getClientX(e),mxEvent.getClientY(e));ka=!1;d.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=f;ka=!0;d.src="/images/aui-wait.gif";c.isExt?l(c,p,function(){x(mxResources.get("cantLoadPrev"));
-ka=!1;d.src="/images/icon-search.svg"}):n(c.url,p)}}function B(b,c,f){if(null!=X){for(var d=X.className.split(" "),e=0;e<d.length;e++)if(-1<d[e].indexOf("Active")){d.splice(e,1);break}X.className=d.join(" ")}null!=b?(X=b,X.className+=" "+c,fa=f,ea.className="geTempDlgCreateBtn"):(fa=X=null,ea.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function C(c,f){if(null!=fa){var d=function(c){t.isExternal?l(t,function(b){g(b,c)},k):t.url?mxUtils.get(TEMPLATE_PATH+"/"+t.url,mxUtils.bind(this,function(b){200<=
-b.getStatus()&&299>=b.getStatus()?g(b.getText(),c):k()})):g(b.emptyDiagramXml,c)},g=function(c,d){v||b.hideDialog(!0);e(c,d,t,f)},k=function(){x(mxResources.get("cannotLoad"));p()},p=function(){fa=t;ea.className="geTempDlgCreateBtn";f&&(ra.className="geTempDlgOpenBtn")},t=fa;fa=null;"boolean"!==typeof f&&(f=t.isExternal&&q);if(1==c)n(t.url,t);else if(f)ra.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",d();else{ea.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy";
-var m=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),m=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),d,m,function(b){var c=null!=b&&0<b.length;return c&&v?(d(b),!1):c},null,null,null,p,u?null:[]);b.showDialog(m.container,350,80,!0,!0);m.init()}}}function E(b){ea.innerHTML=mxUtils.htmlEntities(mxResources.get(R||b?"create":"copy"));b=b?"none":"";q&&(ra.style.display=b);for(var c=H.querySelectorAll(".geTempDlgLinkToDiagram"),
-f=0;f<c.length;f++)c[f].style.display=b}function G(c,f,d,e,l){l||(U.innerHTML="",B(),Y=c,ia=e);var n=null;if(d){n=document.createElement("table");n.className="geTempDlgDiagramsListGrid";var g=document.createElement("tr"),k=document.createElement("th");k.style.width="50%";k.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));g.appendChild(k);k=document.createElement("th");k.style.width="25%";k.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));g.appendChild(k);k=document.createElement("th");
-k.style.width="25%";k.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));g.appendChild(k);n.appendChild(g);U.appendChild(n)}for(g=0;g<c.length;g++){c[g].isExternal=!f;var p=c[g].url,q=(k=mxUtils.htmlEntities(f?mxResources.get(c[g].title,null,c[g].title):c[g].title))||c[g].url,t=c[g].imgUrl,m=mxUtils.htmlEntities(c[g].changedBy||""),O="";c[g].lastModifiedOn&&(O=b.timeSince(new Date(c[g].lastModifiedOn)),null==O&&(O=mxResources.get("lessThanAMinute")),O=mxUtils.htmlEntities(mxResources.get("timeAgo",
-[O],"{1} ago")));t||(t=TEMPLATE_PATH+"/"+p.substring(0,p.length-4)+".png");p=d?50:15;null!=k&&k.length>p&&(k=k.substring(0,p)+"&hellip;");if(d){var u=document.createElement("tr"),t=document.createElement("td"),v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramListPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||t.appendChild(v);q=document.createElement("span");q.className="geTempDlgDiagramTitle";q.innerHTML=k;t.appendChild(q);u.appendChild(t);
-t=document.createElement("td");t.innerHTML=m;u.appendChild(t);t=document.createElement("td");t.innerHTML=O;u.appendChild(t);n.appendChild(u);null==X&&(E(f),B(u,"geTempDlgDiagramsListGridActive",c[g]));(function(b,c,d){mxEvent.addListener(u,"click",function(){X!=c&&(E(f),B(c,"geTempDlgDiagramsListGridActive",b))});mxEvent.addListener(u,"dblclick",C);mxEvent.addListener(v,"click",function(f){y(b,c,d,f)})})(c[g],u,v)}else{var H=document.createElement("div");H.className="geTempDlgDiagramTile";H.setAttribute("title",
-q);null==X&&(E(f),B(H,"geTempDlgDiagramTileActive",c[g]));m=document.createElement("div");m.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var A=document.createElement("img");A.style.display="none";(function(b,c,f){A.onload=function(){c.className="geTempDlgDiagramTileImg";b.style.display=""};A.onerror=function(){this.src!=f?this.src=f:c.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(A,m,t?t.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):
-"");A.src=t;m.appendChild(A);H.appendChild(m);m=document.createElement("div");m.className="geTempDlgDiagramTileLbl";m.innerHTML=null!=k?k:"";H.appendChild(m);v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||H.appendChild(v);(function(b,c,d){mxEvent.addListener(H,"click",function(){X!=c&&(E(f),B(c,"geTempDlgDiagramTileActive",b))});mxEvent.addListener(H,"dblclick",C);mxEvent.addListener(v,
-"click",function(f){y(b,c,d,f)})})(c[g],H,v);U.appendChild(H)}}for(var J in e)c=e[J],0<c.length&&(l=document.createElement("div"),l.className="geTempDlgImportCat",l.innerHTML=mxResources.get(J,null,J),U.appendChild(l),G(c,f,d,null,!0))}function F(b,c){da.innerHTML="";B();for(var f=Math.floor(da.offsetWidth/150)-1,d=!c&&b.length>f?f:b.length,e=0;e<d;e++){var l=b[e];l.isCategory=!0;var n=document.createElement("div"),g=mxResources.get(l.title);null==g&&(g=l.title.substring(0,1).toUpperCase()+l.title.substring(1));
-n.className="geTempDlgNewDiagramCatItem";n.setAttribute("title",g);g=mxUtils.htmlEntities(g);15<g.length&&(g=g.substring(0,15)+"&hellip;");null==X&&(E(!0),B(n,"geTempDlgNewDiagramCatItemActive",l));var k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemImg";var p=document.createElement("img");p.src=NEW_DIAGRAM_CATS_PATH+"/"+l.img;k.appendChild(p);n.appendChild(k);k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemLbl";k.innerHTML=g;n.appendChild(k);da.appendChild(n);
-(function(b,c){mxEvent.addListener(n,"click",function(){X!=c&&(E(!0),B(c,"geTempDlgNewDiagramCatItemActive",b))});mxEvent.addListener(n,"dblclick",C)})(l,n)}n=document.createElement("div");n.className="geTempDlgNewDiagramCatItem";g=mxResources.get("showAllTemps");n.setAttribute("title",g);k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemImg";k.innerHTML="...";k.style.fontSize="32px";n.appendChild(k);k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemLbl";
-k.innerHTML=g;n.appendChild(k);da.appendChild(n);mxEvent.addListener(n,"click",function(){function b(){var f=c.querySelector(".geTemplateDrawioCatLink");null!=f?f.click():setTimeout(b,200)}R=!0;var c=H.querySelector(".geTemplatesList");c.style.display="block";oa.style.width="";pa.style.display="";pa.value="";ca=null;b()});na.style.display=b.length<=f?"none":""}function D(b,c,f){function d(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));var d=f+" ("+c.length+
-")",e=f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"&hellip;");return{lbl:f+" ("+c.length+")",fullLbl:d,lblOnly:e}}function e(f,d,e,l,n){mxEvent.addListener(e,"click",function(){S!=e&&(null!=S?(S.style.fontWeight="normal",S.style.textDecoration="none"):(ba.style.display="none",V.style.minHeight="100%"),S=e,S.style.fontWeight="bold",S.style.textDecoration="underline",oa.scrollTop=0,J&&(W=!0),ja.innerHTML=d,ha.style.display="none",G(n?c[f]:l?ua[f][l]:b[f],n?!1:!0))})}var l=H.querySelector(".geTemplatesList");
-if(0<f){f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(f,mxResources.get("custom"));l.appendChild(f);for(var n in c){f=document.createElement("div");var g=c[n],g=d(n,g);f.className="geTemplateCatLink";f.setAttribute("title",g.fullLbl);f.innerHTML=g.lbl;l.appendChild(f);e(n,g.lblOnly,f,null,!0)}f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";
-mxUtils.write(f,"draw.io");l.appendChild(f)}for(n in b){var k=ua[n],p=f=document.createElement(k?"ul":"div"),g=b[n],g=d(n,g);if(null!=k){var q=document.createElement("li"),t=document.createElement("div");t.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";t.style.padding="0";t.setAttribute("title",g.fullLbl);t.innerHTML=g.lbl;p=t;q.appendChild(t);var m=document.createElement("ul");m.className="geTempTreeNested";m.style.visibility="hidden";for(var y in k){var O=document.createElement("li"),
-u=d(y,k[y]);O.setAttribute("title",u.fullLbl);O.innerHTML=u.lbl;O.className="geTemplateCatLink";O.style.padding="0";O.style.margin="0";e(n,u.lblOnly,O,y);m.appendChild(O)}q.appendChild(m);f.className="geTempTree";f.appendChild(q);(function(b,c){mxEvent.addListener(c,"click",function(){for(var f=b.querySelectorAll("li"),d=0;d<f.length;d++)f[d].style.margin="";b.style.visibility="visible";b.classList.toggle("geTempTreeActive");b.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var c=
-0;c<f.length;c++)f[c].style.margin="0";b.style.visibility="hidden"},250);c.classList.toggle("geTempTreeCaret-down")})})(m,t)}else f.className="geTemplateCatLink geTemplateDrawioCatLink",f.setAttribute("title",g.fullLbl),f.innerHTML=g.lbl;l.appendChild(f);e(n,g.lblOnly,p)}}function I(){mxUtils.get(c,function(b){if(!sa){sa=!0;b=b.getXml().documentElement.firstChild;for(var c={};null!=b;){if("undefined"!==typeof b.getAttribute)if("clibs"==b.nodeName){for(var f=b.getAttribute("name"),d=b.getElementsByTagName("add"),
-e=[],l=0;l<d.length;l++)e.push(encodeURIComponent(mxUtils.getTextContent(d[l])));null!=f&&0<e.length&&(c[f]=e.join(";"))}else if(e=b.getAttribute("url"),null!=e){d=b.getAttribute("section");f=b.getAttribute("subsection");if(null==d&&(l=e.indexOf("/"),d=e.substring(0,l),null==f)){var n=e.indexOf("/",l+1);-1<n&&(f=e.substring(l+1,n))}l=T[d];null==l&&(xa++,l=[],T[d]=l);e=b.getAttribute("clibs");null!=c[e]&&(e=c[e]);e={url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title")||
-b.getAttribute("name"),preview:b.getAttribute("preview"),clibs:e,tags:b.getAttribute("tags")};l.push(e);null!=f&&(l=ua[d],null==l&&(l={},ua[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}D(T,ma,ya)}})}function K(b){m&&(oa.scrollTop=0,U.innerHTML="",qa.spin(U),W=!1,J=!0,ja.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ca=null,m(za,function(){x(mxResources.get("cannotLoad"));za([])},b?null:g))}function L(b){if(""==b)null!=Q&&(Q.click(),Q=null);else{if(null==TemplatesDialog.tagsList[c]){var f=
-{},d;for(d in T)for(var e=T[d],l=0;l<e.length;l++){var n=e[l];if(null!=n.tags)for(var g=n.tags.toLowerCase().split(";"),k=0;k<g.length;k++)null==f[g[k]]&&(f[g[k]]=[]),f[g[k]].push(n)}TemplatesDialog.tagsList[c]=f}var p=b.toLowerCase().split(" "),f=TemplatesDialog.tagsList[c];if(0<ya&&null==f.__tagsList__){for(d in ma)for(e=ma[d],l=0;l<e.length;l++)for(n=e[l],g=n.title.split(" "),g.push(d),k=0;k<g.length;k++){var q=g[k].toLowerCase();null==f[q]&&(f[q]=[]);f[q].push(n)}f.__tagsList__=!0}d=[];e={};for(l=
-g=0;l<p.length;l++)if(0<p[l].length){var q=f[p[l]],t={};d=[];if(null!=q)for(k=0;k<q.length;k++)n=q[k],0==g==(null==e[n.url])&&(t[n.url]=!0,d.push(n));e=t;g++}0==d.length?ja.innerHTML=mxResources.get("noResultsFor",[b]):G(d,!0)}}function M(b){if(ca!=b||aa!=N)A(),oa.scrollTop=0,U.innerHTML="",ja.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(b)+'"',wa=null,R?L(b):f&&(b?(qa.spin(U),W=!1,J=!0,f(b,za,function(){x(mxResources.get("searchFailed"));za([])},aa?null:
-g)):K(aa)),ca=b,N=aa}function P(b){null!=wa&&clearTimeout(wa);13==b.keyCode?M(pa.value):wa=setTimeout(function(){M(pa.value)},1E3)}var O='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(f?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
-mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</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>'+
+this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",f);this.destroy=function(){mxEvent.removeListener(window,"resize",f);this.window.destroy()}},TagsWindow=function(b,e,d,c,g){var k=b.editor.graph,n=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(c,f){if(k.isEnabled()){var d=new FilenameDialog(b,"",mxResources.get("add"),function(d){b.hideDialog();if(null!=d&&0<d.length){d=d.split(" ");for(var e=[],l=0;l<d.length;l++){var m=
+mxUtils.trim(d[l]);""!=m&&0>mxUtils.indexOf(c,m)&&e.push(m)}0<e.length&&(k.isSelectionEmpty()?f(c.concat(e)):k.addTagsForCells(k.getSelectionCells(),e))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(d.container,300,80,!0,!0);d.init()}}),f=n.div;this.window=new mxWindow(mxResources.get("tags"),f,e,d,c,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);
+this.window.addListener("show",mxUtils.bind(this,function(){n.refresh();this.window.fit()}));this.window.setLocation=function(b,c){var f=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,f-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,
+arguments)};var l=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",l);this.destroy=function(){mxEvent.removeListener(window,"resize",l);this.window.destroy()}},AuthDialog=function(b,e,d,c){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("authorizationRequired"));
+var n="Unknown",f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.marginRight="10px";e==b.drive?(n=mxResources.get("googleDrive"),f.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(n=mxResources.get("dropbox"),f.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(n=mxResources.get("oneDrive"),f.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(n=mxResources.get("github"),f.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?
+(n=mxResources.get("gitlab"),f.src=IMAGE_PATH+"/gitlab-logo.svg",f.style.width="32px"):e==b.notion?(n=mxResources.get("notion"),f.src=IMAGE_PATH+"/notion-logo-white.svg",f.style.width="32px"):e==b.trello&&(n=mxResources.get("trello"),f.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[n]));var l=document.createElement("input");l.setAttribute("type","checkbox");n=mxUtils.button(mxResources.get("authorize"),function(){c(l.checked)});
+n.insertBefore(f,n.firstChild);n.style.marginTop="6px";n.className="geBigButton";n.style.fontSize="18px";n.style.padding="14px";g.appendChild(k);g.appendChild(b);g.appendChild(n);d&&(d=document.createElement("p"),d.style.marginTop="20px",d.appendChild(l),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberMe")),d.appendChild(k),g.appendChild(d),l.checked=!0,l.defaultChecked=!0,mxEvent.addListener(k,"click",function(b){l.checked=!l.checked;mxEvent.consume(b)}));this.container=
+g},MoreShapesDialog=function(b,e,d){d=null!=d?d:b.sidebar.entries;var c=document.createElement("div"),g=[];if(null!=b.sidebar.customEntries)for(var k=0;k<b.sidebar.customEntries.length;k++){for(var n=b.sidebar.customEntries[k],f={title:b.getResource(n.title),entries:[]},l=0;l<n.entries.length;l++){var m=n.entries[l];f.entries.push({id:m.id,title:b.getResource(m.title),desc:b.getResource(m.desc),image:m.preview})}g.push(f)}for(k=0;k<d.length;k++)if(null==b.sidebar.enabledLibraries)g.push(d[k]);else{f=
+{title:d[k].title,entries:[]};for(l=0;l<d[k].entries.length;l++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,d[k].entries[l].id)&&f.entries.push(d[k].entries[l]);0<f.entries.length&&g.push(f)}d=g;if(e){k=mxUtils.bind(this,function(c){for(var f=0;f<c.length;f++)(function(c){var d=v.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,c.title);p.appendChild(d);for(var e=0;e<c.entries.length;e++)(function(c){var d=
+v.cloneNode(!1);d.style.cursor="pointer";d.style.padding="4px 0px 4px 20px";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.setAttribute("title",c.title+" ("+c.id+")");var l=document.createElement("input");l.setAttribute("type","checkbox");l.checked=b.sidebar.isEntryVisible(c.id);l.defaultChecked=l.checked;d.appendChild(l);mxUtils.write(d," "+c.title);p.appendChild(d);var m=function(b){if(null==b||"INPUT"!=mxEvent.getSource(b).nodeName){q.style.textAlign="center";
+q.style.padding="0px";q.style.color="";q.innerHTML="";if(null!=c.desc){var f=document.createElement("pre");f.style.boxSizing="border-box";f.style.fontFamily="inherit";f.style.margin="20px";f.style.right="0px";f.style.textAlign="left";mxUtils.write(f,c.desc);q.appendChild(f)}null!=c.imageCallback?c.imageCallback(q):null!=c.image?q.innerHTML+='<img border="0" src="'+c.image+'"/>':null==c.desc&&(q.style.padding="20px",q.style.color="rgb(179, 179, 179)",mxUtils.write(q,mxResources.get("noPreview")));
+null!=t&&(t.style.backgroundColor="");t=d;t.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=b&&mxEvent.consume(b)}};mxEvent.addListener(d,"click",m);mxEvent.addListener(d,"dblclick",function(b){l.checked=!l.checked;mxEvent.consume(b)});u.push(function(){return l.checked?c.id:null});0==f&&0==e&&m()})(c.entries[e])})(c[f])});l=document.createElement("div");l.className="geDialogTitle";mxUtils.write(l,mxResources.get("shapes"));l.style.position="absolute";l.style.top="0px";l.style.left=
+"0px";l.style.lineHeight="40px";l.style.height="40px";l.style.right="0px";var p=document.createElement("div"),q=document.createElement("div");p.style.position="absolute";p.style.top="40px";p.style.left="0px";p.style.width="202px";p.style.bottom="60px";p.style.overflow="auto";q.style.position="absolute";q.style.left="202px";q.style.right="0px";q.style.top="40px";q.style.bottom="60px";q.style.overflow="auto";q.style.borderLeft="1px solid rgb(211, 211, 211)";q.style.textAlign="center";var t=null,u=[],
+v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";k(d);c.style.padding="30px";c.appendChild(l);c.appendChild(p);c.appendChild(q);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";var y=document.createElement("input");y.setAttribute("type","checkbox");if(isLocalStorage||
+mxClient.IS_CHROMEAPP)k=document.createElement("span"),k.style.paddingRight="20px",k.appendChild(y),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),y.checked=!0,y.defaultChecked=!0,mxEvent.addListener(k,"click",function(b){mxEvent.getSource(b)!=y&&(y.checked=!y.checked,mxEvent.consume(b))}),d.appendChild(k);k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var c=[],f=0;f<u.length;f++){var d=
+u[f].apply(this,arguments);null!=d&&c.push(d)}b.sidebar.showEntries(c.join(";"),y.checked,!0)});l.className="geBtn gePrimaryBtn"}else{var A=document.createElement("table"),k=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";l=document.createElement("tr");A.style.width="100%";e=document.createElement("td");var g=document.createElement("td"),n=document.createElement("td"),z=mxUtils.bind(this,function(c,f,d){var e=document.createElement("input");e.type="checkbox";A.appendChild(e);
+e.checked=b.sidebar.isEntryVisible(d);var l=document.createElement("span");mxUtils.write(l,f);f=document.createElement("div");f.style.display="block";f.appendChild(e);f.appendChild(l);mxEvent.addListener(l,"click",function(b){e.checked=!e.checked;mxEvent.consume(b)});c.appendChild(f);return function(){return e.checked?d:null}});l.appendChild(e);l.appendChild(g);l.appendChild(n);k.appendChild(l);A.appendChild(k);for(var u=[],x=0,k=0;k<d.length;k++)for(l=0;l<d[k].entries.length;l++)x++;for(var B=[e,
+g,n],C=0,k=0;k<d.length;k++)(function(b){for(var c=0;c<b.entries.length;c++){var f=b.entries[c];u.push(z(B[Math.floor(C/(x/3))],f.title,f.id));C++}})(d[k]);c.appendChild(A);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";y=document.createElement("input");isLocalStorage&&(y.setAttribute("type","checkbox"),y.checked=!0,y.defaultChecked=!0,d.appendChild(y),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),d.appendChild(k),
+mxEvent.addListener(k,"click",function(b){y.checked=!y.checked;mxEvent.consume(b)}));c.appendChild(d);k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){for(var c=["search"],f=0;f<u.length;f++){var d=u[f].apply(this,arguments);null!=d&&c.push(d)}b.sidebar.showEntries(0<c.length?c.join(";"):"",y.checked);b.hideDialog()});l.className="geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";
+d.style.textAlign="right"}b.editor.cancelFirst?(d.appendChild(k),d.appendChild(l)):(d.appendChild(l),d.appendChild(k));c.appendChild(d);this.container=c},PluginsDialog=function(b,e,d){function c(){if(0==n.length)k.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{k.innerHTML="";for(var f=0;f<n.length;f++){var e=document.createElement("span");e.style.whiteSpace="nowrap";var l=document.createElement("span");l.className="geSprite geSprite-delete";l.style.position="relative";l.style.cursor=
+"pointer";l.style.top="5px";l.style.marginRight="4px";l.style.display="inline-block";e.appendChild(l);mxUtils.write(e,n[f]);k.appendChild(e);mxUtils.br(k);mxEvent.addListener(l,"click",function(f){return function(){b.confirm(mxResources.get("delete")+' "'+n[f]+'"?',function(){null!=d&&d(n[f]);n.splice(f,1);c()})}}(f))}}}var g=document.createElement("div"),k=document.createElement("div");k.style.height="120px";k.style.overflow="auto";var n=mxSettings.getPlugins().slice();g.appendChild(k);c();var f=
+mxUtils.button(mxResources.get("add")+"...",null!=e?function(){e(function(b){b&&0>mxUtils.indexOf(n,b)&&n.push(b);c()})}:function(){var f=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("builtinPlugins")+": ");f.appendChild(d);var e=document.createElement("select");e.style.width="150px";for(d=0;d<App.publicPlugin.length;d++){var l=document.createElement("option");mxUtils.write(l,App.publicPlugin[d]);l.value=App.publicPlugin[d];
+e.appendChild(l)}f.appendChild(e);mxUtils.br(f);mxUtils.br(f);d=mxUtils.button(mxResources.get("custom")+"...",function(){var f=new FilenameDialog(b,"",mxResources.get("add"),function(f){b.hideDialog();if(null!=f&&0<f.length){f=f.split(";");for(var d=0;d<f.length;d++){var e=f[d],l=App.pluginRegistry[e];null!=l&&(e=l);0<e.length&&0>mxUtils.indexOf(n,e)&&n.push(e)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(f.container,300,80,!0,!0);f.init()});d.className="geBtn";
+f=new CustomDialog(b,f,mxUtils.bind(this,function(){var b=App.pluginRegistry[e.value];0>mxUtils.indexOf(n,b)&&(n.push(b),c())}),null,null,null,d);b.showDialog(f.container,300,100,!0,!0)});f.className="geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(n);mxSettings.save();b.hideDialog();b.alert(mxResources.get("restartForChangeRequired"))});m.className="geBtn gePrimaryBtn";
+var p=document.createElement("div");p.style.marginTop="14px";p.style.textAlign="right";var q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});q.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.style.display="none");p.appendChild(q);b.editor.cancelFirst?(p.appendChild(l),p.appendChild(f),p.appendChild(m)):(p.appendChild(f),p.appendChild(m),p.appendChild(l));g.appendChild(p);this.container=g},CropImageDialog=function(b,e,d){function c(b){null!=
+n&&n.destroy();n=b?new Croppie(k,{viewport:{width:150,height:150,type:"circle"},enableExif:!0,showZoomer:!1,enableResize:!1,enableOrientation:!0}):new Croppie(k,{viewport:{width:150,height:150,type:"square"},enableExif:!0,showZoomer:!1,enableResize:!0,enableOrientation:!0});n.bind({url:e})}var g=document.createElement("div"),k=document.createElement("div");k.style.width="300px";k.style.height="300px";g.appendChild(k);var n=null;this.init=function(){c()};var f=document.createElement("input");f.setAttribute("type",
+"checkbox");f.setAttribute("id","croppieCircle");f.style.margin="5px";g.appendChild(f);var l=document.createElement("label");l.setAttribute("for","croppieCircle");mxUtils.write(l,mxResources.get("circle"));g.appendChild(l);var m,p,q,t,l=document.createElement("div");m=document.createElement("button");p=document.createElement("button");l.appendChild(m);l.appendChild(p);q=document.createElement("i");t=document.createElement("i");m.appendChild(q);p.appendChild(t);l.className="cr-rotate-controls";l.style["float"]=
+"right";l.style.position="inherit";m.className="cr-rotate-l";p.className="cr-rotate-r";g.appendChild(l);m.addEventListener("click",function(){n.rotate(-90)});p.addEventListener("click",function(){n.rotate(90)});mxEvent.addListener(f,"change",function(){c(this.checked)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){n.result({type:"base64",size:"original"}).then(function(c){d(c);b.hideDialog()})});l.className=
+"geBtn gePrimaryBtn";m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";b.editor.cancelFirst?(m.appendChild(f),m.appendChild(l)):(m.appendChild(l),m.appendChild(f));g.appendChild(m);this.container=g},EditGeometryDialog=function(b,e){var d=b.editor.graph,c=1==e.length?d.getCellGeometry(e[0]):null,g=document.createElement("div"),k=document.createElement("table"),n=document.createElement("tbody"),f=document.createElement("tr"),l=document.createElement("td"),m=document.createElement("td");
+k.style.paddingLeft="6px";mxUtils.write(l,mxResources.get("relative")+":");var p=document.createElement("input");p.setAttribute("type","checkbox");null!=c&&c.relative&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);this.init=function(){p.focus()};m.appendChild(p);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("left")+":");var q=document.createElement("input");
+q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.x:"";m.appendChild(q);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("top")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.y:"";m.appendChild(t);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");
+m=document.createElement("td");mxUtils.write(l,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c&&null!=c.offset?c.offset.x:"";m.appendChild(u);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";
+v.value=null!=c&&null!=c.offset?c.offset.y:"";m.appendChild(v);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("width")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=c?c.width:"";m.appendChild(y);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=
+document.createElement("td");mxUtils.write(l,mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.height:"";m.appendChild(A);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("rotation")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=
+1==e.length?mxUtils.getValue(d.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";m.appendChild(z);f.appendChild(l);f.appendChild(m);n.appendChild(f);k.appendChild(n);g.appendChild(k);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var x=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<e.length;c++){var f=d.getCellGeometry(e[c]);null!=f&&(f=f.clone(),d.isCellMovable(e[c])&&(f.relative=p.checked,
+0<mxUtils.trim(q.value).length&&(f.x=Number(q.value)),0<mxUtils.trim(t.value).length&&(f.y=Number(t.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))),d.isCellResizable(e[c])&&(0<mxUtils.trim(y.value).length&&(f.width=Number(y.value)),0<mxUtils.trim(A.value).length&&(f.height=Number(A.value))),d.getModel().setGeometry(e[c],f));0<mxUtils.trim(z.value).length&&
+d.setCellStyles(mxConstants.STYLE_ROTATION,Number(z.value),[e[c]])}}finally{d.getModel().endUpdate()}});x.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(b){13==b.keyCode&&x.click()});k=document.createElement("div");k.style.marginTop="20px";k.style.textAlign="right";b.editor.cancelFirst?(k.appendChild(c),k.appendChild(x)):(k.appendChild(x),k.appendChild(c));g.appendChild(k);this.container=g},LibraryDialog=function(b,e,d,c,g,k){function n(b){for(b=document.elementFromPoint(b.clientX,
+b.clientY);null!=b&&b.parentNode!=u;)b=b.parentNode;var c=null;if(null!=b)for(var f=u.firstChild,c=0;null!=f&&f!=b;)f=f.nextSibling,c++;return c}function f(c,d,e,l,m,g,k,q,t){try{if(b.spinner.stop(),null==d||"image/"==d.substring(0,6))if(null==c&&null!=k||null==y[c]){var O=function(){K.innerHTML="";K.style.cursor="pointer";K.style.whiteSpace="nowrap";K.style.textOverflow="ellipsis";mxUtils.write(K,null!=L.title&&0<L.title.length?L.title:mxResources.get("untitled"));K.style.color=null==L.title||0==
+L.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var H=m,D=g;if(m>b.maxImageSize||g>b.maxImageSize){var z=Math.min(1,Math.min(b.maxImageSize/Math.max(1,m)),b.maxImageSize/Math.max(1,g));m*=z;g*=z}H>D?(D=Math.round(100*D/H),H=100):(H=Math.round(100*H/D),D=100);var G=document.createElement("div");G.setAttribute("draggable","true");G.style.display="inline-block";G.style.position="relative";G.style.cursor="move";mxUtils.setPrefixedStyle(G.style,"transition","transform .1s ease-in-out");
+if(null!=c){var M=document.createElement("img");M.setAttribute("src",B.convert(c));M.style.width=H+"px";M.style.height=D+"px";M.style.margin="10px";M.style.paddingBottom=Math.floor((100-D)/2)+"px";M.style.paddingLeft=Math.floor((100-H)/2)+"px";G.appendChild(M)}else if(null!=k){var E=b.stringToCells(Graph.decompress(k.xml));0<E.length&&(b.sidebar.createThumb(E,100,100,G,null,!0,!1),G.firstChild.style.display="inline-block",G.firstChild.style.cursor="")}var F=document.createElement("img");F.setAttribute("src",
+Editor.closeImage);F.setAttribute("border","0");F.setAttribute("title",mxResources.get("delete"));F.setAttribute("align","top");F.style.paddingTop="4px";F.style.position="absolute";F.style.marginLeft="-12px";F.style.zIndex="1";F.style.cursor="pointer";mxEvent.addListener(F,"dragstart",function(b){mxEvent.consume(b)});(function(b,c,f){mxEvent.addListener(F,"click",function(d){y[c]=null;for(var e=0;e<p.length;e++)if(null!=p[e].data&&p[e].data==c||null!=p[e].xml&&null!=f&&p[e].xml==f.xml){p.splice(e,
+1);break}G.parentNode.removeChild(b);0==p.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(F,"dblclick",function(b){mxEvent.consume(b)})})(G,c,k);G.appendChild(F);G.style.marginBottom="30px";var K=document.createElement("div");K.style.position="absolute";K.style.boxSizing="border-box";K.style.bottom="-18px";K.style.left="10px";K.style.right="10px";K.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";K.style.overflow=
+"hidden";K.style.textAlign="center";var L=null;null!=c?(L={data:c,w:m,h:g,title:t},null!=q&&(L.aspect=q),y[c]=M,p.push(L)):null!=k&&(k.aspect="fixed",p.push(k),L=k);mxEvent.addListener(K,"keydown",function(b){13==b.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(b))});O();G.appendChild(K);mxEvent.addListener(K,"mousedown",function(b){"true"!=K.getAttribute("contentEditable")&&mxEvent.consume(b)});E=function(c){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var f=
+new FilenameDialog(b,L.title||"",mxResources.get("ok"),function(b){null!=b&&(L.title=b,O())},mxResources.get("enterValue"));b.showDialog(f.container,300,80,!0,!0);f.init();mxEvent.consume(c)}else if("true"!=K.getAttribute("contentEditable")){null!=x&&(x(),x=null);if(null==L.title||0==L.title.length)K.innerHTML="";K.style.textOverflow="";K.style.whiteSpace="";K.style.cursor="text";K.style.color="";K.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(K.style,"user-select","text");K.focus();
+document.execCommand("selectAll",!1,null);x=function(){K.removeAttribute("contentEditable");K.style.cursor="pointer";L.title=K.innerHTML;O()};mxEvent.consume(c)}};mxEvent.addListener(K,"click",E);mxEvent.addListener(G,"dblclick",E);u.appendChild(G);mxEvent.addListener(G,"dragstart",function(b){null==c&&null!=k&&(F.style.visibility="hidden",K.style.visibility="hidden");mxClient.IS_FF&&null!=k.xml&&b.dataTransfer.setData("Text",k.xml);A=n(b);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);F.style.visibility="";K.style.visibility=""},0)});mxEvent.addListener(G,"dragend",function(b){"hidden"==F.style.visibility&&(F.style.visibility="",K.style.visibility="");A=null;mxUtils.setOpacity(G,100);mxUtils.setPrefixedStyle(G.style,"transform",null)})}else C||(C=!0,b.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(H=mxUtils.parseXml(c),"mxlibrary"==H.documentElement.nodeName){D=JSON.parse(mxUtils.getTextContent(H.documentElement));
+if(null!=D&&0<D.length)for(var I=0;I<D.length;I++)null!=D[I].xml?f(null,null,0,0,0,0,D[I]):f(D[I].data,null,0,0,D[I].w,D[I].h,null,"fixed",D[I].title);m=!0}else if("mxfile"==H.documentElement.nodeName){for(var P=H.documentElement.getElementsByTagName("diagram"),I=0;I<P.length;I++){var D=mxUtils.getTextContent(P[I]),E=b.stringToCells(Graph.decompress(D)),N=b.editor.graph.getBoundingBoxFromGeometry(E);f(null,null,0,0,0,0,{xml:D,w:N.width,h:N.height})}m=!0}}catch(R){}m||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(R){}return null}
+function l(b){b.dataTransfer.dropEffect=null!=A?"move":"copy";b.stopPropagation();b.preventDefault()}function m(c){c.stopPropagation();c.preventDefault();C=!1;z=n(c);if(null!=A)null!=z&&z<u.children.length?(p.splice(z>A?z-1:z,0,p.splice(A,1)[0]),u.insertBefore(u.children[A],u.children[z])):(p.push(p.splice(A,1)[0]),u.appendChild(u.children[A]));else if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxImageSize,E(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var d=
+decodeURIComponent(c.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(d)||/(\.png)($|\?)/i.test(d)||/(\.gif)($|\?)/i.test(d)||/(\.svg)($|\?)/i.test(d))&&b.loadImage(d,function(b){f(d,null,0,0,b.width,b.height);u.scrollTop=u.scrollHeight})}c.stopPropagation();c.preventDefault()}var p=[];d=document.createElement("div");d.style.height="100%";var q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.height="40px";d.appendChild(q);mxUtils.write(q,mxResources.get("filename")+
+":");null==e&&(e=b.defaultLibraryName+".xml");var t=document.createElement("input");t.setAttribute("value",e);t.style.marginRight="20px";t.style.marginLeft="10px";t.style.width="500px";null==g||g.isRenamable()||t.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)};q.appendChild(t);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";
+u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==p.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"));d.appendChild(v);var y={},A=null,z=null,x=null;e=function(b){"true"!=mxEvent.getSource(b).getAttribute("contentEditable")&&null!=x&&(x(),x=null,mxEvent.consume(b))};mxEvent.addListener(u,"mousedown",e);mxEvent.addListener(u,"pointerdown",e);mxEvent.addListener(u,"touchstart",e);var B=new mxUrlConverter,C=!1;if(null!=c)for(e=0;e<c.length;e++)q=c[e],f(q.data,null,0,0,q.w,q.h,q,q.aspect,q.title);mxEvent.addListener(u,"dragleave",function(b){v.style.cursor="";for(var c=
+mxEvent.getSource(b);null!=c;){if(c==u||c==v){b.stopPropagation();b.preventDefault();break}c=c.parentNode}});var E=function(c){return function(d,e,l,m,k,g,p,q,t){null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t.name)||/(\.vs(x|sx?))($|\?)/i.test(t.name))?b.importVisio(t,mxUtils.bind(this,function(b){f(b,e,l,m,k,g,p,"fixed",mxEvent.isAltDown(c)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))})):null!=t&&!b.isOffline()&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(d,t.name)?b.parseFile(t,mxUtils.bind(this,
+function(d){4==d.readyState&&(b.spinner.stop(),200<=d.status&&299>=d.status&&(f(d.responseText,e,l,m,k,g,p,"fixed",mxEvent.isAltDown(c)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(f(d,e,l,m,k,g,p,"fixed",mxEvent.isAltDown(c)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",l);mxEvent.addListener(u,"drop",m);mxEvent.addListener(v,"dragover",l);mxEvent.addListener(v,"drop",m);d.appendChild(u);
+c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&c.appendChild(e);"draw.io"!=b.getServiceName()||null==g||g.constructor!=DriveLibrary&&g.constructor!=GitHubLibrary||(q=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&g.getPublicUrl(function(c){b.spinner.stop();
+if(null!=c){var f=b.getSearch("create title mode url drive splash state clibs ui".split(" ")),f=f+((0==f.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(c));c=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+f,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(c.container,440,240,!0);c.init()}else g.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,
+function(){b.drive.showPermissions(g.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),q.className="geBtn",c.appendChild(q));q=mxUtils.button(mxResources.get("export"),function(){var c=b.createLibraryDataFromImages(p),f=t.value;/(\.xml)$/i.test(f)||(f+=".xml");b.isLocalFileSave()?b.saveLocalFile(c,f,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml&xml="+
+encodeURIComponent(c))).simulate(document,"_blank")});q.setAttribute("id","btnDownload");q.className="geBtn";c.appendChild(q);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var F=document.createElement("input");F.setAttribute("multiple","multiple");F.setAttribute("type","file");mxEvent.addListener(F,"change",function(c){C=!1;b.importFiles(F.files,0,0,b.maxImageSize,function(b,f,d,e,l,m,k,g,p){null!=F.files&&(E(c)(b,f,d,e,l,m,k,g,p),F.type="",F.type="file",F.value="")});u.scrollTop=u.scrollHeight});
+F.style.display="none";document.body.appendChild(F);b.libDlgFileInputElt=F}q=mxUtils.button(mxResources.get("import"),function(){null!=x&&(x(),x=null);b.libDlgFileInputElt.click()});q.setAttribute("id","btnAddImage");q.className="geBtn";c.appendChild(q)}q=mxUtils.button(mxResources.get("addImages"),function(){null!=x&&(x(),x=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(b,c,d){C=!1;if(null!=b){if("data:image/"==b.substring(0,11)){var e=b.indexOf(",");0<e&&(b=b.substring(0,e)+
+";base64,"+b.substring(e+1))}f(b,null,0,0,c,d);u.scrollTop=u.scrollHeight}})});q.setAttribute("id","btnAddImageUrl");q.className="geBtn";c.appendChild(q);this.saveBtnClickHandler=function(c,f,d,e){b.saveLibrary(c,f,d,e)};q=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=x&&(x(),x=null);this.saveBtnClickHandler(t.value,p,g,k)}));q.setAttribute("id","btnSave");q.className="geBtn gePrimaryBtn";c.appendChild(q);b.editor.cancelFirst||c.appendChild(e);d.appendChild(c);this.container=
+d},EditShapeDialog=function(b,e,d,c,g){c=null!=c?c:300;g=null!=g?g:120;var k,n,f=document.createElement("table"),l=document.createElement("tbody");f.style.cellPadding="4px";k=document.createElement("tr");n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";mxUtils.write(n,d);k.appendChild(n);l.appendChild(k);k=document.createElement("tr");n=document.createElement("td");var m=document.createElement("textarea");m.style.outline="none";m.style.resize="none";m.style.width=
+c-200+"px";m.style.height=g+"px";this.textarea=m;this.init=function(){m.focus();m.scrollTop=0};n.appendChild(m);k.appendChild(n);n=document.createElement("td");d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=g+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);n.appendChild(d);var p=new Graph(d);p.setEnabled(!1);var q=b.editor.graph.cloneCell(e);p.addCells([q]);
+d=p.view.getState(q);var t="";null!=d.shape&&null!=d.shape.stencil&&(t=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(m,t||"");d=p.getGraphBounds();g=Math.min(160/d.width,(g-40)/d.height);p.view.scaleAndTranslate(g,20/g-d.x,20/g-d.y);k.appendChild(n);l.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.setAttribute("colspan","2");n.style.paddingTop="2px";n.style.whiteSpace="nowrap";n.setAttribute("align","right");b.isOffline()||(g=mxUtils.button(mxResources.get("help"),
+function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),g.className="geBtn",n.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";b.editor.cancelFirst&&n.appendChild(g);var u=function(c,f,d){var e=m.value,l=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(l.documentElement),l=l.documentElement.getElementsByTagName("parsererror");if(null!=l&&0<l.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),
+mxResources.get("ok"));else if(d&&b.hideDialog(),l=!c.model.contains(f),!d||l||e!=t){e=Graph.compress(e);c.getModel().beginUpdate();try{if(l){var k=b.editor.graph.getFreeInsertPoint();f.geometry.x=k.x;f.geometry.y=k.y;c.addCell(f)}c.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[f])}catch(C){throw C;}finally{c.getModel().endUpdate()}l&&(c.setSelectionCell(f),c.scrollCellToVisible(f))}};d=mxUtils.button(mxResources.get("preview"),function(){u(p,q,!1)});d.className="geBtn";n.appendChild(d);
+d=mxUtils.button(mxResources.get("apply"),function(){u(b.editor.graph,e,!0)});d.className="geBtn gePrimaryBtn";n.appendChild(d);b.editor.cancelFirst||n.appendChild(g);k.appendChild(n);l.appendChild(k);f.appendChild(l);this.container=f},CustomDialog=function(b,e,d,c,g,k,n,f,l,m){var p=document.createElement("div");p.appendChild(e);e=document.createElement("div");e.style.marginTop="30px";e.style.textAlign="center";null!=n&&e.appendChild(n);b.isOffline()||null==k||(n=mxUtils.button(mxResources.get("help"),
+function(){b.openLink(k)}),n.className="geBtn",e.appendChild(n));l=mxUtils.button(l||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});l.className="geBtn";f&&(l.style.display="none");b.editor.cancelFirst&&e.appendChild(l);g=mxUtils.button(g||mxResources.get("ok"),mxUtils.bind(this,function(){m||b.hideDialog(null,null,this.container);if(null!=d){var c=d();if("string"===typeof c){b.showError(mxResources.get("error"),c);return}}m&&b.hideDialog(null,null,this.container)}));e.appendChild(g);
+g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);p.appendChild(e);this.cancelBtn=l;this.okButton=g;this.container=p},TemplatesDialog=function(b,e,d,c,g,k,n,f,l,m,p,q,t,u,v){function y(b){la.innerHTML=mxUtils.htmlEntities(b);la.style.display="block";setTimeout(function(){la.style.display="none"},4E3)}function A(){null!=S&&(S.style.fontWeight="normal",S.style.textDecoration="none",Q=S,S=null)}function z(b,c,f,d,e,l,m){if(-1<b.className.indexOf("geTempDlgRadioBtnActive"))return!1;
+b.className+=" geTempDlgRadioBtnActive";H.querySelector(".geTempDlgRadioBtn[data-id="+d+"]").className="geTempDlgRadioBtn "+(m?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");H.querySelector("."+c).src="/images/"+f+"-sel.svg";H.querySelector("."+e).src="/images/"+l+".svg";return!0}function x(c,f,d,e){function m(c,f){if(null==g){var d=c,d=/^https?:\/\//.test(d)&&!b.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;mxUtils.get(d,mxUtils.bind(this,function(b){200<=
+b.getStatus()&&299>=b.getStatus()&&(g=b.getText());f(g)}))}else f(g)}function k(d,e,l){if(null!=d&&mxUtils.isAncestorNode(document.body,f)&&(d=mxUtils.parseXml(d),d=Editor.extractGraphModel(d.documentElement,!0),null!=d)){"mxfile"==d.nodeName&&(d=Editor.parseDiagramNode(d.getElementsByTagName("diagram")[0]));var m=new mxCodec(d.ownerDocument),k=new mxGraphModel;m.decode(d,k);d=k.root.getChildAt(0).children||[];b.sidebar.createTooltip(f,d,Math.min((window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=c.title?mxResources.get(c.title,null,c.title):null,!0,new mxPoint(e,l),!0,null,!0);var g=document.createElement("div");g.className="geTempDlgDialogMask";H.appendChild(g);var p=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){g&&(H.removeChild(g),g=null,p.apply(this,arguments),b.sidebar.hideTooltip=p)};mxEvent.addListener(g,"click",function(){b.sidebar.hideTooltip()})}}
+var g=null;if(ka||b.sidebar.currentElt==f)b.sidebar.hideTooltip();else{var p=function(c){ka&&b.sidebar.currentElt==f&&k(c,mxEvent.getClientX(e),mxEvent.getClientY(e));ka=!1;d.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=f;ka=!0;d.src="/images/aui-wait.gif";c.isExt?l(c,p,function(){y(mxResources.get("cantLoadPrev"));ka=!1;d.src="/images/icon-search.svg"}):m(c.url,p)}}function B(b,c,f){if(null!=X){for(var d=X.className.split(" "),e=0;e<d.length;e++)if(-1<d[e].indexOf("Active")){d.splice(e,
+1);break}X.className=d.join(" ")}null!=b?(X=b,X.className+=" "+c,fa=f,ea.className="geTempDlgCreateBtn"):(fa=X=null,ea.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function C(c,f){if(null!=fa){var d=function(c){t.isExternal?l(t,function(b){g(b,c)},k):t.url?mxUtils.get(TEMPLATE_PATH+"/"+t.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?g(b.getText(),c):k()})):g(b.emptyDiagramXml,c)},g=function(c,d){v||b.hideDialog(!0);e(c,d,t,f)},k=function(){y(mxResources.get("cannotLoad"));
+p()},p=function(){fa=t;ea.className="geTempDlgCreateBtn";f&&(ra.className="geTempDlgOpenBtn")},t=fa;fa=null;"boolean"!==typeof f&&(f=t.isExternal&&q);if(1==c)m(t.url,t);else if(f)ra.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",d();else{ea.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy";var n=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),n=new FilenameDialog(b,b.defaultFilename+".drawio",
+mxResources.get("ok"),d,n,function(b){var c=null!=b&&0<b.length;return c&&v?(d(b),!1):c},null,null,null,p,u?null:[]);b.showDialog(n.container,350,80,!0,!0);n.init()}}}function E(b){ea.innerHTML=mxUtils.htmlEntities(mxResources.get(R||b?"create":"copy"));b=b?"none":"";q&&(ra.style.display=b);for(var c=H.querySelectorAll(".geTempDlgLinkToDiagram"),f=0;f<c.length;f++)c[f].style.display=b}function F(c,f,d,e,l){l||(U.innerHTML="",B(),Y=c,ia=e);var m=null;if(d){m=document.createElement("table");m.className=
+"geTempDlgDiagramsListGrid";var g=document.createElement("tr"),k=document.createElement("th");k.style.width="50%";k.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));g.appendChild(k);k=document.createElement("th");k.style.width="25%";k.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));g.appendChild(k);k=document.createElement("th");k.style.width="25%";k.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));g.appendChild(k);m.appendChild(g);U.appendChild(m)}for(g=0;g<
+c.length;g++){c[g].isExternal=!f;var p=c[g].url,q=(k=mxUtils.htmlEntities(f?mxResources.get(c[g].title,null,c[g].title):c[g].title))||c[g].url,t=c[g].imgUrl,n=mxUtils.htmlEntities(c[g].changedBy||""),O="";c[g].lastModifiedOn&&(O=b.timeSince(new Date(c[g].lastModifiedOn)),null==O&&(O=mxResources.get("lessThanAMinute")),O=mxUtils.htmlEntities(mxResources.get("timeAgo",[O],"{1} ago")));t||(t=TEMPLATE_PATH+"/"+p.substring(0,p.length-4)+".png");p=d?50:15;null!=k&&k.length>p&&(k=k.substring(0,p)+"&hellip;");
+if(d){var u=document.createElement("tr"),t=document.createElement("td"),v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramListPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||t.appendChild(v);q=document.createElement("span");q.className="geTempDlgDiagramTitle";q.innerHTML=k;t.appendChild(q);u.appendChild(t);t=document.createElement("td");t.innerHTML=n;u.appendChild(t);t=document.createElement("td");t.innerHTML=O;u.appendChild(t);m.appendChild(u);
+null==X&&(E(f),B(u,"geTempDlgDiagramsListGridActive",c[g]));(function(b,c,d){mxEvent.addListener(u,"click",function(){X!=c&&(E(f),B(c,"geTempDlgDiagramsListGridActive",b))});mxEvent.addListener(u,"dblclick",C);mxEvent.addListener(v,"click",function(f){x(b,c,d,f)})})(c[g],u,v)}else{var H=document.createElement("div");H.className="geTempDlgDiagramTile";H.setAttribute("title",q);null==X&&(E(f),B(H,"geTempDlgDiagramTileActive",c[g]));n=document.createElement("div");n.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
+var A=document.createElement("img");A.style.display="none";(function(b,c,f){A.onload=function(){c.className="geTempDlgDiagramTileImg";b.style.display=""};A.onerror=function(){this.src!=f?this.src=f:c.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(A,n,t?t.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");A.src=t;n.appendChild(A);H.appendChild(n);n=document.createElement("div");n.className="geTempDlgDiagramTileLbl";n.innerHTML=null!=k?k:"";H.appendChild(n);
+v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||H.appendChild(v);(function(b,c,d){mxEvent.addListener(H,"click",function(){X!=c&&(E(f),B(c,"geTempDlgDiagramTileActive",b))});mxEvent.addListener(H,"dblclick",C);mxEvent.addListener(v,"click",function(f){x(b,c,d,f)})})(c[g],H,v);U.appendChild(H)}}for(var J in e)c=e[J],0<c.length&&(l=document.createElement("div"),l.className="geTempDlgImportCat",
+l.innerHTML=mxResources.get(J,null,J),U.appendChild(l),F(c,f,d,null,!0))}function G(b,c){da.innerHTML="";B();for(var f=Math.floor(da.offsetWidth/150)-1,d=!c&&b.length>f?f:b.length,e=0;e<d;e++){var l=b[e];l.isCategory=!0;var m=document.createElement("div"),g=mxResources.get(l.title);null==g&&(g=l.title.substring(0,1).toUpperCase()+l.title.substring(1));m.className="geTempDlgNewDiagramCatItem";m.setAttribute("title",g);g=mxUtils.htmlEntities(g);15<g.length&&(g=g.substring(0,15)+"&hellip;");null==X&&
+(E(!0),B(m,"geTempDlgNewDiagramCatItemActive",l));var k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemImg";var p=document.createElement("img");p.src=NEW_DIAGRAM_CATS_PATH+"/"+l.img;k.appendChild(p);m.appendChild(k);k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemLbl";k.innerHTML=g;m.appendChild(k);da.appendChild(m);(function(b,c){mxEvent.addListener(m,"click",function(){X!=c&&(E(!0),B(c,"geTempDlgNewDiagramCatItemActive",b))});mxEvent.addListener(m,"dblclick",
+C)})(l,m)}m=document.createElement("div");m.className="geTempDlgNewDiagramCatItem";g=mxResources.get("showAllTemps");m.setAttribute("title",g);k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemImg";k.innerHTML="...";k.style.fontSize="32px";m.appendChild(k);k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemLbl";k.innerHTML=g;m.appendChild(k);da.appendChild(m);mxEvent.addListener(m,"click",function(){function b(){var f=c.querySelector(".geTemplateDrawioCatLink");
+null!=f?f.click():setTimeout(b,200)}R=!0;var c=H.querySelector(".geTemplatesList");c.style.display="block";oa.style.width="";pa.style.display="";pa.value="";ca=null;b()});na.style.display=b.length<=f?"none":""}function D(b,c,f){function d(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));var d=f+" ("+c.length+")",e=f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"&hellip;");return{lbl:f+" ("+c.length+")",fullLbl:d,lblOnly:e}}function e(f,d,e,l,m){mxEvent.addListener(e,
+"click",function(){S!=e&&(null!=S?(S.style.fontWeight="normal",S.style.textDecoration="none"):(ba.style.display="none",V.style.minHeight="100%"),S=e,S.style.fontWeight="bold",S.style.textDecoration="underline",oa.scrollTop=0,J&&(W=!0),ja.innerHTML=d,ha.style.display="none",F(m?c[f]:l?ua[f][l]:b[f],m?!1:!0))})}var l=H.querySelector(".geTemplatesList");if(0<f){f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";
+mxUtils.write(f,mxResources.get("custom"));l.appendChild(f);for(var m in c){f=document.createElement("div");var g=c[m],g=d(m,g);f.className="geTemplateCatLink";f.setAttribute("title",g.fullLbl);f.innerHTML=g.lbl;l.appendChild(f);e(m,g.lblOnly,f,null,!0)}f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(f,"draw.io");l.appendChild(f)}for(m in b){var k=ua[m],p=f=document.createElement(k?"ul":
+"div"),g=b[m],g=d(m,g);if(null!=k){var q=document.createElement("li"),t=document.createElement("div");t.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";t.style.padding="0";t.setAttribute("title",g.fullLbl);t.innerHTML=g.lbl;p=t;q.appendChild(t);var n=document.createElement("ul");n.className="geTempTreeNested";n.style.visibility="hidden";for(var x in k){var O=document.createElement("li"),u=d(x,k[x]);O.setAttribute("title",u.fullLbl);O.innerHTML=u.lbl;O.className="geTemplateCatLink";
+O.style.padding="0";O.style.margin="0";e(m,u.lblOnly,O,x);n.appendChild(O)}q.appendChild(n);f.className="geTempTree";f.appendChild(q);(function(b,c){mxEvent.addListener(c,"click",function(){for(var f=b.querySelectorAll("li"),d=0;d<f.length;d++)f[d].style.margin="";b.style.visibility="visible";b.classList.toggle("geTempTreeActive");b.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var c=0;c<f.length;c++)f[c].style.margin="0";b.style.visibility="hidden"},250);c.classList.toggle("geTempTreeCaret-down")})})(n,
+t)}else f.className="geTemplateCatLink geTemplateDrawioCatLink",f.setAttribute("title",g.fullLbl),f.innerHTML=g.lbl;l.appendChild(f);e(m,g.lblOnly,p)}}function I(){mxUtils.get(c,function(b){if(!sa){sa=!0;b=b.getXml().documentElement.firstChild;for(var c={};null!=b;){if("undefined"!==typeof b.getAttribute)if("clibs"==b.nodeName){for(var f=b.getAttribute("name"),d=b.getElementsByTagName("add"),e=[],l=0;l<d.length;l++)e.push(encodeURIComponent(mxUtils.getTextContent(d[l])));null!=f&&0<e.length&&(c[f]=
+e.join(";"))}else if(e=b.getAttribute("url"),null!=e){d=b.getAttribute("section");f=b.getAttribute("subsection");if(null==d&&(l=e.indexOf("/"),d=e.substring(0,l),null==f)){var m=e.indexOf("/",l+1);-1<m&&(f=e.substring(l+1,m))}l=T[d];null==l&&(xa++,l=[],T[d]=l);e=b.getAttribute("clibs");null!=c[e]&&(e=c[e]);e={url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title")||b.getAttribute("name"),preview:b.getAttribute("preview"),clibs:e,tags:b.getAttribute("tags")};l.push(e);null!=
+f&&(l=ua[d],null==l&&(l={},ua[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}D(T,ma,ya)}})}function K(b){n&&(oa.scrollTop=0,U.innerHTML="",qa.spin(U),W=!1,J=!0,ja.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ca=null,n(za,function(){y(mxResources.get("cannotLoad"));za([])},b?null:k))}function L(b){if(""==b)null!=Q&&(Q.click(),Q=null);else{if(null==TemplatesDialog.tagsList[c]){var f={},d;for(d in T)for(var e=T[d],l=0;l<e.length;l++){var m=e[l];if(null!=m.tags)for(var g=
+m.tags.toLowerCase().split(";"),k=0;k<g.length;k++)null==f[g[k]]&&(f[g[k]]=[]),f[g[k]].push(m)}TemplatesDialog.tagsList[c]=f}var p=b.toLowerCase().split(" "),f=TemplatesDialog.tagsList[c];if(0<ya&&null==f.__tagsList__){for(d in ma)for(e=ma[d],l=0;l<e.length;l++)for(m=e[l],g=m.title.split(" "),g.push(d),k=0;k<g.length;k++){var q=g[k].toLowerCase();null==f[q]&&(f[q]=[]);f[q].push(m)}f.__tagsList__=!0}d=[];e={};for(l=g=0;l<p.length;l++)if(0<p[l].length){var q=f[p[l]],t={};d=[];if(null!=q)for(k=0;k<q.length;k++)m=
+q[k],0==g==(null==e[m.url])&&(t[m.url]=!0,d.push(m));e=t;g++}0==d.length?ja.innerHTML=mxResources.get("noResultsFor",[b]):F(d,!0)}}function M(b){if(ca!=b||aa!=N)A(),oa.scrollTop=0,U.innerHTML="",ja.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(b)+'"',wa=null,R?L(b):f&&(b?(qa.spin(U),W=!1,J=!0,f(b,za,function(){y(mxResources.get("searchFailed"));za([])},aa?null:k)):K(aa)),ca=b,N=aa}function P(b){null!=wa&&clearTimeout(wa);13==b.keyCode?M(pa.value):wa=setTimeout(function(){M(pa.value)},
+1E3)}var O='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(f?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+
+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</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")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</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"><div class="geTempDlgErrMsg"></div>'+
(t?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(q?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",H=document.createElement("div");H.innerHTML=O;H.className=
-"geTemplateDlg";this.container=H;c=null!=c?c:TEMPLATE_PATH+"/index.xml";k=null!=k?k:NEW_DIAGRAM_CATS_PATH+"/index.xml";var J=!1,W=!1,S=null,Q=null,X=null,fa=null,ga=!1,aa=!0,Z=!1,Y=[],ia=null,ca,N,R=!1,na=H.querySelector(".geTempDlgShowAllBtn"),U=H.querySelector(".geTempDlgDiagramsTiles"),ja=H.querySelector(".geTempDlgDiagramsListTitle"),ha=H.querySelector(".geTempDlgDiagramsListBtns"),oa=H.querySelector(".geTempDlgContent"),V=H.querySelector(".geTempDlgDiagramsList"),ba=H.querySelector(".geTempDlgNewDiagramCat"),
+"geTemplateDlg";this.container=H;c=null!=c?c:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var J=!1,W=!1,S=null,Q=null,X=null,fa=null,ga=!1,aa=!0,Z=!1,Y=[],ia=null,ca,N,R=!1,na=H.querySelector(".geTempDlgShowAllBtn"),U=H.querySelector(".geTempDlgDiagramsTiles"),ja=H.querySelector(".geTempDlgDiagramsListTitle"),ha=H.querySelector(".geTempDlgDiagramsListBtns"),oa=H.querySelector(".geTempDlgContent"),V=H.querySelector(".geTempDlgDiagramsList"),ba=H.querySelector(".geTempDlgNewDiagramCat"),
da=H.querySelector(".geTempDlgNewDiagramCatList"),ea=H.querySelector(".geTempDlgCreateBtn"),ra=H.querySelector(".geTempDlgOpenBtn"),pa=H.querySelector(".geTempDlgSearchBox"),la=H.querySelector(".geTempDlgErrMsg"),qa=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(H.querySelector(".geTempDlgBack"),"click",function(){A();R=!1;H.querySelector(".geTemplatesList").style.display="none";oa.style.width=
"100%";ba.style.display="";V.style.minHeight="calc(100% - 280px)";pa.style.display=f?"":"none";pa.value="";ca=null;K(aa)});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){z(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(aa=!0,null==ca?K(aa):M(ca))});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){z(this,"geTempDlgMyDiagramsBtnImg",
-"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(aa=!1,null==ca?K(aa):M(ca))});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){z(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(Z=!0,G(Y,!1,Z,ia))});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){z(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(Z=!1,G(Y,!1,Z,
-ia))});var ka=!1;mxEvent.addListener(na,"click",function(){ga?(ba.style.height="280px",da.style.height="190px",na.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),F(va)):(ba.style.height="440px",da.style.height="355px",na.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),F(va,!0));ga=!ga});var sa=!1,ta=!1,T={},ua={},ma={},va=[],xa=1,ya=0;null!=p?p(function(b,c){ma=b;ya=c;I()},I):I();mxUtils.get(k,function(b){if(!ta){ta=!0;for(b=b.getXml().documentElement.firstChild;null!=b;)"undefined"!==
-typeof b.getAttribute&&null!=b.getAttribute("title")&&va.push({img:b.getAttribute("img"),libs:b.getAttribute("libs"),clibs:b.getAttribute("clibs"),title:b.getAttribute("title")}),b=b.nextSibling;F(va)}});var za=function(b,c,f){ha.style.display="";qa.stop();J=!1;if(W)W=!1;else if(c)U.innerHTML=c;else{f=f||{};c=0;for(var d in f)c+=f[d].length;0==b.length&&0==c?U.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):G(b,!1,Z,0==c?null:f)}};K(aa);var wa=null;mxEvent.addListener(pa,"keyup",P);
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(aa=!1,null==ca?K(aa):M(ca))});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){z(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(Z=!0,F(Y,!1,Z,ia))});mxEvent.addListener(H.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){z(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(Z=!1,F(Y,!1,Z,
+ia))});var ka=!1;mxEvent.addListener(na,"click",function(){ga?(ba.style.height="280px",da.style.height="190px",na.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),G(va)):(ba.style.height="440px",da.style.height="355px",na.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),G(va,!0));ga=!ga});var sa=!1,ta=!1,T={},ua={},ma={},va=[],xa=1,ya=0;null!=p?p(function(b,c){ma=b;ya=c;I()},I):I();mxUtils.get(g,function(b){if(!ta){ta=!0;for(b=b.getXml().documentElement.firstChild;null!=b;)"undefined"!==
+typeof b.getAttribute&&null!=b.getAttribute("title")&&va.push({img:b.getAttribute("img"),libs:b.getAttribute("libs"),clibs:b.getAttribute("clibs"),title:b.getAttribute("title")}),b=b.nextSibling;G(va)}});var za=function(b,c,f){ha.style.display="";qa.stop();J=!1;if(W)W=!1;else if(c)U.innerHTML=c;else{f=f||{};c=0;for(var d in f)c+=f[d].length;0==b.length&&0==c?U.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):F(b,!1,Z,0==c?null:f)}};K(aa);var wa=null;mxEvent.addListener(pa,"keyup",P);
mxEvent.addListener(pa,"search",P);mxEvent.addListener(pa,"input",P);mxEvent.addListener(ea,"click",function(b){C(!1,!1)});q&&mxEvent.addListener(ra,"click",function(b){C(!1,!0)});t&&mxEvent.addListener(H.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(b){C(!0)});mxEvent.addListener(H.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=d&&d();v||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
-var BtnDialog=function(b,e,d,c){var k=document.createElement("div");k.style.textAlign="center";var g=document.createElement("p");g.style.fontSize="16pt";g.style.padding="0px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("done"));var m="Unknown",f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.marginRight="10px";e==b.drive?(m=mxResources.get("googleDrive"),f.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?
-(m=mxResources.get("dropbox"),f.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(m=mxResources.get("oneDrive"),f.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(m=mxResources.get("github"),f.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(m=mxResources.get("gitlab"),f.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.notion?(m=mxResources.get("notion"),f.src=IMAGE_PATH+"/notion-logo.svg"):e==b.trello&&(m=mxResources.get("trello"),f.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");
-mxUtils.write(b,mxResources.get("authorizedIn",[m],"You are now authorized in {1}"));d=mxUtils.button(d,c);d.insertBefore(f,d.firstChild);d.style.marginTop="6px";d.className="geBigButton";d.style.fontSize="18px";d.style.padding="14px";k.appendChild(g);k.appendChild(b);k.appendChild(d);this.container=k},FontDialog=function(b,e,d,c,k){function g(b){this.style.border="";13==b.keyCode&&y.click()}var m,f,l,n=document.createElement("table"),p=document.createElement("tbody");n.style.marginTop="8px";m=document.createElement("tr");
+var BtnDialog=function(b,e,d,c){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("done"));var n="Unknown",f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.marginRight="10px";e==b.drive?(n=mxResources.get("googleDrive"),f.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?
+(n=mxResources.get("dropbox"),f.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(n=mxResources.get("oneDrive"),f.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(n=mxResources.get("github"),f.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(n=mxResources.get("gitlab"),f.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.notion?(n=mxResources.get("notion"),f.src=IMAGE_PATH+"/notion-logo.svg"):e==b.trello&&(n=mxResources.get("trello"),f.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");
+mxUtils.write(b,mxResources.get("authorizedIn",[n],"You are now authorized in {1}"));d=mxUtils.button(d,c);d.insertBefore(f,d.firstChild);d.style.marginTop="6px";d.className="geBigButton";d.style.fontSize="18px";d.style.padding="14px";g.appendChild(k);g.appendChild(b);g.appendChild(d);this.container=g},FontDialog=function(b,e,d,c,g){function k(b){this.style.border="";13==b.keyCode&&x.click()}var n,f,l,m=document.createElement("table"),p=document.createElement("tbody");m.style.marginTop="8px";n=document.createElement("tr");
f=document.createElement("td");f.colSpan=2;f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.fontWeight="bold";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","sysfonts");q.setAttribute("type","radio");q.setAttribute("name","current-fontdialog");q.setAttribute("id","fontdialog-sysfonts");f.appendChild(q);l=document.createElement("label");l.setAttribute("for","fontdialog-sysfonts");mxUtils.write(l,mxResources.get("sysFonts",
-null,"System Fonts"));f.appendChild(l);m.appendChild(f);p.appendChild(m);m=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontname",null,"Font Name")+":");m.appendChild(f);var t=document.createElement("input");"s"==c&&t.setAttribute("value",e);t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_s";f=document.createElement("td");f.appendChild(t);
-m.appendChild(f);p.appendChild(m);m=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.fontWeight="bold";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","googlefonts");u.setAttribute("type","radio");u.setAttribute("name","current-fontdialog");u.setAttribute("id","fontdialog-googlefonts");f.appendChild(u);l=document.createElement("label");l.setAttribute("for",
-"fontdialog-googlefonts");mxUtils.write(l,mxResources.get("googleFonts",null,"Google Fonts"));f.appendChild(l);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(l=b.menus.createHelpLink("https://fonts.google.com/"),l.getElementsByTagName("img")[0].setAttribute("valign","middle"),f.appendChild(l));m.appendChild(f);p.appendChild(m);m=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft=
-"15px";mxUtils.write(f,mxResources.get("fontname",null,"Font Name")+":");m.appendChild(f);var v=document.createElement("input");"g"==c&&v.setAttribute("value",e);v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontName_g";f=document.createElement("td");f.appendChild(v);m.appendChild(f);p.appendChild(m);m=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.fontWeight="bold";var x=document.createElement("input");
-x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","webfonts");x.setAttribute("type","radio");x.setAttribute("name","current-fontdialog");x.setAttribute("id","fontdialog-webfonts");f.appendChild(x);l=document.createElement("label");l.setAttribute("for","fontdialog-webfonts");mxUtils.write(l,mxResources.get("webfonts",null,"Web Fonts"));f.appendChild(l);m.appendChild(f);p.appendChild(m);m=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";
-f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontname",null,"Font Name")+":");m.appendChild(f);var A=document.createElement("input");"w"==c&&A.setAttribute("value",e);A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontName_w";f=document.createElement("td");f.appendChild(A);m.appendChild(f);p.appendChild(m);m=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width=
-"120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontUrl",null,"Font URL")+":");m.appendChild(f);var z=document.createElement("input");z.setAttribute("value",d||"");z.style.marginLeft="4px";z.style.width="250px";z.className="dlg_fontUrl";f=document.createElement("td");f.appendChild(z);m.appendChild(f);p.appendChild(m);this.init=function(){var b=t;"g"==c?b=v:"w"==c&&(b=A);b.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?b.select():document.execCommand("selectAll",
-!1,null)};m=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="20px";f.style.whiteSpace="nowrap";f.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",f.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();k()});e.className="geBtn";b.editor.cancelFirst&&f.appendChild(e);var y=mxUtils.button(mxResources.get("apply"),
-function(){var c,f,d;q.checked?(c=t.value,d="s"):u.checked?(c=v.value,f=Editor.GOOGLE_FONTS+encodeURIComponent(c).replace(/%20/g,"+"),d="g"):x.checked&&(c=A.value,f=z.value,d="w");var e;e=f;var l=d,g=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==c||0==c.length?(n.querySelector(".dlg_fontName_"+l).style.border="1px solid red",e=!1):"w"!=l||g.test(e)?e=!0:(n.querySelector(".dlg_fontUrl").style.border="1px solid red",e=!1);e&&(k(c,f,d),b.hideDialog())});y.className=
-"geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",g);mxEvent.addListener(v,"keypress",g);mxEvent.addListener(A,"keypress",g);mxEvent.addListener(z,"keypress",g);mxEvent.addListener(t,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});mxEvent.addListener(v,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(A,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(z,"focus",function(){x.setAttribute("checked",
-"checked");x.checked=!0});f.appendChild(y);b.editor.cancelFirst||f.appendChild(e);m.appendChild(f);p.appendChild(m);n.appendChild(p);this.container=n};
-function AspectDialog(b,e,d,c,k){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:d||[]};e=document.createElement("div");var g=document.createElement("h5");g.style.margin="0 0 10px";mxUtils.write(g,mxResources.get("pages"));e.appendChild(g);d=document.createElement("div");d.className="geAspectDlgList";e.appendChild(d);g=document.createElement("h5");g.style.margin="0 0 10px";mxUtils.write(g,mxResources.get("layers"));e.appendChild(g);g=document.createElement("div");g.className="geAspectDlgList";
-e.appendChild(g);this.pagesContainer=d;this.layersContainer=g;this.ui=b;d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="center";g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k()});g.className="geBtn";b.editor.cancelFirst&&d.appendChild(g);var m=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));d.appendChild(m);m.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||d.appendChild(g);m.setAttribute("disabled","disabled");this.okBtn=m;e.appendChild(d);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
-AspectDialog.prototype.createViewer=function(b,e,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var c=new Graph(b);c.setTooltips(!1);c.setEnabled(!1);c.setPanning(!1);c.minFitScale=null;c.maxFitScale=null;c.centerZoom=!0;e="mxGraphModel"==e.nodeName?e:Editor.parseDiagramNode(e);if(null!=e){var k=e.getAttribute("background");if(null==k||""==k||k==mxConstants.NONE)k="#ffffff";b.style.backgroundColor=k;k=new mxCodec(e.ownerDocument);b=c.getModel();k.decode(e,b);e=b.getChildCount(b.root);
-for(var k=null==d,g=0;g<e;g++){var m=b.getChildAt(b.root,g);b.setVisible(m,k||d==m.id)}c.maxFitScale=1;c.fit(0);c.center()}return c};
-AspectDialog.prototype.createPageItem=function(b,e,d){var c=document.createElement("div");c.className="geAspectDlgListItem";c.setAttribute("data-page-id",b);c.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.pagesContainer.appendChild(c);var k=this.createViewer(c.childNodes[0],d);e=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=c;
-this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerHTML="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");for(var e=k.model,e=e.getChildCells(e.getRoot()),m=0;m<e.length;m++)this.createLayerItem(e[m],b,k,d)});mxEvent.addListener(c,"click",e);this.aspect.pageId==b&&e()};
-AspectDialog.prototype.createLayerItem=function(b,e,d,c){e=d.convertValueToString(b)||mxResources.get("background")||"Background";var k=document.createElement("div");k.setAttribute("data-layer-id",b.id);k.className="geAspectDlgListItem";k.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.layersContainer.appendChild(k);this.createViewer(k.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=k.className.indexOf("geAspectDlgListItemSelected")?
-(k.className="geAspectDlgListItem",delete this.selectedLayers[b.id],0==Object.keys(this.selectedLayers).length&&this.okBtn.setAttribute("disabled","disabled")):(k.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(k,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};
-var FilePropertiesDialog=function(b){var e,d,c=document.createElement("table"),k=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";var g=b.getCurrentFile();e=null!=g&&null!=g.getTitle()?g.getTitle():this.editorUi.defaultFilename;d=null;if(/(\.png)$/i.test(e)){var m=1,f=0;e=b.fileNode;null!=e&&(e.hasAttribute("scale")&&(m=parseFloat(e.getAttribute("scale"))),e.hasAttribute("border")&&(f=parseInt(e.getAttribute("border"))));e=document.createElement("tr");d=document.createElement("td");
-d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";mxUtils.write(d,mxResources.get("zoom")+":");e.appendChild(d);var l=document.createElement("input");l.setAttribute("value",100*m+"%");l.style.marginLeft="4px";l.style.width="180px";d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(l);e.appendChild(d);k.appendChild(e);e=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";
-mxUtils.write(d,mxResources.get("borderWidth")+":");e.appendChild(d);var n=document.createElement("input");n.setAttribute("value",f);n.style.marginLeft="4px";n.style.width="180px";d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(n);e.appendChild(d);k.appendChild(e);this.init=function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null)};d=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
-parseInt(l.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(n.value))),null!=g&&g.fileChanged());b.hideDialog()}}else{m=null!=g?g.isCompressed():Editor.compressXml;e=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";mxUtils.write(d,mxResources.get("compressed")+":");e.appendChild(d);var p=document.createElement("input");p.setAttribute("type","checkbox");m&&(p.setAttribute("checked","checked"),p.defaultChecked=
-!0);d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(p);e.appendChild(d);k.appendChild(e);this.init=function(){p.focus()};d=function(){null!=b.fileNode&&(b.fileNode.setAttribute("compressed",p.checked?"true":"false"),null!=g&&g.fileChanged());b.hideDialog()}}m=mxUtils.button(mxResources.get("apply"),d);m.className="geBtn gePrimaryBtn";e=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align",
-"right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);d.appendChild(m);b.editor.cancelFirst||d.appendChild(f);e.appendChild(d);k.appendChild(e);c.appendChild(k);this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
+null,"System Fonts"));f.appendChild(l);n.appendChild(f);p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontname",null,"Font Name")+":");n.appendChild(f);var t=document.createElement("input");"s"==c&&t.setAttribute("value",e);t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_s";f=document.createElement("td");f.appendChild(t);
+n.appendChild(f);p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.fontWeight="bold";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","googlefonts");u.setAttribute("type","radio");u.setAttribute("name","current-fontdialog");u.setAttribute("id","fontdialog-googlefonts");f.appendChild(u);l=document.createElement("label");l.setAttribute("for",
+"fontdialog-googlefonts");mxUtils.write(l,mxResources.get("googleFonts",null,"Google Fonts"));f.appendChild(l);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(l=b.menus.createHelpLink("https://fonts.google.com/"),l.getElementsByTagName("img")[0].setAttribute("valign","middle"),f.appendChild(l));n.appendChild(f);p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft=
+"15px";mxUtils.write(f,mxResources.get("fontname",null,"Font Name")+":");n.appendChild(f);var v=document.createElement("input");"g"==c&&v.setAttribute("value",e);v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontName_g";f=document.createElement("td");f.appendChild(v);n.appendChild(f);p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.fontWeight="bold";var y=document.createElement("input");
+y.style.cssText="margin-right:8px;margin-bottom:8px;";y.setAttribute("value","webfonts");y.setAttribute("type","radio");y.setAttribute("name","current-fontdialog");y.setAttribute("id","fontdialog-webfonts");f.appendChild(y);l=document.createElement("label");l.setAttribute("for","fontdialog-webfonts");mxUtils.write(l,mxResources.get("webfonts",null,"Web Fonts"));f.appendChild(l);n.appendChild(f);p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";
+f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontname",null,"Font Name")+":");n.appendChild(f);var A=document.createElement("input");"w"==c&&A.setAttribute("value",e);A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontName_w";f=document.createElement("td");f.appendChild(A);n.appendChild(f);p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width=
+"120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontUrl",null,"Font URL")+":");n.appendChild(f);var z=document.createElement("input");z.setAttribute("value",d||"");z.style.marginLeft="4px";z.style.width="250px";z.className="dlg_fontUrl";f=document.createElement("td");f.appendChild(z);n.appendChild(f);p.appendChild(n);this.init=function(){var b=t;"g"==c?b=v:"w"==c&&(b=A);b.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?b.select():document.execCommand("selectAll",
+!1,null)};n=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="20px";f.style.whiteSpace="nowrap";f.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",f.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();g()});e.className="geBtn";b.editor.cancelFirst&&f.appendChild(e);var x=mxUtils.button(mxResources.get("apply"),
+function(){var c,f,d;q.checked?(c=t.value,d="s"):u.checked?(c=v.value,f=Editor.GOOGLE_FONTS+encodeURIComponent(c).replace(/%20/g,"+"),d="g"):y.checked&&(c=A.value,f=z.value,d="w");var e;e=f;var l=d,k=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==c||0==c.length?(m.querySelector(".dlg_fontName_"+l).style.border="1px solid red",e=!1):"w"!=l||k.test(e)?e=!0:(m.querySelector(".dlg_fontUrl").style.border="1px solid red",e=!1);e&&(g(c,f,d),b.hideDialog())});x.className=
+"geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",k);mxEvent.addListener(v,"keypress",k);mxEvent.addListener(A,"keypress",k);mxEvent.addListener(z,"keypress",k);mxEvent.addListener(t,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});mxEvent.addListener(v,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(A,"focus",function(){y.setAttribute("checked","checked");y.checked=!0});mxEvent.addListener(z,"focus",function(){y.setAttribute("checked",
+"checked");y.checked=!0});f.appendChild(x);b.editor.cancelFirst||f.appendChild(e);n.appendChild(f);p.appendChild(n);m.appendChild(p);this.container=m};
+function AspectDialog(b,e,d,c,g){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:d||[]};e=document.createElement("div");var k=document.createElement("h5");k.style.margin="0 0 10px";mxUtils.write(k,mxResources.get("pages"));e.appendChild(k);d=document.createElement("div");d.className="geAspectDlgList";e.appendChild(d);k=document.createElement("h5");k.style.margin="0 0 10px";mxUtils.write(k,mxResources.get("layers"));e.appendChild(k);k=document.createElement("div");k.className="geAspectDlgList";
+e.appendChild(k);this.pagesContainer=d;this.layersContainer=k;this.ui=b;d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="center";k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});k.className="geBtn";b.editor.cancelFirst&&d.appendChild(k);var n=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));d.appendChild(n);n.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||d.appendChild(k);n.setAttribute("disabled","disabled");this.okBtn=n;e.appendChild(d);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
+AspectDialog.prototype.createViewer=function(b,e,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var c=new Graph(b);c.setTooltips(!1);c.setEnabled(!1);c.setPanning(!1);c.minFitScale=null;c.maxFitScale=null;c.centerZoom=!0;e="mxGraphModel"==e.nodeName?e:Editor.parseDiagramNode(e);if(null!=e){var g=e.getAttribute("background");if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";b.style.backgroundColor=g;g=new mxCodec(e.ownerDocument);b=c.getModel();g.decode(e,b);e=b.getChildCount(b.root);
+for(var g=null==d,k=0;k<e;k++){var n=b.getChildAt(b.root,k);b.setVisible(n,g||d==n.id)}c.maxFitScale=1;c.fit(0);c.center()}return c};
+AspectDialog.prototype.createPageItem=function(b,e,d){var c=document.createElement("div");c.className="geAspectDlgListItem";c.setAttribute("data-page-id",b);c.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.pagesContainer.appendChild(c);var g=this.createViewer(c.childNodes[0],d);e=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=c;
+this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerHTML="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");for(var e=g.model,e=e.getChildCells(e.getRoot()),n=0;n<e.length;n++)this.createLayerItem(e[n],b,g,d)});mxEvent.addListener(c,"click",e);this.aspect.pageId==b&&e()};
+AspectDialog.prototype.createLayerItem=function(b,e,d,c){e=d.convertValueToString(b)||mxResources.get("background")||"Background";var g=document.createElement("div");g.setAttribute("data-layer-id",b.id);g.className="geAspectDlgListItem";g.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.layersContainer.appendChild(g);this.createViewer(g.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=g.className.indexOf("geAspectDlgListItemSelected")?
+(g.className="geAspectDlgListItem",delete this.selectedLayers[b.id],0==Object.keys(this.selectedLayers).length&&this.okBtn.setAttribute("disabled","disabled")):(g.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(g,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};
+var FilePropertiesDialog=function(b){var e,d,c=document.createElement("table"),g=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";var k=b.getCurrentFile();e=null!=k&&null!=k.getTitle()?k.getTitle():this.editorUi.defaultFilename;d=null;if(/(\.png)$/i.test(e)){var n=1,f=0;e=b.fileNode;null!=e&&(e.hasAttribute("scale")&&(n=parseFloat(e.getAttribute("scale"))),e.hasAttribute("border")&&(f=parseInt(e.getAttribute("border"))));e=document.createElement("tr");d=document.createElement("td");
+d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";mxUtils.write(d,mxResources.get("zoom")+":");e.appendChild(d);var l=document.createElement("input");l.setAttribute("value",100*n+"%");l.style.marginLeft="4px";l.style.width="180px";d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(l);e.appendChild(d);g.appendChild(e);e=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";
+mxUtils.write(d,mxResources.get("borderWidth")+":");e.appendChild(d);var m=document.createElement("input");m.setAttribute("value",f);m.style.marginLeft="4px";m.style.width="180px";d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(m);e.appendChild(d);g.appendChild(e);this.init=function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null)};d=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
+parseInt(l.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(m.value))),null!=k&&k.fileChanged());b.hideDialog()}}else{n=null!=k?k.isCompressed():Editor.compressXml;e=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";mxUtils.write(d,mxResources.get("compressed")+":");e.appendChild(d);var p=document.createElement("input");p.setAttribute("type","checkbox");n&&(p.setAttribute("checked","checked"),p.defaultChecked=
+!0);d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(p);e.appendChild(d);g.appendChild(e);this.init=function(){p.focus()};d=function(){null!=b.fileNode&&(b.fileNode.setAttribute("compressed",p.checked?"true":"false"),null!=k&&k.fileChanged());b.hideDialog()}}n=mxUtils.button(mxResources.get("apply"),d);n.className="geBtn gePrimaryBtn";e=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align",
+"right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);d.appendChild(n);b.editor.cancelFirst||d.appendChild(f);e.appendChild(d);g.appendChild(e);c.appendChild(g);this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",
fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},
edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTkgMTJ2N0g1di03SDN2N2MwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0yem0tNiAuNjdsMi41OS0yLjU4TDE3IDExLjVsLTUgNS01LTUgMS40MS0xLjQxTDExIDEyLjY3VjNoMnoiLz48L3N2Zz4=";
-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=":
+Editor.closeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjZweCI+PGVsbGlwc2UgY3g9IjEyIiBjeT0iMTIiIHJ4PSI5IiByeT0iOSIgc3Ryb2tlPSJub25lIiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE0LjU5IDhMMTIgMTAuNTkgOS40MSA4IDggOS40MSAxMC41OSAxMiA4IDE0LjU5IDkuNDEgMTYgMTIgMTMuNDEgMTQuNTkgMTYgMTYgMTQuNTkgMTMuNDEgMTIgMTYgOS40MSAxNC41OSA4ek0xMiAyQzYuNDcgMiAyIDYuNDcgMiAxMnM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTBTMTcuNTMgMiAxMiAyem0wIDE4Yy00LjQxIDAtOC0zLjU5LTgtOHMzLjU5LTggOC04IDggMy41OSA4IDgtMy41OSA4LTggOHoiLz48L3N2Zz4=";
+Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
IMAGE_PATH+"/spin.gif";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMjEuOTkgNGMwLTEuMS0uODktMi0xLjk5LTJINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNGw0IDQtLjAxLTE4ek0xOCAxNEg2di0yaDEydjJ6bTAtM0g2VjloMTJ2MnptMC0zSDZWNmgxMnYyeiIvPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4=";Editor.commentImageInverted="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABLElEQVRYR+2Wvy4FQRjFf4dINAq9XqtSaVRqXArPINEodUqlhxC5/pU6nYdQSHQeQTRHNtmVuXuXrIxv1k1sN5vMOb85c75kxMCfBvZnCsD2ErAGzAfAvUt6THUnAGwfAWfAQoB5I3kh6aBZfALYXgGeg80b31VJT9UiBRgB48CTp9Lbku7aAPvAZSGAHUm3swEgKWtUbbsj1f4JDA4AbGb24iErgUzzr7bvSrrpVcKgK5ghgKAO9E/gvwNBJRxJuu41BUEd+BFARA3+JsAWcB9x3A7NzgSqt+ALsFwAYhqgMrW9Ub8J14G5QJBugAhD2yfAaUt7T9LVxBhGmDeato/rZJtfZQHq600hygPUEIfAOTAMQALxWrQD7X7ZXpT0VqyE3xU868n9G5PzASPvpiHavBAUAAAAAElFTkSuQmCC";
@@ -10250,10 +10256,8 @@ Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/face
IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE0LjEyIDRsMS44MyAySDIwdjEySDRWNmg0LjA1bDEuODMtMmg0LjI0TTE1IDJIOUw3LjE3IDRINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNmMxLjEgMCAyLS45IDItMlY2YzAtMS4xLS45LTItMi0yaC0zLjE3TDE1IDJ6bS0zIDdjMS42NSAwIDMgMS4zNSAzIDNzLTEuMzUgMy0zIDMtMy0xLjM1LTMtMyAxLjM1LTMgMy0zbTAtMmMtMi43NiAwLTUgMi4yNC01IDVzMi4yNCA1IDUgNSA1LTIuMjQgNS01LTIuMjQtNS01LTV6Ii8+PC9zdmc+";
Editor.tagsLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjM2cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjM2cHgiIGZpbGw9IiNGRkZGRkYiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
-Editor.visibleImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNUMxOS4xNyAxNC44NyAxNS43OSAxNyAxMiAxN3MtNy4xNy0yLjEzLTguODItNS41QzQuODMgOC4xMyA4LjIxIDYgMTIgNm0wLTJDNyA0IDIuNzMgNy4xMSAxIDExLjUgMi43MyAxNS44OSA3IDE5IDEyIDE5czkuMjctMy4xMSAxMS03LjVDMjEuMjcgNy4xMSAxNyA0IDEyIDR6bTAgNWMxLjM4IDAgMi41IDEuMTIgMi41IDIuNVMxMy4zOCAxNCAxMiAxNHMtMi41LTEuMTItMi41LTIuNVMxMC42MiA5IDEyIDltMC0yYy0yLjQ4IDAtNC41IDIuMDItNC41IDQuNVM5LjUyIDE2IDEyIDE2czQuNS0yLjAyIDQuNS00LjVTMTQuNDggNyAxMiA3eiIvPjwvc3ZnPg==";
-Editor.hiddenImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNS0uNTkgMS4yMi0xLjQyIDIuMjctMi40MSAzLjEybDEuNDEgMS40MWMxLjM5LTEuMjMgMi40OS0yLjc3IDMuMTgtNC41M0MyMS4yNyA3LjExIDE3IDQgMTIgNGMtMS4yNyAwLTIuNDkuMi0zLjY0LjU3bDEuNjUgMS42NUMxMC42NiA2LjA5IDExLjMyIDYgMTIgNnptLTEuMDcgMS4xNEwxMyA5LjIxYy41Ny4yNSAxLjAzLjcxIDEuMjggMS4yOGwyLjA3IDIuMDdjLjA4LS4zNC4xNC0uNy4xNC0xLjA3QzE2LjUgOS4wMSAxNC40OCA3IDEyIDdjLS4zNyAwLS43Mi4wNS0xLjA3LjE0ek0yLjAxIDMuODdsMi42OCAyLjY4QzMuMDYgNy44MyAxLjc3IDkuNTMgMSAxMS41IDIuNzMgMTUuODkgNyAxOSAxMiAxOWMxLjUyIDAgMi45OC0uMjkgNC4zMi0uODJsMy40MiAzLjQyIDEuNDEtMS40MUwzLjQyIDIuNDUgMi4wMSAzLjg3em03LjUgNy41bDIuNjEgMi42MWMtLjA0LjAxLS4wOC4wMi0uMTIuMDItMS4zOCAwLTIuNS0xLjEyLTIuNS0yLjUgMC0uMDUuMDEtLjA4LjAxLS4xM3ptLTMuNC0zLjRsMS43NSAxLjc1Yy0uMjMuNTUtLjM2IDEuMTUtLjM2IDEuNzggMCAyLjQ4IDIuMDIgNC41IDQuNSA0LjUuNjMgMCAxLjIzLS4xMyAxLjc3LS4zNmwuOTguOThjLS44OC4yNC0xLjguMzgtMi43NS4zOC0zLjc5IDAtNy4xNy0yLjEzLTguODItNS41LjctMS40MyAxLjcyLTIuNjEgMi45My0zLjUzeiIvPjwvc3ZnPg==";
-Editor.clearImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDYuNDFMMTcuNTkgNSAxMiAxMC41OSA2LjQxIDUgNSA2LjQxIDEwLjU5IDEyIDUgMTcuNTkgNi40MSAxOSAxMiAxMy40MSAxNy41OSAxOSAxOSAxNy41OSAxMy40MSAxMiAxOSA2LjQxeiIvPjwvc3ZnPg==";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');
-Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
+Editor.tagsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE4cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
+Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=
null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(b,c){return"1"!=mxUtils.getValue(b.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"comic","0")||"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(b,c){return"1"==
mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(b,c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(b,c){return"1"==
@@ -10276,8 +10280,8 @@ dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,c){return
type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(b,c){var f=0<b.vertices.length?c.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=f&&!f.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",
dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,
isVisible:function(b,c){var f=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return c.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==f||f==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(b,c){return 0<b.vertices.length&&c.editorUi.editor.graph.isContainer(b.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(b){var c=rough.canvas({getContext:function(){return b}});c.draw=function(c){var f=c.sets||[];c=c.options||this.getDefaultOptions();for(var d=0;d<f.length;d++){var e=f[d];switch(e.type){case "path":null!=c.stroke&&this._drawToContext(b,e,c);break;case "fillPath":this._drawToContext(b,e,c);break;case "fillSketch":this.fillSketch(b,e,c)}}};c.fillSketch=function(c,f,d){var e=b.state.strokeColor,l=b.state.strokeWidth,n=b.state.strokeAlpha,g=b.state.dashed,k=d.fillWeight;
-0>k&&(k=d.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(d.fill||"");b.setStrokeWidth(k);b.setDashed(!1);this._drawToContext(c,f,d);b.setDashed(g);b.setStrokeWidth(l);b.setStrokeColor(e);b.setStrokeAlpha(n)};c._drawToContext=function(b,c,f){b.begin();for(var d=0;d<c.ops.length;d++){var e=c.ops[d],l=e.data;switch(e.op){case "move":b.moveTo(l[0],l[1]);break;case "bcurveTo":b.curveTo(l[0],l[1],l[2],l[3],l[4],l[5]);break;case "lineTo":b.lineTo(l[0],l[1])}}b.end();"fillPath"===c.type&&
+Editor.createRoughCanvas=function(b){var c=rough.canvas({getContext:function(){return b}});c.draw=function(c){var f=c.sets||[];c=c.options||this.getDefaultOptions();for(var d=0;d<f.length;d++){var e=f[d];switch(e.type){case "path":null!=c.stroke&&this._drawToContext(b,e,c);break;case "fillPath":this._drawToContext(b,e,c);break;case "fillSketch":this.fillSketch(b,e,c)}}};c.fillSketch=function(c,f,d){var e=b.state.strokeColor,l=b.state.strokeWidth,m=b.state.strokeAlpha,g=b.state.dashed,k=d.fillWeight;
+0>k&&(k=d.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(d.fill||"");b.setStrokeWidth(k);b.setDashed(!1);this._drawToContext(c,f,d);b.setDashed(g);b.setStrokeWidth(l);b.setStrokeColor(e);b.setStrokeAlpha(m)};c._drawToContext=function(b,c,f){b.begin();for(var d=0;d<c.ops.length;d++){var e=c.ops[d],l=e.data;switch(e.op){case "move":b.moveTo(l[0],l[1]);break;case "bcurveTo":b.curveTo(l[0],l[1],l[2],l[3],l[4],l[5]);break;case "lineTo":b.lineTo(l[0],l[1])}}b.end();"fillPath"===c.type&&
f.filled?b.fill():b.stroke()};return c};(function(){function b(c,f,d){this.canvas=c;this.rc=f;this.shape=d;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,b.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,b.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,b.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,b.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,b.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,b.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,b.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,b.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
b.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,b.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,b.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,b.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,b.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,b.prototype.fillAndStroke);
@@ -10287,20 +10291,20 @@ mxUtils.getValue(this.shape.style,"simplification",d.simplification);f.disableMu
"zigzagOffset",l);l=mxUtils.getValue(this.shape.style,"fillWeight",-1);f.fillWeight="auto"==l?-1:l;l=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==l&&(l=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",l=null!=f.fill&&(null!=e||null!=l&&f.fill.toLowerCase()==l.toLowerCase())?"solid":d.fillStyle);f.fillStyle=l;return f};b.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};b.prototype.end=function(){this.passThrough&&
this.originalEnd.apply(this.canvas,arguments)};b.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};b.prototype.lineTo=function(b,c){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,b,c),this.lastX=b,this.lastY=c)};b.prototype.moveTo=
function(b,c){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,c),this.lastX=b,this.lastY=c,this.firstX=b,this.firstY=c)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,c,f,d){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,b,c,f,d),this.lastX=f,this.lastY=d)};b.prototype.curveTo=function(b,c,f,d,e,l){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,c,f,d,e,l),this.lastX=e,this.lastY=l)};b.prototype.arcTo=function(b,c,f,d,e,l,n){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var g=mxUtils.arcToCurves(this.lastX,this.lastY,b,c,f,d,e,l,n);if(null!=g)for(var k=0;k<g.length;k+=6)this.curveTo(g[k],g[k+1],g[k+2],g[k+3],g[k+4],g[k+5]);this.lastX=l;this.lastY=n}};b.prototype.rect=function(b,c,f,d){this.passThrough?this.originalRect.apply(this.canvas,
+this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,c,f,d,e,l),this.lastX=e,this.lastY=l)};b.prototype.arcTo=function(b,c,f,d,e,l,m){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var g=mxUtils.arcToCurves(this.lastX,this.lastY,b,c,f,d,e,l,m);if(null!=g)for(var k=0;k<g.length;k+=6)this.curveTo(g[k],g[k+1],g[k+2],g[k+3],g[k+4],g[k+5]);this.lastX=l;this.lastY=m}};b.prototype.rect=function(b,c,f,d){this.passThrough?this.originalRect.apply(this.canvas,
arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,c,f,d,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,c,f,d){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+f/2,c+d/2,f,d,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,c,f,d,e,l){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(b+e,c),this.lineTo(b+f-e,c),this.quadTo(b+f,c,b+f,c+l),this.lineTo(b+
f,c+d-l),this.quadTo(b+f,c+d,b+f-e,c+d),this.lineTo(b+e,c+d),this.quadTo(b,c+d,b,c+d-l),this.lineTo(b,c+l),this.quadTo(b,c,b+e,c))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var c in b)this.nextShape.options[c]=b[c];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};b.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};b.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};b.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};b.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;
this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;
this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(c){return new b(c,Editor.createRoughCanvas(c),this)};var c=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?c.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(b):this.createRoughCanvas(b)};var f=mxShape.prototype.paint;
-mxShape.prototype.paint=function(c){var d=c.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=c.handJiggle&&c.handJiggle.constructor==b&&!this.outline){c.save();var l=this.fill,n=this.stroke;this.stroke=this.fill=null;var g=this.configurePointerEvents,k=c.setStrokeColor;c.setStrokeColor=function(){};var p=c.setFillColor;c.setFillColor=function(){};e||null==l||(this.configurePointerEvents=function(){});c.handJiggle.passThrough=!0;
-f.apply(this,arguments);c.handJiggle.passThrough=!1;c.setFillColor=p;c.setStrokeColor=k;this.configurePointerEvents=g;this.stroke=n;this.fill=l;c.restore();e&&null!=l&&(c.addTolerance=function(){})}f.apply(this,arguments);c.addTolerance=d};var d=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(c,f,e,l,n,g){null!=c.handJiggle&&c.handJiggle.constructor==b?(c.handJiggle.passThrough=!0,d.apply(this,arguments),c.handJiggle.passThrough=!1):d.apply(this,arguments)}})();Editor.fastCompress=
+mxShape.prototype.paint=function(c){var d=c.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=c.handJiggle&&c.handJiggle.constructor==b&&!this.outline){c.save();var l=this.fill,m=this.stroke;this.stroke=this.fill=null;var g=this.configurePointerEvents,k=c.setStrokeColor;c.setStrokeColor=function(){};var p=c.setFillColor;c.setFillColor=function(){};e||null==l||(this.configurePointerEvents=function(){});c.handJiggle.passThrough=!0;
+f.apply(this,arguments);c.handJiggle.passThrough=!1;c.setFillColor=p;c.setStrokeColor=k;this.configurePointerEvents=g;this.stroke=m;this.fill=l;c.restore();e&&null!=l&&(c.addTolerance=function(){})}f.apply(this,arguments);c.addTolerance=d};var d=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(c,f,e,l,m,g){null!=c.handJiggle&&c.handJiggle.constructor==b?(c.handJiggle.passThrough=!0,d.apply(this,arguments),c.handJiggle.passThrough=!1):d.apply(this,arguments)}})();Editor.fastCompress=
function(b){return null==b||0==b.length||"undefined"===typeof pako?b:Graph.arrayBufferToString(pako.deflateRaw(b))};Editor.fastDecompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:pako.inflateRaw(Graph.stringToArrayBuffer(atob(b)),{to:"string"})};Editor.extractGraphModel=function(b,c,f){if(null!=b&&"undefined"!==typeof pako){var d=b.ownerDocument.getElementsByTagName("div"),e=[];if(null!=d&&0<d.length)for(var l=0;l<d.length;l++)if("mxgraph"==d[l].getAttribute("class")){e.push(d[l]);
break}0<e.length&&(d=e[0].getAttribute("data-mxgraph"),null!=d?(e=JSON.parse(d),null!=e&&null!=e.xml&&(b=mxUtils.parseXml(e.xml),b=b.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(d=mxUtils.getTextContent(e[0]),d=Graph.decompress(d,null,f),0<d.length&&(b=mxUtils.parseXml(d),b=b.documentElement))))}if(null!=b&&"svg"==b.nodeName)if(d=b.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)b=mxUtils.parseXml(d).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||c||(e=null,"diagram"==b.nodeName?e=b:"mxfile"==b.nodeName&&(d=b.getElementsByTagName("diagram"),0<d.length&&(e=d[Math.max(0,Math.min(d.length-1,urlParams.page||0))])),null!=e&&(b=Editor.parseDiagramNode(e,f)));null==b||"mxGraphModel"==b.nodeName||c&&"mxfile"==b.nodeName||(b=null);return b};Editor.parseDiagramNode=function(b,c){var f=mxUtils.trim(mxUtils.getTextContent(b)),
d=null;0<f.length?(f=Graph.decompress(f,null,c),null!=f&&0<f.length&&(d=mxUtils.parseXml(f).documentElement)):(f=mxUtils.getChildNodes(b),0<f.length&&(d=mxUtils.createXmlDocument(),d.appendChild(d.importNode(f[0],!0)),d=d.documentElement));return d};Editor.getDiagramNodeXml=function(b){var c=mxUtils.getTextContent(b),f=null;0<c.length?f=Graph.decompress(c):null!=b.firstChild&&(f=mxUtils.getXml(b.firstChild));return f};Editor.extractGraphModelFromPdf=function(b){b=b.substring(b.indexOf(",")+1);b=window.atob&&
-!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var c=b.indexOf("EmbeddedFile");if(-1<c){var f=b.indexOf("stream",c)+9;if(0<b.substring(c,f).indexOf("application#2Fvnd.jgraph.mxfile"))return c=b.indexOf("endstream",f-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(f,c)),{to:"string"})}return null}for(var f=null,c="",d=0,e=0,l=[],n=null;e<b.length;){var g=b.charCodeAt(e),e=e+1;10!=g&&(c+=String.fromCharCode(g));g=="/Subject (%3Cmxfile".charCodeAt(d)?d++:d=0;if(19==
-d){var k=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(k>e){f=b.substring(e,k);break}}10==g&&("endobj"==c?n=null:"obj"==c.substring(c.length-3,c.length)||"xref"==c||"trailer"==c?(n=[],l[c.split(" ")[0]]=n):null!=n&&n.push(c),c="")}null==f&&(f=Editor.extractGraphModelFromXref(l));null!=f&&(f=decodeURIComponent(f.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return f};Editor.extractGraphModelFromXref=function(b){var c=b.trailer,f=null;null!=c&&(c=/.* \/Info (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<
+!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var c=b.indexOf("EmbeddedFile");if(-1<c){var f=b.indexOf("stream",c)+9;if(0<b.substring(c,f).indexOf("application#2Fvnd.jgraph.mxfile"))return c=b.indexOf("endstream",f-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(f,c)),{to:"string"})}return null}for(var f=null,c="",d=0,e=0,l=[],m=null;e<b.length;){var g=b.charCodeAt(e),e=e+1;10!=g&&(c+=String.fromCharCode(g));g=="/Subject (%3Cmxfile".charCodeAt(d)?d++:d=0;if(19==
+d){var k=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(k>e){f=b.substring(e,k);break}}10==g&&("endobj"==c?m=null:"obj"==c.substring(c.length-3,c.length)||"xref"==c||"trailer"==c?(m=[],l[c.split(" ")[0]]=m):null!=m&&m.push(c),c="")}null==f&&(f=Editor.extractGraphModelFromXref(l));null!=f&&(f=decodeURIComponent(f.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return f};Editor.extractGraphModelFromXref=function(b){var c=b.trailer,f=null;null!=c&&(c=/.* \/Info (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<
c.length&&(c=b[c[1]],null!=c&&(c=/.* \/Subject (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<c.length&&(b=b[c[1]],null!=b&&(b=b.join("\n"),f=b.substring(1,b.length-1))))));return f};Editor.extractGraphModelFromPng=function(b){var c=null;try{var f=b.substring(b.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(b,f,e){b=d.substring(b+8,b+8+e);"zTXt"==f?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+
2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(c=b))):"tEXt"==f&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(c=b[1]));if(null!=c||"IDAT"==f)return!0}))}catch(S){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.extractParserError=function(b,c){var f=null,d=null!=b?b.getElementsByTagName("parsererror"):null;null!=d&&0<d.length&&(f=c||mxResources.get("invalidChars"),d=d[0].getElementsByTagName("div"),
0<d.length&&(f=mxUtils.getTextContent(d[0])));return null!=f?mxUtils.trim(f):f};Editor.addRetryToError=function(b,c){if(null!=b){var f=null!=b.error?b.error:b;null==f.retry&&(f.retry=c)}};Editor.configure=function(b,c){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;
@@ -10328,27 +10332,27 @@ var c=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\
return null!=this.corsRegExp&&this.corsRegExp.test(b)||"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var c=b.convert,f=this;b.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=Editor.svgBrokenImage.src:!e||d.substring(0,b.baseUrl.length)==b.baseUrl||f.crossOriginImages&&f.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,
19)||mxClient.IS_CHROMEAPP||(d=c.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,c){try{var f=!0,d=window.setTimeout(mxUtils.bind(this,function(){f=!1;c(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,mxUtils.bind(this,function(b){window.clearTimeout(d);f&&c(Editor.createSvgDataUri(b.getText()))}),
function(){window.clearTimeout(d);f&&c(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(f)try{var b=document.createElement("canvas"),l=b.getContext("2d");b.height=e.height;b.width=e.width;l.drawImage(e,0,0);c(b.toDataURL())}catch(fa){c(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(d);f&&c(Editor.svgBrokenImage.src)};e.src=b}}catch(Q){c(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
-function(b,c,f,d){null==d&&(d=this.createImageUrlConverter());var e=0,l=f||{};f=mxUtils.bind(this,function(f,n){for(var g=b.getElementsByTagName(f),k=0;k<g.length;k++)mxUtils.bind(this,function(f){try{if(null!=f){var g=d.convert(f.getAttribute(n));if(null!=g&&"data:"!=g.substring(0,5)){var k=l[g];null==k?(e++,this.convertImageToDataUri(g,function(d){null!=d&&(l[g]=d,f.setAttribute(n,d));e--;0==e&&c(b)})):f.setAttribute(n,k)}else null!=g&&f.setAttribute(n,g)}}catch(ca){}})(g[k])});f("image","xlink:href");
-f("img","src");0==e&&c(b)};Editor.base64Encode=function(b){for(var c="",f=0,d=b.length,e,l,n;f<d;){e=b.charCodeAt(f++)&255;if(f==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);c+="==";break}l=b.charCodeAt(f++);if(f==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
-3)<<4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);c+="=";break}n=b.charCodeAt(f++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(n&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n&63)}return c};
-Editor.prototype.loadUrl=function(b,c,f,d,e,l,n,g){try{var k=!n&&(d||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=c){var d=b.getText();if(k){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();
+function(b,c,f,d){null==d&&(d=this.createImageUrlConverter());var e=0,l=f||{};f=mxUtils.bind(this,function(f,m){for(var g=b.getElementsByTagName(f),k=0;k<g.length;k++)mxUtils.bind(this,function(f){try{if(null!=f){var g=d.convert(f.getAttribute(m));if(null!=g&&"data:"!=g.substring(0,5)){var k=l[g];null==k?(e++,this.convertImageToDataUri(g,function(d){null!=d&&(l[g]=d,f.setAttribute(m,d));e--;0==e&&c(b)})):f.setAttribute(m,k)}else null!=g&&f.setAttribute(m,g)}}catch(ca){}})(g[k])});f("image","xlink:href");
+f("img","src");0==e&&c(b)};Editor.base64Encode=function(b){for(var c="",f=0,d=b.length,e,l,m;f<d;){e=b.charCodeAt(f++)&255;if(f==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);c+="==";break}l=b.charCodeAt(f++);if(f==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);c+="=";break}m=b.charCodeAt(f++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(m&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(m&63)}return c};
+Editor.prototype.loadUrl=function(b,c,f,d,e,l,m,g){try{var k=!m&&(d||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=c){var d=b.getText();if(k){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();
for(var d=Array(b.length),e=0;e<b.length;e++)d[e]=String.fromCharCode(b[e]);d=d.join("")}l=null!=l?l:"data:image/png;base64,";d=l+Editor.base64Encode(d)}c(d)}}else null!=f&&(0==b.getStatus()?f({message:mxResources.get("accessDenied")},b):f({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=f&&f({message:mxResources.get("error")+" "+b.getStatus()})},k,this.timeout,function(){e&&null!=f&&f({code:App.ERROR_TIMEOUT,retry:p})},g)});p()}catch(Z){null!=f&&f(Z)}};Editor.prototype.absoluteCssFonts=
-function(b){var c=null;if(null!=b){var f=b.split("url(");if(0<f.length){c=[f[0]];b=window.location.pathname;var d=null!=b?b.lastIndexOf("/"):-1;0<=d&&(b=b.substring(0,d+1));var d=document.getElementsByTagName("base"),e=null;null!=d&&0<d.length&&(e=d[0].getAttribute("href"));for(var l=1;l<f.length;l++)if(d=f[l].indexOf(")"),0<d){var n=Editor.trimCssUrl(f[l].substring(0,d));this.graph.isRelativeUrl(n)&&(n=null!=e?e+n:window.location.protocol+"//"+window.location.hostname+("/"==n.charAt(0)?"":b)+n);
-c.push('url("'+n+'"'+f[l].substring(d))}else c.push(f[l])}else c=[b]}return null!=c?c.join(""):null};Editor.prototype.embedCssFonts=function(b,c){var f=b.split("url("),d=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==d){for(var b=[f[0]],e=1;e<f.length;e++){var l=f[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(f[e].substring(0,l))]);b.push('"'+f[e].substring(l))}c(b.join(""))}});if(0<f.length){for(var l=1;l<f.length;l++){var n=f[l].indexOf(")"),
-g=null,k=f[l].indexOf("format(",n);0<k&&(g=Editor.trimCssUrl(f[l].substring(k+7,f[l].indexOf(")",k))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;d++;var c="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(b))c="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(b))c="application/x-font-opentype";else if("woff"==g||/(\.woff)($|\?)/i.test(b))c="application/font-woff";else if("woff2"==g||/(\.woff2)($|\?)/i.test(b))c="application/font-woff2";
-else if("eot"==g||/(\.eot)($|\?)/i.test(b))c="application/vnd.ms-fontobject";else if("sfnt"==g||/(\.sfnt)($|\?)/i.test(b))c="application/font-sfnt";var f=b;/^https?:\/\//.test(f)&&!this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(f,mxUtils.bind(this,function(c){this.cachedFonts[b]=c;d--;e()}),mxUtils.bind(this,function(b){d--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(Editor.trimCssUrl(f[l].substring(0,n)),g)}e()}else c(b)};Editor.prototype.loadFonts=
+function(b){var c=null;if(null!=b){var f=b.split("url(");if(0<f.length){c=[f[0]];b=window.location.pathname;var d=null!=b?b.lastIndexOf("/"):-1;0<=d&&(b=b.substring(0,d+1));var d=document.getElementsByTagName("base"),e=null;null!=d&&0<d.length&&(e=d[0].getAttribute("href"));for(var l=1;l<f.length;l++)if(d=f[l].indexOf(")"),0<d){var m=Editor.trimCssUrl(f[l].substring(0,d));this.graph.isRelativeUrl(m)&&(m=null!=e?e+m:window.location.protocol+"//"+window.location.hostname+("/"==m.charAt(0)?"":b)+m);
+c.push('url("'+m+'"'+f[l].substring(d))}else c.push(f[l])}else c=[b]}return null!=c?c.join(""):null};Editor.prototype.embedCssFonts=function(b,c){var f=b.split("url("),d=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==d){for(var b=[f[0]],e=1;e<f.length;e++){var l=f[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(f[e].substring(0,l))]);b.push('"'+f[e].substring(l))}c(b.join(""))}});if(0<f.length){for(var l=1;l<f.length;l++){var m=f[l].indexOf(")"),
+g=null,k=f[l].indexOf("format(",m);0<k&&(g=Editor.trimCssUrl(f[l].substring(k+7,f[l].indexOf(")",k))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;d++;var c="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(b))c="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(b))c="application/x-font-opentype";else if("woff"==g||/(\.woff)($|\?)/i.test(b))c="application/font-woff";else if("woff2"==g||/(\.woff2)($|\?)/i.test(b))c="application/font-woff2";
+else if("eot"==g||/(\.eot)($|\?)/i.test(b))c="application/vnd.ms-fontobject";else if("sfnt"==g||/(\.sfnt)($|\?)/i.test(b))c="application/font-sfnt";var f=b;/^https?:\/\//.test(f)&&!this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(f,mxUtils.bind(this,function(c){this.cachedFonts[b]=c;d--;e()}),mxUtils.bind(this,function(b){d--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(Editor.trimCssUrl(f[l].substring(0,m)),g)}e()}else c(b)};Editor.prototype.loadFonts=
function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(c){this.resolvedFontCss=c;b()})):b()};Editor.prototype.embedExtFonts=function(b){var c=this.graph.getCustomFonts();if(0<c.length){var f="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==d&&this.embedCssFonts(f,b)}),l=0;l<c.length;l++)mxUtils.bind(this,function(b,c){Graph.isCssFontUrl(c)?null==this.cachedGoogleFonts[c]?(d++,this.loadUrl(c,
mxUtils.bind(this,function(b){this.cachedGoogleFonts[c]=b;f+=b;d--;e()}),mxUtils.bind(this,function(b){d--;f+="@import url("+c+");";e()}))):f+=this.cachedGoogleFonts[c]:f+='@font-face {font-family: "'+b+'";src: url("'+c+'")}'})(c[l].name,c[l].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&0<b.length)for(var c=document.getElementsByTagName("style"),f=0;f<c.length;f++)0<mxUtils.getTextContent(c[f]).indexOf("MathJax")&&b[0].appendChild(c[f].cloneNode(!0))};
Editor.prototype.addFontCss=function(b,c){c=null!=c?c:this.absoluteCssFonts(this.fontCss);if(null!=c){var f=b.getElementsByTagName("defs"),d=b.ownerDocument;0==f.length?(f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"),null!=b.firstChild?b.insertBefore(f,b.firstChild):b.appendChild(f)):f=f[0];d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d,c);f.appendChild(d)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,c,f){var d=mxClient.IS_FF?8192:16384;return Math.min(f,Math.min(d/b,d/c))};Editor.prototype.exportToCanvas=function(b,c,f,d,e,l,n,g,k,p,q,t,m,y,u,v,B,A){try{l=null!=l?l:!0;n=null!=n?n:!0;t=null!=t?t:this.graph;m=null!=m?m:0;var x=k?null:t.background;x==mxConstants.NONE&&(x=null);null==x&&(x=d);null==x&&0==k&&(x=v?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(t.getSvg(null,null,m,y,null,n,null,null,null,p,null,v,B,A),mxUtils.bind(this,function(f){try{var d=new Image;d.onload=mxUtils.bind(this,function(){try{var n=function(){mxClient.IS_SF?window.setTimeout(function(){y.drawImage(d,0,0);b(k,f)},0):(y.drawImage(d,0,0),b(k,f))},k=document.createElement("canvas"),p=parseInt(f.getAttribute("width")),q=parseInt(f.getAttribute("height"));g=null!=g?g:1;null!=c&&(g=l?Math.min(1,Math.min(3*c/(4*q),c/p)):c/p);g=this.getMaxCanvasScale(p,q,g);p=
-Math.ceil(g*p);q=Math.ceil(g*q);k.setAttribute("width",p);k.setAttribute("height",q);var y=k.getContext("2d");null!=x&&(y.beginPath(),y.rect(0,0,p,q),y.fillStyle=x,y.fill());1!=g&&y.scale(g,g);if(u){var v=t.view,B=v.scale;v.scale=1;var A=btoa(unescape(encodeURIComponent(v.createSvgGrid(v.gridColor))));v.scale=B;var A="data:image/svg+xml;base64,"+A,C=t.gridSize*v.gridSteps*g,D=t.getGraphBounds(),H=v.translate.x*B,O=v.translate.y*B,z=H+(D.x-H)/B-m,J=O+(D.y-O)/B-m,M=new Image;M.onload=function(){try{for(var b=
--Math.round(C-mxUtils.mod((H-z)*g,C)),c=-Math.round(C-mxUtils.mod((O-J)*g,C));b<p;b+=C)for(var f=c;f<q;f+=C)y.drawImage(M,b/g,f/g);n()}catch(Aa){null!=e&&e(Aa)}};M.onerror=function(b){null!=e&&e(b)};M.src=A}else n()}catch(ya){null!=e&&e(ya)}});d.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(f);this.graph.mathEnabled&&this.addMathCss(f);var n=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(f,this.resolvedFontCss),d.src=Editor.createSvgDataUri(mxUtils.getXml(f))}catch(ba){null!=
-e&&e(ba)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(f,b),this.loadFonts(n)}catch(da){null!=e&&e(da)}}))}catch(ba){null!=e&&e(ba)}}),f,q)}catch(ha){null!=e&&e(ha)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var g=k,m=0;8>m;m++)g=1==(g&1)?3988292384^g>>>1:g>>>1,Editor.crcTable[k]=g;Editor.updateCRC=function(b,c,f,d){for(var e=0;e<d;e++)b=Editor.crcTable[(b^c.charCodeAt(f+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var c=-1,f=0;f<b.length;f++)c=c>>>
-8^Editor.crcTable[(c^b.charCodeAt(f))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(b,c,f,d,e){function l(b,c){var f=k;k+=c;return b.substring(f,k)}function n(b){b=l(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function g(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var k=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
-10))null!=e&&e();else if(l(b,4),"IHDR"!=l(b,4))null!=e&&e();else{l(b,17);e=b.substring(0,k);do{var p=n(b);if("IDAT"==l(b,4)){e=b.substring(0,k-8);"pHYs"==c&&"dpi"==f?(f=Math.round(d/.0254),f=g(f)+g(f)+String.fromCharCode(1)):f=f+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+d;d=4294967295;d=Editor.updateCRC(d,c,0,4);d=Editor.updateCRC(d,f,0,f.length);e+=g(f.length)+c+f+g(d^4294967295);e+=b.substring(k-8,b.length);break}e+=b.substring(k-8,k-4+p);l(b,p);l(b,4)}while(p);return"data:image/png;base64,"+
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,c,f){var d=mxClient.IS_FF?8192:16384;return Math.min(f,Math.min(d/b,d/c))};Editor.prototype.exportToCanvas=function(b,c,f,d,e,l,m,g,k,p,q,t,n,x,u,v,B,A){try{l=null!=l?l:!0;m=null!=m?m:!0;t=null!=t?t:this.graph;n=null!=n?n:0;var y=k?null:t.background;y==mxConstants.NONE&&(y=null);null==y&&(y=d);null==y&&0==k&&(y=v?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(t.getSvg(null,null,n,x,null,m,null,null,null,p,null,v,B,A),mxUtils.bind(this,function(f){try{var d=new Image;d.onload=mxUtils.bind(this,function(){try{var m=function(){mxClient.IS_SF?window.setTimeout(function(){x.drawImage(d,0,0);b(k,f)},0):(x.drawImage(d,0,0),b(k,f))},k=document.createElement("canvas"),p=parseInt(f.getAttribute("width")),q=parseInt(f.getAttribute("height"));g=null!=g?g:1;null!=c&&(g=l?Math.min(1,Math.min(3*c/(4*q),c/p)):c/p);g=this.getMaxCanvasScale(p,q,g);p=
+Math.ceil(g*p);q=Math.ceil(g*q);k.setAttribute("width",p);k.setAttribute("height",q);var x=k.getContext("2d");null!=y&&(x.beginPath(),x.rect(0,0,p,q),x.fillStyle=y,x.fill());1!=g&&x.scale(g,g);if(u){var v=t.view,B=v.scale;v.scale=1;var A=btoa(unescape(encodeURIComponent(v.createSvgGrid(v.gridColor))));v.scale=B;var A="data:image/svg+xml;base64,"+A,C=t.gridSize*v.gridSteps*g,D=t.getGraphBounds(),O=v.translate.x*B,H=v.translate.y*B,z=O+(D.x-O)/B-n,M=H+(D.y-H)/B-n,J=new Image;J.onload=function(){try{for(var b=
+-Math.round(C-mxUtils.mod((O-z)*g,C)),c=-Math.round(C-mxUtils.mod((H-M)*g,C));b<p;b+=C)for(var f=c;f<q;f+=C)x.drawImage(J,b/g,f/g);m()}catch(Aa){null!=e&&e(Aa)}};J.onerror=function(b){null!=e&&e(b)};J.src=A}else m()}catch(ya){null!=e&&e(ya)}});d.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(f);this.graph.mathEnabled&&this.addMathCss(f);var m=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(f,this.resolvedFontCss),d.src=Editor.createSvgDataUri(mxUtils.getXml(f))}catch(ba){null!=
+e&&e(ba)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(f,b),this.loadFonts(m)}catch(da){null!=e&&e(da)}}))}catch(ba){null!=e&&e(ba)}}),f,q)}catch(ha){null!=e&&e(ha)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var k=g,n=0;8>n;n++)k=1==(k&1)?3988292384^k>>>1:k>>>1,Editor.crcTable[g]=k;Editor.updateCRC=function(b,c,f,d){for(var e=0;e<d;e++)b=Editor.crcTable[(b^c.charCodeAt(f+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var c=-1,f=0;f<b.length;f++)c=c>>>
+8^Editor.crcTable[(c^b.charCodeAt(f))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(b,c,f,d,e){function l(b,c){var f=k;k+=c;return b.substring(f,k)}function m(b){b=l(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function g(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var k=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
+10))null!=e&&e();else if(l(b,4),"IHDR"!=l(b,4))null!=e&&e();else{l(b,17);e=b.substring(0,k);do{var p=m(b);if("IDAT"==l(b,4)){e=b.substring(0,k-8);"pHYs"==c&&"dpi"==f?(f=Math.round(d/.0254),f=g(f)+g(f)+String.fromCharCode(1)):f=f+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+d;d=4294967295;d=Editor.updateCRC(d,c,0,4);d=Editor.updateCRC(d,f,0,f.length);e+=g(f.length)+c+f+g(d^4294967295);e+=b.substring(k-8,b.length);break}e+=b.substring(k-8,k-4+p);l(b,p);l(b,4)}while(p);return"data:image/png;base64,"+
(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var f=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&
-(EditDataDialog.getDisplayIdForCell=function(b,c){var f=null;null!=b.editor.graph.getModel().getParent(c)?f=c.getId():null!=b.currentPage&&(f=b.currentPage.getId());return f});if(null!=window.StyleFormatPanel){var n=Format.prototype.init;Format.prototype.init=function(){n.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var p=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+(EditDataDialog.getDisplayIdForCell=function(b,c){var f=null;null!=b.editor.graph.getModel().getParent(c)?f=c.getId():null!=b.currentPage&&(f=b.currentPage.getId());return f});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 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 b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,f=c.editor.graph,d=this.createOption(mxResources.get("shadow"),
function(){return f.shadowVisible},function(b){var d=new ChangePageSetup(c);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=b;f.model.execute(d)},{install:function(b){this.listener=function(){b(f.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,60));b.appendChild(d)}return b};var t=DiagramFormatPanel.prototype.addOptions;
DiagramFormatPanel.prototype.addOptions=function(b){b=t.apply(this,arguments);var c=this.editorUi,f=c.editor.graph;if(f.isEnabled()){var d=c.getCurrentFile();if(null!=d&&d.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(b){c.editor.setAutosave(b);c.editor.autosave&&d.isModified()&&d.fileChanged()},{install:function(b){this.listener=function(){b(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});
@@ -10379,69 +10383,79 @@ gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill
d(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{d(JSON.parse(b))}catch(Q){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},f=b.vertices,d=b.edges,e=0;e<f.length;e++)this.findCommonProperties(f[e],c,0==
e);for(e=0;e<d.length;e++)this.findCommonProperties(d[e],c,0==f.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,b))}};var v=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var c=this.format.getSelectionState(),f=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));f.setAttribute("title",
mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");f.style.marginBottom="2px";f.style.width="100px";f.style.marginRight="2px";b.appendChild(f);0<c.cells.length?(f=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("pasteStyle").funct()})),f.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")"),f.style.marginBottom="2px",f.style.width="100px",b.appendChild(f)):
-f.style.width="202px";mxUtils.br(b);return v.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,c,f){function d(b,c,f,d){t.getModel().beginUpdate();try{var e=[],l=[];if(null!=f.index){for(var n=[],g=f.parentRow.nextSibling;g&&g.getAttribute("data-pName")==b;)n.push(g.getAttribute("data-pValue")),g=g.nextSibling;f.index<n.length?null!=d?n.splice(d,1):n[f.index]=c:n.push(c);null!=f.size&&n.length>f.size&&(n=n.slice(0,f.size));c=n.join(",");
-null!=f.countProperty&&(t.setCellStyles(f.countProperty,n.length,t.getSelectionCells()),e.push(f.countProperty),l.push(n.length))}t.setCellStyles(b,c,t.getSelectionCells());e.push(b);l.push(c);if(null!=f.dependentProps)for(b=0;b<f.dependentProps.length;b++){var k=f.dependentPropsDefVal[b],p=f.dependentPropsVals[b];if(p.length>c)p=p.slice(0,c);else for(var m=p.length;m<c;m++)p.push(k);p=p.join(",");t.setCellStyles(f.dependentProps[b],p,t.getSelectionCells());e.push(f.dependentProps[b]);l.push(p)}if("function"==
+f.style.width="202px";mxUtils.br(b);return v.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,c,f){function d(b,c,f,d){t.getModel().beginUpdate();try{var e=[],l=[];if(null!=f.index){for(var m=[],g=f.parentRow.nextSibling;g&&g.getAttribute("data-pName")==b;)m.push(g.getAttribute("data-pValue")),g=g.nextSibling;f.index<m.length?null!=d?m.splice(d,1):m[f.index]=c:m.push(c);null!=f.size&&m.length>f.size&&(m=m.slice(0,f.size));c=m.join(",");
+null!=f.countProperty&&(t.setCellStyles(f.countProperty,m.length,t.getSelectionCells()),e.push(f.countProperty),l.push(m.length))}t.setCellStyles(b,c,t.getSelectionCells());e.push(b);l.push(c);if(null!=f.dependentProps)for(b=0;b<f.dependentProps.length;b++){var k=f.dependentPropsDefVal[b],p=f.dependentPropsVals[b];if(p.length>c)p=p.slice(0,c);else for(var n=p.length;n<c;n++)p.push(k);p=p.join(",");t.setCellStyles(f.dependentProps[b],p,t.getSelectionCells());e.push(f.dependentProps[b]);l.push(p)}if("function"==
typeof f.onChange)f.onChange(t,c);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",l,"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}function e(c,f,d){var e=mxUtils.getOffset(b,!0),l=mxUtils.getOffset(c,!0);f.style.position="absolute";f.style.left=l.x-e.x+"px";f.style.top=l.y-e.y+"px";f.style.width=c.offsetWidth+"px";f.style.height=c.offsetHeight-(d?4:0)+"px";f.style.zIndex=5}function l(b,c,f){var e=document.createElement("div");e.style.width="32px";e.style.height=
-"4px";e.style.margin="2px";e.style.border="1px solid black";e.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(l){this.editorUi.pickColor(c,function(c){e.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(b,c,f)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function n(b,c,f,e,l,n,g){null!=c&&(c=c.split(","),m.push({name:b,
-values:c,type:f,defVal:e,countProperty:l,parentRow:n,isDeletable:!0,flipBkg:g}));btn=mxUtils.button("+",mxUtils.bind(q,function(c){for(var k=n,q=0;null!=k.nextSibling;)if(k.nextSibling.getAttribute("data-pName")==b)k=k.nextSibling,q++;else break;var t={type:f,parentRow:n,index:q,isDeletable:!0,defVal:e,countProperty:l},q=p(b,"",t,0==q%2,g);d(b,e,t);k.parentNode.insertBefore(q,k.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function g(b,c,f,d,e,l,n){if(0<e){var g=Array(e);c=null!=c?c.split(","):[];for(var k=0;k<e;k++)g[k]=null!=c[k]?c[k]:null!=d?d:"";m.push({name:b,values:g,type:f,defVal:d,parentRow:l,flipBkg:n,size:e})}return document.createElement("div")}function k(b,c,f){var e=document.createElement("input");e.type="checkbox";e.checked="1"==c;mxEvent.addListener(e,"change",function(){d(b,e.checked?"1":"0",f)});return e}function p(c,f,p,t,m){var y=p.dispName,u=p.type,v=document.createElement("tr");v.className="gePropRow"+
-(m?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";v.setAttribute("data-pName",c);v.setAttribute("data-pValue",f);t=!1;null!=p.index&&(v.setAttribute("data-index",p.index),y=(null!=y?y:"")+"["+p.index+"]",t=!0);var B=document.createElement("td");B.className="gePropRowCell";B.innerHTML=mxUtils.htmlEntities(mxResources.get(y,null,y));t&&(B.style.textAlign="right");v.appendChild(B);B=document.createElement("td");B.className="gePropRowCell";if("color"==u)B.appendChild(l(c,f,p));else if("bool"==u||"boolean"==
-u)B.appendChild(k(c,f,p));else if("enum"==u){var A=p.enumList;for(m=0;m<A.length;m++)if(y=A[m],y.val==f){B.innerHTML=mxUtils.htmlEntities(mxResources.get(y.dispName,null,y.dispName));break}mxEvent.addListener(B,"click",mxUtils.bind(q,function(){var l=document.createElement("select");e(B,l);for(var n=0;n<A.length;n++){var g=A[n],k=document.createElement("option");k.value=mxUtils.htmlEntities(g.val);k.innerHTML=mxUtils.htmlEntities(mxResources.get(g.dispName,null,g.dispName));l.appendChild(k)}l.value=
-f;b.appendChild(l);mxEvent.addListener(l,"change",function(){var b=mxUtils.htmlEntities(l.value);d(c,b,p)});l.focus();mxEvent.addListener(l,"blur",function(){b.removeChild(l)})}))}else"dynamicArr"==u?B.appendChild(n(c,f,p.subType,p.subDefVal,p.countProperty,v,m)):"staticArr"==u?B.appendChild(g(c,f,p.subType,p.subDefVal,p.size,v,m)):"readOnly"==u?(m=document.createElement("input"),m.setAttribute("readonly",""),m.value=f,m.style.width="96px",m.style.borderWidth="0px",B.appendChild(m)):(B.innerHTML=
-f,mxEvent.addListener(B,"click",mxUtils.bind(q,function(){function l(){var b=n.value,b=0==b.length&&"string"!=u?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",u="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==u?parseInt(b):b)+"");d(c,b,p)}var n=document.createElement("input");e(B,n,!0);n.value=f;n.className="gePropEditor";"int"!=u&&"float"!=u||p.allowAuto||(n.type="number",n.step="int"==
-u?"1":"any",null!=p.min&&(n.min=parseFloat(p.min)),null!=p.max&&(n.max=parseFloat(p.max)));b.appendChild(n);mxEvent.addListener(n,"keypress",function(b){13==b.keyCode&&l()});n.focus();mxEvent.addListener(n,"blur",function(){l()})})));p.isDeletable&&(m=mxUtils.button("-",mxUtils.bind(q,function(b){d(c,"",p,p.index);mxEvent.consume(b)})),m.style.height="16px",m.style.width="25px",m.style["float"]="right",m.className="geColorBtn",B.appendChild(m));v.appendChild(B);return v}var q=this,t=this.editorUi.editor.graph,
-m=[];b.style.position="relative";b.style.padding="0";var y=document.createElement("table");y.className="geProperties";y.style.whiteSpace="nowrap";y.style.width="100%";var u=document.createElement("tr");u.className="gePropHeader";var v=document.createElement("th");v.className="gePropHeaderCell";var B=document.createElement("img");B.src=Sidebar.prototype.expandedImage;v.appendChild(B);mxUtils.write(v,mxResources.get("property"));u.style.cursor="pointer";var A=function(){var c=y.querySelectorAll(".gePropNonHeaderRow"),
+"4px";e.style.margin="2px";e.style.border="1px solid black";e.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(l){this.editorUi.pickColor(c,function(c){e.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(b,c,f)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function m(b,c,f,e,l,m,g){null!=c&&(c=c.split(","),n.push({name:b,
+values:c,type:f,defVal:e,countProperty:l,parentRow:m,isDeletable:!0,flipBkg:g}));btn=mxUtils.button("+",mxUtils.bind(q,function(c){for(var k=m,q=0;null!=k.nextSibling;)if(k.nextSibling.getAttribute("data-pName")==b)k=k.nextSibling,q++;else break;var t={type:f,parentRow:m,index:q,isDeletable:!0,defVal:e,countProperty:l},q=p(b,"",t,0==q%2,g);d(b,e,t);k.parentNode.insertBefore(q,k.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function g(b,c,f,d,e,l,m){if(0<e){var g=Array(e);c=null!=c?c.split(","):[];for(var k=0;k<e;k++)g[k]=null!=c[k]?c[k]:null!=d?d:"";n.push({name:b,values:g,type:f,defVal:d,parentRow:l,flipBkg:m,size:e})}return document.createElement("div")}function k(b,c,f){var e=document.createElement("input");e.type="checkbox";e.checked="1"==c;mxEvent.addListener(e,"change",function(){d(b,e.checked?"1":"0",f)});return e}function p(c,f,p,t,n){var x=p.dispName,u=p.type,v=document.createElement("tr");v.className="gePropRow"+
+(n?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";v.setAttribute("data-pName",c);v.setAttribute("data-pValue",f);t=!1;null!=p.index&&(v.setAttribute("data-index",p.index),x=(null!=x?x:"")+"["+p.index+"]",t=!0);var B=document.createElement("td");B.className="gePropRowCell";B.innerHTML=mxUtils.htmlEntities(mxResources.get(x,null,x));t&&(B.style.textAlign="right");v.appendChild(B);B=document.createElement("td");B.className="gePropRowCell";if("color"==u)B.appendChild(l(c,f,p));else if("bool"==u||"boolean"==
+u)B.appendChild(k(c,f,p));else if("enum"==u){var A=p.enumList;for(n=0;n<A.length;n++)if(x=A[n],x.val==f){B.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(B,"click",mxUtils.bind(q,function(){var l=document.createElement("select");e(B,l);for(var m=0;m<A.length;m++){var g=A[m],k=document.createElement("option");k.value=mxUtils.htmlEntities(g.val);k.innerHTML=mxUtils.htmlEntities(mxResources.get(g.dispName,null,g.dispName));l.appendChild(k)}l.value=
+f;b.appendChild(l);mxEvent.addListener(l,"change",function(){var b=mxUtils.htmlEntities(l.value);d(c,b,p)});l.focus();mxEvent.addListener(l,"blur",function(){b.removeChild(l)})}))}else"dynamicArr"==u?B.appendChild(m(c,f,p.subType,p.subDefVal,p.countProperty,v,n)):"staticArr"==u?B.appendChild(g(c,f,p.subType,p.subDefVal,p.size,v,n)):"readOnly"==u?(n=document.createElement("input"),n.setAttribute("readonly",""),n.value=f,n.style.width="96px",n.style.borderWidth="0px",B.appendChild(n)):(B.innerHTML=
+f,mxEvent.addListener(B,"click",mxUtils.bind(q,function(){function l(){var b=m.value,b=0==b.length&&"string"!=u?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",u="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==u?parseInt(b):b)+"");d(c,b,p)}var m=document.createElement("input");e(B,m,!0);m.value=f;m.className="gePropEditor";"int"!=u&&"float"!=u||p.allowAuto||(m.type="number",m.step="int"==
+u?"1":"any",null!=p.min&&(m.min=parseFloat(p.min)),null!=p.max&&(m.max=parseFloat(p.max)));b.appendChild(m);mxEvent.addListener(m,"keypress",function(b){13==b.keyCode&&l()});m.focus();mxEvent.addListener(m,"blur",function(){l()})})));p.isDeletable&&(n=mxUtils.button("-",mxUtils.bind(q,function(b){d(c,"",p,p.index);mxEvent.consume(b)})),n.style.height="16px",n.style.width="25px",n.style["float"]="right",n.className="geColorBtn",B.appendChild(n));v.appendChild(B);return v}var q=this,t=this.editorUi.editor.graph,
+n=[];b.style.position="relative";b.style.padding="0";var x=document.createElement("table");x.className="geProperties";x.style.whiteSpace="nowrap";x.style.width="100%";var u=document.createElement("tr");u.className="gePropHeader";var v=document.createElement("th");v.className="gePropHeaderCell";var B=document.createElement("img");B.src=Sidebar.prototype.expandedImage;v.appendChild(B);mxUtils.write(v,mxResources.get("property"));u.style.cursor="pointer";var A=function(){var c=x.querySelectorAll(".gePropNonHeaderRow"),
f;if(q.editorUi.propertiesCollapsed){B.src=Sidebar.prototype.collapsedImage;f="none";for(var d=b.childNodes.length-1;0<=d;d--)try{var e=b.childNodes[d],l=e.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||b.removeChild(e)}catch(ta){}}else B.src=Sidebar.prototype.expandedImage,f="";for(d=0;d<c.length;d++)c[d].style.display=f};mxEvent.addListener(u,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;A()});u.appendChild(v);v=document.createElement("th");v.className="gePropHeaderCell";
-v.innerHTML=mxResources.get("value");u.appendChild(v);y.appendChild(u);var x=!1,C=!1,u=null;1==f.vertices.length&&0==f.edges.length?u=f.vertices[0].id:0==f.vertices.length&&1==f.edges.length&&(u=f.edges[0].id);null!=u&&y.appendChild(p("id",mxUtils.htmlEntities(u),{dispName:"ID",type:"readOnly"},!0,!1));for(var D in c)if(u=c[D],"function"!=typeof u.isVisible||u.isVisible(f,this)){var z=null!=f.style[D]?mxUtils.htmlEntities(f.style[D]+""):null!=u.getDefaultValue?u.getDefaultValue(f,this):u.defVal;if("separator"==
-u.type)C=!C;else{if("staticArr"==u.type)u.size=parseInt(f.style[u.sizeProperty]||c[u.sizeProperty].defVal)||0;else if(null!=u.dependentProps){for(var H=u.dependentProps,O=[],M=[],v=0;v<H.length;v++){var F=f.style[H[v]];M.push(c[H[v]].subDefVal);O.push(null!=F?F.split(","):[])}u.dependentPropsDefVal=M;u.dependentPropsVals=O}y.appendChild(p(D,z,u,x,C));x=!x}}for(v=0;v<m.length;v++)for(u=m[v],c=u.parentRow,f=0;f<u.values.length;f++)D=p(u.name,u.values[f],{type:u.type,parentRow:u.parentRow,isDeletable:u.isDeletable,
-index:f,defVal:u.defVal,countProperty:u.countProperty,size:u.size},0==f%2,u.flipBkg),c.parentNode.insertBefore(D,c.nextSibling),c=D;b.appendChild(y);A();return b};StyleFormatPanel.prototype.addStyles=function(b){function c(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var f=this.editorUi,d=f.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight=
-"20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var l="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.position="relative";n.style.textAlign="center";for(var g=[],k=0;k<this.defaultColorSchemes.length;k++){var p=document.createElement("div");p.style.display=
-"inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight="3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){q(b)}))})(k);g.push(p);n.appendChild(p)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(g[this.format.currentScheme].style.background="transparent");this.format.currentScheme=
-b;t(this.defaultColorSchemes[this.format.currentScheme]);g[this.format.currentScheme].style.background="#84d7ff"}),t=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(b){var c=mxUtils.button("",mxUtils.bind(this,function(c){d.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,n=0;n<e.length;n++){for(var g=d.getModel().getStyle(e[n]),k=0;k<l.length;k++)g=mxUtils.removeStylename(g,l[k]);var p=d.getModel().isVertex(e[n])?f.initialDefaultVertexStyle:f.initialdefaultEdgeStyle;
+v.innerHTML=mxResources.get("value");u.appendChild(v);x.appendChild(u);var y=!1,C=!1,u=null;1==f.vertices.length&&0==f.edges.length?u=f.vertices[0].id:0==f.vertices.length&&1==f.edges.length&&(u=f.edges[0].id);null!=u&&x.appendChild(p("id",mxUtils.htmlEntities(u),{dispName:"ID",type:"readOnly"},!0,!1));for(var D in c)if(u=c[D],"function"!=typeof u.isVisible||u.isVisible(f,this)){var z=null!=f.style[D]?mxUtils.htmlEntities(f.style[D]+""):null!=u.getDefaultValue?u.getDefaultValue(f,this):u.defVal;if("separator"==
+u.type)C=!C;else{if("staticArr"==u.type)u.size=parseInt(f.style[u.sizeProperty]||c[u.sizeProperty].defVal)||0;else if(null!=u.dependentProps){for(var H=u.dependentProps,O=[],M=[],v=0;v<H.length;v++){var G=f.style[H[v]];M.push(c[H[v]].subDefVal);O.push(null!=G?G.split(","):[])}u.dependentPropsDefVal=M;u.dependentPropsVals=O}x.appendChild(p(D,z,u,y,C));y=!y}}for(v=0;v<n.length;v++)for(u=n[v],c=u.parentRow,f=0;f<u.values.length;f++)D=p(u.name,u.values[f],{type:u.type,parentRow:u.parentRow,isDeletable:u.isDeletable,
+index:f,defVal:u.defVal,countProperty:u.countProperty,size:u.size},0==f%2,u.flipBkg),c.parentNode.insertBefore(D,c.nextSibling),c=D;b.appendChild(x);A();return b};StyleFormatPanel.prototype.addStyles=function(b){function c(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var f=this.editorUi,d=f.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight=
+"20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var l="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.position="relative";m.style.textAlign="center";for(var g=[],k=0;k<this.defaultColorSchemes.length;k++){var p=document.createElement("div");p.style.display=
+"inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight="3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){q(b)}))})(k);g.push(p);m.appendChild(p)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(g[this.format.currentScheme].style.background="transparent");this.format.currentScheme=
+b;t(this.defaultColorSchemes[this.format.currentScheme]);g[this.format.currentScheme].style.background="#84d7ff"}),t=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(b){var c=mxUtils.button("",mxUtils.bind(this,function(c){d.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,m=0;m<e.length;m++){for(var g=d.getModel().getStyle(e[m]),k=0;k<l.length;k++)g=mxUtils.removeStylename(g,l[k]);var p=d.getModel().isVertex(e[m])?f.initialDefaultVertexStyle:f.initialdefaultEdgeStyle;
null!=b?(g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(c)||(g=""==b.fill?mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(c)||(g=""==b.stroke?mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,b.stroke||mxUtils.getValue(p,
-mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(c)||mxClient.IS_MAC&&mxEvent.isMetaDown(c)||!d.getModel().isVertex(e[n])||(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,
-mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(e[n])&&(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));d.getModel().setStyle(e[n],g)}}finally{d.getModel().endUpdate()}}));c.className="geStyleButton";c.style.width="36px";c.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";c.style.margin="0px 6px 6px 0px";if(null!=b){var n="1"==urlParams.sketch?"2px solid":"1px solid";null!=b.gradient?mxClient.IS_IE&&
+mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(c)||mxClient.IS_MAC&&mxEvent.isMetaDown(c)||!d.getModel().isVertex(e[m])||(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,
+mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(e[m])&&(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));d.getModel().setStyle(e[m],g)}}finally{d.getModel().endUpdate()}}));c.className="geStyleButton";c.style.width="36px";c.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";c.style.margin="0px 6px 6px 0px";if(null!=b){var m="1"==urlParams.sketch?"2px solid":"1px solid";null!=b.gradient?mxClient.IS_IE&&
10>document.documentMode?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":b.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=""==b.fill?mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff"):b.fill||mxUtils.getValue(f.initialDefaultVertexStyle,
-mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");c.style.border=b.stroke==mxConstants.NONE?n+" transparent":""==b.stroke?n+" "+mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):n+" "+(b.stroke||mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=b.title&&c.setAttribute("title",b.title)}else{var n=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,
-"#ffffff"),g=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=n;c.style.border="1px solid "+g}c.style.borderRadius="0";e.appendChild(c)});e.innerHTML="";for(var n=0;n<b.length;n++)0<n&&0==mxUtils.mod(n,4)&&mxUtils.br(e),c(b[n])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var k=10>=this.defaultColorSchemes.length?28:8,m=document.createElement("div");m.style.cssText="position:absolute;left:10px;top:8px;bottom:"+
-k+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";mxEvent.addListener(m,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));
-var y=document.createElement("div");y.style.cssText="position:absolute;left:202px;top:8px;bottom:"+k+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";1<this.defaultColorSchemes.length&&
-(b.appendChild(m),b.appendChild(y));mxEvent.addListener(y,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));c(m);c(y);t(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&b.appendChild(n);return b};StyleFormatPanel.prototype.addEditOps=function(b){var c=this.format.getSelectionState(),f=null;1==c.cells.length&&(f=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editStyle").funct()})),
+mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");c.style.border=b.stroke==mxConstants.NONE?m+" transparent":""==b.stroke?m+" "+mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):m+" "+(b.stroke||mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=b.title&&c.setAttribute("title",b.title)}else{var m=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,
+"#ffffff"),g=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=m;c.style.border="1px solid "+g}c.style.borderRadius="0";e.appendChild(c)});e.innerHTML="";for(var m=0;m<b.length;m++)0<m&&0==mxUtils.mod(m,4)&&mxUtils.br(e),c(b[m])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var k=10>=this.defaultColorSchemes.length?28:8,n=document.createElement("div");n.style.cssText="position:absolute;left:10px;top:8px;bottom:"+
+k+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";mxEvent.addListener(n,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));
+var x=document.createElement("div");x.style.cssText="position:absolute;left:202px;top:8px;bottom:"+k+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";1<this.defaultColorSchemes.length&&
+(b.appendChild(n),b.appendChild(x));mxEvent.addListener(x,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));c(n);c(x);t(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&b.appendChild(m);return b};StyleFormatPanel.prototype.addEditOps=function(b){var c=this.format.getSelectionState(),f=null;1==c.cells.length&&(f=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editStyle").funct()})),
f.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),f.style.width="202px",f.style.marginBottom="2px",b.appendChild(f));var d=this.editorUi.editor.graph,d=1==c.cells.length?d.view.getState(c.cells[0]):null;null!=d&&null!=d.shape&&null!=d.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom=
"2px",null==f?c.style.width="202px":(f.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),b.appendChild(c)):c.image&&0<c.cells.length&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(b){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==f?c.style.width="202px":(f.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),b.appendChild(c));return b}}Graph.customFontElements=
{};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(b){return b.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(b){return Graph.isGoogleFontUrl(b)};Graph.createFontElement=function(b,c){var f;Graph.isCssFontUrl(c)?(f=document.createElement("link"),f.setAttribute("rel","stylesheet"),f.setAttribute("type","text/css"),f.setAttribute("charset","UTF-8"),f.setAttribute("href",c)):(f=document.createElement("style"),mxUtils.write(f,'@font-face {\nfont-family: "'+
b+'";\nsrc: url("'+c+'");\n}'));return f};Graph.addFont=function(b,c,f){if(null!=b&&0<b.length&&null!=c&&0<c.length){var d=b.toLowerCase();if("helvetica"!=d&&"arial"!=b&&"sans-serif"!=d){var e=Graph.customFontElements[d];null!=e&&e.url!=c&&(e.elt.parentNode.removeChild(e.elt),e=null);null==e?(e=c,"http:"==c.substring(0,5)&&(e=PROXY_URL+"?url="+encodeURIComponent(c)),e={name:b,url:c,elt:Graph.createFontElement(b,e)},Graph.customFontElements[d]=e,Graph.recentCustomFonts[d]=e,c=document.getElementsByTagName("head")[0],
null!=f&&("link"==e.elt.nodeName.toLowerCase()?(e.elt.onload=f,e.elt.onerror=f):f()),null!=c&&c.appendChild(e.elt)):null!=f&&f()}else null!=f&&f()}else null!=f&&f();return b};Graph.getFontUrl=function(b,c){var f=Graph.customFontElements[b.toLowerCase()];null!=f&&(c=f.url);return c};Graph.processFontAttributes=function(b){b=b.getElementsByTagName("*");for(var c=0;c<b.length;c++){var f=b[c].getAttribute("data-font-src");if(null!=f){var d="FONT"==b[c].nodeName?b[c].getAttribute("face"):b[c].style.fontFamily;
null!=d&&Graph.addFont(d,f)}}};Graph.processFontStyle=function(b){if(null!=b){var c=mxUtils.getValue(b,"fontSource",null);if(null!=c){var f=mxUtils.getValue(b,mxConstants.STYLE_FONTFAMILY,null);null!=f&&Graph.addFont(f,decodeURIComponent(c))}}return b};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";
-Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=urlParams.edge;Graph.prototype.hiddenTags=null;var x=Graph.prototype.init;Graph.prototype.init=function(){function b(b){c=b}x.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var c=null;mxEvent.addListener(this.container,"mouseenter",b);mxEvent.addListener(this.container,
+Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=urlParams.edge;Graph.prototype.hiddenTags=null;var y=Graph.prototype.init;Graph.prototype.init=function(){function b(b){c=b}y.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var c=null;mxEvent.addListener(this.container,"mouseenter",b);mxEvent.addListener(this.container,
"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){c=null});this.isMouseInsertPoint=function(){return null!=c};var f=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):f.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(b){var c=this.graph.getCellStyle(b);if(null!=c){if("rack"==c.childLayout){var f=new mxStackLayout(this.graph,!1);f.gridSize=null!=c.rackUnitSize?parseFloat(c.rackUnitSize):
"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;f.marginLeft=c.marginLeft||0;f.marginRight=c.marginRight||0;f.marginTop=c.marginTop||0;f.marginBottom=c.marginBottom||0;f.allowGaps=c.allowGaps||0;f.horizontal="1"==mxUtils.getValue(c,"horizontalRack","0");f.resizeParent=!1;f.fill=!0;return f}if("undefined"!==typeof mxTableLayout&&"tableLayout"==c.childLayout)return f=new mxTableLayout(this.graph),f.rows=c.tableRows||2,f.columns=c.tableColumns||2,f.colPercentages=c.colPercentages,f.rowPercentages=
c.rowPercentages,f.equalColumns="1"==mxUtils.getValue(c,"equalColumns",f.colPercentages?"0":"1"),f.equalRows="1"==mxUtils.getValue(c,"equalRows",f.rowPercentages?"0":"1"),f.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),f.border=c.tableBorder||f.border,f.marginLeft=c.marginLeft||0,f.marginRight=c.marginRight||0,f.marginTop=c.marginTop||0,f.marginBottom=c.marginBottom||0,f.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),f.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",f.autoAddCol?
-"0":"1"),f.colWidths=c.colWidths||"100",f.rowHeights=c.rowHeights||"50",f}return d.apply(this,arguments)};this.updateGlobalUrlVariables()};var A=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(A.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,c,f,d,e,l,n,g,k,p,q){z.apply(this,arguments);Graph.processFontAttributes(q)};var y=mxText.prototype.redraw;mxText.prototype.redraw=
-function(){y.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],c;for(c in Graph.customFontElements){var f=Graph.customFontElements[c];b.push({name:f.name,url:f.url})}return b};Graph.prototype.setFont=function(b,c){Graph.addFont(b,c);document.execCommand("fontname",!1,b);if(null!=c){var f=this.cellEditor.textarea.getElementsByTagName("font");c=Graph.getFontUrl(b,
-c);for(var d=0;d<f.length;d++)f[d].getAttribute("face")==b&&f[d].getAttribute("data-font-src")!=c&&f[d].setAttribute("data-font-src",c)}};var B=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return B.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var b=JSON.parse(decodeURIComponent(urlParams.vars));
-if(null!=b)for(var c in b)this.globalVars[c]=b[c]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var C=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var c=C.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[b]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var E=Graph.prototype.getSvg;Graph.prototype.getSvg=function(b,c,f,d,e,l,n,g,k,p,q,t,m,y){var u=null,v=null;t||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,v=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=
-this.getDefaultStylesheet(),this.refresh());var B=E.apply(this,arguments),A=this.getCustomFonts();if(q&&0<A.length){var x=B.ownerDocument,C=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"style"):x.createElement("style");null!=x.setAttributeNS?C.setAttributeNS("type","text/css"):C.setAttribute("type","text/css");for(var D="",z="",M=0;M<A.length;M++){var F=A[M].name,H=A[M].url;Graph.isCssFontUrl(H)?D+="@import url("+H+");\n":z+='@font-face {\nfont-family: "'+F+'";\nsrc: url("'+H+'");\n}\n'}C.appendChild(x.createTextNode(D+
-z));B.getElementsByTagName("defs")[0].appendChild(C)}null!=u&&(this.defaultPageBackgroundColor=v,this.stylesheet=u,this.refresh());return B};var G=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var b=G.apply(this,arguments);if(this.mathEnabled){var c=b.drawText;b.drawText=function(b,f){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var d=b.text.getContentNode();if(null!=
-d){d=d.cloneNode(!0);if(d.getElementsByTagNameNS)for(var e=d.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=d.innerHTML&&(e=b.text.value,b.text.value=d.innerHTML,c.apply(this,arguments),b.text.value=e)}}else c.apply(this,arguments)}}return b};var F=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){F.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=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;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&this.setBackgroundImage(this.backgroundImage)};var D=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){D.apply(this,arguments);this.currentStyle="default-style2"};
-Graph.prototype.handleCustomLink=function(b){"data:action/json,"==b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=function(b,c){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=
-!0;var f=!1,d=0,e=0,l=mxUtils.bind(this,function(){f||(f=!0,this.model.beginUpdate())}),n=mxUtils.bind(this,function(){f&&(f=!1,this.model.endUpdate())}),g=mxUtils.bind(this,function(){0<d&&d--;0==d&&k()}),k=mxUtils.bind(this,function(){if(e<b.length){var f=this.stoppingCustomActions,p=b[e++],q=[];if(null!=p.open)if(n(),this.isCustomLink(p.open)){if(!this.customLinkClicked(p.open))return}else this.openLink(p.open);null==p.wait||f||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=
-this.pendingExecuteNextAction=null;g()}),d++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=p.wait?parseInt(p.wait):1E3),n());null!=p.opacity&&null!=p.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(p.opacity,!0)),p.opacity.value);null!=p.fadeIn&&(d++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeIn,!0)),0,1,g,f?0:p.fadeIn.delay));null!=p.fadeOut&&(d++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeOut,
-!0)),1,0,g,f?0:p.fadeOut.delay));null!=p.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeIn,!0),!0)));null!=p.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeOut,!0),!1)));null!=p.toggle&&(l(),this.toggleCells(this.getCellsForAction(p.toggle,!0)));if(null!=p.show){l();var t=this.getCellsForAction(p.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(t),1);this.setCellsVisible(t,!0)}null!=p.hide&&(l(),t=this.getCellsForAction(p.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(t),
-0),this.setCellsVisible(t,!1));null!=p.toggleStyle&&null!=p.toggleStyle.key&&(l(),this.toggleCellStyles(p.toggleStyle.key,null!=p.toggleStyle.defaultValue?p.toggleStyle.defaultValue:"0",this.getCellsForAction(p.toggleStyle,!0)));null!=p.style&&null!=p.style.key&&(l(),this.setCellStyles(p.style.key,p.style.value,this.getCellsForAction(p.style,!0)));t=[];null!=p.select&&this.isEnabled()&&(t=this.getCellsForAction(p.select),this.setSelectionCells(t));null!=p.highlight&&(t=this.getCellsForAction(p.highlight),
-this.highlightCells(t,p.highlight.color,p.highlight.duration,p.highlight.opacity));null!=p.scroll&&(t=this.getCellsForAction(p.scroll));null!=p.viewbox&&this.fitWindow(p.viewbox,p.viewbox.border);0<t.length&&this.scrollCellToVisible(t[0]);if(null!=p.tags){t=[];null!=p.tags.hidden&&(t=t.concat(p.tags.hidden));if(null!=p.tags.visible)for(var m=this.getAllTags(),y=0;y<m.length;y++)0>mxUtils.indexOf(p.tags.visible,m[y])&&0>mxUtils.indexOf(t,m[y])&&t.push(m[y]);this.hiddenTags=t;this.refresh()}0<q.length&&
-(d++,this.executeAnimations(q,g,f?1:p.steps,f?0:p.delay));0==d?k():n()}else this.stoppingCustomActions=this.executingCustomActions=!1,n(),null!=c&&c()});k()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,c){var f=this.getLinkForCell(c);null!=f&&"data:action/json,"==f.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(b,f));if(this.isHtmlLabel(c)){var d=document.createElement("div");d.innerHTML=this.sanitizeHtml(this.getLabel(c));for(var e=d.getElementsByTagName("a"),l=!1,n=0;n<
-e.length;n++)f=e[n].getAttribute("href"),null!=f&&"data:action/json,"==f.substring(0,17)&&(e[n].setAttribute("href",this.updateCustomLink(b,f)),l=!0);l&&this.labelChanged(c,d.innerHTML)}};Graph.prototype.updateCustomLink=function(b,c){if("data:action/json,"==c.substring(0,17))try{var f=JSON.parse(c.substring(17));null!=f.actions&&(this.updateCustomLinkActions(b,f.actions),c="data:action/json,"+JSON.stringify(f))}catch(W){}return c};Graph.prototype.updateCustomLinkActions=function(b,c){for(var f=0;f<
+"0":"1"),f.colWidths=c.colWidths||"100",f.rowHeights=c.rowHeights||"50",f}return d.apply(this,arguments)};this.updateGlobalUrlVariables()};var A=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(A.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,c,f,d,e,l,m,g,k,p,q){z.apply(this,arguments);Graph.processFontAttributes(q)};var x=mxText.prototype.redraw;mxText.prototype.redraw=
+function(){x.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,c,f){function d(){for(var b=m.getSelectionCells(),c=[],f=0;f<b.length;f++)m.isCellVisible(b[f])&&c.push(b[f]);m.setSelectionCells(c)}function e(b){m.hiddenTags=b?[]:g.slice();d();m.refresh()}function l(b,f){p.innerHTML="";if(0<b.length){var l=document.createElement("table");l.setAttribute("cellpadding","2");l.style.boxSizing="border-box";
+l.style.tableLayout="fixed";l.style.width="100%";var k=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){function l(){var c=g.slice(),f=mxUtils.indexOf(c,b);c.splice(f,1);m.hiddenTags=c;d();m.refresh()}function p(){var c=m.getCellsForTags([b],null,null,!0);m.isEnabled()?m.setSelectionCells(c):m.highlightCells(c)}var q=0>mxUtils.indexOf(m.hiddenTags,b),t=document.createElement("tr"),n=document.createElement("td");n.style.align="center";n.style.width="16px";
+var x=document.createElement("img");x.setAttribute("src",q?Editor.visibleImage:Editor.hiddenImage);x.setAttribute("title",mxResources.get(q?"hideIt":"show",[b]));mxUtils.setOpacity(x,q?75:25);x.style.verticalAlign="middle";x.style.cursor="pointer";x.style.width="16px";if(c||Editor.isDarkMode())x.style.filter="invert(100%)";n.appendChild(x);mxEvent.addListener(x,"click",function(c){var f=mxUtils.indexOf(m.hiddenTags,b);mxEvent.isShiftDown(c)?e(0<=mxUtils.indexOf(m.hiddenTags,b)):(0>f?m.hiddenTags.push(b):
+0<=f&&m.hiddenTags.splice(f,1),d(),m.refresh());mxEvent.consume(c)});mxEvent.addListener(x,"dblclick",function(b){mxEvent.isShiftDown(b)||(!q&&0<m.hiddenTags.length?e(!0):l());mxEvent.consume(b)});t.appendChild(n);n=document.createElement("td");n.style.overflow="hidden";n.style.whiteSpace="nowrap";n.style.textOverflow="ellipsis";n.style.verticalAlign="middle";n.style.cursor="pointer";n.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position=
+"relative";mxUtils.setOpacity(a,q?100:40);n.appendChild(a);mxEvent.addListener(n,"click",function(b){mxEvent.isShiftDown(b)?(e(!0),p()):q&&0<m.hiddenTags.length?e(!0):l();mxEvent.consume(b)});mxEvent.addListener(n,"dblclick",function(b){e(!0);p();mxEvent.consume(b)});t.appendChild(n);if(m.isEnabled()){n=document.createElement("td");n.style.verticalAlign="middle";n.style.textAlign="center";n.style.width="18px";if(null==f){n.style.align="center";n.style.width="16px";x=document.createElement("img");
+x.setAttribute("src",Editor.crossImage);x.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(x,q?75:25);x.style.verticalAlign="middle";x.style.cursor="pointer";x.style.width="16px";if(c||Editor.isDarkMode())x.style.filter="invert(100%)";mxEvent.addListener(x,"click",function(c){var f=mxUtils.indexOf(g,b);0<=f&&g.splice(f,1);m.removeTagsForCells(m.model.getDescendants(m.model.getRoot()),[b]);m.refresh();mxEvent.consume(c)});n.appendChild(x)}else{var u=document.createElement("input");
+u.setAttribute("type","checkbox");u.style.margin="0px";u.defaultChecked=null!=f&&0<=mxUtils.indexOf(f,b);u.checked=u.defaultChecked;u.style.background="transparent";u.setAttribute("title",mxResources.get(u.defaultChecked?"removeIt":"add",[b]));mxEvent.addListener(u,"change",function(c){u.checked?m.addTagsForCells(m.getSelectionCells(),[b]):m.removeTagsForCells(m.getSelectionCells(),[b]);mxEvent.consume(c)});n.appendChild(u)}t.appendChild(n)}k.appendChild(t)})(b[q]);l.appendChild(k);p.appendChild(l)}}
+var m=this,g=m.hiddenTags.slice(),k=document.createElement("div");k.style.userSelect="none";k.style.overflow="hidden";k.style.padding="10px";k.style.height="100%";var p=document.createElement("div");p.style.boxSizing="border-box";p.style.borderRadius="4px";p.style.userSelect="none";p.style.overflow="auto";p.style.position="absolute";p.style.left="10px";p.style.right="10px";p.style.top="10px";p.style.border=m.isEnabled()?"1px solid #808080":"none";p.style.bottom=m.isEnabled()?"48px":"10px";k.appendChild(p);
+var q=mxUtils.button(mxResources.get("reset"),function(b){m.hiddenTags=[];mxEvent.isShiftDown(b)||(g=m.hiddenTags.slice());d();m.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";q.style.margin="0 4px 0 0";var t=mxUtils.button(mxResources.get("add"),function(){null!=f&&f(g,function(b){g=b;n()})});t.setAttribute("title",mxResources.get("add"));t.className="geBtn";t.style.margin="0";m.addListener(mxEvent.ROOT,function(){g=m.hiddenTags.slice()});var n=mxUtils.bind(this,
+function(c,f){if(b()){for(var d=m.getAllTags(),e=0;e<d.length;e++)0>mxUtils.indexOf(g,d[e])&&g.push(d[e]);g.sort();m.isSelectionEmpty()?l(g):l(g,m.getCommonTagsForCells(m.getSelectionCells()))}});m.selectionModel.addListener(mxEvent.CHANGE,n);m.model.addListener(mxEvent.CHANGE,n);m.addListener(mxEvent.REFRESH,n);var x=document.createElement("div");x.style.boxSizing="border-box";x.style.whiteSpace="nowrap";x.style.position="absolute";x.style.overflow="hidden";x.style.bottom="0px";x.style.height="42px";
+x.style.right="10px";x.style.left="10px";m.isEnabled()&&(x.appendChild(q),x.appendChild(t),k.appendChild(x));return{div:k,refresh:n}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],c;for(c in Graph.customFontElements){var f=Graph.customFontElements[c];b.push({name:f.name,url:f.url})}return b};Graph.prototype.setFont=function(b,c){Graph.addFont(b,c);document.execCommand("fontname",!1,b);if(null!=c){var f=this.cellEditor.textarea.getElementsByTagName("font");c=
+Graph.getFontUrl(b,c);for(var d=0;d<f.length;d++)f[d].getAttribute("face")==b&&f[d].getAttribute("data-font-src")!=c&&f[d].setAttribute("data-font-src",c)}};var B=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return B.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var b=
+JSON.parse(decodeURIComponent(urlParams.vars));if(null!=b)for(var c in b)this.globalVars[c]=b[c]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var C=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var c=C.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[b]);return c};Graph.prototype.getDefaultStylesheet=
+function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var E=Graph.prototype.getSvg;Graph.prototype.getSvg=function(b,c,f,d,e,l,m,g,k,p,q,n,t,x){var u=null,v=null;n||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,v=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?
+"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var B=E.apply(this,arguments),A=this.getCustomFonts();if(q&&0<A.length){var y=B.ownerDocument,C=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"style"):y.createElement("style");null!=y.setAttributeNS?C.setAttributeNS("type","text/css"):C.setAttribute("type","text/css");for(var D="",z="",M=0;M<A.length;M++){var G=A[M].name,K=A[M].url;Graph.isCssFontUrl(K)?D+="@import url("+K+");\n":z+='@font-face {\nfont-family: "'+
+G+'";\nsrc: url("'+K+'");\n}\n'}C.appendChild(y.createTextNode(D+z));B.getElementsByTagName("defs")[0].appendChild(C)}null!=u&&(this.defaultPageBackgroundColor=v,this.stylesheet=u,this.refresh());return B};var F=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var b=F.apply(this,arguments);if(this.mathEnabled){var c=b.drawText;b.drawText=function(b,f){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var d=
+b.text.getContentNode();if(null!=d){d=d.cloneNode(!0);if(d.getElementsByTagNameNS)for(var e=d.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=d.innerHTML&&(e=b.text.value,b.text.value=d.innerHTML,c.apply(this,arguments),b.text.value=e)}}else c.apply(this,arguments)}}return b};var G=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){G.apply(this,arguments);if(mxClient.IS_GC&&null!=
+this.getDrawPane()){var b=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;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&this.setBackgroundImage(this.backgroundImage)};var D=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){D.apply(this,
+arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=function(b,c){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));
+else{this.executingCustomActions=!0;var f=!1,d=0,e=0,l=mxUtils.bind(this,function(){f||(f=!0,this.model.beginUpdate())}),m=mxUtils.bind(this,function(){f&&(f=!1,this.model.endUpdate())}),g=mxUtils.bind(this,function(){0<d&&d--;0==d&&k()}),k=mxUtils.bind(this,function(){if(e<b.length){var f=this.stoppingCustomActions,p=b[e++],q=[];if(null!=p.open)if(m(),this.isCustomLink(p.open)){if(!this.customLinkClicked(p.open))return}else this.openLink(p.open);null==p.wait||f||(this.pendingExecuteNextAction=mxUtils.bind(this,
+function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;g()}),d++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=p.wait?parseInt(p.wait):1E3),m());null!=p.opacity&&null!=p.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(p.opacity,!0)),p.opacity.value);null!=p.fadeIn&&(d++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeIn,!0)),0,1,g,f?0:p.fadeIn.delay));null!=p.fadeOut&&(d++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeOut,
+!0)),1,0,g,f?0:p.fadeOut.delay));null!=p.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeIn,!0),!0)));null!=p.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeOut,!0),!1)));null!=p.toggle&&(l(),this.toggleCells(this.getCellsForAction(p.toggle,!0)));if(null!=p.show){l();var n=this.getCellsForAction(p.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(n),1);this.setCellsVisible(n,!0)}null!=p.hide&&(l(),n=this.getCellsForAction(p.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(n),
+0),this.setCellsVisible(n,!1));null!=p.toggleStyle&&null!=p.toggleStyle.key&&(l(),this.toggleCellStyles(p.toggleStyle.key,null!=p.toggleStyle.defaultValue?p.toggleStyle.defaultValue:"0",this.getCellsForAction(p.toggleStyle,!0)));null!=p.style&&null!=p.style.key&&(l(),this.setCellStyles(p.style.key,p.style.value,this.getCellsForAction(p.style,!0)));n=[];null!=p.select&&this.isEnabled()&&(n=this.getCellsForAction(p.select),this.setSelectionCells(n));null!=p.highlight&&(n=this.getCellsForAction(p.highlight),
+this.highlightCells(n,p.highlight.color,p.highlight.duration,p.highlight.opacity));null!=p.scroll&&(n=this.getCellsForAction(p.scroll));null!=p.viewbox&&this.fitWindow(p.viewbox,p.viewbox.border);0<n.length&&this.scrollCellToVisible(n[0]);if(null!=p.tags){n=[];null!=p.tags.hidden&&(n=n.concat(p.tags.hidden));if(null!=p.tags.visible)for(var t=this.getAllTags(),x=0;x<t.length;x++)0>mxUtils.indexOf(p.tags.visible,t[x])&&0>mxUtils.indexOf(n,t[x])&&n.push(t[x]);this.hiddenTags=n;this.refresh()}0<q.length&&
+(d++,this.executeAnimations(q,g,f?1:p.steps,f?0:p.delay));0==d?k():m()}else this.stoppingCustomActions=this.executingCustomActions=!1,m(),null!=c&&c()});k()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,c){var f=this.getLinkForCell(c);null!=f&&"data:action/json,"==f.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(b,f));if(this.isHtmlLabel(c)){var d=document.createElement("div");d.innerHTML=this.sanitizeHtml(this.getLabel(c));for(var e=d.getElementsByTagName("a"),l=!1,m=0;m<
+e.length;m++)f=e[m].getAttribute("href"),null!=f&&"data:action/json,"==f.substring(0,17)&&(e[m].setAttribute("href",this.updateCustomLink(b,f)),l=!0);l&&this.labelChanged(c,d.innerHTML)}};Graph.prototype.updateCustomLink=function(b,c){if("data:action/json,"==c.substring(0,17))try{var f=JSON.parse(c.substring(17));null!=f.actions&&(this.updateCustomLinkActions(b,f.actions),c="data:action/json,"+JSON.stringify(f))}catch(W){}return c};Graph.prototype.updateCustomLinkActions=function(b,c){for(var f=0;f<
c.length;f++){var d=c[f],e;for(e in d)this.updateCustomLinkAction(b,d[e],"cells"),this.updateCustomLinkAction(b,d[e],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(b,c,f){if(null!=c&&null!=c[f]){for(var d=[],e=0;e<c[f].length;e++)if("*"==c[f][e])d.push(c[f][e]);else{var l=b[c[f][e]];null!=l?""!=l&&d.push(l):d.push(c[f][e])}c[f]=d}};Graph.prototype.getCellsForAction=function(b,c){var f=this.getCellsById(b.cells).concat(this.getCellsForTags(b.tags,null,c));if(null!=b.excludeCells){for(var d=
[],e=0;e<f.length;e++)0>b.excludeCells.indexOf(f[e].id)&&d.push(f[e]);f=d}return f};Graph.prototype.getCellsById=function(b){var c=[];if(null!=b)for(var f=0;f<b.length;f++)if("*"==b[f])var d=this.model.getRoot(),c=c.concat(this.model.filterDescendants(function(b){return b!=d},d));else{var e=this.model.getCell(b[f]);null!=e&&c.push(e)}return c};var I=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(b){return I.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(b))};
-Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var c=0;c<b.length;c++)if(0>mxUtils.indexOf(this.hiddenTags,b[c]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,c,f,d){var e=[];if(null!=b){c=null!=c?c:this.model.getDescendants(this.model.getRoot());for(var l=0,n={},g=0;g<b.length;g++)0<b[g].length&&(n[b[g]]=!0,l++);for(g=0;g<c.length;g++)if(f&&this.model.getParent(c[g])==
-this.model.root||this.model.isVertex(c[g])||this.model.isEdge(c[g])){var k=this.getTagsForCell(c[g]),p=!1;if(0<k.length&&(k=k.split(" "),k.length>=b.length)){for(var q=p=0;q<k.length&&p<l;q++)null!=n[k[q]]&&p++;p=p==l}p&&(1!=d||this.isCellVisible(c[g]))&&e.push(c[g])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var c=null,f=[],d=0;d<b.length;d++){var e=this.getTagsForCell(b[d]),
-f=[];if(0<e.length){for(var e=e.split(" "),l={},n=0;n<e.length;n++)if(null==c||null!=c[e[n]])l[e[n]]=!0,f.push(e[n]);c=l}else return[]}return f};Graph.prototype.getTagsForCells=function(b){for(var c=[],f={},d=0;d<b.length;d++){var e=this.getTagsForCell(b[d]);if(0<e.length)for(var e=e.split(" "),l=0;l<e.length;l++)null==f[e[l]]&&(f[e[l]]=!0,c.push(e[l]))}return c};Graph.prototype.getTagsForCell=function(b){return this.getAttributeForCell(b,"tags","")};Graph.prototype.addTagsForCells=function(b,c){if(0<
-b.length&&0<c.length){this.model.beginUpdate();try{for(var f=0;f<b.length;f++){for(var d=this.getTagsForCell(b[f]),e=d.split(" "),l=!1,n=0;n<c.length;n++){var g=mxUtils.trim(c[n]);""!=g&&0>mxUtils.indexOf(e,g)&&(d=0<d.length?d+" "+g:g,l=!0)}l&&this.setAttributeForCell(b[f],"tags",d)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,c){if(0<b.length&&0<c.length){this.model.beginUpdate();try{for(var f=0;f<b.length;f++){var d=this.getTagsForCell(b[f]);if(0<d.length){for(var e=
-d.split(" "),l=!1,n=0;n<c.length;n++){var g=mxUtils.indexOf(e,c[n]);0<=g&&(e.splice(g,1),l=!0)}l&&this.setAttributeForCell(b[f],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],!this.model.isVisible(b[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,c){this.model.beginUpdate();try{for(var f=0;f<b.length;f++)this.model.setVisible(b[f],c)}finally{this.model.endUpdate()}};
+Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var c=0;c<b.length;c++)if(0>mxUtils.indexOf(this.hiddenTags,b[c]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,c,f,d){var e=[];if(null!=b){c=null!=c?c:this.model.getDescendants(this.model.getRoot());for(var l=0,m={},g=0;g<b.length;g++)0<b[g].length&&(m[b[g]]=!0,l++);for(g=0;g<c.length;g++)if(f&&this.model.getParent(c[g])==
+this.model.root||this.model.isVertex(c[g])||this.model.isEdge(c[g])){var k=this.getTagsForCell(c[g]),p=!1;if(0<k.length&&(k=k.split(" "),k.length>=b.length)){for(var q=p=0;q<k.length&&p<l;q++)null!=m[k[q]]&&p++;p=p==l}p&&(1!=d||this.isCellVisible(c[g]))&&e.push(c[g])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var c=null,f=[],d=0;d<b.length;d++){var e=this.getTagsForCell(b[d]),
+f=[];if(0<e.length){for(var e=e.split(" "),l={},m=0;m<e.length;m++)if(null==c||null!=c[e[m]])l[e[m]]=!0,f.push(e[m]);c=l}else return[]}return f};Graph.prototype.getTagsForCells=function(b){for(var c=[],f={},d=0;d<b.length;d++){var e=this.getTagsForCell(b[d]);if(0<e.length)for(var e=e.split(" "),l=0;l<e.length;l++)null==f[e[l]]&&(f[e[l]]=!0,c.push(e[l]))}return c};Graph.prototype.getTagsForCell=function(b){return this.getAttributeForCell(b,"tags","")};Graph.prototype.addTagsForCells=function(b,c){if(0<
+b.length&&0<c.length){this.model.beginUpdate();try{for(var f=0;f<b.length;f++){for(var d=this.getTagsForCell(b[f]),e=d.split(" "),l=!1,m=0;m<c.length;m++){var g=mxUtils.trim(c[m]);""!=g&&0>mxUtils.indexOf(e,g)&&(d=0<d.length?d+" "+g:g,l=!0)}l&&this.setAttributeForCell(b[f],"tags",d)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,c){if(0<b.length&&0<c.length){this.model.beginUpdate();try{for(var f=0;f<b.length;f++){var d=this.getTagsForCell(b[f]);if(0<d.length){for(var e=
+d.split(" "),l=!1,m=0;m<c.length;m++){var g=mxUtils.indexOf(e,c[m]);0<=g&&(e.splice(g,1),l=!0)}l&&this.setAttributeForCell(b[f],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],!this.model.isVisible(b[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,c){this.model.beginUpdate();try{for(var f=0;f<b.length;f++)this.model.setVisible(b[f],c)}finally{this.model.endUpdate()}};
Graph.prototype.highlightCells=function(b,c,f,d){for(var e=0;e<b.length;e++)this.highlightCell(b[e],c,f,d)};Graph.prototype.highlightCell=function(b,c,f,d){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;f=null!=f?f:1E3;b=this.view.getState(b);if(null!=b){var e=Math.max(5,mxUtils.getValue(b.style,mxConstants.STYLE_STROKEWIDTH,1)+4),l=new mxCellHighlight(this,c,e,!1);null!=d&&(l.opacity=d);l.highlight(b);window.setTimeout(function(){null!=l.shape&&(mxUtils.setPrefixedStyle(l.shape.node.style,"transition",
"all 1200ms ease-in-out"),l.shape.node.style.opacity=0);window.setTimeout(function(){l.destroy()},1200)},f)}};Graph.prototype.addSvgShadow=function(b,c,f){f=null!=f?f:!1;var d=b.ownerDocument,e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");e.setAttribute("id",this.shadowId);var l=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");l.setAttribute("in","SourceAlpha");l.setAttribute("stdDeviation",
this.svgShadowBlur);l.setAttribute("result","blur");e.appendChild(l);l=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset");l.setAttribute("in","blur");l.setAttribute("dx",this.svgShadowSize);l.setAttribute("dy",this.svgShadowSize);l.setAttribute("result","offsetBlur");e.appendChild(l);l=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");l.setAttribute("flood-color",this.svgShadowColor);l.setAttribute("flood-opacity",
@@ -10459,47 +10473,47 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
"/mxBasic.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.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",
STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+
-"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(b){var c=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?c="mxgraph.er":"sysML"==b.substring(0,5)&&(c="mxgraph.sysml"));return c};var K=mxMarker.createMarker;mxMarker.createMarker=function(b,c,f,d,e,l,n,g,k,p){if(null!=f&&null==mxMarker.markers[f]){var q=this.getPackageForType(f);null!=q&&
-mxStencilRegistry.getStencil(q)}return K.apply(this,arguments)};PrintDialog.prototype.create=function(b,c){function f(){y.value=Math.max(1,Math.min(g,Math.max(parseInt(y.value),parseInt(m.value))));m.value=Math.max(1,Math.min(g,Math.min(parseInt(y.value),parseInt(m.value))))}function d(c){function f(c,f,l){var n=c.useCssTransforms,g=c.currentTranslate,k=c.currentScale,p=c.view.translate,q=c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,
-c.view.translate=new mxPoint(0,0),c.view.scale=1);var t=c.getGraphBounds(),m=0,y=0,u=P.get(),v=1/c.pageScale,x=A.checked;if(x)var v=parseInt(L.value),C=parseInt(I.value),v=Math.min(u.height*C/(t.height/c.view.scale),u.width*v/(t.width/c.view.scale));else v=parseInt(B.value)/(100*c.pageScale),isNaN(v)&&(d=1/c.pageScale,B.value="100 %");u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*d);u.height=Math.ceil(u.height*d);v*=d;!x&&c.pageVisible?(t=c.getPageLayout(),m-=t.x*u.width,y-=t.y*u.height):
-x=!0;if(null==f){f=PrintDialog.createPrintPreview(c,v,u,0,m,y,x);f.pageSelector=!1;f.mathEnabled=!1;m=b.getCurrentFile();null!=m&&(f.title=m.getTitle());var D=f.writeHead;f.writeHead=function(f){D.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)f.writeln('<style type="text/css">'),f.writeln(Editor.mathJaxWebkitCss),f.writeln("</style>");mxClient.IS_GC&&(f.writeln('<style type="text/css">'),f.writeln("@media print {"),f.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),f.writeln("}"),
-f.writeln("</style>"));null!=b.editor.fontCss&&(f.writeln('<style type="text/css">'),f.writeln(b.editor.fontCss),f.writeln("</style>"));for(var d=c.getCustomFonts(),e=0;e<d.length;e++){var l=d[e].name,n=d[e].url;Graph.isCssFontUrl(n)?f.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(n)+'" charset="UTF-8" type="text/css">'):(f.writeln('<style type="text/css">'),f.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(n)+'");\n}'),f.writeln("</style>"))}};
-if("undefined"!==typeof MathJax){var z=f.renderPage;f.renderPage=function(c,f,d,e,l,n){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var k=z.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:k.className="geDisableMathJax";return k}}m=null;y=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(m=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
-e.refresh());f.open(null,null,l,!0);e.enableFlowAnimation=y;null!=m&&(e.stylesheet=m,e.refresh())}else{u=c.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";f.backgroundColor=u;f.autoOrigin=x;f.appendGraph(c,v,m,y,l,!0);l=c.getCustomFonts();if(null!=f.wnd)for(m=0;m<l.length;m++)y=l[m].name,x=l[m].url,Graph.isCssFontUrl(x)?f.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(x)+'" charset="UTF-8" type="text/css">'):(f.wnd.document.writeln('<style type="text/css">'),
-f.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(y)+'";\nsrc: url("'+mxUtils.htmlEntities(x)+'");\n}'),f.wnd.document.writeln("</style>"))}n&&(c.useCssTransforms=n,c.currentTranslate=g,c.currentScale=k,c.view.translate=p,c.view.scale=q);return f}var d=parseInt(H.value)/100;isNaN(d)&&(d=1,H.value="100 %");var d=.75*d,l=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(l=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var n=m.value,g=y.value,p=!q.checked,
-t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,n,g,A.checked,L.value,I.value,parseInt(B.value)/100,parseInt(H.value)/100,P.get());else{p&&(p=n==k&&g==k);if(!p&&null!=b.pages&&b.pages.length){var u=0,p=b.pages.length-1;q.checked||(u=parseInt(n)-1,p=parseInt(g)-1);for(var v=u;v<=p;v++){var x=b.pages[v],n=x==b.currentPage?e:null;if(null==n){var n=b.createTemporaryGraph(e.stylesheet),g=!0,u=!1,C=null,D=null;null==x.viewState&&null==x.root&&b.updatePageRoot(x);null!=x.viewState&&
-(g=x.viewState.pageVisible,u=x.viewState.mathEnabled,C=x.viewState.background,D=x.viewState.backgroundImage,n.extFonts=x.viewState.extFonts);n.background=C;n.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;n.pageVisible=g;n.mathEnabled=u;var z=n.getGlobalVariable;n.getGlobalVariable=function(c){return"page"==c?x.getName():"pagenumber"==c?v+1:"pagecount"==c?null!=b.pages?b.pages.length:1:z.apply(this,arguments)};document.body.appendChild(n.container);b.updatePageRoot(x);n.model.setRoot(x.root)}t=
-f(n,t,v!=p);n!=e&&n.container.parentNode.removeChild(n.container)}}else t=f(e);null==t?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(p=t.wnd.document,c&&(t.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),t.closeDocument(),!t.mathEnabled&&c&&PrintDialog.printPreview(t));null!=l&&(e.stylesheet=l,e.refresh())}}var e=b.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,c||mxResources.get("print"));l.appendChild(n);var g=1,k=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");p.appendChild(q);n=document.createElement("span");
-mxUtils.write(n,mxResources.get("printAllPages"));p.appendChild(n);mxUtils.br(p);var t=q.cloneNode(!0);q.setAttribute("checked","checked");t.setAttribute("value","range");p.appendChild(t);n=document.createElement("span");mxUtils.write(n,mxResources.get("pages")+":");p.appendChild(n);var m=document.createElement("input");m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.style.width="50px";p.appendChild(m);n=document.createElement("span");
-mxUtils.write(n,mxResources.get("to"));p.appendChild(n);var y=m.cloneNode(!0);p.appendChild(y);mxEvent.addListener(m,"focus",function(){t.checked=!0});mxEvent.addListener(y,"focus",function(){t.checked=!0});mxEvent.addListener(m,"change",f);mxEvent.addListener(y,"change",f);if(null!=b.pages&&(g=b.pages.length,null!=b.currentPage))for(n=0;n<b.pages.length;n++)if(b.currentPage==b.pages[n]){k=n+1;m.value=k;y.value=k;break}m.setAttribute("max",g);y.setAttribute("max",g);b.isPagesEnabled()?1<g&&(l.appendChild(p),
-t.checked=!0):t.checked=!0;var u=document.createElement("div");u.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");u.appendChild(v);n=document.createElement("span");mxUtils.write(n,mxResources.get("adjustTo"));u.appendChild(n);var B=document.createElement("input");B.style.cssText="margin:0 8px 0 8px;";B.setAttribute("value","100 %");B.style.width="50px";u.appendChild(B);
-mxEvent.addListener(B,"focus",function(){v.checked=!0});l.appendChild(u);var p=p.cloneNode(!1),A=v.cloneNode(!0);A.setAttribute("value","fit");v.setAttribute("checked","checked");n=document.createElement("div");n.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";n.appendChild(A);p.appendChild(n);u=document.createElement("table");u.style.display="inline-block";var x=document.createElement("tbody"),C=document.createElement("tr"),D=C.cloneNode(!0),z=document.createElement("td"),
-M=z.cloneNode(!0),F=z.cloneNode(!0),E=z.cloneNode(!0),K=z.cloneNode(!0),G=z.cloneNode(!0);z.style.textAlign="right";E.style.textAlign="right";mxUtils.write(z,mxResources.get("fitTo"));var L=document.createElement("input");L.style.cssText="margin:0 8px 0 8px;";L.setAttribute("value","1");L.setAttribute("min","1");L.setAttribute("type","number");L.style.width="40px";M.appendChild(L);n=document.createElement("span");mxUtils.write(n,mxResources.get("fitToSheetsAcross"));F.appendChild(n);mxUtils.write(E,
-mxResources.get("fitToBy"));var I=L.cloneNode(!0);K.appendChild(I);mxEvent.addListener(L,"focus",function(){A.checked=!0});mxEvent.addListener(I,"focus",function(){A.checked=!0});n=document.createElement("span");mxUtils.write(n,mxResources.get("fitToSheetsDown"));G.appendChild(n);C.appendChild(z);C.appendChild(M);C.appendChild(F);D.appendChild(E);D.appendChild(K);D.appendChild(G);x.appendChild(C);x.appendChild(D);u.appendChild(x);p.appendChild(u);l.appendChild(p);p=document.createElement("div");n=
-document.createElement("div");n.style.fontWeight="bold";n.style.marginBottom="12px";mxUtils.write(n,mxResources.get("paperSize"));p.appendChild(n);n=document.createElement("div");n.style.marginBottom="12px";var P=PageSetupDialog.addPageFormatPanel(n,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(n);n=document.createElement("span");mxUtils.write(n,mxResources.get("pageScale"));p.appendChild(n);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";
-H.setAttribute("value","100 %");H.style.width="60px";p.appendChild(H);l.appendChild(p);n=document.createElement("div");n.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&n.appendChild(p);b.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),u.className="geBtn",n.appendChild(u));PrintDialog.previewEnabled&&(u=
-mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();d(!1)}),u.className="geBtn",n.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();d(!0)});u.className="geBtn gePrimaryBtn";n.appendChild(u);b.editor.cancelFirst||n.appendChild(p);l.appendChild(n);this.container=l};var L=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(b){var c=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?c="mxgraph.er":"sysML"==b.substring(0,5)&&(c="mxgraph.sysml"));return c};var K=mxMarker.createMarker;mxMarker.createMarker=function(b,c,f,d,e,l,m,g,k,p){if(null!=f&&null==mxMarker.markers[f]){var q=this.getPackageForType(f);null!=q&&
+mxStencilRegistry.getStencil(q)}return K.apply(this,arguments)};PrintDialog.prototype.create=function(b,c){function f(){x.value=Math.max(1,Math.min(g,Math.max(parseInt(x.value),parseInt(t.value))));t.value=Math.max(1,Math.min(g,Math.min(parseInt(x.value),parseInt(t.value))))}function d(c){function f(c,f,l){var m=c.useCssTransforms,g=c.currentTranslate,k=c.currentScale,p=c.view.translate,q=c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,
+c.view.translate=new mxPoint(0,0),c.view.scale=1);var n=c.getGraphBounds(),t=0,x=0,u=P.get(),v=1/c.pageScale,y=A.checked;if(y)var v=parseInt(L.value),C=parseInt(I.value),v=Math.min(u.height*C/(n.height/c.view.scale),u.width*v/(n.width/c.view.scale));else v=parseInt(B.value)/(100*c.pageScale),isNaN(v)&&(d=1/c.pageScale,B.value="100 %");u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*d);u.height=Math.ceil(u.height*d);v*=d;!y&&c.pageVisible?(n=c.getPageLayout(),t-=n.x*u.width,x-=n.y*u.height):
+y=!0;if(null==f){f=PrintDialog.createPrintPreview(c,v,u,0,t,x,y);f.pageSelector=!1;f.mathEnabled=!1;t=b.getCurrentFile();null!=t&&(f.title=t.getTitle());var D=f.writeHead;f.writeHead=function(f){D.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)f.writeln('<style type="text/css">'),f.writeln(Editor.mathJaxWebkitCss),f.writeln("</style>");mxClient.IS_GC&&(f.writeln('<style type="text/css">'),f.writeln("@media print {"),f.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),f.writeln("}"),
+f.writeln("</style>"));null!=b.editor.fontCss&&(f.writeln('<style type="text/css">'),f.writeln(b.editor.fontCss),f.writeln("</style>"));for(var d=c.getCustomFonts(),e=0;e<d.length;e++){var l=d[e].name,m=d[e].url;Graph.isCssFontUrl(m)?f.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(m)+'" charset="UTF-8" type="text/css">'):(f.writeln('<style type="text/css">'),f.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(m)+'");\n}'),f.writeln("</style>"))}};
+if("undefined"!==typeof MathJax){var z=f.renderPage;f.renderPage=function(c,f,d,e,l,m){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var k=z.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:k.className="geDisableMathJax";return k}}t=null;x=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(t=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
+e.refresh());f.open(null,null,l,!0);e.enableFlowAnimation=x;null!=t&&(e.stylesheet=t,e.refresh())}else{u=c.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";f.backgroundColor=u;f.autoOrigin=y;f.appendGraph(c,v,t,x,l,!0);l=c.getCustomFonts();if(null!=f.wnd)for(t=0;t<l.length;t++)x=l[t].name,y=l[t].url,Graph.isCssFontUrl(y)?f.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(y)+'" charset="UTF-8" type="text/css">'):(f.wnd.document.writeln('<style type="text/css">'),
+f.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(x)+'";\nsrc: url("'+mxUtils.htmlEntities(y)+'");\n}'),f.wnd.document.writeln("</style>"))}m&&(c.useCssTransforms=m,c.currentTranslate=g,c.currentScale=k,c.view.translate=p,c.view.scale=q);return f}var d=parseInt(H.value)/100;isNaN(d)&&(d=1,H.value="100 %");var d=.75*d,l=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(l=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var m=t.value,g=x.value,p=!q.checked,
+n=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,m,g,A.checked,L.value,I.value,parseInt(B.value)/100,parseInt(H.value)/100,P.get());else{p&&(p=m==k&&g==k);if(!p&&null!=b.pages&&b.pages.length){var u=0,p=b.pages.length-1;q.checked||(u=parseInt(m)-1,p=parseInt(g)-1);for(var v=u;v<=p;v++){var y=b.pages[v],m=y==b.currentPage?e:null;if(null==m){var m=b.createTemporaryGraph(e.stylesheet),g=!0,u=!1,C=null,D=null;null==y.viewState&&null==y.root&&b.updatePageRoot(y);null!=y.viewState&&
+(g=y.viewState.pageVisible,u=y.viewState.mathEnabled,C=y.viewState.background,D=y.viewState.backgroundImage,m.extFonts=y.viewState.extFonts);m.background=C;m.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;m.pageVisible=g;m.mathEnabled=u;var z=m.getGlobalVariable;m.getGlobalVariable=function(c){return"page"==c?y.getName():"pagenumber"==c?v+1:"pagecount"==c?null!=b.pages?b.pages.length:1:z.apply(this,arguments)};document.body.appendChild(m.container);b.updatePageRoot(y);m.model.setRoot(y.root)}n=
+f(m,n,v!=p);m!=e&&m.container.parentNode.removeChild(m.container)}}else n=f(e);null==n?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(n.mathEnabled&&(p=n.wnd.document,c&&(n.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),n.closeDocument(),!n.mathEnabled&&c&&PrintDialog.printPreview(n));null!=l&&(e.stylesheet=l,e.refresh())}}var e=b.editor.graph,l=document.createElement("div"),m=document.createElement("h3");
+m.style.width="100%";m.style.textAlign="center";m.style.marginTop="0px";mxUtils.write(m,c||mxResources.get("print"));l.appendChild(m);var g=1,k=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");p.appendChild(q);m=document.createElement("span");
+mxUtils.write(m,mxResources.get("printAllPages"));p.appendChild(m);mxUtils.br(p);var n=q.cloneNode(!0);q.setAttribute("checked","checked");n.setAttribute("value","range");p.appendChild(n);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");p.appendChild(m);var t=document.createElement("input");t.style.cssText="margin:0 8px 0 8px;";t.setAttribute("value","1");t.setAttribute("type","number");t.setAttribute("min","1");t.style.width="50px";p.appendChild(t);m=document.createElement("span");
+mxUtils.write(m,mxResources.get("to"));p.appendChild(m);var x=t.cloneNode(!0);p.appendChild(x);mxEvent.addListener(t,"focus",function(){n.checked=!0});mxEvent.addListener(x,"focus",function(){n.checked=!0});mxEvent.addListener(t,"change",f);mxEvent.addListener(x,"change",f);if(null!=b.pages&&(g=b.pages.length,null!=b.currentPage))for(m=0;m<b.pages.length;m++)if(b.currentPage==b.pages[m]){k=m+1;t.value=k;x.value=k;break}t.setAttribute("max",g);x.setAttribute("max",g);b.isPagesEnabled()?1<g&&(l.appendChild(p),
+n.checked=!0):n.checked=!0;var u=document.createElement("div");u.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");u.appendChild(v);m=document.createElement("span");mxUtils.write(m,mxResources.get("adjustTo"));u.appendChild(m);var B=document.createElement("input");B.style.cssText="margin:0 8px 0 8px;";B.setAttribute("value","100 %");B.style.width="50px";u.appendChild(B);
+mxEvent.addListener(B,"focus",function(){v.checked=!0});l.appendChild(u);var p=p.cloneNode(!1),A=v.cloneNode(!0);A.setAttribute("value","fit");v.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";m.appendChild(A);p.appendChild(m);u=document.createElement("table");u.style.display="inline-block";var y=document.createElement("tbody"),C=document.createElement("tr"),D=C.cloneNode(!0),z=document.createElement("td"),
+M=z.cloneNode(!0),G=z.cloneNode(!0),K=z.cloneNode(!0),E=z.cloneNode(!0),F=z.cloneNode(!0);z.style.textAlign="right";K.style.textAlign="right";mxUtils.write(z,mxResources.get("fitTo"));var L=document.createElement("input");L.style.cssText="margin:0 8px 0 8px;";L.setAttribute("value","1");L.setAttribute("min","1");L.setAttribute("type","number");L.style.width="40px";M.appendChild(L);m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsAcross"));G.appendChild(m);mxUtils.write(K,
+mxResources.get("fitToBy"));var I=L.cloneNode(!0);E.appendChild(I);mxEvent.addListener(L,"focus",function(){A.checked=!0});mxEvent.addListener(I,"focus",function(){A.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));F.appendChild(m);C.appendChild(z);C.appendChild(M);C.appendChild(G);D.appendChild(K);D.appendChild(E);D.appendChild(F);y.appendChild(C);y.appendChild(D);u.appendChild(y);p.appendChild(u);l.appendChild(p);p=document.createElement("div");m=
+document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));p.appendChild(m);m=document.createElement("div");m.style.marginBottom="12px";var P=PageSetupDialog.addPageFormatPanel(m,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.get("pageScale"));p.appendChild(m);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";
+H.setAttribute("value","100 %");H.style.width="60px";p.appendChild(H);l.appendChild(p);m=document.createElement("div");m.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&m.appendChild(p);b.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),u.className="geBtn",m.appendChild(u));PrintDialog.previewEnabled&&(u=
+mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();d(!1)}),u.className="geBtn",m.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();d(!0)});u.className="geBtn gePrimaryBtn";m.appendChild(u);b.editor.cancelFirst||m.appendChild(p);l.appendChild(m);this.container=l};var L=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var b=this.image;null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&(b={originalSrc:b.src});this.page.viewState.backgroundImage=b}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)}}else L.apply(this,arguments),null!=this.mathEnabled&&
this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var M=document.createElement("canvas"),P=new Image;P.onload=function(){try{M.getContext("2d").drawImage(P,0,0);var b=M.toDataURL("image/png");Editor.prototype.useCanvasForExport=
null!=b&&6<b.length}catch(H){}};P.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(O){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};b.afterDecode=function(b,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.1.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.1.4";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=
!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,
-noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,d,e,g,k,m){k=null!=k?k:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
+noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,d,e,g,k,n){k=null!=k?k:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(b!=EditorUi.lastErrorMessage&&(null==b||null==c||-1==b.indexOf("Script error")&&-1==b.indexOf("extension"))&&null!=b&&0>b.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=b;var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";g=null!=g?g:Error(b);(new Image).src=f+"/log?severity="+k+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
-encodeURIComponent(d)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=g&&null!=g.stack?"&stack="+encodeURIComponent(g.stack):"")}}catch(x){}try{m||null==window.console||console.error(k,b,c,d,e,g)}catch(x){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
-"")}catch(n){}};EditorUi.sendReport=function(b,c){if("1"==urlParams.dev)EditorUi.debug("sendReport",b);else if(EditorUi.enableLogging)try{c=null!=c?c:5E4,b.length>c&&(b=b.substring(0,c)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(b))}catch(n){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var b=[(new Date).toISOString()],c=0;c<arguments.length;c++)null!=
-arguments[c]&&b.push(arguments[c]);console.log.apply(console,b)}}catch(n){}};EditorUi.parsePng=function(b,c,d){function f(b,c){var f=l;l+=c;return b.substring(f,l)}function e(b){b=f(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var l=0;if(f(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(f(b,4),"IHDR"!=f(b,4))null!=d&&d();else{f(b,17);do{d=e(b);var n=f(b,4);if(null!=c&&c(l-8,n,d))break;value=f(b,d);f(b,4);if("IEND"==
-n)break}while(d)}};EditorUi.removeChildNodes=function(b){for(;null!=b.firstChild;)b.removeChild(b.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+encodeURIComponent(d)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=g&&null!=g.stack?"&stack="+encodeURIComponent(g.stack):"")}}catch(y){}try{n||null==window.console||console.error(k,b,c,d,e,g)}catch(y){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
+"")}catch(m){}};EditorUi.sendReport=function(b,c){if("1"==urlParams.dev)EditorUi.debug("sendReport",b);else if(EditorUi.enableLogging)try{c=null!=c?c:5E4,b.length>c&&(b=b.substring(0,c)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(b))}catch(m){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var b=[(new Date).toISOString()],c=0;c<arguments.length;c++)null!=
+arguments[c]&&b.push(arguments[c]);console.log.apply(console,b)}}catch(m){}};EditorUi.parsePng=function(b,c,d){function f(b,c){var f=l;l+=c;return b.substring(f,l)}function e(b){b=f(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var l=0;if(f(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(f(b,4),"IHDR"!=f(b,4))null!=d&&d();else{f(b,17);do{d=e(b);var m=f(b,4);if(null!=c&&c(l-8,m,d))break;value=f(b,d);f(b,4);if("IEND"==
+m)break}while(d)}};EditorUi.removeChildNodes=function(b){for(;null!=b.firstChild;)b.removeChild(b.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var b=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!b.getContext||!b.getContext("2d"))}catch(q){}try{var c=document.createElement("canvas"),d=new Image;d.onload=function(){try{c.getContext("2d").drawImage(d,0,0);var b=c.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=b&&6<b.length}catch(t){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}try{c=
document.createElement("canvas");c.width=c.height=1;var e=c.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(b,c,d){return this.editor.graph.openLink(b,c,d)};EditorUi.prototype.showSplash=function(b){};EditorUi.prototype.getLocalData=function(b,c){c(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,c,d){localStorage.setItem(b,c);null!=d&&d()};EditorUi.prototype.removeLocalData=function(b,c){localStorage.removeItem(b);
c()};EditorUi.prototype.setMathEnabled=function(b){this.editor.graph.mathEnabled=b;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(b){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(b){return this.isOfflineApp()||!navigator.onLine||!b&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};
-EditorUi.prototype.createSpinner=function(b,c,d){var f=null==b||null==c;d=null!=d?d:24;var e=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),l=e.spin;e.spin=function(d,n){var g=!1;this.active||(l.call(this,d),this.active=!0,null!=n&&(f&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),g=document.createElement("div"),
-g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize="9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,b)+"px",g.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(g.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=n.substring(n.length-3,n.length)&&"!"!=n.charAt(n.length-1)&&(n+="..."),g.innerHTML=n,d.appendChild(g),e.status=g),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(d,n)}));this.stop();return b}),g=!0);return g};var n=e.stop;e.stop=function(){n.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);e.status=null};e.pause=function(){return function(){}};
+EditorUi.prototype.createSpinner=function(b,c,d){var f=null==b||null==c;d=null!=d?d:24;var e=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),l=e.spin;e.spin=function(d,m){var g=!1;this.active||(l.call(this,d),this.active=!0,null!=m&&(f&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),g=document.createElement("div"),
+g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily=Editor.defaultHtmlFont,g.style.fontSize="9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,b)+"px",g.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(g.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=m.substring(m.length-3,m.length)&&"!"!=m.charAt(m.length-1)&&(m+="..."),g.innerHTML=m,d.appendChild(g),e.status=g),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(d,m)}));this.stop();return b}),g=!0);return g};var m=e.stop;e.stop=function(){m.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);e.status=null};e.pause=function(){return function(){}};
return e};EditorUi.prototype.isCompatibleString=function(b){try{var c=mxUtils.parseXml(b),f=this.editor.extractGraphModel(c.documentElement,!0);return null!=f&&0==f.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.prototype.isVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&
3==b.charCodeAt(2)&&4==b.charCodeAt(3)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&3==b.charCodeAt(2)&&6==b.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||60==b.charCodeAt(0)&&63==b.charCodeAt(1)&&120==b.charCodeAt(2)&&109==b.charCodeAt(3)&&108==b.charCodeAt(3))};EditorUi.prototype.isPngData=
function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var d=f.getFunction,e=this.editor.graph,g=this;f.getFunction=function(b){if(e.isSelectionEmpty()&&null!=g.pages&&0<g.pages.length){var c=
@@ -10508,45 +10522,45 @@ c&&g.selectPage(g.pages[0])};if(39==b.keyCode)return function(){c<g.pages.length
15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var g=mxUtils.parseXml(b),k=this.editor.extractGraphModel(g.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=k?mxUtils.getXml(k):""}catch(u){}return c};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var c=b.indexOf('<meta charset="utf-8">');0<=c&&(b=b.slice(0,c)+'<meta charset="utf-8"/>'+b.slice(c+23-1,b.length));b=Graph.zapGremlins(b)}return b};
EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var c=null!=b?this.editor.extractGraphModel(b,!0):null;null!=c&&(b=c);if(null!=b){c=this.editor.graph;c.model.beginUpdate();try{var f=null!=this.pages?this.pages.slice():null,d=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-
1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(d[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,g,0==e?g:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
-this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=f)for(e=0;e<f.length;e++)c.model.execute(new ChangePage(this,f[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,d,e,g,k,m,v,x,A,z){c=null!=c?c:this.editor.graph;g=null!=g?g:!1;x=null!=x?x:!0;var f,l=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?f="_blank":l=f=e;if(null==b)return"";var n=b;if("mxfile"!=n.nodeName.toLowerCase()){if(z){var p=
-b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(b)}else{p=Graph.zapGremlins(mxUtils.getXml(b));n=Graph.compress(p);if(Graph.decompress(n)!=p)return p;p=b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,n)}n=b.ownerDocument.createElement("mxfile");n.appendChild(p)}A?(n=n.cloneNode(!0),n.removeAttribute("modified"),n.removeAttribute("host"),n.removeAttribute("agent"),n.removeAttribute("etag"),n.removeAttribute("userAgent"),
-n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("type")):(n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("pages"),n.removeAttribute("type"),mxClient.IS_CHROMEAPP?n.setAttribute("host","Chrome"):EditorUi.isElectronApp?n.setAttribute("host","Electron"):n.setAttribute("host",window.location.hostname),n.setAttribute("modified",(new Date).toISOString()),n.setAttribute("agent",navigator.appVersion),n.setAttribute("version",
-EditorUi.VERSION),n.setAttribute("etag",Editor.guid()),b=null!=d?d.getMode():this.mode,null!=b&&n.setAttribute("type",b),1<n.getElementsByTagName("diagram").length&&null!=this.pages&&n.setAttribute("pages",this.pages.length));z=z?mxUtils.getPrettyXml(n):mxUtils.getXml(n);if(!k&&!g&&(m||null!=d&&/(\.html)$/i.test(d.getTitle())))z=this.getHtml2(mxUtils.getXml(n),c,null!=d?d.getTitle():null,f,l);else if(k||!g&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
-App.MODE_BROWSER||(e=null),z=this.getEmbeddedSvg(z,c,e,null,v,x,l);return z};EditorUi.prototype.getXmlFileData=function(b,c,d,e){b=null!=b?b:!0;c=null!=c?c:!1;d=null!=d?d:!Editor.compressXml;var f=this.editor.getGraphXml(b,e);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&d?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
-null==c||d?b=b.cloneNode(!0):(b=b.cloneNode(!1),mxUtils.setTextContent(b,Graph.compressNode(c)));f.appendChild(b)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(f)),f=this.fileNode.cloneNode(!1),c)b(this.currentPage.node);else for(c=0;c<this.pages.length;c++){var l=this.pages[c],n=l.node;if(l!=this.currentPage)if(l.needsUpdate){var g=new mxCodec(mxUtils.createXmlDocument()),g=g.encode(new mxGraphModel(l.root));this.editor.graph.saveViewState(l.viewState,
-g,null,e);EditorUi.removeChildNodes(n);mxUtils.setTextContent(n,Graph.compressNode(g));delete l.needsUpdate}else e&&(this.updatePageRoot(l),null!=l.viewState.backgroundImage&&(null!=l.viewState.backgroundImage.originalSrc?l.viewState.backgroundImage=this.createImageForPageLink(l.viewState.backgroundImage.originalSrc,l):Graph.isPageLink(l.viewState.backgroundImage.src)&&(l.viewState.backgroundImage=this.createImageForPageLink(l.viewState.backgroundImage.src,l))),null!=l.viewState.backgroundImage&&
-null!=l.viewState.backgroundImage.originalSrc&&(g=new mxCodec(mxUtils.createXmlDocument()),g=g.encode(new mxGraphModel(l.root)),this.editor.graph.saveViewState(l.viewState,g,null,e),n=n.cloneNode(!1),mxUtils.setTextContent(n,Graph.compressNode(g))));b(n)}return f};EditorUi.prototype.anonymizeString=function(b,c){for(var f=[],d=0;d<b.length;d++){var e=b.charAt(d);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?f.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?f.push(String.fromCharCode(65+Math.round(25*
+this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=f)for(e=0;e<f.length;e++)c.model.execute(new ChangePage(this,f[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,d,e,g,k,n,v,y,A,z){c=null!=c?c:this.editor.graph;g=null!=g?g:!1;y=null!=y?y:!0;var f,l=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?f="_blank":l=f=e;if(null==b)return"";var m=b;if("mxfile"!=m.nodeName.toLowerCase()){if(z){var p=
+b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(b)}else{p=Graph.zapGremlins(mxUtils.getXml(b));m=Graph.compress(p);if(Graph.decompress(m)!=p)return p;p=b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,m)}m=b.ownerDocument.createElement("mxfile");m.appendChild(p)}A?(m=m.cloneNode(!0),m.removeAttribute("modified"),m.removeAttribute("host"),m.removeAttribute("agent"),m.removeAttribute("etag"),m.removeAttribute("userAgent"),
+m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("type")):(m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("pages"),m.removeAttribute("type"),mxClient.IS_CHROMEAPP?m.setAttribute("host","Chrome"):EditorUi.isElectronApp?m.setAttribute("host","Electron"):m.setAttribute("host",window.location.hostname),m.setAttribute("modified",(new Date).toISOString()),m.setAttribute("agent",navigator.appVersion),m.setAttribute("version",
+EditorUi.VERSION),m.setAttribute("etag",Editor.guid()),b=null!=d?d.getMode():this.mode,null!=b&&m.setAttribute("type",b),1<m.getElementsByTagName("diagram").length&&null!=this.pages&&m.setAttribute("pages",this.pages.length));z=z?mxUtils.getPrettyXml(m):mxUtils.getXml(m);if(!k&&!g&&(n||null!=d&&/(\.html)$/i.test(d.getTitle())))z=this.getHtml2(mxUtils.getXml(m),c,null!=d?d.getTitle():null,f,l);else if(k||!g&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
+App.MODE_BROWSER||(e=null),z=this.getEmbeddedSvg(z,c,e,null,v,y,l);return z};EditorUi.prototype.getXmlFileData=function(b,c,d,e){b=null!=b?b:!0;c=null!=c?c:!1;d=null!=d?d:!Editor.compressXml;var f=this.editor.getGraphXml(b,e);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&d?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
+null==c||d?b=b.cloneNode(!0):(b=b.cloneNode(!1),mxUtils.setTextContent(b,Graph.compressNode(c)));f.appendChild(b)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(f)),f=this.fileNode.cloneNode(!1),c)b(this.currentPage.node);else for(c=0;c<this.pages.length;c++){var l=this.pages[c],m=l.node;if(l!=this.currentPage)if(l.needsUpdate){var g=new mxCodec(mxUtils.createXmlDocument()),g=g.encode(new mxGraphModel(l.root));this.editor.graph.saveViewState(l.viewState,
+g,null,e);EditorUi.removeChildNodes(m);mxUtils.setTextContent(m,Graph.compressNode(g));delete l.needsUpdate}else e&&(this.updatePageRoot(l),null!=l.viewState.backgroundImage&&(null!=l.viewState.backgroundImage.originalSrc?l.viewState.backgroundImage=this.createImageForPageLink(l.viewState.backgroundImage.originalSrc,l):Graph.isPageLink(l.viewState.backgroundImage.src)&&(l.viewState.backgroundImage=this.createImageForPageLink(l.viewState.backgroundImage.src,l))),null!=l.viewState.backgroundImage&&
+null!=l.viewState.backgroundImage.originalSrc&&(g=new mxCodec(mxUtils.createXmlDocument()),g=g.encode(new mxGraphModel(l.root)),this.editor.graph.saveViewState(l.viewState,g,null,e),m=m.cloneNode(!1),mxUtils.setTextContent(m,Graph.compressNode(g))));b(m)}return f};EditorUi.prototype.anonymizeString=function(b,c){for(var f=[],d=0;d<b.length;d++){var e=b.charAt(d);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?f.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?f.push(String.fromCharCode(65+Math.round(25*
Math.random()))):e.toUpperCase()!=e?f.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(e)?f.push(" "):f.push("?"):f.push(c?"0":Math.round(9*Math.random()))}return f.join("")};EditorUi.prototype.anonymizePatch=function(b){if(null!=b[EditorUi.DIFF_INSERT])for(var c=0;c<b[EditorUi.DIFF_INSERT].length;c++)try{var f=mxUtils.parseXml(b[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=f.getAttribute("name")&&f.setAttribute("name",this.anonymizeString(f.getAttribute("name")));
b[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(f)}catch(t){b[EditorUi.DIFF_INSERT][c].data=t.message}if(null!=b[EditorUi.DIFF_UPDATE]){for(var d in b[EditorUi.DIFF_UPDATE]){var e=b[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(b){var c=e.cells[b];if(null!=c){for(var f in c)null!=c[f].value&&(c[f].value="["+c[f].value.length+"]"),null!=c[f].xmlValue&&(c[f].xmlValue="["+c[f].xmlValue.length+"]"),null!=c[f].style&&(c[f].style=
"["+c[f].style.length+"]"),0==Object.keys(c[f]).length&&delete c[f];0==Object.keys(c).length&&delete e.cells[b]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete b[EditorUi.DIFF_UPDATE][d]}0==Object.keys(b[EditorUi.DIFF_UPDATE]).length&&delete b[EditorUi.DIFF_UPDATE]}return b};EditorUi.prototype.anonymizeAttributes=function(b,c){if(null!=b.attributes)for(var f=0;f<b.attributes.length;f++)"as"!=b.attributes[f].name&&
b.setAttribute(b.attributes[f].name,this.anonymizeString(b.attributes[f].value,c));if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)this.anonymizeAttributes(b.childNodes[f],c)};EditorUi.prototype.anonymizeNode=function(b,c){for(var f=b.getElementsByTagName("mxCell"),d=0;d<f.length;d++)null!=f[d].getAttribute("value")&&f[d].setAttribute("value","["+f[d].getAttribute("value").length+"]"),null!=f[d].getAttribute("xmlValue")&&f[d].setAttribute("xmlValue","["+f[d].getAttribute("xmlValue").length+
"]"),null!=f[d].getAttribute("style")&&f[d].setAttribute("style","["+f[d].getAttribute("style").length+"]"),null!=f[d].parentNode&&"root"!=f[d].parentNode.nodeName&&null!=f[d].parentNode.parentNode&&(f[d].setAttribute("id",f[d].parentNode.getAttribute("id")),f[d].parentNode.parentNode.replaceChild(f[d],f[d].parentNode));return b};EditorUi.prototype.synchronizeCurrentFile=function(b){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!b&&c.invalidChecksum?
-c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),b?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){c.handleFileError(b,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){c.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,d,e,g,k,m,
-v,x,A,z){g=null!=g?g:!0;k=null!=k?k:!1;var f=this.editor.graph;if(c||!b&&null!=x&&/(\.svg)$/i.test(x.getTitle())){var l=null!=f.themes&&"darkTheme"==f.defaultThemeName;A=!1;if(l||null!=this.pages&&this.currentPage!=this.pages[0]){var n=f.getGlobalVariable,f=this.createTemporaryGraph(f.getStylesheet()),p=this.pages[0];f.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:n.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(p.root)}}m=null!=m?m:this.getXmlFileData(g,
-k,A,z);x=null!=x?x:this.getCurrentFile();b=this.createFileData(m,f,x,window.location.href,b,c,d,e,g,v,A);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return b};EditorUi.prototype.getHtml=function(b,c,d,e,g,k){k=null!=k?k:!0;var f=null,l=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var f=k?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),n=c.view.scale;k=Math.floor(f.x/n-c.view.translate.x);n=Math.floor(f.y/n-c.view.translate.y);f=c.background;null==g&&
-(c=this.getBasenames().join(";"),0<c.length&&(l=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",k);b.setAttribute("y0",n)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit","0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=e&&b.setAttribute("edit",e));null!=g&&(g=g.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";e=Graph.compress(b);Graph.decompress(e)!=b&&(e=encodeURIComponent(b));return(null==
+c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),b?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){c.handleFileError(b,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){c.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,d,e,g,k,n,
+v,y,A,z){g=null!=g?g:!0;k=null!=k?k:!1;var f=this.editor.graph;if(c||!b&&null!=y&&/(\.svg)$/i.test(y.getTitle())){var l=null!=f.themes&&"darkTheme"==f.defaultThemeName;A=!1;if(l||null!=this.pages&&this.currentPage!=this.pages[0]){var m=f.getGlobalVariable,f=this.createTemporaryGraph(f.getStylesheet()),p=this.pages[0];f.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(p.root)}}n=null!=n?n:this.getXmlFileData(g,
+k,A,z);y=null!=y?y:this.getCurrentFile();b=this.createFileData(n,f,y,window.location.href,b,c,d,e,g,v,A);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return b};EditorUi.prototype.getHtml=function(b,c,d,e,g,k){k=null!=k?k:!0;var f=null,l=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var f=k?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),m=c.view.scale;k=Math.floor(f.x/m-c.view.translate.x);m=Math.floor(f.y/m-c.view.translate.y);f=c.background;null==g&&
+(c=this.getBasenames().join(";"),0<c.length&&(l=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",k);b.setAttribute("y0",m)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit","0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=e&&b.setAttribute("edit",e));null!=g&&(g=g.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";e=Graph.compress(b);Graph.decompress(e)!=b&&(e=encodeURIComponent(b));return(null==
g?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=g?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==g?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=g?'<meta http-equiv="refresh" content="0;URL=\''+g+"'\"/>\n":"")+"</head>\n<body"+(null==g&&null!=f&&f!=mxConstants.NONE?' style="background-color:'+f+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
e+"</div>\n</div>\n"+(null==g?'<script type="text/javascript" src="'+l+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+g+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,d,e,g){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=g&&(g=g.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
resize:!0,xml:Graph.zapGremlins(b),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==g?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=g?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==g?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=g?'<meta http-equiv="refresh" content="0;URL=\''+
g+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(b))+'"></div>\n'+(null==g?'<script type="text/javascript" src="'+c+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+g+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
function(b){b=this.validateFileData(b);this.pages=this.fileNode=this.currentPage=null;b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var c=Editor.extractParserError(b,mxResources.get("invalidOrMissingFile"));if(c)throw Error(mxResources.get("notADiagramFile")+" ("+c+")");c=null!=b?this.editor.extractGraphModel(b,!0):null;null!=c&&(b=c);if(null!=b&&"mxfile"==b.nodeName&&(c=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){var f=
null;this.fileNode=b;this.pages=[];for(var d=0;d<c.length;d++)null==c[d].getAttribute("id")&&c[d].setAttribute("id",d),b=new DiagramPage(c[d]),null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(b),null!=urlParams["page-id"]&&b.getId()==urlParams["page-id"]&&(f=b);this.currentPage=null!=f?f:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),
-this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");b={};for(d=0;d<e.length;d++)b[e[d]]=!0;for(var g=this.editor.graph.getModel(),k=g.getChildren(g.root),d=0;d<k.length;d++){var m=k[d];g.setVisible(m,b[m.id]||
-!1)}}catch(x){}};EditorUi.prototype.getBaseFilename=function(b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));/(\.drawio)$/i.test(c)&&(c=c.substring(0,c.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+
-this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(b,c,d,e,g,k,m,v,x,A,z,y){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(!g),l=f+("xml"==b||"pdf"==b&&z?".drawio":"")+"."+b;if("xml"==b){var n='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,g,null,null,null,c);this.saveData(l,b,n,"text/xml")}else if("html"==b)n=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(l,b,n,"text/html");else if("svg"!=
-b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?l=f+".png":"jpeg"==b&&(l=f+".jpg"),this.saveRequest(l,b,mxUtils.bind(this,function(c,f){try{var d=this.editor.graph.pageVisible;null!=k&&(this.editor.graph.pageVisible=k);var l=this.createDownloadRequest(c,b,e,f,m,g,v,x,A,z,y);this.editor.graph.pageVisible=d;return l}catch(O){this.handleError(O)}}));else{var p=null,t=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",b,"image/svg+xml"):
-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==b){var q=this.editor.graph.background;if(m||q==mxConstants.NONE)q=null;var u=this.editor.graph.getSvg(q,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(u);this.editor.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();t('<?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))})))}else l=f+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();t(b)}),e)}}catch(K){this.handleError(K)}};EditorUi.prototype.createDownloadRequest=function(b,c,d,e,g,k,m,v,x,A,z){var f=this.editor.graph,l=f.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==k?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var n="",p="";if(l.width*l.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==
-c&&(null!=z?p="&from="+z.from+"&to="+z.to:0==k&&(p="&allPages=1"));if("xmlpng"==c&&(A="1",c="png",null!=this.pages&&null!=this.currentPage))for(k=0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){n="&from="+k;break}k=f.background;"png"!=c&&"pdf"!=c||!g?g||null!=k&&k!=mxConstants.NONE||(k="#ffffff"):k=mxConstants.NONE;g={globalVars:f.getExportVariables()};x&&(g.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});Graph.translateDiagram&&(g.diagramLanguage=Graph.diagramLanguage);
-return new mxXmlRequest(EXPORT_URL,"format="+c+n+p+"&bg="+(null!=k?k:mxConstants.NONE)+"&base64="+e+"&embedXml="+A+"&xml="+encodeURIComponent(d)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(g))+(null!=m?"&scale="+m:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,d){var f=window.location.hash,e=mxUtils.bind(this,function(d){var e=null!=b.data?b.data:"";null!=d&&0<d.length&&
-(0<e.length&&(e+="\n"),e+=d);d=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return f};this.fileLoaded(d);"csv"==b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var l=null!=b.interval?parseInt(b.interval):6E4,n=null,g=mxUtils.bind(this,function(){var c=this.currentPage;
-mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){c===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),k()):this.handleError({message:mxResources.get("error")+" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),k=mxUtils.bind(this,function(){window.clearTimeout(n);n=window.setTimeout(g,l)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){k();
+this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");b={};for(d=0;d<e.length;d++)b[e[d]]=!0;for(var g=this.editor.graph.getModel(),k=g.getChildren(g.root),d=0;d<k.length;d++){var n=k[d];g.setVisible(n,b[n.id]||
+!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));/(\.drawio)$/i.test(c)&&(c=c.substring(0,c.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+
+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(b,c,d,e,g,k,n,v,y,A,z,x){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(!g),l=f+("xml"==b||"pdf"==b&&z?".drawio":"")+"."+b;if("xml"==b){var m='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,g,null,null,null,c);this.saveData(l,b,m,"text/xml")}else if("html"==b)m=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(l,b,m,"text/html");else if("svg"!=
+b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?l=f+".png":"jpeg"==b&&(l=f+".jpg"),this.saveRequest(l,b,mxUtils.bind(this,function(c,f){try{var d=this.editor.graph.pageVisible;null!=k&&(this.editor.graph.pageVisible=k);var l=this.createDownloadRequest(c,b,e,f,n,g,v,y,A,z,x);this.editor.graph.pageVisible=d;return l}catch(O){this.handleError(O)}}));else{var p=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",b,"image/svg+xml"):
+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==b){var t=this.editor.graph.background;if(n||t==mxConstants.NONE)t=null;var u=this.editor.graph.getSvg(t,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(u);this.editor.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q('<?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))})))}else l=f+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),e)}}catch(K){this.handleError(K)}};EditorUi.prototype.createDownloadRequest=function(b,c,d,e,g,k,n,v,y,A,z){var f=this.editor.graph,l=f.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==k?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var m="",p="";if(l.width*l.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==
+c&&(null!=z?p="&from="+z.from+"&to="+z.to:0==k&&(p="&allPages=1"));if("xmlpng"==c&&(A="1",c="png",null!=this.pages&&null!=this.currentPage))for(k=0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){m="&from="+k;break}k=f.background;"png"!=c&&"pdf"!=c||!g?g||null!=k&&k!=mxConstants.NONE||(k="#ffffff"):k=mxConstants.NONE;g={globalVars:f.getExportVariables()};y&&(g.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});Graph.translateDiagram&&(g.diagramLanguage=Graph.diagramLanguage);
+return new mxXmlRequest(EXPORT_URL,"format="+c+m+p+"&bg="+(null!=k?k:mxConstants.NONE)+"&base64="+e+"&embedXml="+A+"&xml="+encodeURIComponent(d)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(g))+(null!=n?"&scale="+n:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,d){var f=window.location.hash,e=mxUtils.bind(this,function(d){var e=null!=b.data?b.data:"";null!=d&&0<d.length&&
+(0<e.length&&(e+="\n"),e+=d);d=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return f};this.fileLoaded(d);"csv"==b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var l=null!=b.interval?parseInt(b.interval):6E4,m=null,g=mxUtils.bind(this,function(){var c=this.currentPage;
+mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){c===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),k()):this.handleError({message:mxResources.get("error")+" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),k=mxUtils.bind(this,function(){window.clearTimeout(m);m=window.setTimeout(g,l)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){k();
g()}));k();g()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){e(b)}),mxUtils.bind(this,function(b){null!=d&&d(b)})):e("")};EditorUi.prototype.updateDiagram=function(b){function c(b){var c=new mxCellOverlay(b.image||e.warningImage,b.tooltip,b.align,b.valign,b.offset);c.addListener(mxEvent.CLICK,function(c,f){d.alert(b.tooltip)});return c}var f=null,d=this;if(null!=b&&0<b.length&&(f=mxUtils.parseXml(b),b=null!=f?f.documentElement:null,null!=b&&"updates"==
-b.nodeName)){var e=this.editor.graph,g=e.getModel();g.beginUpdate();var k=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var m=g.getCell(b.getAttribute("id"));if(null!=m){try{var x=b.getAttribute("value");if(null!=x){var A=mxUtils.parseXml(x).documentElement;if(null!=A)if("1"==A.getAttribute("replace-value"))g.setValue(m,A);else for(var z=A.attributes,y=0;y<z.length;y++)e.setAttributeForCell(m,z[y].nodeName,0<z[y].nodeValue.length?z[y].nodeValue:null)}}catch(K){null!=window.console&&
-console.log("Error in value for "+m.id+": "+K)}try{var B=b.getAttribute("style");null!=B&&e.model.setStyle(m,B)}catch(K){null!=window.console&&console.log("Error in style for "+m.id+": "+K)}try{var C=b.getAttribute("icon");if(null!=C){var E=0<C.length?JSON.parse(C):null;null!=E&&E.append||e.removeCellOverlays(m);null!=E&&e.addCellOverlay(m,c(E))}}catch(K){null!=window.console&&console.log("Error in icon for "+m.id+": "+K)}try{var G=b.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),F=e.getCellGeometry(m);
-if(null!=F){F=F.clone();for(key in G){var D=parseFloat(G[key]);"dx"==key?F.x+=D:"dy"==key?F.y+=D:"dw"==key?F.width+=D:"dh"==key?F.height+=D:F[key]=parseFloat(G[key])}e.model.setGeometry(m,F)}}}catch(K){null!=window.console&&console.log("Error in icon for "+m.id+": "+K)}}}else if("model"==b.nodeName){for(var I=b.firstChild;null!=I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=I&&(new mxCodec(b.firstChild)).decode(I,g)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(e.view.scale=
+b.nodeName)){var e=this.editor.graph,g=e.getModel();g.beginUpdate();var k=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var n=g.getCell(b.getAttribute("id"));if(null!=n){try{var y=b.getAttribute("value");if(null!=y){var A=mxUtils.parseXml(y).documentElement;if(null!=A)if("1"==A.getAttribute("replace-value"))g.setValue(n,A);else for(var z=A.attributes,x=0;x<z.length;x++)e.setAttributeForCell(n,z[x].nodeName,0<z[x].nodeValue.length?z[x].nodeValue:null)}}catch(K){null!=window.console&&
+console.log("Error in value for "+n.id+": "+K)}try{var B=b.getAttribute("style");null!=B&&e.model.setStyle(n,B)}catch(K){null!=window.console&&console.log("Error in style for "+n.id+": "+K)}try{var C=b.getAttribute("icon");if(null!=C){var E=0<C.length?JSON.parse(C):null;null!=E&&E.append||e.removeCellOverlays(n);null!=E&&e.addCellOverlay(n,c(E))}}catch(K){null!=window.console&&console.log("Error in icon for "+n.id+": "+K)}try{var F=b.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),G=e.getCellGeometry(n);
+if(null!=G){G=G.clone();for(key in F){var D=parseFloat(F[key]);"dx"==key?G.x+=D:"dy"==key?G.y+=D:"dw"==key?G.width+=D:"dh"==key?G.height+=D:G[key]=parseFloat(F[key])}e.model.setGeometry(n,G)}}}catch(K){null!=window.console&&console.log("Error in icon for "+n.id+": "+K)}}}else if("model"==b.nodeName){for(var I=b.firstChild;null!=I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=I&&(new mxCodec(b.firstChild)).decode(I,g)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(e.view.scale=
parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(k=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):1);b=b.nextSibling}}finally{g.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return f};EditorUi.prototype.getCopyFilename=function(b,c){var f=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,
-d="",e=f.lastIndexOf(".");0<=e&&(d=f.substring(e),f=f.substring(0,e));if(c)var l=new Date,e=l.getFullYear(),g=l.getMonth()+1,k=l.getDate(),m=l.getHours(),A=l.getMinutes(),l=l.getSeconds(),f=f+(" "+(e+"-"+g+"-"+k+"-"+m+"-"+A+"-"+l));return f=mxResources.get("copyOf",[f])+d};EditorUi.prototype.fileLoaded=function(b,c){var f=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=f&&(EditorUi.debug("File.closed",[f]),f.removeListener(this.descriptorChangedListener),
+d="",e=f.lastIndexOf(".");0<=e&&(d=f.substring(e),f=f.substring(0,e));if(c)var l=new Date,e=l.getFullYear(),g=l.getMonth()+1,k=l.getDate(),n=l.getHours(),A=l.getMinutes(),l=l.getSeconds(),f=f+(" "+(e+"-"+g+"-"+k+"-"+n+"-"+A+"-"+l));return f=mxResources.get("copyOf",[f])+d};EditorUi.prototype.fileLoaded=function(b,c){var f=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=f&&(EditorUi.debug("File.closed",[f]),f.removeListener(this.descriptorChangedListener),
f.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=f&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!c&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));
this.editor.setStatus("");this.updateUi();c||this.showSplash()});if(null!=b)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(b);b.addListener("descriptorChanged",this.descriptorChangedListener);b.addListener("contentChanged",this.descriptorChangedListener);b.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
this.updateUi();b.isEditable()?b.isModified()?(b.addUnsavedStatus(),null!=b.backupPatch&&b.patch([b.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&
@@ -10554,26 +10568,26 @@ this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fi
mode:b.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){this.fileLoadedError=u;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=b?b.getHash():"none"),action:"message_"+u.message,label:"stack_"+u.stack})}catch(v){}var l=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):
null!=f?this.fileLoaded(f):e()});c?l():this.handleError(u,mxResources.get("errorLoadingFile"),l,!0,null,null,!0)}else e();return d};EditorUi.prototype.getHashValueForPages=function(b,c){var f=0,d=new mxGraphModel,e=new mxCodec;null!=c&&(c.byteCount=0,c.attrCount=0,c.eltCount=0,c.nodeCount=0);for(var l=0;l<b.length;l++){this.updatePageRoot(b[l]);var g=b[l].node.cloneNode(!1);g.removeAttribute("name");d.root=b[l].root;var k=e.encode(d);this.editor.graph.saveViewState(b[l].viewState,k,!0);k.removeAttribute("pageWidth");
k.removeAttribute("pageHeight");g.appendChild(k);null!=c&&(c.eltCount+=g.getElementsByTagName("*").length,c.nodeCount+=g.getElementsByTagName("mxCell").length);f=(f<<5)-f+this.hashValue(g,function(b,c,f,d){return!d||"mxGeometry"!=b.nodeName&&"mxPoint"!=b.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==b.nodeName&&"previous"==c?null:f:Math.round(f)},c)<<0}return f};EditorUi.prototype.hashValue=function(b,c,d){var f=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===
-typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(f^=this.hashValue(b.nodeName,c,d));if(null!=b.attributes){null!=d&&(d.attrCount+=b.attributes.length);for(var e=0;e<b.attributes.length;e++){var l=b.attributes[e].name,n=null!=c?c(b,l,b.attributes[e].value,!0):b.attributes[e].value;null!=n&&(f^=this.hashValue(l,c,d)+this.hashValue(n,c,d))}}if(null!=b.childNodes)for(e=0;e<b.childNodes.length;e++)f=(f<<5)-f+this.hashValue(b.childNodes[e],c,d)<<0}else if(null!=b&&"function"!==
-typeof b){b=String(b);c=0;null!=d&&(d.byteCount+=b.length);for(e=0;e<b.length;e++)c=(c<<5)-c+b.charCodeAt(e)<<0;f^=c}return f};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,d,e,g,k,m){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,
+typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(f^=this.hashValue(b.nodeName,c,d));if(null!=b.attributes){null!=d&&(d.attrCount+=b.attributes.length);for(var e=0;e<b.attributes.length;e++){var l=b.attributes[e].name,m=null!=c?c(b,l,b.attributes[e].value,!0):b.attributes[e].value;null!=m&&(f^=this.hashValue(l,c,d)+this.hashValue(m,c,d))}}if(null!=b.childNodes)for(e=0;e<b.childNodes.length;e++)f=(f<<5)-f+this.hashValue(b.childNodes[e],c,d)<<0}else if(null!=b&&"function"!==
+typeof b){b=String(b);c=0;null!=d&&(d.byteCount+=b.length);for(e=0;e<b.length;e++)c=(c<<5)-c+b.charCodeAt(e)<<0;f^=c}return f};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,d,e,g,k,n){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,
".scratchpad",mxUtils.bind(this,function(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var c=mxUtils.createXmlDocument(),f=c.createElement("mxlibrary");mxUtils.setTextContent(f,JSON.stringify(b));c.appendChild(f);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&
mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var c=this.sidebar.palettes[b];if(null!=c){for(var f=0;f<c.length;f++)c[f].parentNode.removeChild(c[f]);delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=function(b){var c=this.sidebar.container;if(null==b){var f=this.sidebar.palettes["L.scratchpad"];null==f&&(f=this.sidebar.palettes.search);null!=f&&(b=f[f.length-1].nextSibling)}b=null!=
b?b:c.firstChild.nextSibling.nextSibling;var f=c.lastChild,d=f.previousSibling;c.insertBefore(f,b);c.insertBefore(d,f)};EditorUi.prototype.loadLibrary=function(b,c){var f=mxUtils.parseXml(b.getData());if("mxlibrary"==f.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(f.documentElement));this.libraryLoaded(b,d,f.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=
-function(b,c,d,e){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var f=this.sidebar.palettes[b.getHash()],f=null!=f?f[f.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var l=null,n=mxUtils.bind(this,function(c,f){0==c.length&&b.isEditable()?(null==l&&(l=document.createElement("div"),l.className="geDropTarget",mxUtils.write(l,mxResources.get("dragElementsHere"))),f.appendChild(l)):this.addLibraryEntries(c,
-f)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);d=null!=d&&0<d.length?d:b.getTitle();var g=this.sidebar.addPalette(b.getHash(),d,null!=e?e:!0,mxUtils.bind(this,function(b){n(c,b)}));this.repositionLibrary(f);var k=g.parentNode.previousSibling;e=k.getAttribute("title");null!=e&&0<e.length&&".scratchpad"!=b.title&&k.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+e);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding=
-"8px";p.style.backgroundColor="inherit";k.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.cursor="pointer";m.style.margin="0 3px";var y=null;if(".scratchpad"!=b.title||this.closableScratchpad)p.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var f=mxUtils.bind(this,
-function(){this.closeLibrary(b)});null!=y?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f();mxEvent.consume(c)}}));if(b.isEditable()){var B=this.editor.graph,C=null,E=mxUtils.bind(this,function(f){this.showLibraryDialog(b.getTitle(),g,c,b,b.getMode());mxEvent.consume(f)}),G=mxUtils.bind(this,function(f){b.setModified(!0);b.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=m.cloneNode(!1),C.setAttribute("src",
-Editor.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="2px",C.style.marginTop="-2px",p.insertBefore(C,p.firstChild),k.style.paddingRight=18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&(C.parentNode.removeChild(C),k.style.paddingRight=18*p.childNodes.length+"px")})):null==y&&(y=m.cloneNode(!1),y.setAttribute("src",IMAGE_PATH+"/download.png"),y.setAttribute("title",mxResources.get("save")),
-p.insertBefore(y,p.firstChild),mxEvent.addListener(y,"click",mxUtils.bind(this,function(f){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==y||b.isModified()||(k.style.paddingRight=18*p.childNodes.length+"px",y.parentNode.removeChild(y),y=null)});mxEvent.consume(f)})),k.style.paddingRight=18*p.childNodes.length+"px")}),F=mxUtils.bind(this,function(b,f,d,e){b=B.cloneCells(mxUtils.sortCells(B.model.getTopmostCells(b)));for(var n=0;n<b.length;n++){var k=B.getCellGeometry(b[n]);
-null!=k&&k.translate(-f.x,-f.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(b,f.width,f.height,e||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),w:f.width,h:f.height};null!=e&&(b.title=e);c.push(b);G(d);null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)}),D=mxUtils.bind(this,function(b){if(B.isSelectionEmpty())B.getRubberband().isActive()?(B.getRubberband().execute(b),B.getRubberband().reset()):this.showError(mxResources.get("error"),
-mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=B.getSelectionCells(),f=B.view.getBounds(c),d=B.view.scale;f.x/=d;f.y/=d;f.width/=d;f.height/=d;f.x-=B.view.translate.x;f.y-=B.view.translate.y;F(c,f)}mxEvent.consume(b)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.panningManager&&null!=B.graphHandler.first&&(B.graphHandler.suspend(),null!=B.graphHandler.hint&&(B.graphHandler.hint.style.visibility="hidden"),g.style.backgroundColor=
+function(b,c,d,e){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var f=this.sidebar.palettes[b.getHash()],f=null!=f?f[f.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var l=null,m=mxUtils.bind(this,function(c,f){0==c.length&&b.isEditable()?(null==l&&(l=document.createElement("div"),l.className="geDropTarget",mxUtils.write(l,mxResources.get("dragElementsHere"))),f.appendChild(l)):this.addLibraryEntries(c,
+f)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);d=null!=d&&0<d.length?d:b.getTitle();var g=this.sidebar.addPalette(b.getHash(),d,null!=e?e:!0,mxUtils.bind(this,function(b){m(c,b)}));this.repositionLibrary(f);var k=g.parentNode.previousSibling;e=k.getAttribute("title");null!=e&&0<e.length&&".scratchpad"!=b.title&&k.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+e);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding=
+"8px";p.style.backgroundColor="inherit";k.style.position="relative";var n=document.createElement("img");n.setAttribute("src",Dialog.prototype.closeImage);n.setAttribute("title",mxResources.get("close"));n.setAttribute("valign","absmiddle");n.setAttribute("border","0");n.style.cursor="pointer";n.style.margin="0 3px";var x=null;if(".scratchpad"!=b.title||this.closableScratchpad)p.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var f=mxUtils.bind(this,
+function(){this.closeLibrary(b)});null!=x?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f();mxEvent.consume(c)}}));if(b.isEditable()){var B=this.editor.graph,C=null,E=mxUtils.bind(this,function(f){this.showLibraryDialog(b.getTitle(),g,c,b,b.getMode());mxEvent.consume(f)}),F=mxUtils.bind(this,function(f){b.setModified(!0);b.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=n.cloneNode(!1),C.setAttribute("src",
+Editor.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="2px",C.style.marginTop="-2px",p.insertBefore(C,p.firstChild),k.style.paddingRight=18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&(C.parentNode.removeChild(C),k.style.paddingRight=18*p.childNodes.length+"px")})):null==x&&(x=n.cloneNode(!1),x.setAttribute("src",IMAGE_PATH+"/download.png"),x.setAttribute("title",mxResources.get("save")),
+p.insertBefore(x,p.firstChild),mxEvent.addListener(x,"click",mxUtils.bind(this,function(f){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==x||b.isModified()||(k.style.paddingRight=18*p.childNodes.length+"px",x.parentNode.removeChild(x),x=null)});mxEvent.consume(f)})),k.style.paddingRight=18*p.childNodes.length+"px")}),G=mxUtils.bind(this,function(b,f,d,e){b=B.cloneCells(mxUtils.sortCells(B.model.getTopmostCells(b)));for(var m=0;m<b.length;m++){var k=B.getCellGeometry(b[m]);
+null!=k&&k.translate(-f.x,-f.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(b,f.width,f.height,e||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),w:f.width,h:f.height};null!=e&&(b.title=e);c.push(b);F(d);null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)}),D=mxUtils.bind(this,function(b){if(B.isSelectionEmpty())B.getRubberband().isActive()?(B.getRubberband().execute(b),B.getRubberband().reset()):this.showError(mxResources.get("error"),
+mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=B.getSelectionCells(),f=B.view.getBounds(c),d=B.view.scale;f.x/=d;f.y/=d;f.width/=d;f.height/=d;f.x-=B.view.translate.x;f.y-=B.view.translate.y;G(c,f)}mxEvent.consume(b)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.panningManager&&null!=B.graphHandler.first&&(B.graphHandler.suspend(),null!=B.graphHandler.hint&&(B.graphHandler.hint.style.visibility="hidden"),g.style.backgroundColor=
"#f1f3f4",g.style.cursor="copy",B.panningManager.stop(),B.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.panningManager&&null!=B.graphHandler&&(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,B.panningManager.stop(),B.graphHandler.reset(),B.isMouseDown=!1,B.autoScroll=!0,D(b),mxEvent.consume(b))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.graphHandler.first&&(B.graphHandler.resume(),
null!=B.graphHandler.hint&&(B.graphHandler.hint.style.visibility="visible"),g.style.backgroundColor="",g.style.cursor="",B.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(b){g.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(b){g.style.cursor="";g.style.backgroundColor="";0<b.dataTransfer.files.length&&
-this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(f,d,e,k,p,m,t,q,y){if(null!=f&&"image/"==d.substring(0,6))f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(f),f=[new mxCell("",new mxGeometry(0,0,p,m),f)],f[0].vertex=!0,F(f,new mxRectangle(0,0,p,m),b,mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),
-l=null);else{var u=!1,v=mxUtils.bind(this,function(f,d){if(null!=f&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(f);null!=e&&0<e.length&&(f=e)}if(null!=f)if(e=mxUtils.parseXml(f),"mxlibrary"==e.documentElement.nodeName)try{var k=JSON.parse(mxUtils.getTextContent(e.documentElement));n(k,g);c=c.concat(k);G(b);this.spinner.stop();u=!0}catch(N){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),k=0;k<p.length;k++){var m=this.stringToCells(Editor.getDiagramNodeXml(p[k])),
-t=this.editor.graph.getBoundingBoxFromGeometry(m);F(m,new mxRectangle(0,0,t.width,t.height),b)}u=!0}catch(N){null!=window.console&&console.log("error in drop handler:",N)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)});null!=y&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(y,function(b){v(b,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(f,t)&&null!=y?this.parseFile(y,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?v(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):v(f,d)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"dragleave",function(b){g.style.cursor="";g.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));
-m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));p.insertBefore(m,p.firstChild);mxEvent.addListener(m,"click",E);mxEvent.addListener(g,"dblclick",function(b){mxEvent.getSource(b)==g&&E(b)});e=m.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));p.insertBefore(e,p.firstChild);mxEvent.addListener(e,"click",D);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),
+this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(f,d,e,k,p,n,q,t,x){if(null!=f&&"image/"==d.substring(0,6))f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(f),f=[new mxCell("",new mxGeometry(0,0,p,n),f)],f[0].vertex=!0,G(f,new mxRectangle(0,0,p,n),b,mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),
+l=null);else{var u=!1,B=mxUtils.bind(this,function(f,d){if(null!=f&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(f);null!=e&&0<e.length&&(f=e)}if(null!=f)if(e=mxUtils.parseXml(f),"mxlibrary"==e.documentElement.nodeName)try{var k=JSON.parse(mxUtils.getTextContent(e.documentElement));m(k,g);c=c.concat(k);F(b);this.spinner.stop();u=!0}catch(N){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),k=0;k<p.length;k++){var n=this.stringToCells(Editor.getDiagramNodeXml(p[k])),
+q=this.editor.graph.getBoundingBoxFromGeometry(n);G(n,new mxRectangle(0,0,q.width,q.height),b)}u=!0}catch(N){null!=window.console&&console.log("error in drop handler:",N)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)});null!=x&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(x,function(b){B(b,"text/xml")},null,q):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(f,q)&&null!=x?this.parseFile(x,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?B(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):B(f,d)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"dragleave",function(b){g.style.cursor="";g.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));
+n=n.cloneNode(!1);n.setAttribute("src",Editor.editImage);n.setAttribute("title",mxResources.get("edit"));p.insertBefore(n,p.firstChild);mxEvent.addListener(n,"click",E);mxEvent.addListener(g,"dblclick",function(b){mxEvent.getSource(b)==g&&E(b)});e=n.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));p.insertBefore(e,p.firstChild);mxEvent.addListener(e,"click",D);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),
e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(b)})),p.insertBefore(e,p.firstChild))}k.appendChild(p);k.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var f=0;f<b.length;f++){var d=b[f],e=d.data;if(null!=e){var e=this.convertDataUri(e),
l="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(l+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(l+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(Graph.decompress(d.xml)),0<e.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(e,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.main:null};EditorUi.prototype.footerHeight=
0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):
@@ -10584,164 +10598,155 @@ Editor.sketchFontFamily,Graph.prototype.defaultVertexStyle.fontSource=Editor.ske
function(b,c,d,e,g){b=new ImageDialog(this,b,c,d,e,g);this.showDialog(b.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,c){if(!c){var f=new ChangePageSetup(this,null,b);f.ignoreColor=!0;this.editor.graph.model.execute(f)}});var f=new BackgroundImageDialog(this,b,c);this.showDialog(f.container,360,200,!0,!0);f.init()};EditorUi.prototype.showLibraryDialog=function(b,c,d,
e,g){b=new LibraryDialog(this,b,c,d,e,g);this.showDialog(b.container,640,440,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var d=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var c=d.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var b=
this.createDiv("geSidebarContainer geSidebarFooter");b.style.position="absolute";b.style.overflow="hidden";var c=document.createElement("a");c.className="geTitle";c.style.color="#DF6C0C";c.style.fontWeight="bold";c.style.height="100%";c.style.paddingTop="9px";c.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));
-mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,d,e,g,k,m){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{m?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,
-b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(C){}if(null!=l||null!=c){m=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok"),p=null;c=null!=c?c:mxResources.get("error");if(null!=l){null!=l.retry&&(n=mxResources.get("cancel"),p=function(){f();l.retry()});if(404==l.code||404==l.status||403==l.code){m=403==l.code?null!=l.message?mxUtils.htmlEntities(l.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=g?g:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
-(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var t=null!=g?null:null!=k?k:window.location.hash;if(null!=t&&("#G"==t.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==t.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==l.code||404==l.status)){t="#U"==t.substring(0,
-2)?t.substring(45,t.lastIndexOf("%26ex")):t.substring(2);this.showError(c,m,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+t);this.handleError(b,c,d,e,g)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){e.innerHTML="";for(var b=0;b<c.length;b++){var f=document.createElement("option");mxUtils.write(f,c[b].displayName);f.value=b;e.appendChild(f);f=document.createElement("option");f.innerHTML="&nbsp;&nbsp;&nbsp;";
+mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,d,e,g,k,n){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{n?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,
+b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(C){}if(null!=l||null!=c){n=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok"),p=null;c=null!=c?c:mxResources.get("error");if(null!=l){null!=l.retry&&(m=mxResources.get("cancel"),p=function(){f();l.retry()});if(404==l.code||404==l.status||403==l.code){n=403==l.code?null!=l.message?mxUtils.htmlEntities(l.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=g?g:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=g?null:null!=k?k:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==l.code||404==l.status)){q="#U"==q.substring(0,
+2)?q.substring(45,q.lastIndexOf("%26ex")):q.substring(2);this.showError(c,n,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,d,e,g)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){e.innerHTML="";for(var b=0;b<c.length;b++){var f=document.createElement("option");mxUtils.write(f,c[b].displayName);f.value=b;e.appendChild(f);f=document.createElement("option");f.innerHTML="&nbsp;&nbsp;&nbsp;";
mxUtils.write(f,"<"+c[b].email+">");f.setAttribute("disabled","disabled");e.appendChild(f)}f=document.createElement("option");mxUtils.write(f,mxResources.get("addAccount"));f.value=c.length;e.appendChild(f)}var c=this.drive.getUsersList(),f=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");f.appendChild(d);var e=document.createElement("select");e.style.width="200px";b();mxEvent.addListener(e,"change",mxUtils.bind(this,
function(){var f=e.value,d=c.length!=f;d&&this.drive.setUser(c[f]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(c=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));f.appendChild(e);f=new CustomDialog(this,f,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(f.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=l.message?
-m=""==l.message&&null!=l.name?mxUtils.htmlEntities(l.name):mxUtils.htmlEntities(l.message):null!=l.response&&null!=l.response.error?m=mxUtils.htmlEntities(l.response.error):"undefined"!==typeof window.App&&(l.code==App.ERROR_TIMEOUT?m=mxUtils.htmlEntities(mxResources.get("timeout")):l.code==App.ERROR_BUSY?m=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof l&&0<l.length&&(m=mxUtils.htmlEntities(l)))}var q=k=null;null!=l&&null!=l.helpLink&&(k=mxResources.get("help"),q=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(l.helpLink)}));this.showError(c,m,n,d,p,null,null,k,q,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(b,c,d){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,d||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,d,e,g,k){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){f();
+n=""==l.message&&null!=l.name?mxUtils.htmlEntities(l.name):mxUtils.htmlEntities(l.message):null!=l.response&&null!=l.response.error?n=mxUtils.htmlEntities(l.response.error):"undefined"!==typeof window.App&&(l.code==App.ERROR_TIMEOUT?n=mxUtils.htmlEntities(mxResources.get("timeout")):l.code==App.ERROR_BUSY?n=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof l&&0<l.length&&(n=mxUtils.htmlEntities(l)))}var t=k=null;null!=l&&null!=l.helpLink&&(k=mxResources.get("help"),t=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(l.helpLink)}));this.showError(c,n,m,d,p,null,null,k,t,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(b,c,d){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,d||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,d,e,g,k){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){f();
null!=c&&c()},function(){f();null!=d&&d()},e,g,null,null,null,null,l);this.showDialog(b.container,340,46+l,!0,k);b.init()};EditorUi.prototype.showBanner=function(b,c,d,e){var f=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var l=document.createElement("div");l.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(l.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(l.style,"transition","all 1s ease");l.className="geBtn gePrimaryBtn";f=document.createElement("img");f.setAttribute("src",IMAGE_PATH+"/logo.png");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";l.appendChild(f);
f=document.createElement("img");f.setAttribute("src",Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get(e?"doNotShowAgain":"close"));f.setAttribute("border","0");f.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";l.appendChild(f);mxUtils.write(l,c);document.body.appendChild(l);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var g=document.createElement("input");
-g.setAttribute("type","checkbox");g.setAttribute("id","geDoNotShowAgainCheckbox");g.style.marginRight="6px";if(!e){c.appendChild(g);var n=document.createElement("label");n.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(n,mxResources.get("doNotShowAgain"));c.appendChild(n);l.style.paddingBottom="30px";l.appendChild(c)}var k=mxUtils.bind(this,function(){null!=l.parentNode&&(l.parentNode.removeChild(l),this.bannerShowing=!1,g.checked||e)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);k()}));var p=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k()}),1E3)});mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);c!=g&&c!=n?(null!=d&&d(),k(),mxEvent.consume(b)):p()}));window.setTimeout(mxUtils.bind(this,
+g.setAttribute("type","checkbox");g.setAttribute("id","geDoNotShowAgainCheckbox");g.style.marginRight="6px";if(!e){c.appendChild(g);var m=document.createElement("label");m.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(m,mxResources.get("doNotShowAgain"));c.appendChild(m);l.style.paddingBottom="30px";l.appendChild(c)}var k=mxUtils.bind(this,function(){null!=l.parentNode&&(l.parentNode.removeChild(l),this.bannerShowing=!1,g.checked||e)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=
+mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);k()}));var p=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k()}),1E3)});mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);c!=g&&c!=m?(null!=d&&d(),k(),mxEvent.consume(b)):p()}));window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(p,3E4);f=!0}return f};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,d,e){b=b.toDataURL("image/"+d);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,
"tEXt","mxfile",encodeURIComponent(c))),0<e&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",e));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,d,e,g){var f="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+(null!=c?".drawio":"")+"."+f;b=this.createImageDataUri(b,c,d,g);this.saveData(e,f,b.substring(b.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var f=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));f.textarea.style.width="600px";f.textarea.style.height="380px";this.showDialog(f.container,620,460,!0,!0,null,null,null,null,!0);f.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,d,e,
g,k){"text/xml"!=d||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=k?k:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=e?this.base64ToBlob(b,d):new Blob([b],{type:d}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(b,!0):(d.document.write(b),d.document.close(),d.document.execCommand("SaveAs",!0,c),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
null==d||"image/"!=d.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewWindow(b,d,e);else{var f=document.createElement("a");k=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof f.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var l=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);k=65==(l?parseInt(l[2],10):!1)?!1:k}if(k||this.isOffline()){f.href=URL.createObjectURL(e?this.base64ToBlob(b,d):new Blob([b],{type:d}));k?f.download=c:f.setAttribute("target",
-"_blank");document.body.appendChild(f);try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},2E4),f.click(),f.parentNode.removeChild(f)}catch(x){}}else this.createEchoRequest(b,c,d,e,g).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,d,e,g,k){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=d?"&mime="+d:"")+(null!=g?"&format="+g:"")+(null!=k?"&base64="+k:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
-function(b,c){c=c||"";for(var f=atob(b),d=f.length,e=Math.ceil(d/1024),l=Array(e),g=0;g<e;++g){for(var k=1024*g,m=Math.min(k+1024,d),A=Array(m-k),z=0;k<m;++z,++k)A[z]=f[k].charCodeAt(0);l[g]=new Uint8Array(A)}return new Blob(l,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,d,e,g,k,m,v){k=null!=k?k:!1;m=null!=m?m:"vsdx"!=g&&(!mxClient.IS_IOS||!navigator.standalone);g=this.getServiceCount(k);isLocalStorage&&g++;var f=4>=g?2:6<g?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(c,f){try{if("_blank"==
+"_blank");document.body.appendChild(f);try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},2E4),f.click(),f.parentNode.removeChild(f)}catch(y){}}else this.createEchoRequest(b,c,d,e,g).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,d,e,g,k){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=d?"&mime="+d:"")+(null!=g?"&format="+g:"")+(null!=k?"&base64="+k:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
+function(b,c){c=c||"";for(var f=atob(b),d=f.length,e=Math.ceil(d/1024),l=Array(e),g=0;g<e;++g){for(var k=1024*g,n=Math.min(k+1024,d),A=Array(n-k),z=0;k<n;++z,++k)A[z]=f[k].charCodeAt(0);l[g]=new Uint8Array(A)}return new Blob(l,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,d,e,g,k,n,v){k=null!=k?k:!1;n=null!=n?n:"vsdx"!=g&&(!mxClient.IS_IOS||!navigator.standalone);g=this.getServiceCount(k);isLocalStorage&&g++;var f=4>=g?2:6<g?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(c,f){try{if("_blank"==
f)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(b,d,e);else if(null!=d&&"text/html"==d.substring(0,9)){var l=new EmbedDialog(this,b);this.showDialog(l.container,440,240,!0,!0);l.init()}else{var g=window.open("about:blank");null==g?mxUtils.popup(b,!0):(g.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),g.document.close())}else f==App.MODE_DEVICE||"download"==f?this.doSaveLocalFile(b,c,d,e,null,v):null!=c&&0<c.length&&this.pickFolder(f,mxUtils.bind(this,function(l){try{this.exportFile(b,
-c,d,e,f,l)}catch(E){this.handleError(E)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,m,null,1<g,f,b,d,e);k=this.isServices(g)?g>f?390:270:160;this.showDialog(c.container,400,k,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,d){var f=window.open("about:blank");null==f||null==f.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?f.document.write("<html>"+
+c,d,e,f,l)}catch(E){this.handleError(E)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,n,null,1<g,f,b,d,e);k=this.isServices(g)?g>f?390:270:160;this.showDialog(c.container,400,k,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,d){var f=window.open("about:blank");null==f||null==f.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?f.document.write("<html>"+
b+"</html>"):(b=d?b:btoa(unescape(encodeURIComponent(b))),f.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+b+'"/></html>')):f.document.write("<html><pre>"+mxUtils.htmlEntities(b,!1)+"</pre></html>"),f.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};
-EditorUi.prototype.createTagsDialog=function(b,c){function f(){for(var b=l.getSelectionCells(),c=[],f=0;f<b.length;f++)l.isCellVisible(b[f])&&c.push(b[f]);l.setSelectionCells(c)}function d(b){l.hiddenTags=b?[]:k.slice();f();l.refresh()}function e(b,e){A.innerHTML="";if(0<b.length){var g=document.createElement("table");g.setAttribute("cellpadding","2");g.style.boxSizing="border-box";g.style.tableLayout="fixed";g.style.width="100%";var n=document.createElement("tbody");if(null!=b&&0<b.length)for(var p=
-0;p<b.length;p++)(function(b){function g(){var c=k.slice(),d=mxUtils.indexOf(c,b);c.splice(d,1);l.hiddenTags=c;f();l.refresh()}function p(){var c=l.getCellsForTags([b],null,null,!0);l.isEnabled()?l.setSelectionCells(c):l.highlightCells(c)}var m=0>mxUtils.indexOf(l.hiddenTags,b),q=document.createElement("tr"),y=document.createElement("td");y.style.align="center";y.style.width="16px";var t=document.createElement("img");t.setAttribute("src",m?Editor.visibleImage:Editor.hiddenImage);t.setAttribute("title",
-mxResources.get(m?"hideIt":"show",[b]));mxUtils.setOpacity(t,m?75:25);t.style.verticalAlign="middle";t.style.cursor="pointer";t.style.width="16px";if(c||Editor.isDarkMode())t.style.filter="invert(100%)";y.appendChild(t);mxEvent.addListener(t,"click",function(c){var e=mxUtils.indexOf(l.hiddenTags,b);mxEvent.isShiftDown(c)?d(0<=mxUtils.indexOf(l.hiddenTags,b)):(0>e?l.hiddenTags.push(b):0<=e&&l.hiddenTags.splice(e,1),f(),l.refresh());mxEvent.consume(c)});mxEvent.addListener(t,"dblclick",function(b){mxEvent.isShiftDown(b)||
-(!m&&0<l.hiddenTags.length?d(!0):g());mxEvent.consume(b)});q.appendChild(y);y=document.createElement("td");y.style.overflow="hidden";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.verticalAlign="middle";y.style.cursor="pointer";y.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,m?100:40);y.appendChild(a);mxEvent.addListener(y,"click",function(b){mxEvent.isShiftDown(b)?(d(!0),
-p()):m&&0<l.hiddenTags.length?d(!0):g();mxEvent.consume(b)});mxEvent.addListener(y,"dblclick",function(b){d(!0);p();mxEvent.consume(b)});q.appendChild(y);if(l.isEnabled()){y=document.createElement("td");y.style.verticalAlign="middle";y.style.textAlign="center";y.style.width="18px";if(null==e){y.style.align="center";y.style.width="16px";t=document.createElement("img");t.setAttribute("src",Editor.clearImage);t.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(t,m?75:25);t.style.verticalAlign=
-"middle";t.style.cursor="pointer";t.style.width="16px";if(c||Editor.isDarkMode())t.style.filter="invert(100%)";mxEvent.addListener(t,"click",function(c){var f=mxUtils.indexOf(k,b);0<=f&&k.splice(f,1);l.removeTagsForCells(l.model.getDescendants(l.model.getRoot()),[b]);l.refresh();mxEvent.consume(c)});y.appendChild(t)}else{var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.margin="0px";u.defaultChecked=null!=e&&0<=mxUtils.indexOf(e,b);u.checked=u.defaultChecked;u.style.background=
-"transparent";u.setAttribute("title",mxResources.get(u.defaultChecked?"removeIt":"add",[b]));mxEvent.addListener(u,"change",function(c){u.checked?l.addTagsForCells(l.getSelectionCells(),[b]):l.removeTagsForCells(l.getSelectionCells(),[b]);mxEvent.consume(c)});y.appendChild(u)}q.appendChild(y)}n.appendChild(q)})(b[p]);g.appendChild(n);A.appendChild(g)}}var l=this.editor.graph,g=this,k=l.hiddenTags.slice(),m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding=
-"10px";m.style.height="100%";var A=document.createElement("div");A.style.boxSizing="border-box";A.style.borderRadius="4px";A.style.userSelect="none";A.style.overflow="auto";A.style.position="absolute";A.style.left="10px";A.style.right="10px";A.style.top="10px";A.style.border=l.isEnabled()?"1px solid #808080":"none";A.style.bottom=l.isEnabled()?"48px":"10px";m.appendChild(A);var z=mxUtils.button(mxResources.get("reset"),function(b){l.hiddenTags=[];mxEvent.isShiftDown(b)||(k=l.hiddenTags.slice());f();
-l.refresh()});z.setAttribute("title",mxResources.get("reset"));z.className="geBtn";z.style.marginRight="4px";z.marginTop="8px";var y=mxUtils.button(mxResources.get("add"),function(){if(l.isEnabled()){var b=new FilenameDialog(g,"",mxResources.get("add"),function(b){g.hideDialog();if(null!=b&&0<b.length){b=b.split(" ");for(var c=[],f=0;f<b.length;f++){var d=mxUtils.trim(b[f]);""!=d&&0>mxUtils.indexOf(k,d)&&c.push(d)}0<c.length&&(l.isSelectionEmpty()?(k=k.concat(c),B()):l.addTagsForCells(l.getSelectionCells(),
-c))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");g.showDialog(b.container,300,80,!0,!0);b.init()}});y.setAttribute("title",mxResources.get("add"));y.className="geBtn";y.marginTop="4px";l.addListener(mxEvent.ROOT,function(){k=l.hiddenTags.slice()});var B=mxUtils.bind(this,function(c,f){if(b()){for(var d=l.getAllTags(),g=0;g<d.length;g++)0>mxUtils.indexOf(k,d[g])&&k.push(d[g]);k.sort();l.isSelectionEmpty()?e(k):e(k,l.getCommonTagsForCells(l.getSelectionCells()))}});l.selectionModel.addListener(mxEvent.CHANGE,
-B);l.model.addListener(mxEvent.CHANGE,B);l.addListener(mxEvent.REFRESH,B);var C=document.createElement("div");C.style.boxSizing="border-box";C.style.whiteSpace="nowrap";C.style.position="absolute";C.style.overflow="hidden";C.style.bottom="0px";C.style.height="42px";C.style.right="10px";C.style.left="10px";l.isEnabled()&&(C.appendChild(z),C.appendChild(y),m.appendChild(C));return{div:m,refresh:B}};EditorUi.prototype.addChromelessToolbarItems=function(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=
-null;var f=b(mxUtils.bind(this,function(b){null==this.tagsComponent&&(this.tagsComponent=this.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height=
-"auto");if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var c=f.getBoundingClientRect();mxUtils.setPrefixedStyle(this.tagsDialog.style,"borderRadius","5px");this.tagsDialog.style.position="fixed";this.tagsDialog.style.fontFamily=
-"Helvetica,Arial";this.tagsDialog.style.backgroundColor="#000000";this.tagsDialog.style.color="#ffffff";mxUtils.setOpacity(this.tagsDialog,70);this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh()}mxEvent.consume(b)}),Editor.tagsLargeImage,
-mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();f.style.display=0<b.length?"":"none"}));c.apply(this,arguments)}if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var d=b(mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);else{this.exportDialog=document.createElement("div");var f=d.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding=
-"4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=f.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=f.zIndex;var e=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});e.spin(this.exportDialog);
-this.editor.exportToCanvas(mxUtils.bind(this,function(b){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var f=this.createImageDataUri(b,null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",f);this.exportDialog.appendChild(b);
-mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.openInNewWindow(f.substring(f.indexOf(",")+1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),Editor.cameraLargeImage,mxResources.get("export"))}};EditorUi.prototype.saveData=
-function(b,c,d,e,g){this.isLocalFileSave()?this.saveLocalFile(d,b,e,g,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,f){return this.createEchoRequest(d,b,e,g,c,f)}),d,g,e)};EditorUi.prototype.saveRequest=function(b,c,d,e,g,k,m){m=null!=m?m:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);isLocalStorage&&f++;var l=4>=f?2:6<f?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,f){if("_blank"==f||null!=b&&0<b.length){var l=d("_blank"==f?null:b,f==App.MODE_DEVICE||"download"==
-f||null==f||"_blank"==f?"0":"1");null!=l&&(f==App.MODE_DEVICE||"download"==f||"_blank"==f?l.simulate(document,"_blank"):this.pickFolder(f,mxUtils.bind(this,function(d){k=null!=k?k:"pdf"==c?"application/pdf":"image/"+c;if(null!=e)try{this.exportFile(e,b,k,!0,f,d)}catch(C){this.handleError(C)}else this.spinner.spin(document.body,mxResources.get("saving"))&&l.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=l.getStatus()&&299>=l.getStatus())try{this.exportFile(l.getText(),b,k,!0,f,d)}catch(C){this.handleError(C)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,m,null,1<f,l,e,k,g);f=this.isServices(f)?4<f?390:270:160;this.showDialog(b.container,380,f,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,d,e,g,k){};EditorUi.prototype.pickFolder=function(b,
-c,d){c(null)};EditorUi.prototype.exportSvg=function(b,c,d,e,g,k,m,v,x,A,z,y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var f=this.editor.graph.isSelectionEmpty();d=null!=d?d:f;var l=c?null:this.editor.graph.background;l==mxConstants.NONE&&(l=null);null==l&&0==c&&(l=z?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var n=this.editor.graph.getSvg(l,b,m,v,null,d,null,null,"blank"==A?"_blank":"self"==A?"_top":null,null,!0,z,y);e&&this.editor.graph.addSvgShadow(n);var p=
-this.getBaseFilename()+(g?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();g&&b.setAttribute("content",this.getFileData(!0,null,null,null,d,x,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(b);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(n);this.editor.graph.mathEnabled&&this.editor.addMathCss(n);k?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(n,q,this.thumbImageCache)):q(n)}catch(D){this.handleError(D)}};EditorUi.prototype.addRadiobox=function(b,c,d,e,g,k,m){return this.addCheckbox(b,d,e,g,k,m,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,d,e,g,k,m,v){k=null!=k?k:!0;var f=document.createElement("input");
-f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",m?"radio":"checkbox");m="geCheckbox-"+Editor.guid();f.id=m;null!=v&&f.setAttribute("name",v);d&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);e&&f.setAttribute("disabled","disabled");k&&(b.appendChild(f),d=document.createElement("label"),mxUtils.write(d,c),d.setAttribute("for",m),b.appendChild(d),g||mxUtils.br(b));return f};EditorUi.prototype.addEditButton=function(b,c){var f=this.addCheckbox(b,mxResources.get("edit")+
-":",!0,null,!0);f.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var l=document.createElement("select");l.style.width="120px";l.style.marginLeft="8px";l.style.marginRight="10px";l.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));l.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,
-mxResources.get("custom")+"...");l.appendChild(d);b.appendChild(l);mxEvent.addListener(l,"change",mxUtils.bind(this,function(){if("custom"==l.value){var b=new FilenameDialog(this,e,mxResources.get("ok"),function(b){null!=b?e=b:l.value="blank"},mxResources.get("url"),null,null,null,null,function(){l.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(f,"change",mxUtils.bind(this,function(){f.checked&&(null==c||c.checked)?l.removeAttribute("disabled"):l.setAttribute("disabled",
-"disabled")}));mxUtils.br(b);return{getLink:function(){return f.checked?"blank"===l.value?"_blank":e:null},getEditInput:function(){return f},getEditSelect:function(){return l}}};EditorUi.prototype.addLinkSection=function(b,c){function f(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=l&&l!=mxConstants.NONE?"border:1px solid black;background-color:"+l:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+
-"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");
-e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);c&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));b.appendChild(d);mxUtils.write(b,mxResources.get("borderColor")+":");var l="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(l||"none",function(b){l=b;f()});mxEvent.consume(b)}));f();g.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width="22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";b.appendChild(g);mxUtils.br(b);return{getColor:function(){return l},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,d,e,g,k,m){m=null!=m?m:[];e&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&
-"1"!=urlParams.dev||m.push("lightbox=1"),"auto"!=b&&m.push("target="+b),null!=c&&c!=mxConstants.NONE&&m.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=g&&0<g.length&&m.push("edit="+encodeURIComponent(g)),k&&m.push("layers=1"),this.editor.graph.foldingEnabled&&m.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&m.push("page-id="+this.currentPage.getId());return m};EditorUi.prototype.createLink=function(b,c,d,e,g,k,m,v,x,A){x=this.createUrlParameters(b,
-c,d,e,g,k,x);b=this.getCurrentFile();c=!0;null!=m?d="#U"+encodeURIComponent(m):(b=this.getCurrentFile(),v||null==b||b.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=this.defaultFilename&&x.push("title="+encodeURIComponent(b.getTitle()));A&&1<d.length&&(x.push("open="+d.substring(1)),d="");return(e&&
-"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<x.length?"?"+x.join("&"):"")+d};EditorUi.prototype.createHtml=function(b,c,d,e,g,k,m,v,x,A,z){this.getBasenames();var f={};""!=g&&g!=mxConstants.NONE&&(f.highlight=g);"auto"!==e&&(f.target=e);x||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(f.zoom=d/100);d=[];m&&(d.push("pages"),
-f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(d.push("zoom"),f.resize=!0);v&&d.push("layers");0<d.length&&(x&&d.push("lightbox"),f.toolbar=d.join(" "));null!=A&&0<A.length&&(f.edit=A);null!=b?f.url=b:f.xml=this.getFileData(!0,null,null,null,null,!m);c='<div class="mxgraph" style="'+(k?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+'"></div>';b=null!=b?"&fetch="+
-encodeURIComponent(b):"";z(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,
-mxResources.get("html"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");l=k.cloneNode(!0);l.setAttribute("value",
-"copy");g.appendChild(l);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(n);mxUtils.br(g);g.appendChild(k);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));g.appendChild(n);var p=this.getCurrentFile();null==d&&null!=p&&p.constructor==window.DriveFile&&(n=document.createElement("a"),n.style.paddingLeft="12px",n.style.color="gray",n.style.cursor="pointer",mxUtils.write(n,mxResources.get("share")),g.appendChild(n),
-mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));l.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");f.appendChild(g);var m=this.addLinkSection(f),y=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var B=document.createElement("input");B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value=
-"100%";f.appendChild(B);var C=this.addCheckbox(f,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(f,mxResources.get("allPages"),g,!g),G=this.addCheckbox(f,mxResources.get("layers"),!0),F=this.addCheckbox(f,mxResources.get("lightbox"),!0),D=this.addEditButton(f,F),I=D.getEditInput();I.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");I.checked&&F.checked?D.getEditSelect().removeAttribute("disabled"):
-D.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(k.checked?d:null,y.checked,B.value,m.getTarget(),m.getColor(),C.checked,E.checked,G.checked,F.checked,D.getLink())}),null,b,c);this.showDialog(b.container,340,380,!0,!0);l.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,d,e,g,k){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,b||mxResources.get("link"));l.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var n=this.getCurrentFile(),l="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=n&&n.constructor==window.DriveFile&&!c){b=80;var l="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var m=document.createElement("div");
-m.style.whiteSpace="normal";mxUtils.write(m,mxResources.get("linkAccountRequired"));p.appendChild(m);m=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(n.getId())}));m.style.marginTop="12px";m.className="geBtn";p.appendChild(m);f.appendChild(p);m=document.createElement("a");m.style.paddingLeft="12px";m.style.color="gray";m.style.fontSize="11px";m.style.cursor="pointer";mxUtils.write(m,mxResources.get("check"));p.appendChild(m);mxEvent.addListener(m,"click",
-mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var y=null,q=null;if(null!=d||null!=e)b+=30,mxUtils.write(f,mxResources.get("width")+":"),y=document.createElement("input"),y.setAttribute("type","text"),
-y.style.marginRight="16px",y.style.width="50px",y.style.marginLeft="6px",y.style.marginRight="16px",y.style.marginBottom="10px",y.value="100%",f.appendChild(y),mxUtils.write(f,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=e+"px",f.appendChild(q),mxUtils.br(f);var t=this.addLinkSection(f,k);d=null!=this.pages&&1<this.pages.length;var E=null;if(null==n||n.constructor!=window.DriveFile||
-c)E=this.addCheckbox(f,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(f,mxResources.get("lightbox"),!0,null,null,!k),F=this.addEditButton(f,G),D=F.getEditInput();k&&(D.style.marginLeft=G.style.marginLeft,G.style.display="none",b-=30);var I=this.addCheckbox(f,mxResources.get("layers"),!0);I.style.marginLeft=D.style.marginLeft;I.style.marginTop="8px";var K=this.addCheckbox(f,mxResources.get("tags"),!0);K.style.marginLeft=D.style.marginLeft;K.style.marginBottom="16px";K.style.marginTop="16px";
-mxEvent.addListener(G,"change",function(){G.checked?(I.removeAttribute("disabled"),D.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"));D.checked&&G.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){g(t.getTarget(),t.getColor(),null==E?!0:E.checked,G.checked,F.getLink(),I.checked,null!=y?y.value:null,null!=q?q.value:null,K.checked)}),
-null,mxResources.get("create"),l);this.showDialog(c.container,340,300+b,!0,!0);null!=y?(y.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?y.select():document.execCommand("selectAll",!1,null)):t.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxResources.get("image"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(g?
-"10":"4")+"px";f.appendChild(l);if(g){mxUtils.write(f,mxResources.get("zoom")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.style.marginRight="12px";k.value=this.lastExportZoom||"100%";f.appendChild(k);mxUtils.write(f,mxResources.get("borderWidth")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.value=
-this.lastExportBorder||"0";f.appendChild(n);mxUtils.br(f)}var p=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=e?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),l=this.editor.graph,y=e?null:this.addCheckbox(f,mxResources.get("transparentBackground"),l.background==mxConstants.NONE||null==l.background);null!=y&&(y.style.marginBottom="16px");b=new CustomDialog(this,f,mxUtils.bind(this,function(){var b=parseInt(k.value)/
-100||1,c=parseInt(n.value)||0;d(!p.checked,null!=m?m.checked:!1,null!=y?y.checked:!1,b,c)}),null,b,c);this.showDialog(b.container,300,(g?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,d,e,g,k,m,v,x){m=null!=m?m:Editor.defaultIncludeDiagram;var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph,n="jpeg"==v?200:280,p=document.createElement("h3");mxUtils.write(p,b);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-f.appendChild(p);mxUtils.write(f,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";f.appendChild(q);mxUtils.write(f,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.value=this.lastExportBorder||
-"0";f.appendChild(t);mxUtils.br(f);var u=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.style.marginLeft="24px";F.setAttribute("disabled","disabled");F.setAttribute("type","checkbox");var D=document.createElement("select");D.style.marginTop="16px";D.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(p=0;p<b.length;p++)if(!l.isSelectionEmpty()||"selectionOnly"!=b[p]){var I=
-document.createElement("option");mxUtils.write(I,mxResources.get(b[p]));I.setAttribute("value",b[p]);D.appendChild(I)}x?(mxUtils.write(f,mxResources.get("size")+":"),f.appendChild(D),mxUtils.br(f),n+=26,mxEvent.addListener(D,"change",function(){"selectionOnly"==D.value&&(u.checked=!0)})):k&&(f.appendChild(F),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),n+=26,mxEvent.addListener(u,"change",function(){u.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));l.isSelectionEmpty()?
-x&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",n-=26):(D.value="diagram",F.setAttribute("checked","checked"),F.defaultChecked=!0,mxEvent.addListener(u,"change",function(){D.value=u.checked?"selectionOnly":"diagram"}));var K=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=v),L=null;Editor.isDarkMode()&&(L=this.addCheckbox(f,mxResources.get("dark"),!0),n+=26);var M=this.addCheckbox(f,mxResources.get("shadow"),
-l.shadowVisible),P=document.createElement("input");P.style.marginTop="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||P.setAttribute("disabled","disabled");c&&(f.appendChild(P),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),n+=26);var O=null;if("png"==v||"jpeg"==v)O=this.addCheckbox(f,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),n+=26;var H=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),
-m,null,null,"jpeg"!=v);H.style.marginBottom="16px";var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight="10px";J.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));J.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));J.appendChild(c);c=document.createElement("option");c.setAttribute("value",
-"self");mxUtils.write(c,mxResources.get("openInThisWindow"));J.appendChild(c);"svg"==v&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(J),mxUtils.br(f),mxUtils.br(f),n+=40);d=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=q.value;g(q.value,K.checked,!u.checked,M.checked,H.checked,P.checked,t.value,F.checked,!1,J.value,null!=O?O.checked:null,null!=L?L.checked:null,D.value)}),null,d,e);this.showDialog(d.container,340,n,!0,!0,null,
-null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph;if(null!=c){var k=document.createElement("h3");mxUtils.write(k,c);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(k)}var n=this.addCheckbox(f,mxResources.get("fit"),!0),
-p=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible&&e,!e),m=this.addCheckbox(f,d),y=this.addCheckbox(f,mxResources.get("lightbox"),!0),q=this.addEditButton(f,y),C=q.getEditInput(),E=1<l.model.getChildCount(l.model.getRoot()),G=this.addCheckbox(f,mxResources.get("layers"),E,!E);G.style.marginLeft=C.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(y,"change",function(){y.checked?(E&&G.removeAttribute("disabled"),C.removeAttribute("disabled")):(G.setAttribute("disabled",
-"disabled"),C.setAttribute("disabled","disabled"));C.checked&&y.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){b(n.checked,p.checked,m.checked,y.checked,q.getLink(),G.checked)}),null,mxResources.get("embed"),g);this.showDialog(c.container,280,290,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,c,d,e,g,k,m,v){function f(c){var f=" ",p="";e&&(f=" 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('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=n?"&page="+n:"")+(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");b&&(p+="max-width:100%;");var y="";d&&(y=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');m('<img src="'+c+'"'+y+(""!=p?' style="'+p+'"':"")+f+"/>")}var l=this.editor.graph.getGraphBounds(),n=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=e?this.getFileData(!0):null;b=
-this.createImageDataUri(b,c,"png");f(b)}),null,null,null,mxUtils.bind(this,function(b){v({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),l.width*l.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var p="";d&&(p="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+p+"&xml="+encodeURIComponent(c));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&
-299>=q.getStatus()?f("data:image/png;base64,"+q.getText()):v({message:mxResources.get("unknownError")})}))}else v({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(b,c,d,e,g,k,m){var f=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),l=f.getElementsByTagName("a");if(null!=l)for(var n=0;n<l.length;n++){var p=l[n].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==l[n].getAttribute("target")&&l[n].removeAttribute("target")}e&&
-f.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(f);if(d){var y=" ",q="";e&&(y="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('"+EditorUi.lightboxHost+"/?client=1"+(g?"&edit=_blank":"")+(k?"&layers=1":
-"")+"');}})(this);\"",q+="cursor:pointer;");b&&(q+="max-width:100%;");this.editor.convertImages(f,mxUtils.bind(this,function(b){m('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=q?' style="'+q+'"':"")+y+"/>")}))}else q="",e&&(c=this.getSelectedPageIndex(),f.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=c?"&page="+c:"")+(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),b&&(b=parseInt(f.getAttribute("width")),g=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","-0.5 -0.5 "+b+" "+g),q+="max-width:100%;max-height:"+g+"px;",f.removeAttribute("height")),""!=q&&f.setAttribute("style",q),this.editor.addFontCss(f),this.editor.graph.mathEnabled&&this.editor.addMathCss(f),m(mxUtils.getXml(f))};EditorUi.prototype.timeSince=function(b){b=
+EditorUi.prototype.addChromelessToolbarItems=function(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=b(mxUtils.bind(this,function(b){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",
+this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,70));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),
+this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var c=f.getBoundingClientRect();this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=
+c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(b)}),Editor.tagsLargeImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();f.style.display=0<b.length?"":"none"}));c.apply(this,arguments)}this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,
+"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var d=b(mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&
+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);else{this.exportDialog=document.createElement("div");var f=d.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
+"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=f.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=f.zIndex;var e=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});e.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(b){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var f=this.createImageDataUri(b,null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));
+b.setAttribute("border","0");b.setAttribute("src",f);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.openInNewWindow(f.substring(f.indexOf(",")+1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),
+Editor.cameraLargeImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(b,c,d,e,g){this.isLocalFileSave()?this.saveLocalFile(d,b,e,g,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,f){return this.createEchoRequest(d,b,e,g,c,f)}),d,g,e)};EditorUi.prototype.saveRequest=function(b,c,d,e,g,k,n){n=null!=n?n:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);isLocalStorage&&f++;var l=4>=f?2:6<f?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,f){if("_blank"==
+f||null!=b&&0<b.length){var l=d("_blank"==f?null:b,f==App.MODE_DEVICE||"download"==f||null==f||"_blank"==f?"0":"1");null!=l&&(f==App.MODE_DEVICE||"download"==f||"_blank"==f?l.simulate(document,"_blank"):this.pickFolder(f,mxUtils.bind(this,function(d){k=null!=k?k:"pdf"==c?"application/pdf":"image/"+c;if(null!=e)try{this.exportFile(e,b,k,!0,f,d)}catch(C){this.handleError(C)}else this.spinner.spin(document.body,mxResources.get("saving"))&&l.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=
+l.getStatus()&&299>=l.getStatus())try{this.exportFile(l.getText(),b,k,!0,f,d)}catch(C){this.handleError(C)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,n,null,1<f,l,e,k,g);f=this.isServices(f)?4<f?390:270:160;this.showDialog(b.container,380,f,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=
+b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,d,e,g,k){};EditorUi.prototype.pickFolder=function(b,c,d){c(null)};EditorUi.prototype.exportSvg=function(b,c,d,e,g,k,n,v,y,A,z,x){if(this.spinner.spin(document.body,mxResources.get("export")))try{var f=this.editor.graph.isSelectionEmpty();d=null!=d?d:f;var l=c?null:this.editor.graph.background;l==mxConstants.NONE&&(l=null);null==l&&0==c&&(l=z?this.editor.graph.defaultPageBackgroundColor:
+"#ffffff");var m=this.editor.graph.getSvg(l,b,n,v,null,d,null,null,"blank"==A?"_blank":"self"==A?"_top":null,null,!0,z,x);e&&this.editor.graph.addSvgShadow(m);var p=this.getBaseFilename()+(g?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();g&&b.setAttribute("content",this.getFileData(!0,null,null,null,d,y,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(b);
+this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(m);this.editor.graph.mathEnabled&&this.editor.addMathCss(m);k?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(m,q,this.thumbImageCache)):q(m)}catch(D){this.handleError(D)}};EditorUi.prototype.addRadiobox=function(b,
+c,d,e,g,k,n){return this.addCheckbox(b,d,e,g,k,n,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,d,e,g,k,n,v){k=null!=k?k:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",n?"radio":"checkbox");n="geCheckbox-"+Editor.guid();f.id=n;null!=v&&f.setAttribute("name",v);d&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);e&&f.setAttribute("disabled","disabled");k&&(b.appendChild(f),d=document.createElement("label"),mxUtils.write(d,
+c),d.setAttribute("for",n),b.appendChild(d),g||mxUtils.br(b));return f};EditorUi.prototype.addEditButton=function(b,c){var f=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);f.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var l=document.createElement("select");l.style.width="120px";l.style.marginLeft="8px";l.style.marginRight="10px";l.className="geBtn";d=document.createElement("option");
+d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));l.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");l.appendChild(d);b.appendChild(l);mxEvent.addListener(l,"change",mxUtils.bind(this,function(){if("custom"==l.value){var b=new FilenameDialog(this,e,mxResources.get("ok"),function(b){null!=b?e=b:l.value="blank"},mxResources.get("url"),null,null,null,null,function(){l.value="blank"});this.showDialog(b.container,
+300,80,!0,!1);b.init()}}));mxEvent.addListener(f,"change",mxUtils.bind(this,function(){f.checked&&(null==c||c.checked)?l.removeAttribute("disabled"):l.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return f.checked?"blank"===l.value?"_blank":e:null},getEditInput:function(){return f},getEditSelect:function(){return l}}};EditorUi.prototype.addLinkSection=function(b,c){function f(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=l&&l!=mxConstants.NONE?
+"border:1px solid black;background-color:"+l:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");
+e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);c&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));b.appendChild(d);mxUtils.write(b,mxResources.get("borderColor")+":");var l="#0000ff",g=
+null,g=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(l||"none",function(b){l=b;f()});mxEvent.consume(b)}));f();g.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width="22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";b.appendChild(g);mxUtils.br(b);return{getColor:function(){return l},getTarget:function(){return d.value},focus:function(){d.focus()}}};
+EditorUi.prototype.createUrlParameters=function(b,c,d,e,g,k,n){n=null!=n?n:[];e&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||n.push("lightbox=1"),"auto"!=b&&n.push("target="+b),null!=c&&c!=mxConstants.NONE&&n.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=g&&0<g.length&&n.push("edit="+encodeURIComponent(g)),k&&n.push("layers=1"),this.editor.graph.foldingEnabled&&n.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&
+n.push("page-id="+this.currentPage.getId());return n};EditorUi.prototype.createLink=function(b,c,d,e,g,k,n,v,y,A){y=this.createUrlParameters(b,c,d,e,g,k,y);b=this.getCurrentFile();c=!0;null!=n?d="#U"+encodeURIComponent(n):(b=this.getCurrentFile(),v||null==b||b.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=
+this.defaultFilename&&y.push("title="+encodeURIComponent(b.getTitle()));A&&1<d.length&&(y.push("open="+d.substring(1)),d="");return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+d};EditorUi.prototype.createHtml=function(b,c,d,e,g,k,n,v,y,A,z,x){this.getBasenames();var f={};""!=g&&g!=mxConstants.NONE&&(f.highlight=g);"auto"!==
+e&&(f.target=e);A||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(f.zoom=d/100);d=[];n&&(d.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(d.push("zoom"),f.resize=!0);v&&d.push("layers");y&&d.push("tags");0<d.length&&(A&&d.push("lightbox"),f.toolbar=d.join(" "));null!=z&&0<z.length&&(f.edit=z);null!=b?f.url=b:f.xml=this.getFileData(!0,null,null,null,null,!n);c='<div class="mxgraph" style="'+
+(k?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";x(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};
+EditorUi.prototype.showHtmlDialog=function(b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxResources.get("html"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
+k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");l=k.cloneNode(!0);l.setAttribute("value","copy");g.appendChild(l);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(m);mxUtils.br(g);g.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));g.appendChild(m);var p=this.getCurrentFile();null==d&&null!=p&&p.constructor==window.DriveFile&&(m=
+document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.style.cursor="pointer",mxUtils.write(m,mxResources.get("share")),g.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));l.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");f.appendChild(g);var n=this.addLinkSection(f),x=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var B=document.createElement("input");
+B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";f.appendChild(B);var C=this.addCheckbox(f,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(f,mxResources.get("allPages"),g,!g),F=this.addCheckbox(f,mxResources.get("layers"),!0),G=this.addCheckbox(f,mxResources.get("tags"),!0),D=this.addCheckbox(f,mxResources.get("lightbox"),!0),I=this.addEditButton(f,D),K=I.getEditInput();
+K.style.marginBottom="16px";mxEvent.addListener(D,"change",function(){D.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled");K.checked&&D.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(k.checked?d:null,x.checked,B.value,n.getTarget(),n.getColor(),C.checked,E.checked,F.checked,G.checked,D.checked,I.getLink())}),null,b,c);this.showDialog(b.container,340,420,
+!0,!0);l.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,d,e,g,k){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,b||mxResources.get("link"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var m=this.getCurrentFile(),l="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=m&&m.constructor==window.DriveFile&&!c){b=80;var l="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",
+p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));p.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(m.getId())}));n.style.marginTop="12px";n.className="geBtn";p.appendChild(n);f.appendChild(p);n=document.createElement("a");
+n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("check"));p.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,
+300,80,!0,!1);b.init()}))}))}var x=null,q=null;if(null!=d||null!=e)b+=30,mxUtils.write(f,mxResources.get("width")+":"),x=document.createElement("input"),x.setAttribute("type","text"),x.style.marginRight="16px",x.style.width="50px",x.style.marginLeft="6px",x.style.marginRight="16px",x.style.marginBottom="10px",x.value="100%",f.appendChild(x),mxUtils.write(f,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom=
+"10px",q.value=e+"px",f.appendChild(q),mxUtils.br(f);var t=this.addLinkSection(f,k);d=null!=this.pages&&1<this.pages.length;var E=null;if(null==m||m.constructor!=window.DriveFile||c)E=this.addCheckbox(f,mxResources.get("allPages"),d,!d);var F=this.addCheckbox(f,mxResources.get("lightbox"),!0,null,null,!k),G=this.addEditButton(f,F),D=G.getEditInput();k&&(D.style.marginLeft=F.style.marginLeft,F.style.display="none",b-=30);var I=this.addCheckbox(f,mxResources.get("layers"),!0);I.style.marginLeft=D.style.marginLeft;
+I.style.marginTop="8px";var K=this.addCheckbox(f,mxResources.get("tags"),!0);K.style.marginLeft=D.style.marginLeft;K.style.marginBottom="16px";K.style.marginTop="16px";mxEvent.addListener(F,"change",function(){F.checked?(I.removeAttribute("disabled"),D.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"));D.checked&&F.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,
+f,mxUtils.bind(this,function(){g(t.getTarget(),t.getColor(),null==E?!0:E.checked,F.checked,G.getLink(),I.checked,null!=x?x.value:null,null!=q?q.value:null,K.checked)}),null,mxResources.get("create"),l);this.showDialog(c.container,340,300+b,!0,!0);null!=x?(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null)):t.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace=
+"nowrap";var l=document.createElement("h3");mxUtils.write(l,mxResources.get("image"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(g?"10":"4")+"px";f.appendChild(l);if(g){mxUtils.write(f,mxResources.get("zoom")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.style.marginRight="12px";k.value=this.lastExportZoom||"100%";f.appendChild(k);mxUtils.write(f,mxResources.get("borderWidth")+
+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";f.appendChild(m);mxUtils.br(f)}var n=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),p=e?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),l=this.editor.graph,x=e?null:this.addCheckbox(f,mxResources.get("transparentBackground"),l.background==
+mxConstants.NONE||null==l.background);null!=x&&(x.style.marginBottom="16px");b=new CustomDialog(this,f,mxUtils.bind(this,function(){var b=parseInt(k.value)/100||1,c=parseInt(m.value)||0;d(!n.checked,null!=p?p.checked:!1,null!=x?x.checked:!1,b,c)}),null,b,c);this.showDialog(b.container,300,(g?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,d,e,g,k,n,v,y){n=null!=n?n:Editor.defaultIncludeDiagram;var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph,
+m="jpeg"==v?200:280,p=document.createElement("h3");mxUtils.write(p,b);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(p);mxUtils.write(f,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";f.appendChild(q);mxUtils.write(f,mxResources.get("borderWidth")+":");var t=document.createElement("input");
+t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.value=this.lastExportBorder||"0";f.appendChild(t);mxUtils.br(f);var u=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),G=document.createElement("input");G.style.marginTop="16px";G.style.marginRight="8px";G.style.marginLeft="24px";G.setAttribute("disabled","disabled");G.setAttribute("type","checkbox");var D=document.createElement("select");D.style.marginTop="16px";D.style.marginLeft=
+"8px";b=["selectionOnly","diagram","page"];for(p=0;p<b.length;p++)if(!l.isSelectionEmpty()||"selectionOnly"!=b[p]){var I=document.createElement("option");mxUtils.write(I,mxResources.get(b[p]));I.setAttribute("value",b[p]);D.appendChild(I)}y?(mxUtils.write(f,mxResources.get("size")+":"),f.appendChild(D),mxUtils.br(f),m+=26,mxEvent.addListener(D,"change",function(){"selectionOnly"==D.value&&(u.checked=!0)})):k&&(f.appendChild(G),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),m+=26,mxEvent.addListener(u,
+"change",function(){u.checked?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}));l.isSelectionEmpty()?y&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",m-=26):(D.value="diagram",G.setAttribute("checked","checked"),G.defaultChecked=!0,mxEvent.addListener(u,"change",function(){D.value=u.checked?"selectionOnly":"diagram"}));var K=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=v),L=null;Editor.isDarkMode()&&
+(L=this.addCheckbox(f,mxResources.get("dark"),!0),m+=26);var M=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible),P=document.createElement("input");P.style.marginTop="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||P.setAttribute("disabled","disabled");c&&(f.appendChild(P),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),m+=26);var O=null;if("png"==v||"jpeg"==v)O=this.addCheckbox(f,mxResources.get("grid"),!1,this.isOffline()||
+!this.canvasSupported,!1,!0),m+=26;var H=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=v);H.style.marginBottom="16px";var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight="10px";J.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));J.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,
+mxResources.get("openInNewWindow"));J.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));J.appendChild(c);"svg"==v&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(J),mxUtils.br(f),mxUtils.br(f),m+=40);d=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=q.value;g(q.value,K.checked,!u.checked,M.checked,H.checked,P.checked,t.value,G.checked,!1,J.value,
+null!=O?O.checked:null,null!=L?L.checked:null,D.value)}),null,d,e);this.showDialog(d.container,340,m,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph;if(null!=c){var k=document.createElement("h3");mxUtils.write(k,c);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+f.appendChild(k)}var m=this.addCheckbox(f,mxResources.get("fit"),!0),n=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible&&e,!e),p=this.addCheckbox(f,d),x=this.addCheckbox(f,mxResources.get("lightbox"),!0),q=this.addEditButton(f,x),C=q.getEditInput(),E=1<l.model.getChildCount(l.model.getRoot()),F=this.addCheckbox(f,mxResources.get("layers"),E,!E);F.style.marginLeft=C.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(x,"change",function(){x.checked?
+(E&&F.removeAttribute("disabled"),C.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"));C.checked&&x.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){b(m.checked,n.checked,p.checked,x.checked,q.getLink(),F.checked)}),null,mxResources.get("embed"),g);this.showDialog(c.container,280,290,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(b,c,d,e,g,k,n,v){function f(c){var f=" ",p="";e&&(f=" 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('"+EditorUi.lightboxHost+"/?client=1"+(null!=m?"&page="+m:"")+(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",p+=
+"cursor:pointer;");b&&(p+="max-width:100%;");var x="";d&&(x=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');n('<img src="'+c+'"'+x+(""!=p?' style="'+p+'"':"")+f+"/>")}var l=this.editor.graph.getGraphBounds(),m=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=e?this.getFileData(!0):null;b=this.createImageDataUri(b,c,"png");f(b)}),null,null,null,mxUtils.bind(this,function(b){v({message:mxResources.get("unknownError")})}),
+null,!0,d?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),l.width*l.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var p="";d&&(p="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+p+"&xml="+encodeURIComponent(c));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?f("data:image/png;base64,"+q.getText()):v({message:mxResources.get("unknownError")})}))}else v({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(b,c,d,e,g,k,n){var f=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),l=f.getElementsByTagName("a");if(null!=l)for(var m=0;m<l.length;m++){var p=l[m].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==l[m].getAttribute("target")&&l[m].removeAttribute("target")}e&&f.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(f);if(d){var x=" ",q="";e&&(x="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('"+
+EditorUi.lightboxHost+"/?client=1"+(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");b&&(q+="max-width:100%;");this.editor.convertImages(f,mxUtils.bind(this,function(b){n('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=q?' style="'+q+'"':"")+x+"/>")}))}else q="",e&&(c=this.getSelectedPageIndex(),f.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=c?"&page="+c:"")+(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),b&&(b=parseInt(f.getAttribute("width")),g=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","-0.5 -0.5 "+b+" "+g),q+="max-width:100%;max-height:"+g+"px;",f.removeAttribute("height")),""!=q&&f.setAttribute("style",q),this.editor.addFontCss(f),this.editor.graph.mathEnabled&&this.editor.addMathCss(f),n(mxUtils.getXml(f))};EditorUi.prototype.timeSince=function(b){b=
Math.floor((new Date-b)/1E3);var c=Math.floor(b/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(b/2592E3);if(1<c)return c+" "+mxResources.get("months");c=Math.floor(b/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(b/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(b/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(b,c){if(null!=b){var f=null;if("diagram"==b.nodeName)f=
b;else if("mxfile"==b.nodeName){var d=b.getElementsByTagName("diagram");if(0<d.length){var f=d[0],e=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?f.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:e.apply(this,arguments)}}}null!=f&&(b=Editor.parseDiagramNode(f))}d=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(t){}finally{this.editor.graph=d}return b};EditorUi.prototype.getPngFileProperties=function(b){var c=1,f=0;if(null!=
b){if(b.hasAttribute("scale")){var d=parseFloat(b.getAttribute("scale"));!isNaN(d)&&0<d&&(c=d)}b.hasAttribute("border")&&(d=parseInt(b.getAttribute("border")),!isNaN(d)&&0<d&&(f=d))}return{scale:c,border:f}};EditorUi.prototype.getEmbeddedPng=function(b,c,d,e,g){try{var f=this.editor.graph,l=null!=f.themes&&"darkTheme"==f.defaultThemeName,k=null;if(null!=d&&0<d.length)f=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(f.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
-!0),f),k=d;else if(l||null!=this.pages&&this.currentPage!=this.pages[0]){var f=this.createTemporaryGraph(f.getStylesheet()),n=f.getGlobalVariable,m=this.pages[0];f.getGlobalVariable=function(b){return"page"==b?m.getName():"pagenumber"==b?1:n.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(m.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==k&&(k=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=d.toDataURL("image/png"),e=Editor.writeGraphModelToPng(e,
-"tEXt","mxfile",encodeURIComponent(k));b(e.substring(e.lastIndexOf(",")+1));f!=this.editor.graph&&f.container.parentNode.removeChild(f.container)}catch(B){null!=c&&c(B)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&c(b)}),null,null,e,null,f.shadowVisible,null,f,g)}catch(z){null!=c&&c(z)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,d,e,g,k,m,v,x,A,z,y,B){v=null!=v?v:!0;m=null!=x?x:c.background;m==mxConstants.NONE&&(m=null);k=c.getSvg(m,A,z,null,null,k,null,null,null,c.shadowVisible||
-y,null,B);(c.shadowVisible||y)&&c.addSvgShadow(k);null!=b&&k.setAttribute("content",b);null!=d&&k.setAttribute("resource",d);if(null!=g)this.embedFonts(k,mxUtils.bind(this,function(b){v?this.editor.convertImages(b,mxUtils.bind(this,function(b){g((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b))})):g((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(b))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(k)};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(p){c(b)}}))}catch(n){c(b)}}))};
-EditorUi.prototype.exportImage=function(b,c,d,e,g,k,m,v,x,A,z,y,B){x=null!=x?x:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();d=null!=d?d:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,g?this.getFileData(!0,null,null,null,d,v):null,x,null==this.pages||0==this.pages.length,z)}catch(G){this.handleError(G)}}),null,this.thumbImageCache,
-null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,d,b||1,c,e,null,null,k,m,A,y,B)}catch(E){this.spinner.stop(),this.handleError(E)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,d,e,g,k,m){c=null!=c?c:0;d=null!=d?d:0;var f=[];try{var l=this.editor.graph;if(null!=b&&0<b.length){l.model.beginUpdate();try{var n=mxUtils.parseXml(b);b={};var p=this.editor.extractGraphModel(n.documentElement,
-null!=this.pages);if(null!=p&&"mxfile"==p.nodeName&&null!=this.pages){var y=p.getElementsByTagName("diagram");if(1==y.length&&!k){if(p=Editor.parseDiagramNode(y[0]),null!=this.currentPage&&(b[y[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var q=y[0].getAttribute("name");null!=q&&""!=q&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,q))}}else if(0<
-y.length){k=[];var t=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[y[0].getAttribute("id")]=this.pages[0].getId(),p=Editor.parseDiagramNode(y[0]),e=!1,t=1);for(;t<y.length;t++){var u=y[t].getAttribute("id");y[t].removeAttribute("id");var G=this.updatePageRoot(new DiagramPage(y[t]));b[u]=y[t].getAttribute("id");var F=this.pages.length;null==G.getName()&&G.setName(mxResources.get("pageWithNumber",[F+1]));l.model.execute(new ChangePage(this,G,G,F,!0));k.push(G)}this.updatePageLinks(b,
-k)}}if(null!=p&&"mxGraphModel"===p.nodeName&&(f=l.importGraphModel(p,c,d,e),null!=f))for(t=0;t<f.length;t++)this.updatePageLinksForCell(b,f[t]);m&&this.insertHandler(f,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{l.model.endUpdate()}}}catch(D){if(g)throw D;this.handleError(D)}return f};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,
+!0),f),k=d;else if(l||null!=this.pages&&this.currentPage!=this.pages[0]){var f=this.createTemporaryGraph(f.getStylesheet()),m=f.getGlobalVariable,n=this.pages[0];f.getGlobalVariable=function(b){return"page"==b?n.getName():"pagenumber"==b?1:m.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(n.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==k&&(k=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=d.toDataURL("image/png"),e=Editor.writeGraphModelToPng(e,
+"tEXt","mxfile",encodeURIComponent(k));b(e.substring(e.lastIndexOf(",")+1));f!=this.editor.graph&&f.container.parentNode.removeChild(f.container)}catch(B){null!=c&&c(B)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&c(b)}),null,null,e,null,f.shadowVisible,null,f,g)}catch(z){null!=c&&c(z)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,d,e,g,k,n,v,y,A,z,x,B){v=null!=v?v:!0;n=null!=y?y:c.background;n==mxConstants.NONE&&(n=null);k=c.getSvg(n,A,z,null,null,k,null,null,null,c.shadowVisible||
+x,null,B);(c.shadowVisible||x)&&c.addSvgShadow(k);null!=b&&k.setAttribute("content",b);null!=d&&k.setAttribute("resource",d);if(null!=g)this.embedFonts(k,mxUtils.bind(this,function(b){v?this.editor.convertImages(b,mxUtils.bind(this,function(b){g((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b))})):g((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(b))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(k)};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(f){try{null!=f&&this.editor.addFontCss(b,f),c(b)}catch(p){c(b)}}))}catch(m){c(b)}}))};
+EditorUi.prototype.exportImage=function(b,c,d,e,g,k,n,v,y,A,z,x,B){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();d=null!=d?d:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,g?this.getFileData(!0,null,null,null,d,v):null,y,null==this.pages||0==this.pages.length,z)}catch(F){this.handleError(F)}}),null,this.thumbImageCache,
+null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,d,b||1,c,e,null,null,k,n,A,x,B)}catch(E){this.spinner.stop(),this.handleError(E)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,d,e,g,k,n){c=null!=c?c:0;d=null!=d?d:0;var f=[];try{var l=this.editor.graph;if(null!=b&&0<b.length){l.model.beginUpdate();try{var m=mxUtils.parseXml(b);b={};var p=this.editor.extractGraphModel(m.documentElement,
+null!=this.pages);if(null!=p&&"mxfile"==p.nodeName&&null!=this.pages){var x=p.getElementsByTagName("diagram");if(1==x.length&&!k){if(p=Editor.parseDiagramNode(x[0]),null!=this.currentPage&&(b[x[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var q=x[0].getAttribute("name");null!=q&&""!=q&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,q))}}else if(0<
+x.length){k=[];var t=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[x[0].getAttribute("id")]=this.pages[0].getId(),p=Editor.parseDiagramNode(x[0]),e=!1,t=1);for(;t<x.length;t++){var u=x[t].getAttribute("id");x[t].removeAttribute("id");var F=this.updatePageRoot(new DiagramPage(x[t]));b[u]=x[t].getAttribute("id");var G=this.pages.length;null==F.getName()&&F.setName(mxResources.get("pageWithNumber",[G+1]));l.model.execute(new ChangePage(this,F,F,G,!0));k.push(F)}this.updatePageLinks(b,
+k)}}if(null!=p&&"mxGraphModel"===p.nodeName&&(f=l.importGraphModel(p,c,d,e),null!=f))for(t=0;t<f.length;t++)this.updatePageLinksForCell(b,f[t]);n&&this.insertHandler(f,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{l.model.endUpdate()}}}catch(D){if(g)throw D;this.handleError(D)}return f};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,
c){var d=document.createElement("div"),f=this.editor.graph,e=f.getLinkForCell(c);null!=e&&f.setLinkForCell(c,this.updatePageLink(b,e));if(f.isHtmlLabel(c)){d.innerHTML=f.sanitizeHtml(f.getLabel(c));for(var l=d.getElementsByTagName("a"),g=!1,k=0;k<l.length;k++)e=l[k].getAttribute("href"),null!=e&&(l[k].setAttribute("href",this.updatePageLink(b,e)),g=!0);g&&f.labelChanged(c,d.innerHTML)}for(k=0;k<f.model.getChildCount(c);k++)this.updatePageLinksForCell(b,f.model.getChildAt(c,k))};EditorUi.prototype.updatePageLink=
function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var f=JSON.parse(c.substring(17));if(null!=f.actions){for(var e=0;e<f.actions.length;e++){var l=f.actions[e];if(null!=l.open&&Graph.isPageLink(l.open)){var g=l.open.substring(l.open.indexOf(",")+1),d=b[g];null!=d?l.open="data:page/id,"+d:null==this.getPageById(g)&&delete l.open}}c="data:action/json,"+JSON.stringify(f)}}catch(v){}return c};
-EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,d,e,g){e=null!=e?e:b.name;d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var f=this.isRemoteVisioFormat(e);try{var l="UNKNOWN-VISIO",k=e.lastIndexOf(".");if(0<=k&&k<e.length)l=e.substring(k+1).toUpperCase();else{var n=e.lastIndexOf("/");0<=
-n&&n<e.length&&(e=e.substring(n+1))}EditorUi.logEvent({category:l+"-MS-IMPORT-FILE",action:"filename_"+e,label:f?"remote":"local"})}catch(y){}if(f)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{f=new FormData;f.append("file1",b,e);var m=new XMLHttpRequest;m.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(e)?"?stencil=1":""));m.responseType="blob";this.addRemoteServiceSecurityCheck(m);
-null!=g&&m.setRequestHeader("x-convert-custom",g);m.onreadystatechange=mxUtils.bind(this,function(){if(4==m.readyState)if(200<=m.status&&299>=m.status)try{var b=m.response;if("text/xml"==b.type){var f=new FileReader;f.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(E){d({message:mxResources.get("errorLoadingFile")})}});f.readAsText(b)}else this.doImportVisio(b,c,d,e)}catch(C){d(C)}else try{""==m.responseType||"text"==m.responseType?d({message:m.responseText}):(f=new FileReader,f.onload=
-function(){d({message:JSON.parse(f.result).Message})},f.readAsText(m.response))}catch(C){d({})}});m.send(f)}else try{this.doImportVisio(b,c,d,e)}catch(y){d(y)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importGraphML=function(b,c,d){d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});
+EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,d,e,g){e=null!=e?e:b.name;d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var f=this.isRemoteVisioFormat(e);try{var l="UNKNOWN-VISIO",k=e.lastIndexOf(".");if(0<=k&&k<e.length)l=e.substring(k+1).toUpperCase();else{var m=e.lastIndexOf("/");0<=
+m&&m<e.length&&(e=e.substring(m+1))}EditorUi.logEvent({category:l+"-MS-IMPORT-FILE",action:"filename_"+e,label:f?"remote":"local"})}catch(x){}if(f)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{f=new FormData;f.append("file1",b,e);var n=new XMLHttpRequest;n.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(e)?"?stencil=1":""));n.responseType="blob";this.addRemoteServiceSecurityCheck(n);
+null!=g&&n.setRequestHeader("x-convert-custom",g);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var b=n.response;if("text/xml"==b.type){var f=new FileReader;f.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(E){d({message:mxResources.get("errorLoadingFile")})}});f.readAsText(b)}else this.doImportVisio(b,c,d,e)}catch(C){d(C)}else try{""==n.responseType||"text"==n.responseType?d({message:n.responseText}):(f=new FileReader,f.onload=
+function(){d({message:JSON.parse(f.result).Message})},f.readAsText(n.response))}catch(C){d({})}});n.send(f)}else try{this.doImportVisio(b,c,d,e)}catch(x){d(x)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importGraphML=function(b,c,d){d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});
var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,d)}catch(q){d(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.exportVisio=function(b){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||
-this.handleError({message:mxResources.get("unknownError")})}catch(n){this.handleError(n)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.convertLucidChart=function(b,c,d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
+this.handleError({message:mxResources.get("unknownError")})}catch(m){this.handleError(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.convertLucidChart=function(b,c,d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(q){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(q){null!=window.console&&console.error(q),d(q)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(f,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})})}):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generateMermaidImage=function(b,c,d,e){var f=this,l=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=
-b.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(b).getElementsByTagName("svg");if(0<c.length){var l=parseFloat(c[0].getAttribute("width")),g=parseFloat(c[0].getAttribute("height"));if(isNaN(l)||isNaN(g))try{var k=c[0].getAttribute("viewBox").split(/\s+/),l=parseFloat(k[2]),g=parseFloat(k[3])}catch(y){l=l||100,g=g||100}d(f.convertDataUri(Editor.createSvgDataUri(b)),l,g)}else e({message:mxResources.get("invalidInput")})}catch(y){e(y)}})}catch(u){e(u)}};
+b.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(b).getElementsByTagName("svg");if(0<c.length){var l=parseFloat(c[0].getAttribute("width")),g=parseFloat(c[0].getAttribute("height"));if(isNaN(l)||isNaN(g))try{var k=c[0].getAttribute("viewBox").split(/\s+/),l=parseFloat(k[2]),g=parseFloat(k[3])}catch(x){l=l||100,g=g||100}d(f.convertDataUri(Editor.createSvgDataUri(b)),l,g)}else e({message:mxResources.get("invalidInput")})}catch(x){e(x)}})}catch(u){e(u)}};
"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?l():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",l):mxscript("js/extensions.min.js",l))};EditorUi.prototype.generatePlantUmlImage=function(b,c,d,e){function f(b,c,d){c1=b>>2;c2=(b&3)<<4|c>>4;c3=(c&15)<<2|d>>6;c4=d&63;r="";r+=l(c1&63);r+=l(c2&63);r+=l(c3&63);return r+=l(c4&63)}function l(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+
b);b-=26;return 0==b?"-":1==b?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(b){r="";for(i=0;i<b.length;i+=3)r=i+2==b.length?r+f(b.charCodeAt(i),b.charCodeAt(i+1),0):i+1==b.length?r+f(b.charCodeAt(i),0,0):r+f(b.charCodeAt(i),b.charCodeAt(i+1),b.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(b))),!0);"txt"!=c&&(g.responseType="blob");g.onload=function(b){if(200<=this.status&&300>this.status)if("txt"==
-c)d(this.response);else{var f=new FileReader;f.readAsDataURL(this.response);f.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,l=c.height;if(0==b&&0==l){var g=f.result,k=g.indexOf(","),n=decodeURIComponent(escape(atob(g.substring(k+1)))),m=mxUtils.parseXml(n).getElementsByTagName("svg");0<m.length&&(b=parseFloat(m[0].getAttribute("width")),l=parseFloat(m[0].getAttribute("height")))}d(f.result,b,l)}catch(D){e(D)}};c.src=f.result};f.onerror=function(b){e(b)}}else e(b)};g.onerror=
-function(b){e(b)};g.send()};EditorUi.prototype.insertAsPreText=function(b,c,d){var f=this.editor.graph,e=null;f.getModel().beginUpdate();try{e=f.insertVertex(null,null,"<pre>"+b+"</pre>",c,d,1,1,"text;html=1;align=left;verticalAlign=top;"),f.updateCellSize(e,!0)}finally{f.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(b,c,d,e,g,k,m,v){k=null!=k?k:!0;m=null!=m?m:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
+c)d(this.response);else{var f=new FileReader;f.readAsDataURL(this.response);f.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,l=c.height;if(0==b&&0==l){var g=f.result,k=g.indexOf(","),m=decodeURIComponent(escape(atob(g.substring(k+1)))),n=mxUtils.parseXml(m).getElementsByTagName("svg");0<n.length&&(b=parseFloat(n[0].getAttribute("width")),l=parseFloat(n[0].getAttribute("height")))}d(f.result,b,l)}catch(D){e(D)}};c.src=f.result};f.onerror=function(b){e(b)}}else e(b)};g.onerror=
+function(b){e(b)};g.send()};EditorUi.prototype.insertAsPreText=function(b,c,d){var f=this.editor.graph,e=null;f.getModel().beginUpdate();try{e=f.insertVertex(null,null,"<pre>"+b+"</pre>",c,d,1,1,"text;html=1;align=left;verticalAlign=top;"),f.updateCellSize(e,!0)}finally{f.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(b,c,d,e,g,k,n,v){k=null!=k?k:!0;n=null!=n?n:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,d,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(g||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var f=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var l=Editor.extractGraphModelFromPdf(b);if(null!=l&&0<l.length)return this.importXml(l,c,d,k,!0,v)}if("data:image/png;base64,"==
-b.substring(0,22)&&(l=this.extractGraphModelFromPng(b),null!=l&&0<l.length))return this.importXml(l,c,d,k,!0,v);if("data:image/svg+xml;"==b.substring(0,19))try{l=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(l=b.substring(b.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0)):l=decodeURIComponent(b.substring(b.indexOf(",")+1));var n=this.importXml(l,c,d,k,!0,v);if(0<n.length)return n}catch(B){}this.loadImage(b,mxUtils.bind(this,function(e){if("data:"==b.substring(0,
-5))this.resizeImage(e,b,mxUtils.bind(this,function(b,e,l){f.setSelectionCell(f.insertVertex(null,null,"",f.snap(c),f.snap(d),e,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),m,this.maxImageSize);else{var l=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),g=Math.round(e.width*l);e=Math.round(e.height*l);f.setSelectionCell(f.insertVertex(null,null,"",f.snap(c),f.snap(d),
-g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var l=null;f.getModel().beginUpdate();try{l=f.insertVertex(f.getDefaultParent(),null,b,f.snap(c),f.snap(d),1,1,"text;"+(e?"html=1;":"")),f.updateCellSize(l),f.fireEvent(new mxEventObject("textInserted","cells",[l]))}finally{f.getModel().endUpdate()}f.setSelectionCell(l)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,
+b.substring(0,22)&&(l=this.extractGraphModelFromPng(b),null!=l&&0<l.length))return this.importXml(l,c,d,k,!0,v);if("data:image/svg+xml;"==b.substring(0,19))try{l=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(l=b.substring(b.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0)):l=decodeURIComponent(b.substring(b.indexOf(",")+1));var m=this.importXml(l,c,d,k,!0,v);if(0<m.length)return m}catch(B){}this.loadImage(b,mxUtils.bind(this,function(e){if("data:"==b.substring(0,
+5))this.resizeImage(e,b,mxUtils.bind(this,function(b,e,g){f.setSelectionCell(f.insertVertex(null,null,"",f.snap(c),f.snap(d),e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),n,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),l=Math.round(e.width*g);e=Math.round(e.height*g);f.setSelectionCell(f.insertVertex(null,null,"",f.snap(c),f.snap(d),
+l,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var g=null;f.getModel().beginUpdate();try{g=f.insertVertex(f.getDefaultParent(),null,b,f.snap(c),f.snap(d),1,1,"text;"+(e?"html=1;":"")),f.updateCellSize(g),f.fireEvent(new mxEventObject("textInserted","cells",[g]))}finally{f.getModel().endUpdate()}f.setSelectionCell(g)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,
c,d,k,null,v);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,d,k,null,v))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{f=this.editor.graph;g=null;f.getModel().beginUpdate();try{g=f.insertVertex(f.getDefaultParent(),null,"",f.snap(c),f.snap(d),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));f.fireEvent(new mxEventObject("textInserted","cells",[g]));"<"==b.charAt(0)&&b.indexOf(">")==
b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");g.value=b;f.updateCellSize(g);if(0<this.maxTextWidth&&g.geometry.width>this.maxTextWidth){var p=f.getPreferredSizeForCell(g,this.maxTextWidth);g.geometry.width=p.width;g.geometry.height=p.height}Graph.isLink(g.value)&&f.setLinkForCell(g,g.value);g.geometry.width+=f.gridSize;g.geometry.height+=f.gridSize}finally{f.getModel().endUpdate()}return[g]}}return[]};EditorUi.prototype.formatFileSize=
function(b){var c=-1;do b/=1024,c++;while(1024<b);return Math.max(b,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var c=b.indexOf(";");0<c&&(b=b.substring(0,c)+b.substring(b.indexOf(",",c+1)))}return b};EditorUi.prototype.isRemoteFileFormat=function(b,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)};EditorUi.prototype.isLucidChartData=function(b){return null!=b&&('{"state":"{\\"Properties\\":'==
b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.importLocalFile=function(b,c){if(b&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=
!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(b,c){StorageFile.listFiles(this,"F",b,c)});window.openBrowserFile=mxUtils.bind(this,function(b,c,d){StorageFile.getFileContent(this,b,c,d)});window.deleteBrowserFile=mxUtils.bind(this,function(b,c,d){StorageFile.deleteFile(this,b,c,d)});if(!c){var f=Editor.useLocalStorage;Editor.useLocalStorage=!b}window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,
-function(b,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var d=new Blob([b],{type:"application/octet-stream"});this.importVisio(d,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(b,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var e=this.dialog,l=e.close;this.dialog.close=mxUtils.bind(this,
-function(b){Editor.useLocalStorage=f;l.apply(e,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,d){var f=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(b).then(function(e){if(0==Object.keys(e.files).length)d();else{var l=0,g,k=!1;e.forEach(function(b,f){var e=f.name.toLowerCase();"diagram/diagram.xml"==e?(k=!0,f.async("string").then(function(b){0==b.indexOf("<mxfile ")?
-c(b):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>l&&(l=e,g=f))});0<l?g.async("string").then(function(e){!f.isOffline()&&(new XMLHttpRequest).upload&&f.isRemoteFileFormat(e,b.name)?f.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):d())}),b.name):d()}):k||d()}},function(b){d(b)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=
-!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(b,c,d,e,g,k,m,v,x,A,z,y){A=null!=A?A:!0;var f=!1,l=null,n=mxUtils.bind(this,function(b){var c=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,m)):c=this.importXml(b,d,e,A,null,null!=y?mxEvent.isControlDown(y):null);null!=v&&v(c)});"image"==c.substring(0,5)?(x=!1,"image/png"==c.substring(0,9)&&(c=z?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(l=this.importXml(c,d,e,A,
-null,null!=y?mxEvent.isControlDown(y):null),x=!0)),x||(c=this.editor.graph,z=b.indexOf(";"),0<z&&(b=b.substring(0,z)+b.substring(b.indexOf(",",z+1))),A&&c.isGridEnabled()&&(d=c.snap(d),e=c.snap(e)),l=[c.insertVertex(null,null,"",d,e,g,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(f=!0,this.importGraphML(b,n)):null!=x&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?
-(f=!0,this.importVisio(x,n)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,m)?(f=!0,this.parseFile(null!=x?x:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?n(b.responseText):null!=v&&v(null))}),m)):0==b.indexOf("PK")&&null!=x?(f=!0,this.importZipFile(x,n,mxUtils.bind(this,function(){l=this.insertTextAt(this.validateFileData(b),d,e,!0,null,A);v(l)}))):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||
-(l=this.insertTextAt(this.validateFileData(b),d,e,!0,null,A,null,null!=y?mxEvent.isControlDown(y):null));f||null==v||v(l);return l};EditorUi.prototype.importFiles=function(b,c,d,e,g,k,m,v,x,A,z,y,B){e=null!=e?e:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var f=null!=c&&null!=d,l=!0;c=null!=c?c:0;d=null!=d?d:0;var n=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var p=z||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>p){n=!0;break}var t=mxUtils.bind(this,
-function(){var n=this.editor.graph,p=n.gridSize;g=null!=g?g:mxUtils.bind(this,function(b,c,d,e,g,l,k,n,m){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,k)),null):this.importFile(b,c,d,e,g,l,k,n,m,f,y,B)}catch(ia){return this.handleError(ia),null}});k=null!=k?k:mxUtils.bind(this,function(b){n.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,t=q,u=[],D=mxUtils.bind(this,function(b,
-c){u[b]=c;if(0==--t){this.spinner.stop();if(null!=v)v(u);else{var d=[];n.getModel().beginUpdate();try{for(var f=0;f<u.length;f++){var e=u[f]();null!=e&&(d=d.concat(e))}}finally{n.getModel().endUpdate()}}k(d)}}),C=0;C<q;C++)mxUtils.bind(this,function(f){var k=b[f];if(null!=k){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==m||m(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+
-1)))),B=mxUtils.parseXml(u),u=B.getElementsByTagName("svg");if(0<u.length){var u=u[0],v=y?null:u.getAttribute("content");null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(v,!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?D(f,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=B){var b=B.getElementsByTagName("svg");if(0<b.length){var l=b[0],m=l.getAttribute("width"),
-y=l.getAttribute("height"),m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,y=null!=y&&"%"!=y.charAt(y.length-1)?parseFloat(y):NaN,u=l.getAttribute("viewBox");if(null==u||0==u.length)l.setAttribute("viewBox","0 0 "+m+" "+y);else if(isNaN(m)||isNaN(y)){var v=u.split(" ");3<v.length&&(m=parseFloat(v[2]),y=parseFloat(v[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(l));var D=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,y)),A=g(q,k.type,c+f*p,d+f*p,Math.max(1,Math.round(m*D)),Math.max(1,Math.round(y*
-D)),k.name);if(isNaN(m)||isNaN(y)){var C=new Image;C.onload=mxUtils.bind(this,function(){m=Math.max(1,C.width);y=Math.max(1,C.height);A[0].geometry.width=m;A[0].geometry.height=y;l.setAttribute("viewBox","0 0 "+m+" "+y);q=Editor.createSvgDataUri(mxUtils.getXml(l));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));n.setCellStyles("image",q,[A[0]])});C.src=Editor.createSvgDataUri(mxUtils.getXml(l))}return A}}}catch(da){}return null})):D(f,mxUtils.bind(this,function(){return g(v,
-"text/xml",c+f*p,d+f*p,0,0,k.name)}))}else D(f,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==k.type){var C=y?null:this.extractGraphModelFromPng(b.target.result);if(null!=C&&0<C.length){var x=new Image;x.src=b.target.result;D(f,mxUtils.bind(this,function(){return g(C,"text/xml",c+f*p,d+f*p,x.width,x.height,k.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(n){this.resizeImage(n,b.target.result,mxUtils.bind(this,function(b,n,m){D(f,mxUtils.bind(this,function(){if(null!=b&&b.length<A){var y=l&&this.isResampleImageSize(k.size,z)?Math.min(1,Math.min(e/n,e/m)):1;return g(b,k.type,c+f*p,d+f*p,Math.round(n*y),Math.round(m*y),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),l,e,z,k.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,g(q,k.type,c+f*p,d+f*p,240,160,k.name,function(b){D(f,function(){return b})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?g(null,k.type,c+f*p,d+f*p,240,160,k.name,function(b){D(f,function(){return b})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?q.readAsDataURL(k):q.readAsText(k)}})(C)});if(n){n=
-[];for(q=0;q<b.length;q++)n.push(b[q]);b=n;this.confirmImageResize(function(b){l=b;t()},x)}else t()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(f,e){if(f||c)mxSettings.setResizeImages(f?e:null),mxSettings.save();d();b(e)};null==f||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
+function(b,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var d=new Blob([b],{type:"application/octet-stream"});this.importVisio(d,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(b,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var e=this.dialog,g=e.close;this.dialog.close=mxUtils.bind(this,
+function(b){Editor.useLocalStorage=f;g.apply(e,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,d){var f=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(b).then(function(e){if(0==Object.keys(e.files).length)d();else{var g=0,l,k=!1;e.forEach(function(b,f){var e=f.name.toLowerCase();"diagram/diagram.xml"==e?(k=!0,f.async("string").then(function(b){0==b.indexOf("<mxfile ")?
+c(b):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>g&&(g=e,l=f))});0<g?l.async("string").then(function(e){!f.isOffline()&&(new XMLHttpRequest).upload&&f.isRemoteFileFormat(e,b.name)?f.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):d())}),b.name):d()}):k||d()}},function(b){d(b)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=
+!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(b,c,d,e,g,k,n,v,y,A,z,x){A=null!=A?A:!0;var f=!1,l=null,m=mxUtils.bind(this,function(b){var c=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,n)):c=this.importXml(b,d,e,A,null,null!=x?mxEvent.isControlDown(x):null);null!=v&&v(c)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=z?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(l=this.importXml(c,d,e,A,
+null,null!=x?mxEvent.isControlDown(x):null),y=!0)),y||(c=this.editor.graph,z=b.indexOf(";"),0<z&&(b=b.substring(0,z)+b.substring(b.indexOf(",",z+1))),A&&c.isGridEnabled()&&(d=c.snap(d),e=c.snap(e)),l=[c.insertVertex(null,null,"",d,e,g,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(f=!0,this.importGraphML(b,m)):null!=y&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?
+(f=!0,this.importVisio(y,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,n)?(f=!0,this.parseFile(null!=y?y:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?m(b.responseText):null!=v&&v(null))}),n)):0==b.indexOf("PK")&&null!=y?(f=!0,this.importZipFile(y,m,mxUtils.bind(this,function(){l=this.insertTextAt(this.validateFileData(b),d,e,!0,null,A);v(l)}))):/(\.v(sd|dx))($|\?)/i.test(n)||/(\.vs(s|x))($|\?)/i.test(n)||
+(l=this.insertTextAt(this.validateFileData(b),d,e,!0,null,A,null,null!=x?mxEvent.isControlDown(x):null));f||null==v||v(l);return l};EditorUi.prototype.importFiles=function(b,c,d,e,g,k,n,v,y,A,z,x,B){e=null!=e?e:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var f=null!=c&&null!=d,l=!0;c=null!=c?c:0;d=null!=d?d:0;var m=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var p=z||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>p){m=!0;break}var t=mxUtils.bind(this,
+function(){var m=this.editor.graph,p=m.gridSize;g=null!=g?g:mxUtils.bind(this,function(b,c,d,e,g,l,k,m,n){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,k)),null):this.importFile(b,c,d,e,g,l,k,m,n,f,x,B)}catch(ia){return this.handleError(ia),null}});k=null!=k?k:mxUtils.bind(this,function(b){m.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,t=q,u=[],D=mxUtils.bind(this,function(b,
+c){u[b]=c;if(0==--t){this.spinner.stop();if(null!=v)v(u);else{var d=[];m.getModel().beginUpdate();try{for(var f=0;f<u.length;f++){var e=u[f]();null!=e&&(d=d.concat(e))}}finally{m.getModel().endUpdate()}}k(d)}}),C=0;C<q;C++)mxUtils.bind(this,function(f){var k=b[f];if(null!=k){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==n||n(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+
+1)))),B=mxUtils.parseXml(u),u=B.getElementsByTagName("svg");if(0<u.length){var u=u[0],v=x?null:u.getAttribute("content");null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(v,!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?D(f,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=B){var b=B.getElementsByTagName("svg");if(0<b.length){var l=b[0],n=l.getAttribute("width"),
+x=l.getAttribute("height"),n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,u=l.getAttribute("viewBox");if(null==u||0==u.length)l.setAttribute("viewBox","0 0 "+n+" "+x);else if(isNaN(n)||isNaN(x)){var v=u.split(" ");3<v.length&&(n=parseFloat(v[2]),x=parseFloat(v[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(l));var D=Math.min(1,Math.min(e/Math.max(1,n)),e/Math.max(1,x)),A=g(q,k.type,c+f*p,d+f*p,Math.max(1,Math.round(n*D)),Math.max(1,Math.round(x*
+D)),k.name);if(isNaN(n)||isNaN(x)){var C=new Image;C.onload=mxUtils.bind(this,function(){n=Math.max(1,C.width);x=Math.max(1,C.height);A[0].geometry.width=n;A[0].geometry.height=x;l.setAttribute("viewBox","0 0 "+n+" "+x);q=Editor.createSvgDataUri(mxUtils.getXml(l));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));m.setCellStyles("image",q,[A[0]])});C.src=Editor.createSvgDataUri(mxUtils.getXml(l))}return A}}}catch(da){}return null})):D(f,mxUtils.bind(this,function(){return g(v,
+"text/xml",c+f*p,d+f*p,0,0,k.name)}))}else D(f,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==k.type){var C=x?null:this.extractGraphModelFromPng(b.target.result);if(null!=C&&0<C.length){var y=new Image;y.src=b.target.result;D(f,mxUtils.bind(this,function(){return g(C,"text/xml",c+f*p,d+f*p,y.width,y.height,k.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,b.target.result,mxUtils.bind(this,function(b,m,n){D(f,mxUtils.bind(this,function(){if(null!=b&&b.length<A){var x=l&&this.isResampleImageSize(k.size,z)?Math.min(1,Math.min(e/m,e/n)):1;return g(b,k.type,c+f*p,d+f*p,Math.round(m*x),Math.round(n*x),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),l,e,z,k.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,g(q,k.type,c+f*p,d+f*p,240,160,k.name,function(b){D(f,function(){return b})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?g(null,k.type,c+f*p,d+f*p,240,160,k.name,function(b){D(f,function(){return b})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?q.readAsDataURL(k):q.readAsText(k)}})(C)});if(m){m=
+[];for(q=0;q<b.length;q++)m.push(b[q]);b=m;this.confirmImageResize(function(b){l=b;t()},y)}else t()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(f,e){if(f||c)mxSettings.setResizeImages(f?e:null),mxSettings.save();d();b(e)};null==f||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
function(b){e(b,!0)},function(b){e(b,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,f)};EditorUi.prototype.parseFile=function(b,c,d){d=null!=d?d:b.name;var f=new FormData;f.append("format","xml");f.append("upfile",b,d);var e=new XMLHttpRequest;e.open("POST",
-OPEN_URL);e.onreadystatechange=function(){c(e)};e.send(f);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,d,e,g,k,m){g=null!=g?g:this.maxImageSize;var f=Math.max(1,b.width),l=Math.max(1,b.height);if(e&&this.isResampleImageSize(null!=m?m:c.length,k))try{var n=Math.max(f/g,l/g);if(1<n){var p=Math.round(f/n),y=Math.round(l/
-n),q=document.createElement("canvas");q.width=p;q.height=y;q.getContext("2d").drawImage(b,0,0,p,y);var t=q.toDataURL();if(t.length<c.length){var u=document.createElement("canvas");u.width=p;u.height=y;var G=u.toDataURL();t!==G&&(c=t,f=p,l=y)}}}catch(F){}d(c,f,l)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,d){try{var f=new Image;f.onload=function(){f.width=0<f.width?f.width:120;f.height=0<f.height?f.height:
-120;c(f)};null!=d&&(f.onerror=d);f.src=b}catch(q){if(null!=d)d(q);else throw q;}};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,f,e){var g=JSON.parse(e);f=
-new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(f){null!=f&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(f,g.format,function(e,l,k){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(d,"<pre>"+e+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(e),[d]);var n=c.model.getGeometry(d);null!=n&&(n=n.clone(),n.width=l,n.height=k,c.cellsResized([d],[n],!1))}c.setAttributeForCell(d,"plantUmlData",
+OPEN_URL);e.onreadystatechange=function(){c(e)};e.send(f);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,d,e,g,k,n){g=null!=g?g:this.maxImageSize;var f=Math.max(1,b.width),l=Math.max(1,b.height);if(e&&this.isResampleImageSize(null!=n?n:c.length,k))try{var m=Math.max(f/g,l/g);if(1<m){var p=Math.round(f/m),x=Math.round(l/
+m),q=document.createElement("canvas");q.width=p;q.height=x;q.getContext("2d").drawImage(b,0,0,p,x);var t=q.toDataURL();if(t.length<c.length){var u=document.createElement("canvas");u.width=p;u.height=x;var F=u.toDataURL();t!==F&&(c=t,f=p,l=x)}}}catch(G){}d(c,f,l)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,d){try{var f=new Image;f.onload=function(){f.width=0<f.width?f.width:120;f.height=0<f.height?f.height:
+120;c(f)};null!=d&&(f.onerror=d);f.src=b}catch(q){if(null!=d)d(q);else throw q;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,f,e){var g=JSON.parse(e);f=
+new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(f){null!=f&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(f,g.format,function(e,l,k){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(d,"<pre>"+e+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(e),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=l,m.height=k,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",
JSON.stringify({data:f,format:g.format}))}finally{c.getModel().endUpdate()}},function(c){b.handleError(c)})},null,null,400,220);b.showDialog(f.container,420,300,!0,!0);f.init()};c.cellEditor.editMermaidData=function(d,f,e){var g=JSON.parse(e);f=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(f){null!=f&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(f,g.config,function(e,l,k){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",
-e,[d]);var n=c.model.getGeometry(d);null!=n&&(n=n.clone(),n.width=Math.max(n.width,l),n.height=Math.max(n.height,k),c.cellsResized([d],[n],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:f,config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(c){b.handleError(c)})},null,null,400,220);b.showDialog(f.container,420,300,!0,!0);f.init()};var d=c.cellEditor.startEditing;c.cellEditor.startEditing=function(f,e){try{var g=this.graph.getAttributeForCell(f,"plantUmlData");if(null!=
+e,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,l),m.height=Math.max(m.height,k),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:f,config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(c){b.handleError(c)})},null,null,400,220);b.showDialog(f.container,420,300,!0,!0);f.init()};var d=c.cellEditor.startEditing;c.cellEditor.startEditing=function(f,e){try{var g=this.graph.getAttributeForCell(f,"plantUmlData");if(null!=
g)this.editPlantUmlData(f,e,g);else if(g=this.graph.getAttributeForCell(f,"mermaidData"),null!=g)this.editMermaidData(f,e,g);else{var l=c.getCellStyle(f);"1"==mxUtils.getValue(l,"metaEdit","0")?b.showDataDialog(f):d.apply(this,arguments)}}catch(L){b.handleError(L)}};c.getLinkTitle=function(c){return b.getLinkTitle(c)};c.customLinkClicked=function(c){var d=!1;try{b.handleCustomLink(c),d=!0}catch(I){b.handleError(I)}return d};var e=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var c=e.apply(this,
-arguments);null!=c&&null!=c.src&&Graph.isPageLink(c.src)&&(c={originalSrc:c.src});return c};var g=c.setBackgroundImage;c.setBackgroundImage=function(c){null!=c&&null!=c.originalSrc&&(c=b.createImageForPageLink(c.originalSrc,b.currentPage));g.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,
-function(b,d){var f=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=f){var e=f.indexOf(",");if(0<e)for(var f=f.substring(e+1),e=d.getProperty("patches"),g=0;g<e.length;g++)if(null!=e[g][EditorUi.DIFF_UPDATE]&&null!=e[g][EditorUi.DIFF_UPDATE][f]){c.refreshBackgroundImage();c.view.validateBackgroundImage();break}}}));var m=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,c){var d=m.apply(this,arguments);null==d||null==d.originalSrc||c||(d={src:d.originalSrc});return d};
+arguments);null!=c&&null!=c.src&&Graph.isPageLink(c.src)&&(c={originalSrc:c.src});return c};var k=c.setBackgroundImage;c.setBackgroundImage=function(c){null!=c&&null!=c.originalSrc&&(c=b.createImageForPageLink(c.originalSrc,b.currentPage));k.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,
+function(b,d){var f=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=f){var e=f.indexOf(",");if(0<e)for(var f=f.substring(e+1),e=d.getProperty("patches"),g=0;g<e.length;g++)if(null!=e[g][EditorUi.DIFF_UPDATE]&&null!=e[g][EditorUi.DIFF_UPDATE][f]){c.refreshBackgroundImage();c.view.validateBackgroundImage();break}}}));var n=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,c){var d=n.apply(this,arguments);null==d||null==d.originalSrc||c||(d={src:d.originalSrc});return d};
var u=this.clearDefaultStyle;this.clearDefaultStyle=function(){u.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var v=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==
-urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return v.apply(this,arguments)};var x=c.addClickHandler;c.addClickHandler=function(b,d,f){var e=d;d=function(b,d){if(null==d){var f=mxEvent.getSource(b);"a"==f.nodeName.toLowerCase()&&(d=f.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=e&&e(b,d)};x.call(this,b,d,f)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,
+urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return v.apply(this,arguments)};var y=c.addClickHandler;c.addClickHandler=function(b,d,f){var e=d;d=function(b,d){if(null==d){var f=mxEvent.getSource(b);"a"==f.nodeName.toLowerCase()&&(d=f.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=e&&e(b,d)};y.call(this,b,d,f)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,
null,!0);if(null!=this.menus){var A=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(c,d,f){b.editor.graph.isSelectionEmpty()?A.apply(this,arguments):b.menus.addMenuItems(c,"delete - cut copy copyAsImage - duplicate".split(" "),null,f)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var z=c.getExportVariables;c.getExportVariables=
-function(){var c=z.apply(this,arguments),d=b.getCurrentFile();null!=d&&(c.filename=d.getTitle());c.pagecount=null!=b.pages?b.pages.length:1;c.page=null!=b.currentPage?b.currentPage.getName():"";c.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return c};var y=c.getGlobalVariable;c.getGlobalVariable=function(c){var d=b.getCurrentFile();return"filename"==c&&null!=d?d.getTitle():"page"==c&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==c?null!=b.currentPage&&
-null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==c?null!=b.pages?b.pages.length:1:y.apply(this,arguments)};var B=c.labelLinkClicked;c.labelLinkClicked=function(b,d,f){var e=d.getAttribute("href");if(null==e||!c.isCustomLink(e)||!mxEvent.isTouchEvent(f)&&mxEvent.isPopupTrigger(f))B.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(e),c.getRubberband().reset();mxEvent.consume(f)}};this.editor.getOrCreateFilename=function(){var c=b.defaultFilename,
+function(){var c=z.apply(this,arguments),d=b.getCurrentFile();null!=d&&(c.filename=d.getTitle());c.pagecount=null!=b.pages?b.pages.length:1;c.page=null!=b.currentPage?b.currentPage.getName():"";c.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return c};var x=c.getGlobalVariable;c.getGlobalVariable=function(c){var d=b.getCurrentFile();return"filename"==c&&null!=d?d.getTitle():"page"==c&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==c?null!=b.currentPage&&
+null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==c?null!=b.pages?b.pages.length:1:x.apply(this,arguments)};var B=c.labelLinkClicked;c.labelLinkClicked=function(b,d,f){var e=d.getAttribute("href");if(null==e||!c.isCustomLink(e)||!mxEvent.isTouchEvent(f)&&mxEvent.isPopupTrigger(f))B.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(e),c.getRubberband().reset();mxEvent.consume(f)}};this.editor.getOrCreateFilename=function(){var c=b.defaultFilename,
d=b.getCurrentFile();null!=d&&(c=null!=d.getTitle()?d.getTitle():c);return c};var C=this.actions.get("print");C.setEnabled(!mxClient.IS_IOS||!navigator.standalone);C.visible=C.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),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),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&c.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(b){var d=c.cellEditor.text2,f=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(b){null!=f&&(f.parentNode.removeChild(f),f=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(d,
"dragover",mxUtils.bind(this,function(b){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=this.highlightElement(d));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=f&&(f.parentNode.removeChild(f),f=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,f,e,g,l){c.insertImage(b,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=0;c<b.length;c++)b[c]()},
@@ -10749,14 +10754,14 @@ mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/
mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(C=this.editor.graph.view,C.setUnit(mxSettings.getUnit()),C.addListener("unitChanged",function(b,c){mxSettings.setUnit(c.getProperty("unit"));mxSettings.save()}),
this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,C.unit),this.refresh());if("1"==urlParams.styledev){C=document.getElementById("geFooter");null!=C&&(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)})),C.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,c){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);
-this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var E=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:E.apply(this,arguments)}}C=document.getElementById("geInfo");null!=C&&C.parentNode.removeChild(C);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var G=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=G&&(G.parentNode.removeChild(G),
-G=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=G&&(G.parentNode.removeChild(G),G=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),
+this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var E=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:E.apply(this,arguments)}}C=document.getElementById("geInfo");null!=C&&C.parentNode.removeChild(C);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var F=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=F&&(F.parentNode.removeChild(F),
+F=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=F&&(F.parentNode.removeChild(F),F=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),
f=c.view.translate,e=c.view.scale,g=d.x/e-f.x,l=d.y/e-f.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(l=g=null),this.importFiles(b.dataTransfer.files,g,l,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(l=g=0);var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,
-null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,l,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var n=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(n);var m=null,f=d.getElementsByTagName("img");null!=f&&1==f.length?(n=f[0].getAttribute("src"),null==n&&(n=f[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(n)||(m=!0)):(f=d.getElementsByTagName("a"),null!=f&&1==f.length?n=f[0].getAttribute("href"):
-(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(n=mxUtils.getTextContent(d[0]))));var p=!0,y=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(n,g,l,!0,m,null,p,mxEvent.isControlDown(b)))});m&&null!=n&&n.length>this.resampleThreshold?this.confirmImageResize(function(b){p=b;y()},mxEvent.isControlDown(b)):y()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);
+null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,l,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var n=null,f=d.getElementsByTagName("img");null!=f&&1==f.length?(m=f[0].getAttribute("src"),null==m&&(m=f[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(n=!0)):(f=d.getElementsByTagName("a"),null!=f&&1==f.length?m=f[0].getAttribute("href"):
+(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var p=!0,x=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,l,!0,n,null,p,mxEvent.isControlDown(b)))});n&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){p=b;x()},mxEvent.isControlDown(b)):x()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);
var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,l,d*f,b*f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(k,g,l,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),g,l,!0))}}b.stopPropagation();
b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var d=c.clipboardData||c.originalEvent.clipboardData,f=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){f=!0;break}if(!f){var g=d.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(c,d,f,e,g,l){b.insertImage(c,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=0;c<b.length;c++)b[c]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([l.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(x){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){d.innerHTML=
+g[index];if("file"===l.kind){if(b.isEditing())this.importFiles([l.getAsFile()],0,0,this.maxImageSize,function(c,d,f,e,g,l){b.insertImage(c,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=0;c<b.length;c++)b[c]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([l.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){d.innerHTML=
"&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow=
"hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var f=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||
c.isEditing()||null!=this.dialog||"INPUT"==f.nodeName||"TEXTAREA"==f.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||e||(d.style.left=c.container.scrollLeft+10+"px",d.style.top=c.container.scrollTop+10+"px",c.container.appendChild(d),e=!0,d.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var f=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=f&&17!=
@@ -10768,22 +10773,22 @@ function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClie
mxUtils.bind(this,function(b,c){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(b,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.addListener("gridColorChanged",
mxUtils.bind(this,function(b,c){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(b,c){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(b,c,d){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var f=this.createImageDataUri(b,c,"png"),e=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));this.writeImageToClipboard(f,e,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(x){this.handleError(x)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=d?d:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var f=this.createImageDataUri(b,c,"png"),e=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));this.writeImageToClipboard(f,e,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=d?d:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
null,null,null,10,null,null,!0,null,0<b.length?b:null)}catch(p){this.handleError(p)}};EditorUi.prototype.writeImageToClipboard=function(b,c,d,e){var f=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":f,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+d+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](e)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var f=
mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(d.encodeCells(f));mxUtils.setTextContent(b,encodeURIComponent(e));c?(d.removeCells(f,!1),d.lastPasteXml=null):(d.lastPasteXml=e,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),
-c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,d,e){var f=this.editor.graph,g=null;f.lastPasteXml==b?f.pasteCounter++:(f.lastPasteXml=b,f.pasteCounter=0);var l=f.pasteCounter*f.gridSize;if(d||this.isCompatibleString(b))g=this.importXml(b,l,l),f.setSelectionCells(g);else if(c&&1==f.getSelectionCount()){l=f.getStartEditingCell(f.getSelectionCell(),e);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==f.getCurrentCellStyle(l)[mxConstants.STYLE_SHAPE])f.setCellStyles(mxConstants.STYLE_IMAGE,
-b,[l]);else{f.model.beginUpdate();try{f.labelChanged(l,b),Graph.isLink(b)&&f.setLinkForCell(l,b)}finally{f.model.endUpdate()}}f.setSelectionCell(l)}else g=f.getInsertPoint(),f.isMouseInsertPoint()&&(l=0,f.lastPasteXml==b&&0<f.pasteCounter&&f.pasteCounter--),g=this.insertTextAt(b,g.x+l,g.y+l,!0),f.setSelectionCells(g);f.isSelectionEmpty()||(f.scrollCellToVisible(f.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(f.view.getState(f.getSelectionCell())));return g};EditorUi.prototype.pasteCells=
-function(b,c,d,e){if(!mxEvent.isConsumed(b)){var f=c,g=!1;if(d&&null!=b.clipboardData&&b.clipboardData.getData){var l=b.clipboardData.getData("text/plain"),k=!1;if(null!=l&&0<l.length&&"%3CmxGraphModel%3E"==l.substring(0,18)){var n=decodeURIComponent(l);this.isCompatibleString(n)&&(k=!0,l=n)}k=k?null:b.clipboardData.getData("text/html");null!=k&&0<k.length?(f=this.parseHtmlData(k),g="text/plain"!=f.getAttribute("data-type")):null!=l&&0<l.length&&(f=document.createElement("div"),mxUtils.setTextContent(f,
-k))}l=f.getElementsByTagName("span");if(null!=l&&0<l.length&&"application/vnd.lucid.chart.objects"===l[0].getAttribute("data-lucid-type"))d=l[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(b){var c=this.editor.graph;c.lastPasteXml==b?c.pasteCounter++:(c.lastPasteXml=b,c.pasteCounter=0);var d=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(b,d,d));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),
-mxEvent.consume(b));else{g=g?f.innerHTML:mxUtils.trim(null==f.innerText?mxUtils.getTextContent(f):f.innerText);k=!1;try{var m=g.lastIndexOf("%3E");0<=m&&m<g.length-3&&(g=g.substring(0,m+3))}catch(y){}try{l=f.getElementsByTagName("span"),n=null!=l&&0<l.length?mxUtils.trim(decodeURIComponent(l[0].textContent)):decodeURIComponent(g),this.isCompatibleString(n)&&(k=!0,g=n)}catch(y){}try{if(null!=g&&0<g.length){this.pasteXml(g,e,k,b);try{mxEvent.consume(b)}catch(y){}}else if(!d){var p=this.editor.graph;
-p.lastPasteXml=null;p.pasteCounter=0}}catch(y){this.handleError(y)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var c=null,d=0;d<b.length;d++)mxEvent.addListener(b[d],"dragleave",function(b){null!=c&&(c.parentNode.removeChild(c),c=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[d],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&
+c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,d,e){var f=this.editor.graph,g=null;f.lastPasteXml==b?f.pasteCounter++:(f.lastPasteXml=b,f.pasteCounter=0);var k=f.pasteCounter*f.gridSize;if(d||this.isCompatibleString(b))g=this.importXml(b,k,k),f.setSelectionCells(g);else if(c&&1==f.getSelectionCount()){k=f.getStartEditingCell(f.getSelectionCell(),e);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==f.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])f.setCellStyles(mxConstants.STYLE_IMAGE,
+b,[k]);else{f.model.beginUpdate();try{f.labelChanged(k,b),Graph.isLink(b)&&f.setLinkForCell(k,b)}finally{f.model.endUpdate()}}f.setSelectionCell(k)}else g=f.getInsertPoint(),f.isMouseInsertPoint()&&(k=0,f.lastPasteXml==b&&0<f.pasteCounter&&f.pasteCounter--),g=this.insertTextAt(b,g.x+k,g.y+k,!0),f.setSelectionCells(g);f.isSelectionEmpty()||(f.scrollCellToVisible(f.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(f.view.getState(f.getSelectionCell())));return g};EditorUi.prototype.pasteCells=
+function(b,c,d,e){if(!mxEvent.isConsumed(b)){var f=c,g=!1;if(d&&null!=b.clipboardData&&b.clipboardData.getData){var k=b.clipboardData.getData("text/plain"),l=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(l=!0,k=m)}l=l?null:b.clipboardData.getData("text/html");null!=l&&0<l.length?(f=this.parseHtmlData(l),g="text/plain"!=f.getAttribute("data-type")):null!=k&&0<k.length&&(f=document.createElement("div"),mxUtils.setTextContent(f,
+l))}k=f.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))d=k[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(b){var c=this.editor.graph;c.lastPasteXml==b?c.pasteCounter++:(c.lastPasteXml=b,c.pasteCounter=0);var d=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(b,d,d));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),
+mxEvent.consume(b));else{g=g?f.innerHTML:mxUtils.trim(null==f.innerText?mxUtils.getTextContent(f):f.innerText);l=!1;try{var n=g.lastIndexOf("%3E");0<=n&&n<g.length-3&&(g=g.substring(0,n+3))}catch(x){}try{k=f.getElementsByTagName("span"),m=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(g),this.isCompatibleString(m)&&(l=!0,g=m)}catch(x){}try{if(null!=g&&0<g.length){this.pasteXml(g,e,l,b);try{mxEvent.consume(b)}catch(x){}}else if(!d){var p=this.editor.graph;
+p.lastPasteXml=null;p.pasteCounter=0}}catch(x){this.handleError(x)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var c=null,d=0;d<b.length;d++)mxEvent.addListener(b[d],"dragleave",function(b){null!=c&&(c.parentNode.removeChild(c),c=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[d],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&
12>document.documentMode)&&(c=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[d],"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);
else{var d=this.extractGraphModelFromEvent(b);if(null==d){var f=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=f&&(10==document.documentMode||11==document.documentMode?d=f.getData("Text"):(d=null,d=0<=mxUtils.indexOf(f.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(f.types,"text/html")?f.getData("text/html"):null,null!=d&&0<d.length?(f=document.createElement("div"),f.innerHTML=this.editor.graph.sanitizeHtml(d),f=f.getElementsByTagName("img"),0<f.length&&
(d=f[0].getAttribute("src"))):0<=mxUtils.indexOf(f.types,"text/plain")&&(d=f.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(d)&&
(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var c=0,d=0,f,e;if(null==b){e=document.body;var g=document.documentElement;f=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-
3}else c=b.offsetTop,d=b.offsetLeft,f=b.clientWidth,e=b.clientHeight;g=document.createElement("div");g.style.zIndex=mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=c+"px";g.style.left=d+"px";g.style.width=Math.max(0,f-3)+"px";g.style.height=Math.max(0,e-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=
function(b){b=mxUtils.parseXml(b);var c=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=c){var d=new mxCodec(c.ownerDocument),f=new mxGraphModel;d.decode(c,f);c=f.getChildAt(f.getRoot(),0);for(d=0;d<f.getChildCount(c);d++)b.push(f.getChildAt(c,d))}return b};EditorUi.prototype.openFileHandle=function(b,c,d,e,g){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var f=
-mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,e)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(d,mxUtils.bind(this,
+mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,e)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(d,mxUtils.bind(this,
function(b){this.spinner.stop();f(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,mxUtils.bind(this,function(b){this.spinner.stop();f(b)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(d,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?f(b.responseText):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,e)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,b,d.name))}catch(v){this.handleError(v,
mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(b){this.spinner.stop();f(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,e)}));else{if("image/png"==d.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==d.type){var k=Editor.extractGraphModelFromPdf(b);null!=k&&(g=null,e=!0,b=k)}this.spinner.stop();this.openLocalFile(b,c,e,g,null!=g?d:null)}}};EditorUi.prototype.openFiles=function(b,
@@ -10795,15 +10800,15 @@ d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));f.model.i
b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=b?"":"none";this.editor.graph.setEnabled(b);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=b?"":"hidden",this.ruler.vRuler.container.style.visibility=b?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden");b||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),
null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(b,c,d,e){this.spinner.stop();
this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,b,{}));this.mode=App.MODE_EMBED;this.setFileData(b);if(e)try{var f=this.editor.graph;f.setGridEnabled(!1);f.pageVisible=!1;var g=f.model.cells,k;for(k in g){var l=g[k];null!=l&&null!=l.style&&(l.style+=";sketch=1;"+(-1==l.style.indexOf("fontFamily=")||-1<l.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(x){console.log(x)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
+""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var c=this.editor.graph;return{event:b,pageVisible:c.pageVisible,translate:c.view.translate,bounds:c.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:c.view.scale,page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(b){var c=null,d=!1,
-f=!1,e=null,g=mxUtils.bind(this,function(b,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){if(g.source==(window.opener||window.parent)){var l=g.data,n=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==
-b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(na){}return b});if("json"==urlParams.proto){var m=!1;try{l=JSON.parse(l)}catch(R){l=null}try{if(null==l)return;if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?
+f=!1,e=null,g=mxUtils.bind(this,function(b,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){if(g.source==(window.opener||window.parent)){var l=g.data,m=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==
+b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(na){}return b});if("json"==urlParams.proto){var n=!1;try{l=JSON.parse(l)}catch(R){l=null}try{if(null==l)return;if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?
mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("layout"==l.action){this.executeLayoutList(l.layouts);return}if("prompt"==l.action){this.spinner.stop();var p=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):l.ok,function(b){null!=b?k.postMessage(JSON.stringify({event:"prompt",value:b,message:l}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:l}),
-"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(p.container,300,80,!0,!1);p.init();return}if("draft"==l.action){var q=n(l.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:l}),
+"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(p.container,300,80,!0,!1);p.init();return}if("draft"==l.action){var q=m(l.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:l}),
"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null,l.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:l}),"*")}):null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{p.init()}catch(R){k.postMessage(JSON.stringify({event:"draft",error:R.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();
-var t=1==l.enableRecent,u=1==l.enableSearch,v=1==l.enableCustomTemp;if("1"==urlParams.newTempDlg&&!l.templatesOnly&&null!=l.callback){var D=this.getCurrentUser(),x=new TemplatesDialog(this,function(b,c,d){b=b||this.emptyDiagramXml;k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c,tempUrl:d.url,libs:d.libs,builtIn:null!=d.info&&null!=d.info.custContentId,message:l}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=D?D.id:
-null,t?mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getRecentDiagrams",[d],null,b,c)}):null,u?mxUtils.bind(this,function(b,c,d,f){this.remoteInvoke("searchDiagrams",[b,f],null,c,d)}):null,mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getFileContent",[b.url],null,c,d)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(x.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=
+var t=1==l.enableRecent,u=1==l.enableSearch,v=1==l.enableCustomTemp;if("1"==urlParams.newTempDlg&&!l.templatesOnly&&null!=l.callback){var D=this.getCurrentUser(),y=new TemplatesDialog(this,function(b,c,d){b=b||this.emptyDiagramXml;k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c,tempUrl:d.url,libs:d.libs,builtIn:null!=d.info&&null!=d.info.custContentId,message:l}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=D?D.id:
+null,t?mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getRecentDiagrams",[d],null,b,c)}):null,u?mxUtils.bind(this,function(b,c,d,f){this.remoteInvoke("searchDiagrams",[b,f],null,c,d)}):null,mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getFileContent",[b.url],null,c,d)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=
new NewDialog(this,!1,l.templatesOnly?!1:null!=l.callback,mxUtils.bind(this,function(c,d,f,e){c=c||this.emptyDiagramXml;null!=l.callback?k.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,name:d,tempUrl:f,libs:e,builtIn:!0,message:l}),"*"):(b(c,g,c!=this.emptyDiagramXml,l.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,
"Network Error!")})}):null,u?mxUtils.bind(this,function(b,c){this.remoteInvoke("searchDiagrams",[b,null],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,c,d){k.postMessage(JSON.stringify({event:"template",docUrl:b,info:c,name:d}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==l.withoutType);this.showDialog(p.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();
b&&this.actions.get("exit").funct()}));p.init();return}if("textContent"==l.action){var K=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:K,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 L=null!=l.messageKey?mxResources.get(l.messageKey):
@@ -10814,31 +10819,31 @@ this.pages&&this.currentPage.getId()!=J){for(var W=P.getGlobalVariable,P=this.cr
"")+(null!=l.scale?"&scale="+l.scale:"")+"&base64=1&xml="+encodeURIComponent(M))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?O("data:image/png;base64,"+b.getText()):H(null)}),mxUtils.bind(this,function(){H(null)}))}}else{null!=l.xml&&0<l.xml.length&&(d=!0,this.setFileData(l.xml),d=!1);L=this.createLoadMessage("export");L.message=l;if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();L.xml=
mxUtils.getXml(ga);L.data=this.getFileData(null,null,!0,null,null,null,ga);L.format=l.format}else if("html"==l.format)M=this.editor.getGraphXml(),L.data=this.getHtml(M,this.editor.graph),L.xml=mxUtils.getXml(M),L.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;var aa=null!=l.background?l.background:this.editor.graph.background;aa==mxConstants.NONE&&(aa=null);L.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);L.format="svg";var Z=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);
this.spinner.stop();L.data=Editor.createSvgDataUri(b);k.postMessage(JSON.stringify(L),"*")});if("xmlsvg"==l.format)(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))&&this.getEmbeddedSvg(L.xml,this.editor.graph,null,!0,Z,null,null,l.embedImages,aa,l.scale,l.border,l.shadow,l.keepTheme);else 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);
-var Y=this.editor.graph.getSvg(aa,l.scale,l.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||l.shadow,null,l.keepTheme);(this.editor.graph.shadowVisible||l.shadow)&&this.editor.graph.addSvgShadow(Y);this.embedFonts(Y,mxUtils.bind(this,function(b){l.embedImages||null==l.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){Z(mxUtils.getXml(b))})):Z(mxUtils.getXml(b))}))}return}k.postMessage(JSON.stringify(L),"*")}return}if("load"==l.action){m=l.toSketch;f=1==l.autosave;
+var Y=this.editor.graph.getSvg(aa,l.scale,l.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||l.shadow,null,l.keepTheme);(this.editor.graph.shadowVisible||l.shadow)&&this.editor.graph.addSvgShadow(Y);this.embedFonts(Y,mxUtils.bind(this,function(b){l.embedImages||null==l.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){Z(mxUtils.getXml(b))})):Z(mxUtils.getXml(b))}))}return}k.postMessage(JSON.stringify(L),"*")}return}if("load"==l.action){n=l.toSketch;f=1==l.autosave;
this.hideDialog();null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified);null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit);null!=l.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=l.noSaveBtn);null!=l.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=l.noExitBtn);null!=l.title&&null!=this.buttonContainer&&(q=document.createElement("span"),mxUtils.write(q,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
"12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(q),this.embedFilenameSpan=q);try{l.libs&&this.sidebar.showEntries(l.libs)}catch(R){}l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):
-null!=l.descriptor?l.descriptor:l.xml}else{if("merge"==l.action){var ia=this.getCurrentFile();null!=ia&&(q=n(l.xml),null!=q&&""!=q&&ia.mergeFile(new LocalFile(this,q),function(){k.postMessage(JSON.stringify({event:"merge",message:l}),"*")},function(b){k.postMessage(JSON.stringify({event:"merge",message:l,error:b}),"*")}))}else"remoteInvokeReady"==l.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==l.action?this.handleRemoteInvoke(l,g.origin):"remoteInvokeResponse"==l.action?this.handleRemoteInvokeResponse(l):
-k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}catch(R){this.handleError(R)}}var ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),N=mxUtils.bind(this,function(g,l){d=!0;try{b(g,l,null,m)}catch(ja){this.handleError(ja)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");e=ca();f&&null==c&&(c=mxUtils.bind(this,function(b,c){var f=ca();if(f!=
+null!=l.descriptor?l.descriptor:l.xml}else{if("merge"==l.action){var ia=this.getCurrentFile();null!=ia&&(q=m(l.xml),null!=q&&""!=q&&ia.mergeFile(new LocalFile(this,q),function(){k.postMessage(JSON.stringify({event:"merge",message:l}),"*")},function(b){k.postMessage(JSON.stringify({event:"merge",message:l,error:b}),"*")}))}else"remoteInvokeReady"==l.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==l.action?this.handleRemoteInvoke(l,g.origin):"remoteInvokeResponse"==l.action?this.handleRemoteInvokeResponse(l):
+k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}catch(R){this.handleError(R)}}var ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),N=mxUtils.bind(this,function(g,l){d=!0;try{b(g,l,null,n)}catch(ja){this.handleError(ja)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");e=ca();f&&null==c&&(c=mxUtils.bind(this,function(b,c){var f=ca();if(f!=
e&&!d){var g=this.createLoadMessage("autosave");g.xml=f;(window.opener||window.parent).postMessage(JSON.stringify(g),"*")}e=f}),this.editor.graph.model.addListener(mxEvent.CHANGE,c),this.editor.graph.addListener("gridSizeChanged",c),this.editor.graph.addListener("shadowVisibleChanged",c),this.addListener("pageFormatChanged",c),this.addListener("pageScaleChanged",c),this.addListener("backgroundColorChanged",c),this.addListener("backgroundImageChanged",c),this.addListener("foldingEnabledChanged",c),
-this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",c),this.addListener("guidesEnabledChanged",c),this.addListener("pageViewChanged",c));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var n=this.createLoadMessage("load");n.xml=g;k.postMessage(JSON.stringify(n),"*")}});null!=l&&"function"===typeof l.substring&&"data:application/vnd.visio;base64,"==l.substring(0,34)?(n="0M8R4KGxGuE"==l.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(l.substring(l.indexOf(",")+
-1)),function(b){N(b,g)},mxUtils.bind(this,function(b){this.handleError(b)}),n)):null!=l&&"function"===typeof l.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,"")?this.parseFile(new Blob([l],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&N(b.responseText,g)}),""):null!=l&&"function"===typeof l.substring&&this.isLucidChartData(l)?this.convertLucidChart(l,
-mxUtils.bind(this,function(b){N(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==l||"object"!==typeof l||null==l.format||null==l.data&&null==l.url?(l=n(l),N(l,g)):this.loadDescriptor(l,mxUtils.bind(this,function(b){N(ca(),g)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(g,"*");if("json"==urlParams.proto){var m=
-this.editor.graph.openLink;this.editor.graph.openLink=function(b,c,d){m.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:b,target:c,allowOpener:d}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";
+this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",c),this.addListener("guidesEnabledChanged",c),this.addListener("pageViewChanged",c));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=g;k.postMessage(JSON.stringify(m),"*")}});null!=l&&"function"===typeof l.substring&&"data:application/vnd.visio;base64,"==l.substring(0,34)?(m="0M8R4KGxGuE"==l.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(l.substring(l.indexOf(",")+
+1)),function(b){N(b,g)},mxUtils.bind(this,function(b){this.handleError(b)}),m)):null!=l&&"function"===typeof l.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,"")?this.parseFile(new Blob([l],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&N(b.responseText,g)}),""):null!=l&&"function"===typeof l.substring&&this.isLucidChartData(l)?this.convertLucidChart(l,
+mxUtils.bind(this,function(b){N(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==l||"object"!==typeof l||null==l.format||null==l.data&&null==l.url?(l=m(l),N(l,g)):this.loadDescriptor(l,mxUtils.bind(this,function(b){N(ca(),g)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(g,"*");if("json"==urlParams.proto){var n=
+this.editor.graph.openLink;this.editor.graph.openLink=function(b,c,d){n.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:b,target:c,allowOpener:d}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";
var d=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var e="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,e);c.setAttribute("title",e);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),d=c);"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
mxUtils.write(c,d),c.setAttribute("title",d),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),d=c);d.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.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(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,f=d.getSelectionCells(),e=0;e<b.length;e++){var g=new window[b[e].layout](d);
-if(null!=b[e].config)for(var l in b[e].config)g[l]=b[e].config[l];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==f.length?null:f)},e==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),f=[],e=[],g={};if(0<d.length){var l={},k=null,m=null,A=null,z=null,y=null,B=null,C=null,E=null,G=null,F="",D="auto",I="auto",K=null,L=null,M=40,P=40,O=100,H=0,J=this.editor.graph;J.getGraphBounds();for(var W=function(){null!=c?c(ka):(J.setSelectionCells(ka),J.scrollCellToVisible(J.getSelectionCell()))},
-S=J.getFreeInsertPoint(),Q=S.x,X=S.y,S=X,fa=null,ga="auto",G=null,aa=[],Z=null,Y=null,ia=0;ia<d.length&&"#"==d[ia].charAt(0);){b=d[ia];for(ia++;ia<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[ia].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[ia].substring(1)),ia++;if("#"!=b.charAt(1)){var ca=b.indexOf(":");if(0<ca){var N=mxUtils.trim(b.substring(1,ca)),R=mxUtils.trim(b.substring(ca+1));"label"==N?fa=J.sanitizeHtml(R):"labelname"==N&&0<R.length&&"-"!=R?y=R:"labels"==N&&0<R.length&&"-"!=R?B=
-JSON.parse(R):"style"==N?m=R:"parentstyle"==N?C=R:"stylename"==N&&0<R.length&&"-"!=R?z=R:"styles"==N&&0<R.length&&"-"!=R?A=JSON.parse(R):"vars"==N&&0<R.length&&"-"!=R?k=JSON.parse(R):"identity"==N&&0<R.length&&"-"!=R?E=R:"parent"==N&&0<R.length&&"-"!=R?G=R:"namespace"==N&&0<R.length&&"-"!=R?F=R:"width"==N?D=R:"height"==N?I=R:"left"==N&&0<R.length?K=R:"top"==N&&0<R.length?L=R:"ignore"==N?Y=R.split(","):"connect"==N?aa.push(JSON.parse(R)):"link"==N?Z=R:"padding"==N?H=parseFloat(R):"edgespacing"==N?
-M=parseFloat(R):"nodespacing"==N?P=parseFloat(R):"levelspacing"==N?O=parseFloat(R):"layout"==N&&(ga=R)}}}if(null==d[ia])throw Error(mxResources.get("invalidOrMissingFile"));for(var na=this.editor.csvToArray(d[ia]),N=ca=null,R=[],U=0;U<na.length;U++)E==na[U]&&(ca=U),G==na[U]&&(N=U),R.push(mxUtils.trim(na[U]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==fa&&(fa="%"+R[0]+"%");if(null!=aa)for(var ja=0;ja<aa.length;ja++)null==l[aa[ja].to]&&(l[aa[ja].to]={});E=[];for(U=ia+1;U<
-d.length;U++){var ha=this.editor.csvToArray(d[U]);if(null==ha){var oa=40<d[U].length?d[U].substring(0,40)+"...":d[U];throw Error(oa+" ("+U+"):\n"+mxResources.get("containsValidationErrors"));}0<ha.length&&E.push(ha)}J.model.beginUpdate();try{for(U=0;U<E.length;U++){var ha=E[U],V=null,ba=null!=ca?F+ha[ca]:null;null!=ba&&(V=J.model.getCell(ba));var d=null!=V,da=new mxCell(fa,new mxGeometry(Q,S,0,0),m||"whiteSpace=wrap;html=1;");da.vertex=!0;da.id=ba;for(var ea=0;ea<ha.length;ea++)J.setAttributeForCell(da,
-R[ea],ha[ea]);if(null!=y&&null!=B){var ra=B[da.getAttribute(y)];null!=ra&&J.labelChanged(da,ra)}if(null!=z&&null!=A){var pa=A[da.getAttribute(z)];null!=pa&&(da.style=pa)}J.setAttributeForCell(da,"placeholders","1");da.style=J.replacePlaceholders(da,da.style,k);d&&(J.model.setGeometry(V,da.geometry),J.model.setStyle(V,da.style),0>mxUtils.indexOf(e,V)&&e.push(V));V=da;if(!d)for(ja=0;ja<aa.length;ja++)l[aa[ja].to][V.getAttribute(aa[ja].to)]=V;null!=Z&&"link"!=Z&&(J.setLinkForCell(V,V.getAttribute(Z)),
+if(null!=b[e].config)for(var k in b[e].config)g[k]=b[e].config[k];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==f.length?null:f)},e==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),f=[],e=[],g={};if(0<d.length){var k={},l=null,n=null,A=null,z=null,x=null,B=null,C=null,E=null,F=null,G="",D="auto",I="auto",K=null,L=null,M=40,P=40,O=100,H=0,J=this.editor.graph;J.getGraphBounds();for(var W=function(){null!=c?c(ka):(J.setSelectionCells(ka),J.scrollCellToVisible(J.getSelectionCell()))},
+S=J.getFreeInsertPoint(),Q=S.x,X=S.y,S=X,fa=null,ga="auto",F=null,aa=[],Z=null,Y=null,ia=0;ia<d.length&&"#"==d[ia].charAt(0);){b=d[ia];for(ia++;ia<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[ia].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[ia].substring(1)),ia++;if("#"!=b.charAt(1)){var ca=b.indexOf(":");if(0<ca){var N=mxUtils.trim(b.substring(1,ca)),R=mxUtils.trim(b.substring(ca+1));"label"==N?fa=J.sanitizeHtml(R):"labelname"==N&&0<R.length&&"-"!=R?x=R:"labels"==N&&0<R.length&&"-"!=R?B=
+JSON.parse(R):"style"==N?n=R:"parentstyle"==N?C=R:"stylename"==N&&0<R.length&&"-"!=R?z=R:"styles"==N&&0<R.length&&"-"!=R?A=JSON.parse(R):"vars"==N&&0<R.length&&"-"!=R?l=JSON.parse(R):"identity"==N&&0<R.length&&"-"!=R?E=R:"parent"==N&&0<R.length&&"-"!=R?F=R:"namespace"==N&&0<R.length&&"-"!=R?G=R:"width"==N?D=R:"height"==N?I=R:"left"==N&&0<R.length?K=R:"top"==N&&0<R.length?L=R:"ignore"==N?Y=R.split(","):"connect"==N?aa.push(JSON.parse(R)):"link"==N?Z=R:"padding"==N?H=parseFloat(R):"edgespacing"==N?
+M=parseFloat(R):"nodespacing"==N?P=parseFloat(R):"levelspacing"==N?O=parseFloat(R):"layout"==N&&(ga=R)}}}if(null==d[ia])throw Error(mxResources.get("invalidOrMissingFile"));for(var na=this.editor.csvToArray(d[ia]),N=ca=null,R=[],U=0;U<na.length;U++)E==na[U]&&(ca=U),F==na[U]&&(N=U),R.push(mxUtils.trim(na[U]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==fa&&(fa="%"+R[0]+"%");if(null!=aa)for(var ja=0;ja<aa.length;ja++)null==k[aa[ja].to]&&(k[aa[ja].to]={});E=[];for(U=ia+1;U<
+d.length;U++){var ha=this.editor.csvToArray(d[U]);if(null==ha){var oa=40<d[U].length?d[U].substring(0,40)+"...":d[U];throw Error(oa+" ("+U+"):\n"+mxResources.get("containsValidationErrors"));}0<ha.length&&E.push(ha)}J.model.beginUpdate();try{for(U=0;U<E.length;U++){var ha=E[U],V=null,ba=null!=ca?G+ha[ca]:null;null!=ba&&(V=J.model.getCell(ba));var d=null!=V,da=new mxCell(fa,new mxGeometry(Q,S,0,0),n||"whiteSpace=wrap;html=1;");da.vertex=!0;da.id=ba;for(var ea=0;ea<ha.length;ea++)J.setAttributeForCell(da,
+R[ea],ha[ea]);if(null!=x&&null!=B){var ra=B[da.getAttribute(x)];null!=ra&&J.labelChanged(da,ra)}if(null!=z&&null!=A){var pa=A[da.getAttribute(z)];null!=pa&&(da.style=pa)}J.setAttributeForCell(da,"placeholders","1");da.style=J.replacePlaceholders(da,da.style,l);d&&(J.model.setGeometry(V,da.geometry),J.model.setStyle(V,da.style),0>mxUtils.indexOf(e,V)&&e.push(V));V=da;if(!d)for(ja=0;ja<aa.length;ja++)k[aa[ja].to][V.getAttribute(aa[ja].to)]=V;null!=Z&&"link"!=Z&&(J.setLinkForCell(V,V.getAttribute(Z)),
J.setAttributeForCell(V,Z,null));J.fireEvent(new mxEventObject("cellsInserted","cells",[V]));var la=this.editor.graph.getPreferredSizeForCell(V);V.vertex&&(null!=K&&null!=V.getAttribute(K)&&(V.geometry.x=Q+parseFloat(V.getAttribute(K))),null!=L&&null!=V.getAttribute(L)&&(V.geometry.y=X+parseFloat(V.getAttribute(L))),"@"==D.charAt(0)&&null!=V.getAttribute(D.substring(1))?V.geometry.width=parseFloat(V.getAttribute(D.substring(1))):V.geometry.width="auto"==D?la.width+H:parseFloat(D),"@"==I.charAt(0)&&
-null!=V.getAttribute(I.substring(1))?V.geometry.height=parseFloat(V.getAttribute(I.substring(1))):V.geometry.height="auto"==I?la.height+H:parseFloat(I),S+=V.geometry.height+P);d?(null==g[ba]&&(g[ba]=[]),g[ba].push(V)):(G=null!=N?J.model.getCell(F+ha[N]):null,f.push(V),null!=G?(G.style=J.replacePlaceholders(G,C,k),J.addCell(V,G)):e.push(J.addCell(V)))}for(var qa=e.slice(),ka=e.slice(),ja=0;ja<aa.length;ja++)for(var sa=aa[ja],U=0;U<f.length;U++){var V=f[U],ta=mxUtils.bind(this,function(b,c,d){var f=
-c.getAttribute(d.from);if(null!=f&&(J.setAttributeForCell(c,d.from,null),""!=f))for(var f=f.split(","),e=0;e<f.length;e++){var g=l[d.to][f[e]];if(null!=g){var n=d.label;null!=d.fromlabel&&(n=(c.getAttribute(d.fromlabel)||"")+(n||""));null!=d.sourcelabel&&(n=J.replacePlaceholders(c,d.sourcelabel,k)+(n||""));null!=d.tolabel&&(n=(n||"")+(g.getAttribute(d.tolabel)||""));null!=d.targetlabel&&(n=(n||"")+J.replacePlaceholders(g,d.targetlabel,k));var m="target"==d.placeholders==!d.invert?g:b,m=null!=d.style?
-J.replacePlaceholders(m,d.style,k):J.createCurrentEdgeStyle(),n=J.insertEdge(null,null,n||"",d.invert?g:b,d.invert?b:g,m);if(null!=d.labels)for(m=0;m<d.labels.length;m++){var p=d.labels[m],y=new mxCell(p.label||m,new mxGeometry(null!=p.x?p.x:0,null!=p.y?p.y:0,0,0),"resizable=0;html=1;");y.vertex=!0;y.connectable=!1;y.geometry.relative=!0;null!=p.placeholders&&(y.value=J.replacePlaceholders("target"==p.placeholders==!d.invert?g:b,y.value,k));if(null!=p.dx||null!=p.dy)y.geometry.offset=new mxPoint(null!=
-p.dx?p.dx:0,null!=p.dy?p.dy:0);n.insert(y)}ka.push(n);mxUtils.remove(d.invert?b:g,qa)}}});ta(V,V,sa);if(null!=g[V.id])for(ea=0;ea<g[V.id].length;ea++)ta(V,g[V.id][ea],sa)}if(null!=Y)for(U=0;U<f.length;U++)for(V=f[U],ea=0;ea<Y.length;ea++)J.setAttributeForCell(V,mxUtils.trim(Y[ea]),null);if(0<e.length){var T=new mxParallelEdgeLayout(J);T.spacing=M;T.checkOverlap=!0;var ua=function(){0<T.spacing&&T.execute(J.getDefaultParent());for(var b=0;b<e.length;b++){var c=J.getCellGeometry(e[b]);c.x=Math.round(J.snap(c.x));
+null!=V.getAttribute(I.substring(1))?V.geometry.height=parseFloat(V.getAttribute(I.substring(1))):V.geometry.height="auto"==I?la.height+H:parseFloat(I),S+=V.geometry.height+P);d?(null==g[ba]&&(g[ba]=[]),g[ba].push(V)):(F=null!=N?J.model.getCell(G+ha[N]):null,f.push(V),null!=F?(F.style=J.replacePlaceholders(F,C,l),J.addCell(V,F)):e.push(J.addCell(V)))}for(var qa=e.slice(),ka=e.slice(),ja=0;ja<aa.length;ja++)for(var sa=aa[ja],U=0;U<f.length;U++){var V=f[U],ta=mxUtils.bind(this,function(b,c,d){var f=
+c.getAttribute(d.from);if(null!=f&&(J.setAttributeForCell(c,d.from,null),""!=f))for(var f=f.split(","),e=0;e<f.length;e++){var g=k[d.to][f[e]];if(null!=g){var m=d.label;null!=d.fromlabel&&(m=(c.getAttribute(d.fromlabel)||"")+(m||""));null!=d.sourcelabel&&(m=J.replacePlaceholders(c,d.sourcelabel,l)+(m||""));null!=d.tolabel&&(m=(m||"")+(g.getAttribute(d.tolabel)||""));null!=d.targetlabel&&(m=(m||"")+J.replacePlaceholders(g,d.targetlabel,l));var n="target"==d.placeholders==!d.invert?g:b,n=null!=d.style?
+J.replacePlaceholders(n,d.style,l):J.createCurrentEdgeStyle(),m=J.insertEdge(null,null,m||"",d.invert?g:b,d.invert?b:g,n);if(null!=d.labels)for(n=0;n<d.labels.length;n++){var p=d.labels[n],x=new mxCell(p.label||n,new mxGeometry(null!=p.x?p.x:0,null!=p.y?p.y:0,0,0),"resizable=0;html=1;");x.vertex=!0;x.connectable=!1;x.geometry.relative=!0;null!=p.placeholders&&(x.value=J.replacePlaceholders("target"==p.placeholders==!d.invert?g:b,x.value,l));if(null!=p.dx||null!=p.dy)x.geometry.offset=new mxPoint(null!=
+p.dx?p.dx:0,null!=p.dy?p.dy:0);m.insert(x)}ka.push(m);mxUtils.remove(d.invert?b:g,qa)}}});ta(V,V,sa);if(null!=g[V.id])for(ea=0;ea<g[V.id].length;ea++)ta(V,g[V.id][ea],sa)}if(null!=Y)for(U=0;U<f.length;U++)for(V=f[U],ea=0;ea<Y.length;ea++)J.setAttributeForCell(V,mxUtils.trim(Y[ea]),null);if(0<e.length){var T=new mxParallelEdgeLayout(J);T.spacing=M;T.checkOverlap=!0;var ua=function(){0<T.spacing&&T.execute(J.getDefaultParent());for(var b=0;b<e.length;b++){var c=J.getCellGeometry(e[b]);c.x=Math.round(J.snap(c.x));
c.y=Math.round(J.snap(c.y));"auto"==D&&(c.width=Math.round(J.snap(c.width)));"auto"==I&&(c.height=Math.round(J.snap(c.height)))}};if("["==ga.charAt(0)){var ma=W;J.view.validate();this.executeLayoutList(JSON.parse(ga),function(){ua();ma()});W=null}else if("circle"==ga){var va=new mxCircleLayout(J);va.disableEdgeStyle=!1;va.resetEdges=!1;var xa=va.isVertexIgnored;va.isVertexIgnored=function(b){return xa.apply(this,arguments)||0>mxUtils.indexOf(e,b)};this.executeLayout(function(){va.execute(J.getDefaultParent());
ua()},!0,W);W=null}else if("horizontaltree"==ga||"verticaltree"==ga||"auto"==ga&&ka.length==2*e.length-1&&1==qa.length){J.view.validate();var ya=new mxCompactTreeLayout(J,"horizontaltree"==ga);ya.levelDistance=P;ya.edgeRouting=!1;ya.resetEdges=!1;this.executeLayout(function(){ya.execute(J.getDefaultParent(),0<qa.length?qa[0]:null)},!0,W);W=null}else if("horizontalflow"==ga||"verticalflow"==ga||"auto"==ga&&1==qa.length){J.view.validate();var za=new mxHierarchicalLayout(J,"horizontalflow"==ga?mxConstants.DIRECTION_WEST:
mxConstants.DIRECTION_NORTH);za.intraCellSpacing=P;za.parallelEdgeSpacing=M;za.interRankCellSpacing=O;za.disableEdgeStyle=!1;this.executeLayout(function(){za.execute(J.getDefaultParent(),ka);J.moveCells(ka,Q,X)},!0,W);W=null}else if("organic"==ga||"auto"==ga&&ka.length>e.length){J.view.validate();var wa=new mxFastOrganicLayout(J);wa.forceConstant=3*P;wa.disableEdgeStyle=!1;wa.resetEdges=!1;var Aa=wa.isVertexIgnored;wa.isVertexIgnored=function(b){return Aa.apply(this,arguments)||0>mxUtils.indexOf(e,
@@ -10848,23 +10853,23 @@ function(b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c+
this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),
this.menus.get("newLibrary").setEnabled(d));b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);this.actions.get("undo").setEnabled(this.canUndo()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&b);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);
this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();
-return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),d=this.isDiagramActive(),e=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(d);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(d);this.actions.get("editData").setEnabled(0<
+return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),d=this.isDiagramActive(),e=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(d);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(d);this.actions.get("editData").setEnabled(0<
e.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(d);this.actions.get("connectionArrows").setEnabled(d);this.actions.get("connectionPoints").setEnabled(d);this.actions.get("copyStyle").setEnabled(d&&!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(d&&0<e.length);this.actions.get("editGeometry").setEnabled(0<e.length&&b.getModel().isVertex(e[0]));this.actions.get("createShape").setEnabled(d);this.actions.get("createRevision").setEnabled(d);this.actions.get("moveToFolder").setEnabled(null!=
c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(d&&(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("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());c=this.actions.get("findReplace");c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());this.actions.get("editShape").setEnabled(d&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var m=EditorUi.prototype.destroy;
-EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);m.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,d,e,g,k,m,v){var f=b.editor.graph;if("xml"==d)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==d)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(f.getSvg(e,
-g,k)),"image/svg+xml");else{var l=b.getFileData(!0,null,null,null,null,!0),n=f.getGraphBounds(),p=Math.floor(n.width*g/f.view.scale),q=Math.floor(n.height*g/f.view.scale);if(l.length<=MAX_REQUEST_SIZE&&p*q<MAX_AREA)if(b.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!b.isExportToCanvas()){var t={globalVars:f.getExportVariables()};v&&(t.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});b.saveRequest(c,d,function(b,c){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(c||"0")+
-(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(0<m?"&dpi="+m:"")+"&bg="+(null!=e?e:"none")+"&w="+p+"&h="+q+"&border="+k+"&xml="+encodeURIComponent(l))})}else"png"==d?b.exportImage(g,null==e||"none"==e,!0,!1,!1,k,!0,!1,null,v,m):b.exportImage(g,!1,!0,!1,!1,k,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=
+c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());c=this.actions.get("findReplace");c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());this.actions.get("editShape").setEnabled(d&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var n=EditorUi.prototype.destroy;
+EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);n.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,d,e,g,k,n,v){var f=b.editor.graph;if("xml"==d)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==d)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(f.getSvg(e,
+g,k)),"image/svg+xml");else{var l=b.getFileData(!0,null,null,null,null,!0),m=f.getGraphBounds(),p=Math.floor(m.width*g/f.view.scale),q=Math.floor(m.height*g/f.view.scale);if(l.length<=MAX_REQUEST_SIZE&&p*q<MAX_AREA)if(b.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!b.isExportToCanvas()){var t={globalVars:f.getExportVariables()};v&&(t.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});b.saveRequest(c,d,function(b,c){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(c||"0")+
+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(0<n?"&dpi="+n:"")+"&bg="+(null!=e?e:"none")+"&w="+p+"&h="+q+"&border="+k+"&xml="+encodeURIComponent(l))})}else"png"==d?b.exportImage(g,null==e||"none"==e,!0,!1,!1,k,!0,!1,null,v,n):b.exportImage(g,!1,!0,!1,!1,k,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=
this.pages)for(var d=0;d<this.pages.length;d++){var e=b;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[d]),e.model.setRoot(this.pages[d].root));c+=this.pages[d].getName()+" "+e.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(b){var c={},d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,
-mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(e);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var g={};try{var k=mxSettings.getCustomLibraries();for(b=0;b<k.length;b++){var m=k[b];if("R"==m.substring(0,1)){var x=JSON.parse(decodeURIComponent(m.substring(1)));g[x[0]]=
-{id:x[0],title:x[1],downloadUrl:x[2]}}}}catch(A){}this.remoteInvoke("getCustomLibraries",null,null,function(b){f.innerHTML="";if(0==b.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var d=0;d<b.length;d++){var e=b[d];g[e.id]&&(c[e.id]=e);var k=this.addCheckbox(f,e.title,g[e.id]);(function(b,d){mxEvent.addListener(d,"change",function(){this.checked?c[b.id]=b:delete c[b.id]})})(e,k)}},mxUtils.bind(this,
+mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(e);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var g={};try{var k=mxSettings.getCustomLibraries();for(b=0;b<k.length;b++){var n=k[b];if("R"==n.substring(0,1)){var y=JSON.parse(decodeURIComponent(n.substring(1)));g[y[0]]=
+{id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(A){}this.remoteInvoke("getCustomLibraries",null,null,function(b){f.innerHTML="";if(0==b.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var d=0;d<b.length;d++){var e=b[d];g[e.id]&&(c[e.id]=e);var k=this.addCheckbox(f,e.title,g[e.id]);(function(b,d){mxEvent.addListener(d,"change",function(){this.checked?c[b.id]=b:delete c[b.id]})})(e,k)}},mxUtils.bind(this,
function(b){f.innerHTML="";var c=document.createElement("div");c.style.padding="8px";c.style.textAlign="center";mxUtils.write(c,mxResources.get("error")+": ");mxUtils.write(c,null!=b&&null!=b.message?b.message:mxResources.get("unknownError"));f.appendChild(c)}));d.appendChild(f);d=new CustomDialog(this,d,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var b=0,d;for(d in c)null==g[d]&&(b++,mxUtils.bind(this,function(c){this.remoteInvoke("getFileContent",[c.downloadUrl],
null,mxUtils.bind(this,function(d){b--;0==b&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,d,c))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(c[d]));for(d in g)c[d]||this.closeLibrary(new RemoteLibrary(this,null,g[d]));0==b&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(d.container,
340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(b){this.remoteWin=b;for(var c=0;c<this.remoteInvokeQueue.length;c++)b.postMessage(this.remoteInvokeQueue[c],
"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(b){var c=b.msgMarkers,d=this.remoteInvokeCallbacks[c.callbackId];if(null==d)throw Error("No callback for "+(null!=c?c.callbackId:"null"));b.error?d.error&&d.error(b.error.errResp):d.callback&&d.callback.apply(this,b.resp);this.remoteInvokeCallbacks[c.callbackId]=null};EditorUi.prototype.remoteInvoke=function(b,c,d,e,g){var f=!0,k=window.setTimeout(mxUtils.bind(this,function(){f=!1;g({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),l=mxUtils.bind(this,function(){window.clearTimeout(k);f&&e.apply(this,arguments)}),n=mxUtils.bind(this,function(){window.clearTimeout(k);f&&g.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:l,error:n});b=JSON.stringify({event:"remoteInvoke",funtionName:b,functionArgs:c,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(b,"*"):this.remoteInvokeQueue.push(b)};EditorUi.prototype.handleRemoteInvoke=function(b,
+this.timeout),l=mxUtils.bind(this,function(){window.clearTimeout(k);f&&e.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(k);f&&g.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:l,error:m});b=JSON.stringify({event:"remoteInvoke",funtionName:b,functionArgs:c,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(b,"*"):this.remoteInvokeQueue.push(b)};EditorUi.prototype.handleRemoteInvoke=function(b,
c){var d=mxUtils.bind(this,function(c,d){var e={event:"remoteInvokeResponse",msgMarkers:b.msgMarkers};null!=d?e.error={errResp:d}:null!=c&&(e.resp=c);this.remoteWin.postMessage(JSON.stringify(e),"*")});try{var e=b.funtionName,f=this.remoteInvokableFns[e];if(null!=f&&"function"===typeof this[e]){if(f.allowedDomains){for(var g=!1,k=0;k<f.allowedDomains.length;k++)if(c=="https://"+f.allowedDomains[k]){g=!0;break}if(!g){d(null,"Invalid Call: "+e+" is not allowed.");return}}var l=b.functionArgs;Array.isArray(l)||
-(l=[]);if(f.isAsync)l.push(function(){d(Array.prototype.slice.apply(arguments))}),l.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,l);else{var m=this[e].apply(this,l);d([m])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(A){d(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=
+(l=[]);if(f.isAsync)l.push(function(){d(Array.prototype.slice.apply(arguments))}),l.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,l);else{var n=this[e].apply(this,l);d([n])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(A){d(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=
function(b){try{var d=e.result;1>b.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>b.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),d.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(u){null!=c&&c(u)}};e.onsuccess=mxUtils.bind(this,function(c){var d=e.result;this.database=d;EditorUi.migrateStorageFiles&&(StorageFile.migrate(d),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(b){if(!b||"1"==urlParams.forceMigration){var c=document.createElement("iframe");c.style.display="none";c.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(c);var d=!0,e=!1,f,g=0,k=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){g++;m()}),m=mxUtils.bind(this,function(){try{if(g>=f.length)k();else{var b=f[g];StorageFile.getFileContent(this,b,mxUtils.bind(this,function(d){null==d||".scratchpad"==b&&d==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(D){console.log(D)}}),n=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,
@@ -10875,65 +10880,65 @@ function(b,c,d,e){this.openDatabase(mxUtils.bind(this,function(f){try{e=e||"obje
c.target.result["continue"]())};f.onerror=c}catch(u){null!=c&&c(u)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,d){this.openDatabase(mxUtils.bind(this,function(e){try{d=d||"objects";var f=e.transaction([d],"readonly").objectStore(d).getAllKeys();f.onsuccess=function(){b(f.result)};f.onerror=c}catch(t){null!=c&&c(t)}}),c)};EditorUi.prototype.commentsSupported=function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=
this.getCurrentFile();return null!=b?b.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(b,c){var d=this.getCurrentFile();null!=d?d.getComments(b,c):b([])};EditorUi.prototype.addComment=function(b,c,d){var e=this.getCurrentFile();null!=e?e.addComment(b,c,d):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var b=this.getCurrentFile();return null!=b?
b.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var b=this.getCurrentFile();return null!=b?b.canComment():!0};EditorUi.prototype.newComment=function(b,c){var d=this.getCurrentFile();return null!=d?d.newComment(b,c):new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var b=this.getCurrentFile();return null!=b&&b.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(b,c){var d=this.getCurrentFile();null!=
-d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,d,e,g,k,m,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(b,c,d,e,g,k,m,v)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,d,e,g,k,m,v,x,A,z,y,B,C,E,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,d,e,g,k,m,v,x,A,z,y,B,C,E,G)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,d,e,g,k,n,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
+return this.editor.loadUrl(b,c,d,e,g,k,n,v)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
+return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,d,e,g,k,n,v,y,A,z,x,B,C,E,F){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,d,e,g,k,n,v,y,A,z,x,B,C,E,F)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
return this.editor.convertImages(b,c,d,e)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=function(b,c,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,d,e)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,d,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,c,d,e,g)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var d=localStorage.key(c),e=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<e.length){var g=
"<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(g||e)&&b.push(d)}}return b};EditorUi.prototype.getLocalStorageFile=function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,d,c,k,g){function m(){for(var b=y.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==y&&c++;B.style.display=0==c?"block":"none"}function f(b,c,d,e){function f(){c.removeChild(l);c.removeChild(n);k.style.display="block";g.style.display="block"}x={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
-"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var n=document.createElement("div");n.className="geCommentEditBtns";var p=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),m()):f();x=null});p.className="geCommentEditBtn";n.appendChild(p);var y=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);x=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
-function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(y.click(),mxEvent.consume(b)):27==b.keyCode&&(p.click(),mxEvent.consume(b)))}));y.focus();y.className="geCommentEditBtn gePrimaryBtn";n.appendChild(y);c.insertBefore(n,g);k.style.display="none";g.style.display="none";l.focus()}function l(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
-[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function n(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function p(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function q(b){b.style.border="";b.removeChild(b.busyImg)}function t(c,d,e,g,k){function C(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
-"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});P.appendChild(f);e&&(f.style.display="none")}function D(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=z;b(c);return{pdiv:e,replies:d}}function M(d,e,k,l,m){function y(){n(C);c.addReply(v,function(b){v.id=b;c.replies.push(v);q(C);k&&k()},function(c){B();p(C);b.handleError(c,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},l,m)}function B(){f(v,C,function(b){y()},!0)}var u=D().pdiv,v=b.newComment(d,b.getCurrentUser());v.pCommentId=c.id;null==c.replies&&(c.replies=[]);var C=t(v,c.replies,u,g+1);e?B():y()}if(k||!c.isResolved){B.style.display="none";var z=document.createElement("div");z.className="geCommentContainer";z.setAttribute("data-commentId",c.id);z.style.marginLeft=20*g+5+"px";c.isResolved&&!Editor.isDarkMode()&&(z.style.backgroundColor="ghostWhite");
-var E=document.createElement("div");E.className="geCommentHeader";var A=document.createElement("img");A.className="geCommentUserImg";A.src=c.user.pictureUrl||Editor.userImage;E.appendChild(A);A=document.createElement("div");A.className="geCommentHeaderTxt";E.appendChild(A);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,c.user.displayName||"");A.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",c.id);l(c,
-F);A.appendChild(F);z.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,c.content||"");z.appendChild(E);c.isLocked&&(z.style.opacity="0.5");E=document.createElement("div");E.className="geCommentActions";var P=document.createElement("ul");P.className="geCommentActionsList";E.appendChild(P);u||c.isLocked||0!=g&&!v||C(mxResources.get("reply"),function(){M("",!0)},c.isResolved);A=b.getCurrentUser();null==A||A.id!=c.user.id||u||c.isLocked||(C(mxResources.get("edit"),
-function(){function d(){f(c,z,function(){n(z);c.editComment(c.content,function(){q(z)},function(c){p(z);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),C(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){n(z);c.deleteComment(function(b){if(!0===b){b=z.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var e=z.querySelectorAll(".geCommentAction");for(b=
-0;b<e.length;b++)e[b].parentNode.removeChild(e[b]);q(z);z.style.opacity="0.5"}else{e=D(c).replies;for(b=0;b<e.length;b++)y.removeChild(e[b]);for(b=0;b<d.length;b++)if(d[b]==c){d.splice(b,1);break}B.style.display=0==y.getElementsByTagName("div").length?"block":"none"}},function(c){p(z);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=g||C(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
-b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=D(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),n=0;n<l.length;n++)l[n]!=d.parentNode&&(l[n].style.display=e);G||(f[k].style.display="none")}m()}c.isResolved?M(mxResources.get("reOpened")+": ",!0,
-d,!1,!0):M(mxResources.get("markedAsResolved"),!1,d,!0)});z.appendChild(E);null!=e?y.insertBefore(z,e.nextSibling):y.appendChild(z);for(e=0;null!=c.replies&&e<c.replies.length;e++)E=c.replies[e],E.isResolved=c.isResolved,t(E,c.replies,null,g+1,k);null!=x&&(x.comment.id==c.id?(k=c.content,c.content=x.comment.content,f(c,z,x.saveCallback,x.deleteOnCancel),c.content=k):null==x.comment.id&&x.comment.pCommentId==c.id&&(y.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return z}}
-var u=!b.canComment(),v=b.canReplyToReplies(),x=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var z=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y.style.bottom=parseInt(z)+7+"px";A.appendChild(y);var B=document.createElement("span");B.style.cssText="display:none;padding-top:10px;text-align:center;";
+var CommentsWindow=function(b,e,d,c,g,k){function n(){for(var b=x.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==x&&c++;B.style.display=0==c?"block":"none"}function f(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}y={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var m=document.createElement("div");m.className="geCommentEditBtns";var p=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),n()):f();y=null});p.className="geCommentEditBtn";m.appendChild(p);var x=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);y=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
+function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(x.click(),mxEvent.consume(b)):27==b.keyCode&&(p.click(),mxEvent.consume(b)))}));x.focus();x.className="geCommentEditBtn gePrimaryBtn";m.appendChild(x);c.insertBefore(m,g);k.style.display="none";g.style.display="none";l.focus()}function l(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
+[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function m(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function p(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function q(b){b.style.border="";b.removeChild(b.busyImg)}function t(c,d,e,g,k){function D(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
+"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});P.appendChild(f);e&&(f.style.display="none")}function C(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=z;b(c);return{pdiv:e,replies:d}}function M(d,e,k,l,n){function x(){m(D);c.addReply(v,function(b){v.id=b;c.replies.push(v);q(D);k&&k()},function(c){B();p(D);b.handleError(c,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},l,n)}function B(){f(v,D,function(b){x()},!0)}var u=C().pdiv,v=b.newComment(d,b.getCurrentUser());v.pCommentId=c.id;null==c.replies&&(c.replies=[]);var D=t(v,c.replies,u,g+1);e?B():x()}if(k||!c.isResolved){B.style.display="none";var z=document.createElement("div");z.className="geCommentContainer";z.setAttribute("data-commentId",c.id);z.style.marginLeft=20*g+5+"px";c.isResolved&&!Editor.isDarkMode()&&(z.style.backgroundColor="ghostWhite");
+var E=document.createElement("div");E.className="geCommentHeader";var A=document.createElement("img");A.className="geCommentUserImg";A.src=c.user.pictureUrl||Editor.userImage;E.appendChild(A);A=document.createElement("div");A.className="geCommentHeaderTxt";E.appendChild(A);var G=document.createElement("div");G.className="geCommentUsername";mxUtils.write(G,c.user.displayName||"");A.appendChild(G);G=document.createElement("div");G.className="geCommentDate";G.setAttribute("data-commentId",c.id);l(c,
+G);A.appendChild(G);z.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,c.content||"");z.appendChild(E);c.isLocked&&(z.style.opacity="0.5");E=document.createElement("div");E.className="geCommentActions";var P=document.createElement("ul");P.className="geCommentActionsList";E.appendChild(P);u||c.isLocked||0!=g&&!v||D(mxResources.get("reply"),function(){M("",!0)},c.isResolved);A=b.getCurrentUser();null==A||A.id!=c.user.id||u||c.isLocked||(D(mxResources.get("edit"),
+function(){function d(){f(c,z,function(){m(z);c.editComment(c.content,function(){q(z)},function(c){p(z);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),D(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){m(z);c.deleteComment(function(b){if(!0===b){b=z.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var e=z.querySelectorAll(".geCommentAction");for(b=
+0;b<e.length;b++)e[b].parentNode.removeChild(e[b]);q(z);z.style.opacity="0.5"}else{e=C(c).replies;for(b=0;b<e.length;b++)x.removeChild(e[b]);for(b=0;b<d.length;b++)if(d[b]==c){d.splice(b,1);break}B.style.display=0==x.getElementsByTagName("div").length?"block":"none"}},function(c){p(z);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=g||D(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
+b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=C(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);F||(f[k].style.display="none")}n()}c.isResolved?M(mxResources.get("reOpened")+": ",!0,
+d,!1,!0):M(mxResources.get("markedAsResolved"),!1,d,!0)});z.appendChild(E);null!=e?x.insertBefore(z,e.nextSibling):x.appendChild(z);for(e=0;null!=c.replies&&e<c.replies.length;e++)E=c.replies[e],E.isResolved=c.isResolved,t(E,c.replies,null,g+1,k);null!=y&&(y.comment.id==c.id?(k=c.content,c.content=y.comment.content,f(c,z,y.saveCallback,y.deleteOnCancel),c.content=k):null==y.comment.id&&y.comment.pCommentId==c.id&&(x.appendChild(y.div),f(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return z}}
+var u=!b.canComment(),v=b.canReplyToReplies(),y=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var z=EditorUi.compactUi?"26px":"30px",x=document.createElement("div");x.className="geCommentsList";x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";x.style.bottom=parseInt(z)+7+"px";A.appendChild(x);var B=document.createElement("span");B.style.cssText="display:none;padding-top:10px;text-align:center;";
mxUtils.write(B,mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=z;C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";z=document.createElement("a");z.className="geButton";if(!u){var E=z.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(E,"click",function(c){function d(){f(e,g,function(c){n(g);b.addComment(c,function(b){c.id=b;F.push(c);q(g)},function(c){p(g);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=b.newComment("",b.getCurrentUser()),g=t(e,F,null,0);d();c.preventDefault();mxEvent.consume(c)});C.appendChild(E)}E=z.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));
-var G=!1;Editor.isDarkMode()&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(b){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";D();b.preventDefault();mxEvent.consume(b)});C.appendChild(E);b.commentsRefreshNeeded()&&(E=z.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(b){D();
-b.preventDefault();mxEvent.consume(b)}),C.appendChild(E));b.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(z.style.filter="invert(100%)"),mxEvent.addListener(z,"click",function(b){g();b.preventDefault();mxEvent.consume(b)}),C.appendChild(z));A.appendChild(C);var F=[],D=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);
-var c=x.div.querySelector(".geCommentEditTxtArea"),d=x.div.querySelector(".geCommentEditBtns");x.comment.content=c.value;c.parentNode.removeChild(c);d.parentNode.removeChild(d)}catch(M){b.handleError(M)}y.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
-new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});y.innerHTML="";y.appendChild(B);B.style.display="block";F=b;for(b=0;b<F.length;b++)c(F[b].replies),t(F[b],F,null,0,G);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(y.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(b){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
-": "+b.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});D();this.refreshComments=D;C=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(l(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=y.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var f=c[e];d[f.getAttribute("data-commentId")]=f}for(e=0;e<F.length;e++)b(F[e])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=
-new mxWindow(mxResources.get("comments"),A,e,d,c,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
+"...");mxEvent.addListener(E,"click",function(c){function d(){f(e,g,function(c){m(g);b.addComment(c,function(b){c.id=b;G.push(c);q(g)},function(c){p(g);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=b.newComment("",b.getCurrentUser()),g=t(e,G,null,0);d();c.preventDefault();mxEvent.consume(c)});C.appendChild(E)}E=z.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));
+var F=!1;Editor.isDarkMode()&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(b){this.className=(F=!F)?"geButton geCheckedBtn":"geButton";D();b.preventDefault();mxEvent.consume(b)});C.appendChild(E);b.commentsRefreshNeeded()&&(E=z.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(b){D();
+b.preventDefault();mxEvent.consume(b)}),C.appendChild(E));b.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(z.style.filter="invert(100%)"),mxEvent.addListener(z,"click",function(b){k();b.preventDefault();mxEvent.consume(b)}),C.appendChild(z));A.appendChild(C);var G=[],D=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
+var c=y.div.querySelector(".geCommentEditTxtArea"),d=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);d.parentNode.removeChild(d)}catch(M){b.handleError(M)}x.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
+new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});x.innerHTML="";x.appendChild(B);B.style.display="block";G=b;for(b=0;b<G.length;b++)c(G[b].replies),t(G[b],G,null,0,F);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(x.appendChild(y.div),f(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){x.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
+": "+b.message:""));this.hasError=!0})):x.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});D();this.refreshComments=D;C=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(l(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=x.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var f=c[e];d[f.getAttribute("data-commentId")]=f}for(e=0;e<G.length;e++)b(G[e])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=
+new mxWindow(mxResources.get("comments"),A,e,d,c,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var I=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",I);this.destroy=function(){mxEvent.removeListener(window,"resize",I);this.window.destroy()}},ConfirmDialog=function(b,e,d,
-c,k,g,m,f,l,n,p){var q=document.createElement("div");q.style.textAlign="center";p=null!=p?p:44;var t=document.createElement("div");t.style.padding="6px";t.style.overflow="auto";t.style.maxHeight=p+"px";t.style.lineHeight="1.2em";mxUtils.write(t,e);q.appendChild(t);null!=n&&(t=document.createElement("div"),t.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",n),t.appendChild(e),q.appendChild(t));n=document.createElement("div");n.style.textAlign="center";n.style.whiteSpace=
-"nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");g=mxUtils.button(g||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(u.checked)});g.className="geBtn";null!=f&&(g.innerHTML=f+"<br>"+g.innerHTML,g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.style.width="40%");b.editor.cancelFirst&&n.appendChild(g);var v=mxUtils.button(k||mxResources.get("ok"),function(){b.hideDialog();null!=d&&d(u.checked)});n.appendChild(v);null!=m?(v.innerHTML=
-m+"<br>"+v.innerHTML+"<br>",v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.className="geBtn",v.style.width="40%"):v.className="geBtn gePrimaryBtn";b.editor.cancelFirst||n.appendChild(g);q.appendChild(n);l?(n.style.marginTop="10px",t=document.createElement("p"),t.style.marginTop="20px",t.style.marginBottom="0px",t.appendChild(u),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),t.appendChild(k),q.appendChild(t),mxEvent.addListener(k,
-"click",function(b){u.checked=!u.checked;mxEvent.consume(b)})):n.style.marginTop="12px";this.init=function(){v.focus()};this.container=q};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
-EditorUi.prototype.patchPages=function(b,e,d,c,k){var g={},m=[],f={},l={},n={},p={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var q in c[EditorUi.DIFF_UPDATE])g[q]=c[EditorUi.DIFF_UPDATE][q];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)l[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)f[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(q in e[EditorUi.DIFF_UPDATE])c=
-e[EditorUi.DIFF_UPDATE][q],null!=c.previous&&(p[c.previous]=q);if(null!=b){var t="";for(c=0;c<b.length;c++){var u=b[c].getId();n[u]=b[c];null!=p[t]||l[u]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][u]&&null!=e[EditorUi.DIFF_UPDATE][u].previous||(p[t]=u);t=u}}var v={},x=mxUtils.bind(this,function(b){var c=null!=b?b.getId():"";if(null!=b&&!v[c]){v[c]=!0;m.push(b);var l=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][c]:null;null!=l&&(this.updatePageRoot(b),null!=l.name&&b.setName(l.name),
-null!=l.view&&this.patchViewState(b,l.view),null!=l.cells&&this.patchPage(b,l.cells,g[b.getId()],k),!d||null==l.cells&&null==l.view||(b.needsUpdate=!0))}b=p[c];null!=b&&(delete p[c],x(n[b]));b=f[c];null!=b&&(delete f[c],A(b))}),A=mxUtils.bind(this,function(b){b=mxUtils.parseXml(b.data).documentElement;b=new DiagramPage(b);this.updatePageRoot(b);var c=n[b.getId()];null==c?x(b):(c.root=b.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):d&&(c.needsUpdate=!0))});x();for(q in p)x(n[p[q]]),
-delete p[q];for(q in f)A(f[q]),delete f[q];return m};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var d in e)try{b.viewState[d]=JSON.parse(e[d])}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};
-EditorUi.prototype.createParentLookup=function(b,e){function d(b){var d=c[b];null==d&&(d={inserted:[],moved:{}},c[b]=d);return d}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var k=0;k<e[EditorUi.DIFF_INSERT].length;k++){var g=e[EditorUi.DIFF_INSERT][k],m=null!=g.parent?g.parent:"",f=null!=g.previous?g.previous:"";d(m).inserted[f]=g}if(null!=e[EditorUi.DIFF_UPDATE])for(var l in e[EditorUi.DIFF_UPDATE])g=e[EditorUi.DIFF_UPDATE][l],null!=g.previous&&(m=g.parent,null==m&&(k=b.getCell(l),null!=k&&(k=
-b.getParent(k),null!=k&&(m=k.getId()))),null!=m&&(d(m).moved[g.previous]=l));return c};
-EditorUi.prototype.patchPage=function(b,e,d,c){var k=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),g=this.createParentLookup(k,e);k.beginUpdate();try{var m=k.updateEdgeParent,f=new mxDictionary,l=[];k.updateEdgeParent=function(b,d){!f.get(b)&&c&&(f.put(b,!0),l.push(b))};var n=g[""],p=null!=n&&null!=n.inserted?n.inserted[""]:null,q=null;null!=p&&(q=this.getCellForJson(p));if(null==q){var t=null!=n&&null!=n.moved?n.moved[""]:null;null!=t&&(q=k.getCell(t))}null!=q&&(k.setRoot(q),
-b.root=q);this.patchCellRecursive(b,k,k.root,g,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var u=0;u<e[EditorUi.DIFF_REMOVE].length;u++){var v=k.getCell(e[EditorUi.DIFF_REMOVE][u]);null!=v&&k.remove(v)}if(null!=e[EditorUi.DIFF_UPDATE]){var x=null!=d&&null!=d.cells?d.cells[EditorUi.DIFF_UPDATE]:null;for(t in e[EditorUi.DIFF_UPDATE])this.patchCell(k,k.getCell(t),e[EditorUi.DIFF_UPDATE][t],null!=x?x[t]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(u=0;u<e[EditorUi.DIFF_INSERT].length;u++)p=e[EditorUi.DIFF_INSERT][u],
-v=k.getCell(p.id),null!=v&&(k.setTerminal(v,k.getCell(p.source),!0),k.setTerminal(v,k.getCell(p.target),!1));k.updateEdgeParent=m;if(c&&0<l.length)for(u=0;u<l.length;u++)k.contains(l[u])&&k.updateEdgeParent(l[u])}finally{k.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,e,d,c,k){if(null!=d){for(var g=c[d.getId()],m=null!=g&&null!=g.inserted?g.inserted:{},g=null!=g&&null!=g.moved?g.moved:{},f=0,l=e.getChildCount(d),n="",p=0;p<l;p++){var q=e.getChildAt(d,p).getId();null==g[n]&&(null==k[EditorUi.DIFF_UPDATE]||null==k[EditorUi.DIFF_UPDATE][q]||null==k[EditorUi.DIFF_UPDATE][q].previous&&null==k[EditorUi.DIFF_UPDATE][q].parent)&&(g[n]=q);n=q}l=mxUtils.bind(this,function(g,l){var m=null!=g?g.getId():"";if(null!=g&&l){var n=
-e.getCell(m);null!=n&&n!=g&&(g=null)}null!=g&&(e.getChildAt(d,f)!=g&&e.add(d,g,f),this.patchCellRecursive(b,e,g,c,k),f++);return m});for(n=[null];0<n.length;)if(p=n.shift(),p=l(null!=p?p.child:null,null!=p?p.insert:!1),q=g[p],null!=q&&(delete g[p],n.push({child:e.getCell(q)})),q=m[p],null!=q&&(delete m[p],n.push({child:this.getCellForJson(q),insert:!0})),0==n.length){for(p in g)n.push({child:e.getCell(g[p])}),delete g[p];for(p in m)n.push({child:this.getCellForJson(m[p]),insert:!0}),delete m[p]}}};
+c,g,k,n,f,l,m,p){var q=document.createElement("div");q.style.textAlign="center";p=null!=p?p:44;var t=document.createElement("div");t.style.padding="6px";t.style.overflow="auto";t.style.maxHeight=p+"px";t.style.lineHeight="1.2em";mxUtils.write(t,e);q.appendChild(t);null!=m&&(t=document.createElement("div"),t.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",m),t.appendChild(e),q.appendChild(t));m=document.createElement("div");m.style.textAlign="center";m.style.whiteSpace=
+"nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");k=mxUtils.button(k||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(u.checked)});k.className="geBtn";null!=f&&(k.innerHTML=f+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.style.width="40%");b.editor.cancelFirst&&m.appendChild(k);var v=mxUtils.button(g||mxResources.get("ok"),function(){b.hideDialog();null!=d&&d(u.checked)});m.appendChild(v);null!=n?(v.innerHTML=
+n+"<br>"+v.innerHTML+"<br>",v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.className="geBtn",v.style.width="40%"):v.className="geBtn gePrimaryBtn";b.editor.cancelFirst||m.appendChild(k);q.appendChild(m);l?(m.style.marginTop="10px",t=document.createElement("p"),t.style.marginTop="20px",t.style.marginBottom="0px",t.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),t.appendChild(g),q.appendChild(t),mxEvent.addListener(g,
+"click",function(b){u.checked=!u.checked;mxEvent.consume(b)})):m.style.marginTop="12px";this.init=function(){v.focus()};this.container=q};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
+EditorUi.prototype.patchPages=function(b,e,d,c,g){var k={},n=[],f={},l={},m={},p={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var q in c[EditorUi.DIFF_UPDATE])k[q]=c[EditorUi.DIFF_UPDATE][q];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)l[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)f[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(q in e[EditorUi.DIFF_UPDATE])c=
+e[EditorUi.DIFF_UPDATE][q],null!=c.previous&&(p[c.previous]=q);if(null!=b){var t="";for(c=0;c<b.length;c++){var u=b[c].getId();m[u]=b[c];null!=p[t]||l[u]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][u]&&null!=e[EditorUi.DIFF_UPDATE][u].previous||(p[t]=u);t=u}}var v={},y=mxUtils.bind(this,function(b){var c=null!=b?b.getId():"";if(null!=b&&!v[c]){v[c]=!0;n.push(b);var l=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][c]:null;null!=l&&(this.updatePageRoot(b),null!=l.name&&b.setName(l.name),
+null!=l.view&&this.patchViewState(b,l.view),null!=l.cells&&this.patchPage(b,l.cells,k[b.getId()],g),!d||null==l.cells&&null==l.view||(b.needsUpdate=!0))}b=p[c];null!=b&&(delete p[c],y(m[b]));b=f[c];null!=b&&(delete f[c],A(b))}),A=mxUtils.bind(this,function(b){b=mxUtils.parseXml(b.data).documentElement;b=new DiagramPage(b);this.updatePageRoot(b);var c=m[b.getId()];null==c?y(b):(c.root=b.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):d&&(c.needsUpdate=!0))});y();for(q in p)y(m[p[q]]),
+delete p[q];for(q in f)A(f[q]),delete f[q];return n};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var d in e)try{b.viewState[d]=JSON.parse(e[d])}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};
+EditorUi.prototype.createParentLookup=function(b,e){function d(b){var d=c[b];null==d&&(d={inserted:[],moved:{}},c[b]=d);return d}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var g=0;g<e[EditorUi.DIFF_INSERT].length;g++){var k=e[EditorUi.DIFF_INSERT][g],n=null!=k.parent?k.parent:"",f=null!=k.previous?k.previous:"";d(n).inserted[f]=k}if(null!=e[EditorUi.DIFF_UPDATE])for(var l in e[EditorUi.DIFF_UPDATE])k=e[EditorUi.DIFF_UPDATE][l],null!=k.previous&&(n=k.parent,null==n&&(g=b.getCell(l),null!=g&&(g=
+b.getParent(g),null!=g&&(n=g.getId()))),null!=n&&(d(n).moved[k.previous]=l));return c};
+EditorUi.prototype.patchPage=function(b,e,d,c){var g=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),k=this.createParentLookup(g,e);g.beginUpdate();try{var n=g.updateEdgeParent,f=new mxDictionary,l=[];g.updateEdgeParent=function(b,d){!f.get(b)&&c&&(f.put(b,!0),l.push(b))};var m=k[""],p=null!=m&&null!=m.inserted?m.inserted[""]:null,q=null;null!=p&&(q=this.getCellForJson(p));if(null==q){var t=null!=m&&null!=m.moved?m.moved[""]:null;null!=t&&(q=g.getCell(t))}null!=q&&(g.setRoot(q),
+b.root=q);this.patchCellRecursive(b,g,g.root,k,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var u=0;u<e[EditorUi.DIFF_REMOVE].length;u++){var v=g.getCell(e[EditorUi.DIFF_REMOVE][u]);null!=v&&g.remove(v)}if(null!=e[EditorUi.DIFF_UPDATE]){var y=null!=d&&null!=d.cells?d.cells[EditorUi.DIFF_UPDATE]:null;for(t in e[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(t),e[EditorUi.DIFF_UPDATE][t],null!=y?y[t]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(u=0;u<e[EditorUi.DIFF_INSERT].length;u++)p=e[EditorUi.DIFF_INSERT][u],
+v=g.getCell(p.id),null!=v&&(g.setTerminal(v,g.getCell(p.source),!0),g.setTerminal(v,g.getCell(p.target),!1));g.updateEdgeParent=n;if(c&&0<l.length)for(u=0;u<l.length;u++)g.contains(l[u])&&g.updateEdgeParent(l[u])}finally{g.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,e,d,c,g){if(null!=d){for(var k=c[d.getId()],n=null!=k&&null!=k.inserted?k.inserted:{},k=null!=k&&null!=k.moved?k.moved:{},f=0,l=e.getChildCount(d),m="",p=0;p<l;p++){var q=e.getChildAt(d,p).getId();null==k[m]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][q]||null==g[EditorUi.DIFF_UPDATE][q].previous&&null==g[EditorUi.DIFF_UPDATE][q].parent)&&(k[m]=q);m=q}l=mxUtils.bind(this,function(k,l){var n=null!=k?k.getId():"";if(null!=k&&l){var m=
+e.getCell(n);null!=m&&m!=k&&(k=null)}null!=k&&(e.getChildAt(d,f)!=k&&e.add(d,k,f),this.patchCellRecursive(b,e,k,c,g),f++);return n});for(m=[null];0<m.length;)if(p=m.shift(),p=l(null!=p?p.child:null,null!=p?p.insert:!1),q=k[p],null!=q&&(delete k[p],m.push({child:e.getCell(q)})),q=n[p],null!=q&&(delete n[p],m.push({child:this.getCellForJson(q),insert:!0})),0==m.length){for(p in k)m.push({child:e.getCell(k[p])}),delete k[p];for(p in n)m.push({child:this.getCellForJson(n[p]),insert:!0}),delete n[p]}}};
EditorUi.prototype.patchCell=function(b,e,d,c){if(null!=e&&null!=d){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in d?b.setValue(e,d.value):null!=d.xmlValue&&b.setValue(e,mxUtils.parseXml(d.xmlValue).documentElement);null!=c&&null!=c.style||null==d.style||b.setStyle(e,d.style);null!=d.visible&&b.setVisible(e,1==d.visible);null!=d.collapsed&&b.setCollapsed(e,1==d.collapsed);null!=d.vertex&&(e.vertex=1==d.vertex);null!=d.edge&&(e.edge=1==d.edge);null!=d.connectable&&(e.connectable=
-1==d.connectable);null!=d.geometry&&b.setGeometry(e,this.codec.decode(mxUtils.parseXml(d.geometry).documentElement));null!=d.source&&b.setTerminal(e,b.getCell(d.source),!0);null!=d.target&&b.setTerminal(e,b.getCell(d.target),!1);for(var k in d)this.cellProperties[k]||(e[k]=d[k])}};
-EditorUi.prototype.getPagesForNode=function(b,e){var d=this.editor.extractGraphModel(b,!0,!0);null!=d&&(b=d);var d=b.getElementsByTagName(e||"diagram"),c=[];if(0<d.length)for(var k=0;k<d.length;k++){var g=new DiagramPage(d[k]);this.updatePageRoot(g,!0);c.push(g)}else"mxGraphModel"==b.nodeName&&(g=new DiagramPage(b.ownerDocument.createElement("diagram")),g.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(g.node,Graph.compressNode(b,!0)),c.push(g));return c};
-EditorUi.prototype.diffPages=function(b,e){for(var d=[],c=[],k={},g={},m={},f=null,l=0;l<e.length;l++)g[e[l].getId()]={page:e[l],prev:f},f=e[l];f=null;for(l=0;l<b.length;l++){var n=b[l].getId(),p=g[n];if(null==p)c.push(n);else{var q=this.diffPage(b[l],p.page),t={};0<Object.keys(q).length&&(t.cells=q);q=this.diffViewState(b[l],p.page);0<Object.keys(q).length&&(t.view=q);if((null!=p.prev?null==f:null!=f)||null!=f&&null!=p.prev&&f.getId()!=p.prev.getId())t.previous=null!=p.prev?p.prev.getId():"";null!=
-p.page.getName()&&b[l].getName()!=p.page.getName()&&(t.name=p.page.getName());0<Object.keys(t).length&&(m[n]=t)}delete g[b[l].getId()];f=b[l]}for(n in g)p=g[n],d.push({data:mxUtils.getXml(p.page.node),previous:null!=p.prev?p.prev.getId():""});0<Object.keys(m).length&&(k[EditorUi.DIFF_UPDATE]=m);0<c.length&&(k[EditorUi.DIFF_REMOVE]=c);0<d.length&&(k[EditorUi.DIFF_INSERT]=d);return k};
-EditorUi.prototype.createCellLookup=function(b,e,d){d=null!=d?d:{};d[b.getId()]={cell:b,prev:e};var c=b.getChildCount();e=null;for(var k=0;k<c;k++){var g=b.getChildAt(k);this.createCellLookup(g,e,d);e=g}return d};
-EditorUi.prototype.diffCellRecursive=function(b,e,d,c,k){c=null!=c?c:{};var g=d[b.getId()];delete d[b.getId()];if(null==g)k.push(b.getId());else{var m=this.diffCell(b,g.cell);if(null!=m.parent||(null!=g.prev?null==e:null!=e)||null!=e&&null!=g.prev&&e.getId()!=g.prev.getId())m.previous=null!=g.prev?g.prev.getId():"";0<Object.keys(m).length&&(c[b.getId()]=m)}g=b.getChildCount();e=null;for(m=0;m<g;m++){var f=b.getChildAt(m);this.diffCellRecursive(f,e,d,c,k);e=f}return c};
-EditorUi.prototype.diffPage=function(b,e){var d=[],c=[],k={};this.updatePageRoot(b);this.updatePageRoot(e);var g=this.createCellLookup(e.root),m=this.diffCellRecursive(b.root,null,g,m,c),f;for(f in g){var l=g[f];d.push(this.getJsonForCell(l.cell,l.prev))}0<Object.keys(m).length&&(k[EditorUi.DIFF_UPDATE]=m);0<c.length&&(k[EditorUi.DIFF_REMOVE]=c);0<d.length&&(k[EditorUi.DIFF_INSERT]=d);return k};
-EditorUi.prototype.diffViewState=function(b,e){var d=b.viewState,c=e.viewState,k={};e==this.currentPage&&(c=this.editor.graph.getViewState());if(null!=d&&null!=c)for(var g in this.viewStateProperties){var m=JSON.stringify(d[g]),f=JSON.stringify(c[g]);m!=f&&(k[g]=f)}return k};
+1==d.connectable);null!=d.geometry&&b.setGeometry(e,this.codec.decode(mxUtils.parseXml(d.geometry).documentElement));null!=d.source&&b.setTerminal(e,b.getCell(d.source),!0);null!=d.target&&b.setTerminal(e,b.getCell(d.target),!1);for(var g in d)this.cellProperties[g]||(e[g]=d[g])}};
+EditorUi.prototype.getPagesForNode=function(b,e){var d=this.editor.extractGraphModel(b,!0,!0);null!=d&&(b=d);var d=b.getElementsByTagName(e||"diagram"),c=[];if(0<d.length)for(var g=0;g<d.length;g++){var k=new DiagramPage(d[g]);this.updatePageRoot(k,!0);c.push(k)}else"mxGraphModel"==b.nodeName&&(k=new DiagramPage(b.ownerDocument.createElement("diagram")),k.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(k.node,Graph.compressNode(b,!0)),c.push(k));return c};
+EditorUi.prototype.diffPages=function(b,e){for(var d=[],c=[],g={},k={},n={},f=null,l=0;l<e.length;l++)k[e[l].getId()]={page:e[l],prev:f},f=e[l];f=null;for(l=0;l<b.length;l++){var m=b[l].getId(),p=k[m];if(null==p)c.push(m);else{var q=this.diffPage(b[l],p.page),t={};0<Object.keys(q).length&&(t.cells=q);q=this.diffViewState(b[l],p.page);0<Object.keys(q).length&&(t.view=q);if((null!=p.prev?null==f:null!=f)||null!=f&&null!=p.prev&&f.getId()!=p.prev.getId())t.previous=null!=p.prev?p.prev.getId():"";null!=
+p.page.getName()&&b[l].getName()!=p.page.getName()&&(t.name=p.page.getName());0<Object.keys(t).length&&(n[m]=t)}delete k[b[l].getId()];f=b[l]}for(m in k)p=k[m],d.push({data:mxUtils.getXml(p.page.node),previous:null!=p.prev?p.prev.getId():""});0<Object.keys(n).length&&(g[EditorUi.DIFF_UPDATE]=n);0<c.length&&(g[EditorUi.DIFF_REMOVE]=c);0<d.length&&(g[EditorUi.DIFF_INSERT]=d);return g};
+EditorUi.prototype.createCellLookup=function(b,e,d){d=null!=d?d:{};d[b.getId()]={cell:b,prev:e};var c=b.getChildCount();e=null;for(var g=0;g<c;g++){var k=b.getChildAt(g);this.createCellLookup(k,e,d);e=k}return d};
+EditorUi.prototype.diffCellRecursive=function(b,e,d,c,g){c=null!=c?c:{};var k=d[b.getId()];delete d[b.getId()];if(null==k)g.push(b.getId());else{var n=this.diffCell(b,k.cell);if(null!=n.parent||(null!=k.prev?null==e:null!=e)||null!=e&&null!=k.prev&&e.getId()!=k.prev.getId())n.previous=null!=k.prev?k.prev.getId():"";0<Object.keys(n).length&&(c[b.getId()]=n)}k=b.getChildCount();e=null;for(n=0;n<k;n++){var f=b.getChildAt(n);this.diffCellRecursive(f,e,d,c,g);e=f}return c};
+EditorUi.prototype.diffPage=function(b,e){var d=[],c=[],g={};this.updatePageRoot(b);this.updatePageRoot(e);var k=this.createCellLookup(e.root),n=this.diffCellRecursive(b.root,null,k,n,c),f;for(f in k){var l=k[f];d.push(this.getJsonForCell(l.cell,l.prev))}0<Object.keys(n).length&&(g[EditorUi.DIFF_UPDATE]=n);0<c.length&&(g[EditorUi.DIFF_REMOVE]=c);0<d.length&&(g[EditorUi.DIFF_INSERT]=d);return g};
+EditorUi.prototype.diffViewState=function(b,e){var d=b.viewState,c=e.viewState,g={};e==this.currentPage&&(c=this.editor.graph.getViewState());if(null!=d&&null!=c)for(var k in this.viewStateProperties){var n=JSON.stringify(d[k]),f=JSON.stringify(c[k]);n!=f&&(g[k]=f)}return g};
EditorUi.prototype.getCellForJson=function(b){var e=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,d=b.value;null!=b.xmlValue&&(d=mxUtils.parseXml(b.xmlValue).documentElement);e=new mxCell(d,e,b.style);e.connectable=0!=b.connectable;e.collapsed=1==b.collapsed;e.visible=0!=b.visible;e.vertex=1==b.vertex;e.edge=1==b.edge;e.id=b.id;for(var c in b)this.cellProperties[c]||(e[c]=b[c]);return e};
EditorUi.prototype.getJsonForCell=function(b,e){var d={id:b.getId()};b.vertex&&(d.vertex=1);b.edge&&(d.edge=1);b.connectable||(d.connectable=0);null!=b.parent&&(d.parent=b.parent.getId());null!=e&&(d.previous=e.getId());null!=b.source&&(d.source=b.source.getId());null!=b.target&&(d.target=b.target.getId());null!=b.style&&(d.style=b.style);null!=b.geometry&&(d.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(d.collapsed=1);b.visible||(d.visible=0);null!=b.value&&("object"===typeof b.value&&
"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?d.xmlValue=mxUtils.getXml(b.value):d.value=b.value);for(var c in b)this.cellProperties[c]||"function"===typeof b[c]||(d[c]=b[c]);return d};
EditorUi.prototype.diffCell=function(b,e){function d(b){return null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===typeof b.nodeName&&"function"===typeof b.getAttribute}var c={};b.vertex!=e.vertex&&(c.vertex=e.vertex?1:0);b.edge!=e.edge&&(c.edge=e.edge?1:0);b.connectable!=e.connectable&&(c.connectable=e.connectable?1:0);if((null!=b.parent?null==e.parent:null!=e.parent)||null!=b.parent&&null!=e.parent&&b.parent.getId()!=e.parent.getId())c.parent=null!=e.parent?e.parent.getId():"";
if((null!=b.source?null==e.source:null!=e.source)||null!=b.source&&null!=e.source&&b.source.getId()!=e.source.getId())c.source=null!=e.source?e.source.getId():"";if((null!=b.target?null==e.target:null!=e.target)||null!=b.target&&null!=e.target&&b.target.getId()!=e.target.getId())c.target=null!=e.target?e.target.getId():"";d(b.value)&&d(e.value)?b.value.isEqualNode(e.value)||(c.xmlValue=mxUtils.getXml(e.value)):b.value!=e.value&&(d(e.value)?c.xmlValue=mxUtils.getXml(e.value):c.value=null!=e.value?
-e.value:null);b.style!=e.style&&(c.style=e.style);b.visible!=e.visible&&(c.visible=e.visible?1:0);b.collapsed!=e.collapsed&&(c.collapsed=e.collapsed?1:0);if(!this.isObjectEqual(b.geometry,e.geometry,new mxGeometry)){var k=this.codec.encode(e.geometry);null!=k&&(c.geometry=mxUtils.getXml(k))}for(var g in b)this.cellProperties[g]||"function"===typeof b[g]||"function"===typeof e[g]||b[g]==e[g]||(c[g]=void 0===e[g]?null:e[g]);for(g in e)g in b||this.cellProperties[g]||"function"===typeof b[g]||"function"===
-typeof e[g]||b[g]==e[g]||(c[g]=void 0===e[g]?null:e[g]);return c};EditorUi.prototype.isObjectEqual=function(b,e,d){if(null==b&&null==e)return!0;if(null!=b?null==e:null!=e)return!1;var c=function(b,c){return null==d||d[b]!=c?!0===c?1:c:void 0};return JSON.stringify(b,c)==JSON.stringify(e,c)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},getUi:function(){return mxSettings.settings.ui},setUi:function(b){var e=localStorage.getItem(".drawio-config"),e=null==e?mxSettings.getDefaults():JSON.parse(e);e.ui=b;delete e.isNew;e.version=mxSettings.currentVersion;localStorage.setItem(".drawio-config",JSON.stringify(e))},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},
+e.value:null);b.style!=e.style&&(c.style=e.style);b.visible!=e.visible&&(c.visible=e.visible?1:0);b.collapsed!=e.collapsed&&(c.collapsed=e.collapsed?1:0);if(!this.isObjectEqual(b.geometry,e.geometry,new mxGeometry)){var g=this.codec.encode(e.geometry);null!=g&&(c.geometry=mxUtils.getXml(g))}for(var k in b)this.cellProperties[k]||"function"===typeof b[k]||"function"===typeof e[k]||b[k]==e[k]||(c[k]=void 0===e[k]?null:e[k]);for(k in e)k in b||this.cellProperties[k]||"function"===typeof b[k]||"function"===
+typeof e[k]||b[k]==e[k]||(c[k]=void 0===e[k]?null:e[k]);return c};EditorUi.prototype.isObjectEqual=function(b,e,d){if(null==b&&null==e)return!0;if(null!=b?null==e:null!=e)return!1;var c=function(b,c){return null==d||d[b]!=c?!0===c?1:c:void 0};return JSON.stringify(b,c)==JSON.stringify(e,c)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},getUi:function(){return mxSettings.settings.ui},setUi:function(b){var e=localStorage.getItem(".drawio-config"),e=null==e?mxSettings.getDefaults():JSON.parse(e);e.ui=b;delete e.isNew;e.version=mxSettings.currentVersion;localStorage.setItem(".drawio-config",JSON.stringify(e))},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},
setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){return b?mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(b,e){e?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=
b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],e=0;e<b.length;e++)"string"===typeof b[e]&&(b[e]={name:b[e],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();
Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,b)&&("L.scratchpad"===b?mxSettings.settings.customLibraries.splice(0,0,b):mxSettings.settings.customLibraries.push(b));mxSettings.save()},removeCustomLibrary:function(b){mxSettings.load();mxUtils.remove(b,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},
@@ -10970,27 +10975,27 @@ DrawioFileSync.prototype.fileChangedNotify=function(b){if(this.isValidState())if
DrawioFileSync.prototype.fileChanged=function(b,e,d,c){return this.notifyThread=c=window.setTimeout(mxUtils.bind(this,function(){null!=d&&d()||(this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(c){null!=d&&d()||(this.isValidState()?this.catchup(c,b,e,d):null!=e&&e())}),e):null!=e&&e())}),c?this.cacheReadyDelay:0)};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.p2pCatchup=function(b,e,d,c,k,g,m,f){if(null!=k&&(null==f||!f()))if(this.file.getDescriptorRevisionId(k),this.file.getCurrentRevisionId(),this.isValidState()){if(this.file.getDescriptorSecret(k),null==f||!f()){this.file.stats.bytesReceived+=b.length;e=null;d=[];try{if(b=[b],null!=b&&0<b.length)for(c=0;c<b.length;c++){var l=this.stringToObject(b[c]);if(l.v>DrawioFileSync.PROTOCOL){failed=!0;d=[];break}else if(l.v===DrawioFileSync.PROTOCOL&&null!=l.d)e=l.d.checksum,d.push(l.d.patch);
-else{failed=!0;d=[];break}}}catch(n){d=[],null!=window.console&&"1"==urlParams.test&&console.log(n)}try{0<d.length?(this.file.stats.cacheHits++,this.merge(d,e,k,g,m,f)):(this.file.stats.cacheFail++,this.reload(g,m,f))}catch(n){null!=m&&m(n)}}}else null!=m&&m()};
-DrawioFileSync.prototype.catchup=function(b,e,d,c){if(null!=b&&(null==c||!c())){var k=this.file.getDescriptorRevisionId(b),g=this.file.getCurrentRevisionId();if(g==k)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=e&&e();else if(this.isValidState()){var m=this.file.getDescriptorSecret(b);if(null==m||"1"==urlParams.lockdown)this.reload(e,d,c);else{var f=0,l=!1,n=mxUtils.bind(this,function(){if(null==c||!c())if(g!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var p=
-!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;this.reload(e,d,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(g)+"&to="+encodeURIComponent(k)+(null!=m?"&secret="+encodeURIComponent(m):""),mxUtils.bind(this,function(k){this.file.stats.bytesReceived+=k.getText().length;window.clearTimeout(q);if(p&&(null==c||!c()))if(g!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var m=null,t=[];if(200<=
-k.getStatus()&&299>=k.getStatus()&&0<k.getText().length)try{var x=JSON.parse(k.getText());if(null!=x&&0<x.length)for(var A=0;A<x.length;A++){var z=this.stringToObject(x[A]);if(z.v>DrawioFileSync.PROTOCOL){l=!0;t=[];break}else if(z.v===DrawioFileSync.PROTOCOL&&null!=z.d)m=z.d.checksum,t.push(z.d.patch);else{l=!0;t=[];break}}}catch(y){t=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<t.length?(this.file.stats.cacheHits++,this.merge(t,m,b,e,d,c)):f<=this.maxCacheReadyRetries-1&&!l&&
-401!=k.getStatus()&&503!=k.getStatus()?(f++,this.file.stats.cacheMiss++,window.setTimeout(n,(f+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(e,d,c))}catch(y){null!=d&&d(y)}}else null!=d&&d()}))}else null!=d&&d()});window.setTimeout(n,this.cacheReadyDelay)}}else null!=d&&d()}};
+DrawioFileSync.prototype.p2pCatchup=function(b,e,d,c,g,k,n,f){if(null!=g&&(null==f||!f()))if(this.file.getDescriptorRevisionId(g),this.file.getCurrentRevisionId(),this.isValidState()){if(this.file.getDescriptorSecret(g),null==f||!f()){this.file.stats.bytesReceived+=b.length;e=null;d=[];try{if(b=[b],null!=b&&0<b.length)for(c=0;c<b.length;c++){var l=this.stringToObject(b[c]);if(l.v>DrawioFileSync.PROTOCOL){failed=!0;d=[];break}else if(l.v===DrawioFileSync.PROTOCOL&&null!=l.d)e=l.d.checksum,d.push(l.d.patch);
+else{failed=!0;d=[];break}}}catch(m){d=[],null!=window.console&&"1"==urlParams.test&&console.log(m)}try{0<d.length?(this.file.stats.cacheHits++,this.merge(d,e,g,k,n,f)):(this.file.stats.cacheFail++,this.reload(k,n,f))}catch(m){null!=n&&n(m)}}}else null!=n&&n()};
+DrawioFileSync.prototype.catchup=function(b,e,d,c){if(null!=b&&(null==c||!c())){var g=this.file.getDescriptorRevisionId(b),k=this.file.getCurrentRevisionId();if(k==g)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=e&&e();else if(this.isValidState()){var n=this.file.getDescriptorSecret(b);if(null==n||"1"==urlParams.lockdown)this.reload(e,d,c);else{var f=0,l=!1,m=mxUtils.bind(this,function(){if(null==c||!c())if(k!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var p=
+!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;this.reload(e,d,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(k)+"&to="+encodeURIComponent(g)+(null!=n?"&secret="+encodeURIComponent(n):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(q);if(p&&(null==c||!c()))if(k!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var n=null,t=[];if(200<=
+g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var y=JSON.parse(g.getText());if(null!=y&&0<y.length)for(var A=0;A<y.length;A++){var z=this.stringToObject(y[A]);if(z.v>DrawioFileSync.PROTOCOL){l=!0;t=[];break}else if(z.v===DrawioFileSync.PROTOCOL&&null!=z.d)n=z.d.checksum,t.push(z.d.patch);else{l=!0;t=[];break}}}catch(x){t=[],null!=window.console&&"1"==urlParams.test&&console.log(x)}try{0<t.length?(this.file.stats.cacheHits++,this.merge(t,n,b,e,d,c)):f<=this.maxCacheReadyRetries-1&&!l&&
+401!=g.getStatus()&&503!=g.getStatus()?(f++,this.file.stats.cacheMiss++,window.setTimeout(m,(f+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(e,d,c))}catch(x){null!=d&&d(x)}}else null!=d&&d()}))}else null!=d&&d()});window.setTimeout(m,this.cacheReadyDelay)}}else null!=d&&d()}};
DrawioFileSync.prototype.reload=function(b,e,d,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(b){null!=e&&e(b)}),d,c)};
-DrawioFileSync.prototype.merge=function(b,e,d,c,k,g){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var m=this.file.ignorePatches(b),f=this.file.getDescriptorRevisionId(d);if(!m){for(g=0;g<b.length;g++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
-b[g]);var l=null!=e?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",f,"etag",this.file.getDescriptorEtag(d),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",b,"checksum",e==l,e);if(null!=e&&e!=l){var n=this.ui.hashValue(this.file.getCurrentRevisionId()),p=this.ui.hashValue(f);this.file.checksumError(k,b,"From: "+n+"\nTo: "+p+"\nChecksum: "+e+"\nCurrent: "+l,f,"merge");
-return}this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),d);this.file.backupPatch=null;null!=c&&c()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=k&&k(u);try{if(this.file.errorReportsEnabled)n=this.ui.hashValue(this.file.getCurrentRevisionId()),p=this.ui.hashValue(f),this.file.sendErrorReport("Error in merge",
-"From: "+n+"\nTo: "+p+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),u);else{var q=this.file.getCurrentUser(),t=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),t,u)}}catch(v){}}};
+DrawioFileSync.prototype.merge=function(b,e,d,c,g,k){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var n=this.file.ignorePatches(b),f=this.file.getDescriptorRevisionId(d);if(!n){for(k=0;k<b.length;k++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
+b[k]);var l=null!=e?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",f,"etag",this.file.getDescriptorEtag(d),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",b,"checksum",e==l,e);if(null!=e&&e!=l){var m=this.ui.hashValue(this.file.getCurrentRevisionId()),p=this.ui.hashValue(f);this.file.checksumError(g,b,"From: "+m+"\nTo: "+p+"\nChecksum: "+e+"\nCurrent: "+l,f,"merge");
+return}this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),d);this.file.backupPatch=null;null!=c&&c()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(u);try{if(this.file.errorReportsEnabled)m=this.ui.hashValue(this.file.getCurrentRevisionId()),p=this.ui.hashValue(f),this.file.sendErrorReport("Error in merge",
+"From: "+m+"\nTo: "+p+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),u);else{var q=this.file.getCurrentUser(),t=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),t,u)}}catch(v){}}};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var e=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),d=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(d)+"&msg="+encodeURIComponent(e)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++}this.updateStatus()};
DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
-DrawioFileSync.prototype.createToken=function(b,e,d){var c=!0,k=window.setTimeout(mxUtils.bind(this,function(){c=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(b){window.clearTimeout(k);c&&(200<=b.getStatus()&&299>=b.getStatus()?e(b.getText()):d({code:b.getStatus(),message:"Token Error "+b.getStatus()}))}))};
+DrawioFileSync.prototype.createToken=function(b,e,d){var c=!0,g=window.setTimeout(mxUtils.bind(this,function(){c=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(b){window.clearTimeout(g);c&&(200<=b.getStatus()&&299>=b.getStatus()?e(b.getText()):d({code:b.getStatus(),message:"Token Error "+b.getStatus()}))}))};
DrawioFileSync.prototype.fileSaving=function(){var b=this.objectToString(this.createMessage({m:(new Date).getTime(),type:"optimistic"}));mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(b),function(){})};
-DrawioFileSync.prototype.sendFileChanges=function(b,e){this.lastModified=this.file.getLastModifiedDate();var d=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),c=this.file.getDescriptorSecret(this.file.getDescriptor()),k=this.file.getDescriptorRevisionId(e),g=this.file.getCurrentRevisionId(),m=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement),f=this.file.getDescriptorSecret(e),l=this.ui.getHashValueForPages(b),
-m=this.ui.diffPages(m,b),l=this.objectToString(this.createMessage({patch:m,checksum:l}));this.file.p2pCollab.sendMessage("diff",{id:this.channelId,from:k,to:g,msg:d,secret:c,lastSecret:f,data:l})};
-DrawioFileSync.prototype.fileSaved=function(b,e,d,c,k){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var g=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),m=this.file.getDescriptorSecret(this.file.getDescriptor()),f=this.file.getDescriptorRevisionId(e),l=this.file.getCurrentRevisionId();if(null==
-m||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(g),function(){}),null!=d&&d(),"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",f,"to",l,"etag",this.file.getCurrentEtag(),"notify");else{var n=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);e=this.file.getDescriptorSecret(e);var p=this.ui.getHashValueForPages(b),n=this.ui.diffPages(n,
-b),q=this.objectToString(this.createMessage({patch:n,checksum:p}));this.file.stats.bytesSent+=q.length;this.file.stats.msgSent++;var t=!0,u=window.setTimeout(mxUtils.bind(this,function(){t=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(l)+"&msg="+encodeURIComponent(g)+(null!=m?"&secret="+encodeURIComponent(m):"")+(null!=e?"&last-secret="+encodeURIComponent(e):
-"")+(q.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(q):"")+(null!=k?"&token="+encodeURIComponent(k):""),mxUtils.bind(this,function(b){window.clearTimeout(u);t&&(200<=b.getStatus()&&299>=b.getStatus()?null!=d&&d():c({code:b.getStatus(),message:b.getStatus()}))}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",f,"to",l,"etag",this.file.getCurrentEtag(),q.length,"bytes","diff",n,"checksum",p)}}this.file.shadowPages=b};
+DrawioFileSync.prototype.sendFileChanges=function(b,e){this.lastModified=this.file.getLastModifiedDate();var d=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),c=this.file.getDescriptorSecret(this.file.getDescriptor()),g=this.file.getDescriptorRevisionId(e),k=this.file.getCurrentRevisionId(),n=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement),f=this.file.getDescriptorSecret(e),l=this.ui.getHashValueForPages(b),
+n=this.ui.diffPages(n,b),l=this.objectToString(this.createMessage({patch:n,checksum:l}));this.file.p2pCollab.sendMessage("diff",{id:this.channelId,from:g,to:k,msg:d,secret:c,lastSecret:f,data:l})};
+DrawioFileSync.prototype.fileSaved=function(b,e,d,c,g){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var k=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),n=this.file.getDescriptorSecret(this.file.getDescriptor()),f=this.file.getDescriptorRevisionId(e),l=this.file.getCurrentRevisionId();if(null==
+n||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(k),function(){}),null!=d&&d(),"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",f,"to",l,"etag",this.file.getCurrentEtag(),"notify");else{var m=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);e=this.file.getDescriptorSecret(e);var p=this.ui.getHashValueForPages(b),m=this.ui.diffPages(m,
+b),q=this.objectToString(this.createMessage({patch:m,checksum:p}));this.file.stats.bytesSent+=q.length;this.file.stats.msgSent++;var t=!0,u=window.setTimeout(mxUtils.bind(this,function(){t=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(l)+"&msg="+encodeURIComponent(k)+(null!=n?"&secret="+encodeURIComponent(n):"")+(null!=e?"&last-secret="+encodeURIComponent(e):
+"")+(q.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(q):"")+(null!=g?"&token="+encodeURIComponent(g):""),mxUtils.bind(this,function(b){window.clearTimeout(u);t&&(200<=b.getStatus()&&299>=b.getStatus()?null!=d&&d():c({code:b.getStatus(),message:b.getStatus()}))}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",f,"to",l,"etag",this.file.getCurrentEtag(),q.length,"bytes","diff",m,"checksum",p)}}this.file.shadowPages=b};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(b,e,d){this.catchupRetryCount++;this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,e,d):this.fileChanged(e,d)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=d&&d({code:App.ERROR_TIMEOUT,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()};
@@ -10998,45 +11003,45 @@ DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.
"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)};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;function mxAsyncCanvas(b){mxAbstractCanvas2D.call(this);this.htmlCanvas=b;b.images=b.images||[];b.subCanvas=b.subCanvas||[]}mxUtils.extend(mxAsyncCanvas,mxAbstractCanvas2D);mxAsyncCanvas.prototype.htmlCanvas=null;mxAsyncCanvas.prototype.canvasIndex=0;mxAsyncCanvas.prototype.waitCounter=0;mxAsyncCanvas.prototype.onComplete=null;mxAsyncCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
-mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(b,e,d,c,k){};
+mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(b,e,d,c,g){};
mxAsyncCanvas.prototype.setAlpha=function(b){this.state.alpha=b};mxAsyncCanvas.prototype.setFontColor=function(b){this.state.fontColor=b};mxAsyncCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxAsyncCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxAsyncCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
-mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,e,d,c){};mxAsyncCanvas.prototype.roundrect=function(b,e,d,c,k,g){};mxAsyncCanvas.prototype.ellipse=function(b,e,d,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
-mxAsyncCanvas.prototype.image=function(b,e,d,c,k,g,m,f){k=this.rewriteImageSource(k);b=this.htmlCanvas.images[k];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[k]=b,b.src=k)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(b,e,d,c,k,g,m,f,l,n,p,q){if(null!=k&&0!=k.length&&(b=this.state.scale,"html"==l&&"function"===typeof html2canvas)){this.incWaitCounter();var t=this.canvasIndex++;html2canvas(k,{onrendered:mxUtils.bind(this,function(b){this.htmlCanvas.subCanvas[t]=b;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
-mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(b,d,c,k){return d+d+c+c+k+k});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
+mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,e,d,c){};mxAsyncCanvas.prototype.roundrect=function(b,e,d,c,g,k){};mxAsyncCanvas.prototype.ellipse=function(b,e,d,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
+mxAsyncCanvas.prototype.image=function(b,e,d,c,g,k,n,f){g=this.rewriteImageSource(g);b=this.htmlCanvas.images[g];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[g]=b,b.src=g)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
+mxAsyncCanvas.prototype.text=function(b,e,d,c,g,k,n,f,l,m,p,q){if(null!=g&&0!=g.length&&(b=this.state.scale,"html"==l&&"function"===typeof html2canvas)){this.incWaitCounter();var t=this.canvasIndex++;html2canvas(g,{onrendered:mxUtils.bind(this,function(b){this.htmlCanvas.subCanvas[t]=b;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(b,d,c,g){return d+d+c+c+g+g});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};
mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(b){this.state.scale*=b;this.state.strokeWidth*=b;this.ctx.scale(b,b)};mxJsCanvas.prototype.translate=function(b,e){this.state.dx+=b;this.state.dy+=e;this.ctx.translate(b,e)};
-mxJsCanvas.prototype.rotate=function(b,e,d,c,k){c-=this.state.dx;k-=this.state.dy;this.ctx.translate(c,k);(e||d)&&this.ctx.scale(e?-1:1,d?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-k)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};
-mxJsCanvas.prototype.setGradient=function(b,e,d,c,k,g,m,f,l){d=this.ctx.createLinearGradient(0,c,0,c+g);c=this.state;c.fillColor=b;c.fillAlpha=null!=f?f:1;c.gradientColor=e;c.gradientAlpha=null!=l?l:1;c.gradientDirection=m;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&d.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&d.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=d};
+mxJsCanvas.prototype.rotate=function(b,e,d,c,g){c-=this.state.dx;g-=this.state.dy;this.ctx.translate(c,g);(e||d)&&this.ctx.scale(e?-1:1,d?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-g)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};
+mxJsCanvas.prototype.setGradient=function(b,e,d,c,g,k,n,f,l){d=this.ctx.createLinearGradient(0,c,0,c+k);c=this.state;c.fillColor=b;c.fillAlpha=null!=f?f:1;c.gradientColor=e;c.gradientAlpha=null!=l?l:1;c.gradientDirection=n;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&d.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&d.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=d};
mxJsCanvas.prototype.setStrokeColor=function(b){null!=b&&(b==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=b,this.state.strokeColor=b))};mxJsCanvas.prototype.setStrokeWidth=function(b){this.ctx.lineWidth=b};mxJsCanvas.prototype.setDashed=function(b){if(this.state.dashed=b){b=this.state.dashPattern.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.setLineDash(b)}else this.setLineDash([0])};
mxJsCanvas.prototype.setLineDash=function(b){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(b)}catch(e){}};mxJsCanvas.prototype.setDashPattern=function(b){this.state.dashPattern=b;if(this.state.dashed){b=b.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.ctx.setLineDash(b)}};mxJsCanvas.prototype.setLineCap=function(b){this.ctx.lineCap=b};mxJsCanvas.prototype.setLineJoin=function(b){this.ctx.lineJoin=b};
mxJsCanvas.prototype.setMiterLimit=function(b){this.ctx.lineJoin=b};mxJsCanvas.prototype.setFontColor=function(b){this.ctx.fillStyle=b};mxJsCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxJsCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxJsCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
mxJsCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxJsCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxJsCanvas.prototype.setShadow=function(b){(this.state.shadow=b)?(this.setShadowOffset(this.state.shadowDx,this.state.shadowDy),this.setShadowAlpha(this.state.shadowAlpha)):(this.ctx.shadowColor="transparent",this.ctx.shadowBlur=0,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0)};
mxJsCanvas.prototype.setShadowColor=function(b){if(null==b||b==mxConstants.NONE)b=null,this.ctx.shadowColor="transparent";this.state.shadowColor=b;if(this.state.shadow&&null!=b){var e=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;b=this.hexToRgb(b);this.ctx.shadowColor="rgba("+b.r+","+b.g+","+b.b+","+e+")"}};mxJsCanvas.prototype.setShadowAlpha=function(b){this.state.shadowAlpha=b;this.setShadowColor(this.state.shadowColor)};
mxJsCanvas.prototype.setShadowOffset=function(b,e){this.state.shadowDx=b;this.state.shadowDy=e;this.state.shadow&&(this.ctx.shadowOffsetX=b,this.ctx.shadowOffsetY=e)};mxJsCanvas.prototype.moveTo=function(b,e){this.ctx.moveTo(b,e);this.lastMoveX=b;this.lastMoveY=e};mxJsCanvas.prototype.lineTo=function(b,e){this.ctx.lineTo(b,e);this.lastMoveX=b;this.lastMoveY=e};mxJsCanvas.prototype.quadTo=function(b,e,d,c){this.ctx.quadraticCurveTo(b,e,d,c);this.lastMoveX=d;this.lastMoveY=c};
-mxJsCanvas.prototype.arcTo=function(b,e,d,c,k,g,m){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,e,d,c,k,g,m);if(null!=b)for(e=0;e<b.length;e+=6)this.curveTo(b[e],b[e+1],b[e+2],b[e+3],b[e+4],b[e+5])};mxJsCanvas.prototype.curveTo=function(b,e,d,c,k,g){this.ctx.bezierCurveTo(b,e,d,c,k,g);this.lastMoveX=k;this.lastMoveY=g};mxJsCanvas.prototype.rect=function(b,e,d,c){this.begin();this.moveTo(b,e);this.lineTo(b+d,e);this.lineTo(b+d,e+c);this.lineTo(b,e+c);this.close()};
-mxJsCanvas.prototype.roundrect=function(b,e,d,c,k,g){this.begin();this.moveTo(b+k,e);this.lineTo(b+d-k,e);this.quadTo(b+d,e,b+d,e+g);this.lineTo(b+d,e+c-g);this.quadTo(b+d,e+c,b+d-k,e+c);this.lineTo(b+k,e+c);this.quadTo(b,e+c,b,e+c-g);this.lineTo(b,e+g);this.quadTo(b,e,b+k,e)};mxJsCanvas.prototype.ellipse=function(b,e,d,c){this.ctx.save();this.ctx.translate(b+d/2,e+c/2);this.ctx.scale(d/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
+mxJsCanvas.prototype.arcTo=function(b,e,d,c,g,k,n){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,e,d,c,g,k,n);if(null!=b)for(e=0;e<b.length;e+=6)this.curveTo(b[e],b[e+1],b[e+2],b[e+3],b[e+4],b[e+5])};mxJsCanvas.prototype.curveTo=function(b,e,d,c,g,k){this.ctx.bezierCurveTo(b,e,d,c,g,k);this.lastMoveX=g;this.lastMoveY=k};mxJsCanvas.prototype.rect=function(b,e,d,c){this.begin();this.moveTo(b,e);this.lineTo(b+d,e);this.lineTo(b+d,e+c);this.lineTo(b,e+c);this.close()};
+mxJsCanvas.prototype.roundrect=function(b,e,d,c,g,k){this.begin();this.moveTo(b+g,e);this.lineTo(b+d-g,e);this.quadTo(b+d,e,b+d,e+k);this.lineTo(b+d,e+c-k);this.quadTo(b+d,e+c,b+d-g,e+c);this.lineTo(b+g,e+c);this.quadTo(b,e+c,b,e+c-k);this.lineTo(b,e+k);this.quadTo(b,e,b+g,e)};mxJsCanvas.prototype.ellipse=function(b,e,d,c){this.ctx.save();this.ctx.translate(b+d/2,e+c/2);this.ctx.scale(d/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
-mxJsCanvas.prototype.image=function(b,e,d,c,k,g,m,f){k=this.rewriteImageSource(k);k=this.images[k];if(null!=k&&0<k.height&&0<k.width){var l=this.ctx;l.save();if(g){g=k.width;var n=k.height,p=Math.min(d/g,c/n);b+=(d-g*p)/2;e+=(c-n*p)/2;d=g*p;c=n*p}m&&(l.translate(2*b+d,0),l.scale(-1,1));f&&(l.translate(0,2*e+c),l.scale(1,-1));l.drawImage(k,b,e,d,c);l.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.image=function(b,e,d,c,g,k,n,f){g=this.rewriteImageSource(g);g=this.images[g];if(null!=g&&0<g.height&&0<g.width){var l=this.ctx;l.save();if(k){k=g.width;var m=g.height,p=Math.min(d/k,c/m);b+=(d-k*p)/2;e+=(c-m*p)/2;d=k*p;c=m*p}n&&(l.translate(2*b+d,0),l.scale(-1,1));f&&(l.translate(0,2*e+c),l.scale(1,-1));l.drawImage(g,b,e,d,c);l.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var b=this.ctx.shadowColor,e=this.ctx.shadowOffsetX,d=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=b;this.ctx.shadowOffsetX=e;this.ctx.shadowOffsetY=d}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(b,e,d,c,k,g,m,f,l,n,p,q){if(null!=k&&0!=k.length){d=this.state.scale;0!=q&&(this.ctx.translate(Math.round(b),Math.round(e)),this.ctx.rotate(q*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-e)));if("html"==l){k=this.subCanvas[this.canvasIndex++];l=k.height;q=k.width;switch(m){case mxConstants.ALIGN_MIDDLE:e-=l/2/d;break;case mxConstants.ALIGN_BOTTOM:e-=l/d}switch(g){case mxConstants.ALIGN_CENTER:b-=q/2/d;break;case mxConstants.ALIGN_RIGHT:b-=q/d}this.ctx.save();
-if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(k.width/d),Math.round(k.height/d))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(k.width/d),Math.round(k.height/d)));this.ctx.scale(1/d,1/d);this.ctx.drawImage(k,
-Math.round(b*d),Math.round(e*d))}else{this.ctx.save();this.updateFont();q=document.createElement("div");q.innerHTML=k;q.style.position="absolute";q.style.top="-9999px";q.style.left="-9999px";q.style.fontFamily=this.state.fontFamily;q.style.fontWeight="bold";q.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(q);l=[q.offsetWidth,q.offsetHeight];document.body.removeChild(q);k=k.split("\n");q=l[1];this.ctx.textBaseline="top";l=e;switch(m){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";e-=(k.length-1)*q/2;l=e-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",e-=q*(k.length-1),l=e-this.state.fontSize}m=[];q=[];for(d=0;d<k.length;d++)q[d]=b,m[d]=this.ctx.measureText(k[d]).width,null!=g&&g!=mxConstants.ALIGN_LEFT&&(q[d]-=m[d],g==mxConstants.ALIGN_CENTER&&(q[d]+=m[d]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=q[0];g=m[0];for(d=1;d<k.length;d++)b=Math.min(b,q[d]),g=Math.max(g,m[d]);this.ctx.save();
-b=Math.round(b)-.5;l=Math.round(l)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,l,g,this.state.fontSize*mxConstants.LINE_HEIGHT*k.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,l,g,this.state.fontSize*mxConstants.LINE_HEIGHT*k.length));this.ctx.restore()}for(d=0;d<k.length;d++)this.ctx.fillText(k[d],q[d],e),e+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+mxJsCanvas.prototype.text=function(b,e,d,c,g,k,n,f,l,m,p,q){if(null!=g&&0!=g.length){d=this.state.scale;0!=q&&(this.ctx.translate(Math.round(b),Math.round(e)),this.ctx.rotate(q*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-e)));if("html"==l){g=this.subCanvas[this.canvasIndex++];l=g.height;q=g.width;switch(n){case mxConstants.ALIGN_MIDDLE:e-=l/2/d;break;case mxConstants.ALIGN_BOTTOM:e-=l/d}switch(k){case mxConstants.ALIGN_CENTER:b-=q/2/d;break;case mxConstants.ALIGN_RIGHT:b-=q/d}this.ctx.save();
+if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(g.width/d),Math.round(g.height/d))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(g.width/d),Math.round(g.height/d)));this.ctx.scale(1/d,1/d);this.ctx.drawImage(g,
+Math.round(b*d),Math.round(e*d))}else{this.ctx.save();this.updateFont();q=document.createElement("div");q.innerHTML=g;q.style.position="absolute";q.style.top="-9999px";q.style.left="-9999px";q.style.fontFamily=this.state.fontFamily;q.style.fontWeight="bold";q.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(q);l=[q.offsetWidth,q.offsetHeight];document.body.removeChild(q);g=g.split("\n");q=l[1];this.ctx.textBaseline="top";l=e;switch(n){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";e-=(g.length-1)*q/2;l=e-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",e-=q*(g.length-1),l=e-this.state.fontSize}n=[];q=[];for(d=0;d<g.length;d++)q[d]=b,n[d]=this.ctx.measureText(g[d]).width,null!=k&&k!=mxConstants.ALIGN_LEFT&&(q[d]-=n[d],k==mxConstants.ALIGN_CENTER&&(q[d]+=n[d]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=q[0];k=n[0];for(d=1;d<g.length;d++)b=Math.min(b,q[d]),k=Math.max(k,n[d]);this.ctx.save();
+b=Math.round(b)-.5;l=Math.round(l)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,l,k,this.state.fontSize*mxConstants.LINE_HEIGHT*g.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,l,k,this.state.fontSize*mxConstants.LINE_HEIGHT*g.length));this.ctx.restore()}for(d=0;d<g.length;d++)this.ctx.fillText(g[d],q[d],e),e+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};DrawioClient=function(b,e){mxEventSource.call(this);this.ui=b;this.cookieName=e;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(b){this.user=b;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName),sessionStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+b.toUTCString()}};
DrawioClient.prototype.getPersistentToken=function(b){var e=null;isLocalStorage&&(e=localStorage.getItem("."+this.cookieName),null==e&&b&&(e=sessionStorage.getItem("."+this.cookieName)));if(null==e&&"undefined"!=typeof Storage){var d=document.cookie;b=this.cookieName+"=";var c=d.indexOf(b);0<=c&&(c+=b.length,e=d.indexOf(";",c),0>e?e=d.length:postCookie=d.substring(e),e=d.substring(c,e),e=0<e.length?e:null,null!=e&&isLocalStorage&&(d=new Date,d.setYear(d.getFullYear()-1),document.cookie=b+"; expires="+
-d.toUTCString(),localStorage.setItem("."+this.cookieName,e)))}return e};DrawioClient.prototype.setPersistentToken=function(b,e){try{if(null!=b)if(isLocalStorage)e?sessionStorage.setItem("."+this.cookieName,b):localStorage.setItem("."+this.cookieName,b);else{if("undefined"!=typeof Storage){var d=new Date;d.setYear(d.getFullYear()+10);var c=this.cookieName+"="+b+"; path=/"+(e?"":"; expires="+d.toUTCString());"https"==document.location.protocol.toLowerCase()&&(c+=";secure");document.cookie=c}}else this.clearPersistentToken()}catch(k){this.ui.handleError(k)}};DrawioUser=function(b,e,d,c,k){this.id=b;this.email=e;this.displayName=d;this.pictureUrl=c;this.locale=k};DriveFile=function(b,e,d){DrawioFile.call(this,b,e);this.desc=d};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};
+d.toUTCString(),localStorage.setItem("."+this.cookieName,e)))}return e};DrawioClient.prototype.setPersistentToken=function(b,e){try{if(null!=b)if(isLocalStorage)e?sessionStorage.setItem("."+this.cookieName,b):localStorage.setItem("."+this.cookieName,b);else{if("undefined"!=typeof Storage){var d=new Date;d.setYear(d.getFullYear()+10);var c=this.cookieName+"="+b+"; path=/"+(e?"":"; expires="+d.toUTCString());"https"==document.location.protocol.toLowerCase()&&(c+=";secure");document.cookie=c}}else this.clearPersistentToken()}catch(g){this.ui.handleError(g)}};DrawioUser=function(b,e,d,c,g){this.id=b;this.email=e;this.displayName=d;this.pictureUrl=c;this.locale=g};DriveFile=function(b,e,d){DrawioFile.call(this,b,e);this.desc=d};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};
DriveFile.prototype.isConflict=function(b){return null!=b&&null!=b.error&&412==b.error.code};DriveFile.prototype.getCurrentUser=function(){return null!=this.ui.drive?this.ui.drive.user:null};DriveFile.prototype.getMode=function(){return App.MODE_GOOGLE};
DriveFile.prototype.getPublicUrl=function(b){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(e){if(null!=e&&null!=e.items)for(var d=0;d<e.items.length;d++)if("anyoneWithLink"===e.items[d].id||"anyone"===e.items[d].id){b(this.desc.webContentLink);return}b(null)}),mxUtils.bind(this,function(){b(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
-DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,e,d,c,k){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,e,d,c,k)}),d,c,k])};
-DriveFile.prototype.saveFile=function(b,e,d,c,k,g){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(b,f){var l=mxUtils.bind(this,function(g,m){try{var n=this.desc;this.ui.drive.saveFile(this,m,mxUtils.bind(this,function(b,g){try{this.savingFile=!1,0!=b?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=Math.round(Math.min(1E4,
-Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=b,null!=f?this.fileSaved(g,n,mxUtils.bind(this,function(){this.contentChanged();null!=d&&d(b)}),c,f):null!=d&&d(b)):null!=c&&c(b)}catch(v){if(this.savingFile=!1,null!=c)c(v);else throw v;}}),mxUtils.bind(this,function(b,d){try{this.savingFile=!1,this.isConflict(b)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(d,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();
-this.setShadowModified(!1);l(g,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(b)}catch(v){if(this.savingFile=!1,null!=c)c(v);else throw v;}}),k,k,g,null,b)}catch(t){if(this.savingFile=!1,null!=c)c(t);else throw t;}});l(g,e)}))):null!=d&&d()}catch(m){if(null!=c)c(m);else throw m;}};
+DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,e,d,c,g){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,e,d,c,g)}),d,c,g])};
+DriveFile.prototype.saveFile=function(b,e,d,c,g,k){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(b,f){var l=mxUtils.bind(this,function(k,n){try{var m=this.desc;this.ui.drive.saveFile(this,n,mxUtils.bind(this,function(b,g){try{this.savingFile=!1,0!=b?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=Math.round(Math.min(1E4,
+Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=b,null!=f?this.fileSaved(g,m,mxUtils.bind(this,function(){this.contentChanged();null!=d&&d(b)}),c,f):null!=d&&d(b)):null!=c&&c(b)}catch(v){if(this.savingFile=!1,null!=c)c(v);else throw v;}}),mxUtils.bind(this,function(b,d){try{this.savingFile=!1,this.isConflict(b)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(d,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();
+this.setShadowModified(!1);l(k,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(b)}catch(v){if(this.savingFile=!1,null!=c)c(v);else throw v;}}),g,g,k,null,b)}catch(t){if(this.savingFile=!1,null!=c)c(t);else throw t;}});l(k,e)}))):null!=d&&d()}catch(n){if(null!=c)c(n);else throw n;}};
DriveFile.prototype.copyFile=function(b,e){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,b,e)}catch(d){e(d)}}),e,!0)};
DriveFile.prototype.makeCopy=function(b,e,d){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,d),mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))};DriveFile.prototype.saveAs=function(b,e,d){this.ui.drive.copyFile(this.getId(),b,e,d)};
-DriveFile.prototype.rename=function(b,e,d){var c=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(k){this.hasSameExtension(b,this.getTitle())?(this.desc=k,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(k)):(this.desc=k,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,d))}),d)};
+DriveFile.prototype.rename=function(b,e,d){var c=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(g){this.hasSameExtension(b,this.getTitle())?(this.desc=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(g)):(this.desc=g,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,d))}),d)};
DriveFile.prototype.move=function(b,e,d){this.ui.drive.moveFile(this.getId(),b,mxUtils.bind(this,function(b){this.desc=b;this.descriptorChanged();null!=e&&e(b)}),d)};DriveFile.prototype.share=function(){this.ui.drive.showPermissions(this.getId())};DriveFile.prototype.getTitle=function(){return this.desc.title};DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id};
DriveFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&this.desc.editable};DriveFile.prototype.isSyncSupported=function(){return!0};DriveFile.prototype.isRevisionHistorySupported=function(){return!0};
DriveFile.prototype.getRevisions=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(d){for(var c=0;c<d.items.length;c++)mxUtils.bind(this,function(b){b.title=b.originalFilename;b.getXml=mxUtils.bind(this,function(c,d){this.ui.drive.getXmlFile(b,mxUtils.bind(this,function(b){c(b.getData())}),d)});b.getUrl=mxUtils.bind(this,function(c){return this.ui.getUrl(window.location.pathname+"?rev="+b.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=
@@ -11044,146 +11049,146 @@ c?"&page="+c:""))+window.location.hash})})(d.items[c]);b(d.items)}),e)};DriveFil
DriveFile.prototype.getDescriptor=function(){return this.desc};DriveFile.prototype.setDescriptor=function(b){this.desc=b};DriveFile.prototype.getDescriptorSecret=function(b){return this.ui.drive.getCustomProperty(b,"secret")};DriveFile.prototype.setDescriptorRevisionId=function(b,e){b.headRevisionId=e};DriveFile.prototype.getDescriptorRevisionId=function(b){return b.headRevisionId};DriveFile.prototype.getDescriptorEtag=function(b){return b.etag};
DriveFile.prototype.setDescriptorEtag=function(b,e){b.etag=e};DriveFile.prototype.loadPatchDescriptor=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(d){b(d)}),e)};DriveFile.prototype.patchDescriptor=function(b,e){b.headRevisionId=e.headRevisionId;b.modifiedDate=e.modifiedDate;DrawioFile.prototype.patchDescriptor.apply(this,arguments)};
DriveFile.prototype.loadDescriptor=function(b,e){this.ui.drive.loadDescriptor(this.getId(),b,e)};DriveFile.prototype.commentsSupported=function(){return!0};
-DriveFile.prototype.getComments=function(b,e){function d(b,e,m){if(e.deleted)return null;m=new DriveComment(b,e.commentId||e.replyId,e.content,e.modifiedDate,e.createdDate,"resolved"==e.status,e.author.isAuthenticatedUser?c:new DrawioUser(e.author.permissionId,e.author.emailAddress,e.author.displayName,e.author.picture.url),m);for(var f=0;null!=e.replies&&f<e.replies.length;f++)m.addReplyDirect(d(b,e.replies[f],e.commentId));return m}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
-this.getId()+"/comments"},mxUtils.bind(this,function(c){for(var e=[],k=0;k<c.items.length;k++){var f=d(this,c.items[k]);null!=f&&e.push(f)}b(e)}),e)};DriveFile.prototype.addComment=function(b,e,d){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(b){e(b.commentId)}),d)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
+DriveFile.prototype.getComments=function(b,e){function d(b,e,n){if(e.deleted)return null;n=new DriveComment(b,e.commentId||e.replyId,e.content,e.modifiedDate,e.createdDate,"resolved"==e.status,e.author.isAuthenticatedUser?c:new DrawioUser(e.author.permissionId,e.author.emailAddress,e.author.displayName,e.author.picture.url),n);for(var f=0;null!=e.replies&&f<e.replies.length;f++)n.addReplyDirect(d(b,e.replies[f],e.commentId));return n}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
+this.getId()+"/comments"},mxUtils.bind(this,function(c){for(var e=[],g=0;g<c.items.length;g++){var f=d(this,c.items[g]);null!=f&&e.push(f)}b(e)}),e)};DriveFile.prototype.addComment=function(b,e,d){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(b){e(b.commentId)}),d)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
DriveFile.prototype.newComment=function(b,e){return new DriveComment(this,null,b,Date.now(),Date.now(),!1,e)};DriveLibrary=function(b,e,d){DriveFile.call(this,b,e,d)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(b,e,d){this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(b){this.desc=b;null!=e&&e(b)}),d)};DriveLibrary.prototype.open=function(){};(function(){var b=null,e={};window.DriveClient=function(b,c){null==c&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(c=!0);mxEventSource.call(this);DrawioClient.call(this,b,"gDriveAuthInfo");this.isExtAuth=c;this.ui=b;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt&&"1"!=urlParams.extAuth?(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken(),
this.appId=window.DRAWIO_GOOGLE_VIEWER_APP_ID||"850530949725",this.clientId=window.DRAWIO_GOOGLE_VIEWER_CLIENT_ID||"850530949725.apps.googleusercontent.com",this.scopes=["https://www.googleapis.com/auth/drive.readonly","https://www.googleapis.com/auth/userinfo.profile"]):(this.appId=window.DRAWIO_GOOGLE_APP_ID||"671128082532",this.clientId=window.DRAWIO_GOOGLE_CLIENT_ID||"671128082532-jhphbq6d0e1gnsus9mn7vf8a6fjn10mp.apps.googleusercontent.com");this.mimeTypes=this.xmlMimeType+",application/mxe,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy";
var d=JSON.parse(this.token);null!=d&&null!=d.current&&(this.userId=d.current.userId,this.authCalled=!1)};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);DriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/google";DriveClient.prototype.GDriveBaseUrl="https://www.googleapis.com/drive/v2";DriveClient.prototype.scopes=["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/userinfo.profile"];
DriveClient.prototype.allFields="kind,id,parents,headRevisionId,etag,title,mimeType,modifiedDate,editable,copyable,canComment,labels,properties,downloadUrl,webContentLink,userPermission,fileSize";DriveClient.prototype.catchupFields="etag,headRevisionId,modifiedDate,properties(key,value)";DriveClient.prototype.enableThumbnails=!0;DriveClient.prototype.thumbnailWidth=1E3;DriveClient.prototype.maxThumbnailSize=2E6;DriveClient.prototype.placeholderThumbnail="iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAACN1BMVEXwhwXvhgX4iwXzhwXgbQzvhgXhbAzocgzqcwzldAoAAADhbgvjcQnmdgrlbgDwhgXsfwXufgjwhgXwgQfziAXxgADibgz4iwX4jAX3iwTpcwr1igXoewjsfgj3igX4iwXqcQv4jAX3iwXtfQnndQrvhAbibArwhwXgbQz//////v39jwX6jQX+/v7fagHfawzdVQDwhADgbhPgbhXwhwPocQ3uvKvwiA/faQDscgzxiAT97+XgciTgcSP6jAXgbQ3gcCHwiRfpcQzwhwfeXQD77ef74NLvhgTvegD66uPgbAf66+TvfADwjCzgcCfwiSD67ObhcjjwiBHhczvwiyrgbxj///777ujgcSHgcB/xiRzgbhveWgDeVwDhdEDgbRDqfgffYgDfXwD97+bvfQDxiz7//vvwiRr118rrcgztggbfZgDfZAD++PT98+3gbBPsgAb99vD33tPgcB7icAvuhAX//Pn66N/00sTyy7vuuqbjekLwhwzkcgr88er449n++vfutp/kh1vgcBvhbwvmdwnwgwDwgADeWQD87eLxxrTssJjqpIf0roHmjWTkhFP759n63czvvanomnjnlHDhczD22cr4y6/wwa/3xKX2wJ3rqpH0tY7qp4vpnoDymlbjf0vxjjntcwzldAroegj/kgX12s7518PzqnnnkWfynmLieUjpewjrdAD40Lj1uZTzpm3idTbiciLydQzzfwnyiQTsfgD3xqnzp3TxlkzgbCrdTwDdSwBLKUlNAAAAJ3RSTlP8/b2X/YH8wb+FAIuIggJbQin5opAM9+a/ubaubyD78NjSyr2WgRp4sjN4AAAI70lEQVR42u2cZ38SQRDGT8WGvfde4E4BxVMRRaKiUURRlJhQRDCCSgQVO/bee++9994+nMt5ywoezFJd/fm8uITi3p9n5mbYkcCpO6rVnVu2YEXd+3dRIySuo7pLv4GjGNKg7j3UHTl1l14PajmG9OFBnx7Ird4PumpYEtf1QXc112l0M7OGKXEfeg3guo3iNIyJG92Jaz61mYYxcaNacs1H/8f6j6X5j1WI/mMVIsawRFEzI49SjwOqAJa43emclk8Rp2c7AFZ+LDGyvXE2kmO2Q1Lq17RSd6ND48QIwFVuLNHTOPbEpTOz8ujMpccHGz0AV5mxIo4TpwUeUPj0YwfAVVYs0Tn7VZjnBUA8v+n6CyfERY8FR/DEJj7MQ6oL85vOvfDUAsuVC8s19s5yXuAppOPnvPk4EeSCsehCeBVTwVzHfE6RcFUQa4an8Qw91kpbw2oz4aoc1sSxniO0WAI/J24wriabmEpizZtM79bc+fr4/tUarEpiLabGElJYRsOGjbJfjGDpJCxtmosRLOEnVpqLESzZLYlLg65H1rAkLo2GESwcROwXI1jELcS1Y6OGQSzEVaupZQJLDiLhYtCtFBcbbslYhOueqKllDwtzwVhTq4RFuBh0C3EdEBl0C3OBWNUrEISLvSD+5GLQLYmLoSqfwcUiFuaqzhYDxiJc981lxqqdVsCGbHPcQLBgrtK3rwLt9tWqhblKxxI9hW3267U5ZHhuBrCKzXl4NIJTS5FrmbmMWGIEDZIouOp0/O6boYQ2jxBXWcdu13fzRILuF/2Ku+aGr96uBbhALHo5Z38+XcfXyVRZVx/+Ed513ldDCCCu0rFE0Xlo2mu5TAj8ki0XV0q6ePHilhi+d/15b9ACQGGusg3AFzc+XSMBCPzu89+CNlnB7zfD8t1z4iaLXUvDVT6sGdMOnv5pi47f6r9Qk9YF3xZ0l8S11UfMArlgLMpZM6bamYy6rWnta9q7TrZrzZPgPgoqg3atubY8WK6D8lQXHfb4p/wSK7vFfxmxSsAPQ96AlZ4LxoLNeompdkUDGQVznL5mLr4ar5ESD3PBWHA9fbpbjlT4pq1Bm6H6w9dwfOd69ePouNDYt3S3ULPGZ96S3YqtAW/Tepz1E8bgAANc+xEXhAX36ut1cslcd6rJq81SIvgEe7lmL3kY5iqxVYvOI9isswp22KeMOcrriJlWai5giwHl+yec73Ma9Mbfz+qOJndKz6hLpR5V1uPxavFuTTt0K1XfpbNeO0wKeUaR2IPBN5sMRlqu1eY8bsFmPeIFUpi0CjIGTLvSZY2EGeYSi3VL9Dgeb0I+SQl9MlcZT4TObZKzfmfS5NZSx1GsLQ5r+8Sxp7ERR/1TtDlUn2qNuGXCrZGM5URlLDiEVzDVkje5fdjXdDsm27XpXChBz4XG0UpYcDOMYaxjGc3wtyJxFtu1PohaI71f2K2imqEONcN4nrMZ9TWbMf81wg9z3VNwC26Gr3enY4ObobLqbccFefuz5AKONpVfzQp2y3NoVvrN32GLNl9orA22lTiM+Nqg5CJY1DueOjkwsdtNgAP7gidR2SWVhFqt3o9QwoKHIuiwDcwX+xT/UWztSlvCaqXGmtQBY1GadQmfh6anuE0XlkhhRFs3tGGkd+tuIVhiJN0M+brj0mlAu46lX0bcbizVLbgZrgwl4JhYA+NQa9TJQUetsSJYHscJvAVct7eJKoUbQudxPYmdirqzsYsIojhjoitD01yadH287J+vpZF1/uGt2K4ttinjshQo2C2XMzI2U64X6WY4tyZq99a7wZS3eA3BpNyrUPn1x00Z0uM1ACzilOfg7EN3VmRo8dN16WYYerYw6G9qCOSDCjQ0jQkufRbalt65LVyapaA/2mClxhK3Rxy3rsyavDxDR/DL5sMLFiyYu/7sXps7z8VldPv2Xl6PnjlTwOOuJQuytH7CXpvXCOQWoZrYeHWd4nw2Q+v22OLGnFSG0Nk1PCi0xjgjpVvTGi8hht9F+ARBGq8dtXmtOSLoDm1FhUSHnihkTecESalHkPAaWVhtFbA8jqvQGBmbt8fWkKtNn0Xw9GvAWK6DX9bBVHjzqtyvvcG9a+jXyC5oKoKV/a4YFG7Yij2ofszlgtaA3ZoRwW+pIOH3w0qZFURNh3oNtKsDsAr9LNvMC0pj93H6hTPpX9ocg8FIgTVvcgFYC03jFLBMi6ix0MDAoi8/lh7Cgt2q0VfNrSX0ayhjTa2IW0tKdotNrMq4NbPkILKZW+xdiSoGgshogfh7Ul7FcIEoFevfrPLC3+XWf6y/CEvHZoFQqlts9sQigqjLxFpQCJauakFcsqhKPXH79rGb6bE2B5Qmu0b91zn0WJtN8Wys9tgtIqfjEf2SWw7XKI8gHuKQ0X0eDsQSI44TaGBN6dYN5dlI/eFj9I7f8GWtoUJYOIgkiq6Ds/gw5T7dZDUqTrfscbLbB9eIB7JmEKsUgiii/4uO8ToBfJlhfif5tEGWEsGTMT4Mr6HDa0BBlP5Y88lcnkdkCtLhnyjMM0+Gcn2WzW6xnd/J8zn+LZq4SUeEvUBaA8LCs6Tk1p1AetXt3JoMWexWZSyr3RK6vSUGrRHbmkRUVgCLpP1HW/L4tgl5tO140mdKKFFhrkTUdxta4xleA8DCXC6n/vCYvPJFa9zAWL4m6qNaA8IiqjW73lreWnJrSj0AJYFZpvwq6RZRzjVUGEtB5tX7DdoqCXaL+PXHuEjdYsuvVqva4Sqv6NdabdW4YLeIKsoFYzHGhYPIGBd2izGuVpPaSVgAV7VEsOQgsuUXdosxLuwWxLVMW0WRK5ExLiiIpN4vq2YYVTiIbPmFgii5xRiXimCBqmIcVSS3WMqvdMqz5VcKqzdKeca4UrnVT/ryR6bi2Opuf64TwYJlfl4FLqu2Zxeux5BRXZnisvZ8103NqTtzoziuGa24+wZVRdVK9W7wyNSX1nYeOmrU6JSmjp6KhH5BR+kGvk++Ld0c/X66rPH4SEQeGl+kpq8a33eAumPqK347durWpzm9hrWhUevi1Hd4ZzVC+gGMHY0TYnDOYwAAAABJRU5ErkJggg==".replace(/\+/g,
"-").replace(/\//g,"_");DriveClient.prototype.placeholderMimeType="image/png";DriveClient.prototype.libraryMimeType="application/vnd.jgraph.mxlibrary";DriveClient.prototype.newAppHostname="www.draw.io";DriveClient.prototype.extension=".drawio";DriveClient.prototype.tokenRefreshInterval=0;DriveClient.prototype.lastTokenRefresh=0;DriveClient.prototype.maxRetries=5;DriveClient.prototype.staleEtagMaxRetries=3;DriveClient.prototype.coolOff=1E3;DriveClient.prototype.mimeTypeCheckCoolOff=6E4;DriveClient.prototype.user=
null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedirectUrl=null;DriveClient.prototype.setUser=function(b){this.user=b;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=b.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(b){this.userId=b;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser=
-function(){return this.user};DriveClient.prototype.getUsersList=function(){var b=[],c=JSON.parse(this.getPersistentToken(!0)),e=null;if(null!=c){null!=c.current&&(e=c.current.userId,b.push(c[e].user),b[0].isCurrent=!0);for(var g in c)"current"!=g&&g!=e&&b.push(c[g].user)}return b};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();
+function(){return this.user};DriveClient.prototype.getUsersList=function(){var b=[],c=JSON.parse(this.getPersistentToken(!0)),e=null;if(null!=c){null!=c.current&&(e=c.current.userId,b.push(c[e].user),b[0].isCurrent=!0);for(var k in c)"current"!=k&&k!=e&&b.push(c[k].user)}return b};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();
this.setUser(null);b=null};DriveClient.prototype.execute=function(b){var c=mxUtils.bind(this,function(c){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(c,d){this.authorize(!1,mxUtils.bind(this,function(){null!=d&&d();b()}),mxUtils.bind(this,function(b){var c=mxResources.get("cannotLogin");null!=b&&null!=b.error&&403==b.error.code&&null!=b.error.data&&0<b.error.data.length&&"domainPolicy"==b.error.data[0].reason&&(c=b.error.message);this.logout();this.ui.showError(mxResources.get("error"),
-c,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),c)}))});this.authorize(!0,b,c)};DriveClient.prototype.executeRequest=function(d,c,e){try{var g=!0,k=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var l=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=d;null!=k&&window.clearTimeout(k);k=window.setTimeout(mxUtils.bind(this,
-function(){g=!1;null!=e&&e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:l})}),this.ui.timeout);var m=null,p=!1;"string"===typeof d.params?m=d.params:null!=d.params&&(m=JSON.stringify(d.params),p=!0);var q=d.fullUrl||this.GDriveBaseUrl+d.url;p&&(q+=(0<q.indexOf("?")?"&":"?")+"alt=json");var t=new mxXmlRequest(q,m,d.method||"GET");t.setRequestHeaders=mxUtils.bind(this,function(c,e){if(null!=d.headers)for(var f in d.headers)c.setRequestHeader(f,d.headers[f]);else null!=d.contentType?
-c.setRequestHeader("Content-Type",d.contentType):p&&c.setRequestHeader("Content-Type","application/json");c.setRequestHeader("Authorization","Bearer "+b)});t.send(mxUtils.bind(this,function(b){try{if(window.clearTimeout(k),g){var m;try{m=JSON.parse(b.getText())}catch(z){m=null}if(200<=b.getStatus()&&299>=b.getStatus())null!=c&&c(m);else{var n=null!=m&&null!=m.error?null!=m.error.data?m.error.data:m.error.errors:null,p=null!=n&&0<n.length?n[0].reason:null;null==e||null==m||null==m.error||-1!=m.error.code&&
-(403!=m.error.code||"domainPolicy"!=p&&"The requested mime type change is forbidden."!=m.error.message)?null!=m&&null!=m.error&&(401==m.error.code||403==m.error.code&&"rateLimitExceeded"!=p)?403==m.error.code&&this.retryAuth||401==m.error.code&&this.retryAuth&&"authError"==p?(null!=e&&e(m),this.retryAuth=!1):(this.retryAuth=!0,this.execute(l)):null!=m&&null!=m.error&&412!=m.error.code&&404!=m.error.code&&400!=m.error.code&&this.currentRequest==d&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(l,
-Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=e&&e(m):e(m)}}}catch(z){if(null!=e)e(z);else throw z;}}))}catch(u){if(null!=e)e(u);else throw u;}});null!=b&&this.authCalled?l():this.execute(l)}catch(n){if(null!=e)e(n);else throw n;}};DriveClient.prototype.createAuthWin=function(b){return window.open(b?b:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
-DriveClient.prototype.authorize=function(b,c,e,g,m){this.isExtAuth&&!b?window.parent.driveAuth(mxUtils.bind(this,function(b){this.updateAuthInfo(b,!0,!0,c,e)}),e):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()?this.authorizeStep2(d.getText(),b,c,e,g,m):null!=e&&e(d)}),e)};DriveClient.prototype.updateAuthInfo=function(d,c,e,g,m){b=d.access_token;delete d.access_token;d.expires=Date.now()+1E3*parseInt(d.expires_in);
-d.remember=c;this.resetTokenRefresh(d);this.authCalled=!0;if(e||null==this.user){var f=JSON.stringify(d);this.updateUser(mxUtils.bind(this,function(){var b=JSON.parse(f);this.setPersistentToken(b,!c);null!=g&&g()}),m)}else null!=g&&(this.setPersistentToken(d,!c),g())};DriveClient.prototype.authorizeStep2=function(b,c,e,g,m,f){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var d=
-JSON.parse(this.getPersistentToken(!0));d&&null!=d.current&&(this.userId=d.current.userId)}if(c&&null==this.userId)null!=g&&g();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+b)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?(b=JSON.parse(b.getText()),this.updateAuthInfo(b,!0,!1,e,g)):(0!=b.getStatus()&&this.logout(),null!=g&&g(b))}),g);else{var k=
-"https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(m?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+b+(this.sameWinRedirectUrl?"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(k),
-f=null):null==f?f=this.createAuthWin(k):f.location=k;null!=f&&(window.onGoogleDriveCallback=mxUtils.bind(this,function(b,c){window.onGoogleDriveCallback=null;try{null==b?null!=g&&g({message:mxResources.get("accessDenied")}):this.updateAuthInfo(b,m,!0,e,g)}catch(t){null!=g&&g(t)}finally{null!=c&&c.close()}}),f.focus())}}catch(p){if(null!=g)g(p);else throw p;}};DriveClient.prototype.resetTokenRefresh=function(b){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=
+c,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),c)}))});this.authorize(!0,b,c)};DriveClient.prototype.executeRequest=function(d,c,e){try{var g=!0,n=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var l=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=d;null!=n&&window.clearTimeout(n);n=window.setTimeout(mxUtils.bind(this,
+function(){g=!1;null!=e&&e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:l})}),this.ui.timeout);var k=null,p=!1;"string"===typeof d.params?k=d.params:null!=d.params&&(k=JSON.stringify(d.params),p=!0);var q=d.fullUrl||this.GDriveBaseUrl+d.url;p&&(q+=(0<q.indexOf("?")?"&":"?")+"alt=json");var t=new mxXmlRequest(q,k,d.method||"GET");t.setRequestHeaders=mxUtils.bind(this,function(c,e){if(null!=d.headers)for(var f in d.headers)c.setRequestHeader(f,d.headers[f]);else null!=d.contentType?
+c.setRequestHeader("Content-Type",d.contentType):p&&c.setRequestHeader("Content-Type","application/json");c.setRequestHeader("Authorization","Bearer "+b)});t.send(mxUtils.bind(this,function(b){try{if(window.clearTimeout(n),g){var k;try{k=JSON.parse(b.getText())}catch(z){k=null}if(200<=b.getStatus()&&299>=b.getStatus())null!=c&&c(k);else{var m=null!=k&&null!=k.error?null!=k.error.data?k.error.data:k.error.errors:null,p=null!=m&&0<m.length?m[0].reason:null;null==e||null==k||null==k.error||-1!=k.error.code&&
+(403!=k.error.code||"domainPolicy"!=p&&"The requested mime type change is forbidden."!=k.error.message)?null!=k&&null!=k.error&&(401==k.error.code||403==k.error.code&&"rateLimitExceeded"!=p)?403==k.error.code&&this.retryAuth||401==k.error.code&&this.retryAuth&&"authError"==p?(null!=e&&e(k),this.retryAuth=!1):(this.retryAuth=!0,this.execute(l)):null!=k&&null!=k.error&&412!=k.error.code&&404!=k.error.code&&400!=k.error.code&&this.currentRequest==d&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(l,
+Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=e&&e(k):e(k)}}}catch(z){if(null!=e)e(z);else throw z;}}))}catch(u){if(null!=e)e(u);else throw u;}});null!=b&&this.authCalled?l():this.execute(l)}catch(m){if(null!=e)e(m);else throw m;}};DriveClient.prototype.createAuthWin=function(b){return window.open(b?b:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
+DriveClient.prototype.authorize=function(b,c,e,k,n){this.isExtAuth&&!b?window.parent.driveAuth(mxUtils.bind(this,function(b){this.updateAuthInfo(b,!0,!0,c,e)}),e):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()?this.authorizeStep2(d.getText(),b,c,e,k,n):null!=e&&e(d)}),e)};DriveClient.prototype.updateAuthInfo=function(d,c,e,k,n){b=d.access_token;delete d.access_token;d.expires=Date.now()+1E3*parseInt(d.expires_in);
+d.remember=c;this.resetTokenRefresh(d);this.authCalled=!0;if(e||null==this.user){var f=JSON.stringify(d);this.updateUser(mxUtils.bind(this,function(){var b=JSON.parse(f);this.setPersistentToken(b,!c);null!=k&&k()}),n)}else null!=k&&(this.setPersistentToken(d,!c),k())};DriveClient.prototype.authorizeStep2=function(b,c,e,k,n,f){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var d=
+JSON.parse(this.getPersistentToken(!0));d&&null!=d.current&&(this.userId=d.current.userId)}if(c&&null==this.userId)null!=k&&k();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+b)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?(b=JSON.parse(b.getText()),this.updateAuthInfo(b,!0,!1,e,k)):(0!=b.getStatus()&&this.logout(),null!=k&&k(b))}),k);else{var g=
+"https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(n?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+b+(this.sameWinRedirectUrl?"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(g),
+f=null):null==f?f=this.createAuthWin(g):f.location=g;null!=f&&(window.onGoogleDriveCallback=mxUtils.bind(this,function(b,c){window.onGoogleDriveCallback=null;try{null==b?null!=k&&k({message:mxResources.get("accessDenied")}):this.updateAuthInfo(b,n,!0,e,k)}catch(t){null!=k&&k(t)}finally{null!=c&&c.close()}}),f.focus())}}catch(p){if(null!=k)k(p);else throw p;}};DriveClient.prototype.resetTokenRefresh=function(b){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=
null);null!=b&&null==b.error&&0<b.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(b.expires_in),this.lastTokenRefresh=(new Date).getTime(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*b.expires_in))};DriveClient.prototype.checkToken=function(b){var c=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,
function(){b();c&&this.fireEvent(new mxEventObject("disconnected"))})):b()};DriveClient.prototype.updateUser=function(d,c){try{var e={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(b){var e=JSON.parse(b);this.executeRequest({url:"/about"},mxUtils.bind(this,function(b){var c=mxResources.get("notAvailable"),f=c,g=null;null!=b&&null!=b.user&&(c=b.user.emailAddress,f=b.user.displayName,g=null!=b.user.picture?b.user.picture.url:
-null);this.setUser(new DrawioUser(e.id,c,f,g,e.locale));this.userId=e.id;null!=d&&d()}),c)}),c,null,null,null,null,e)}catch(g){if(null!=c)c(g);else throw g;}};DriveClient.prototype.copyFile=function(b,c,e,g){null!=b&&null!=c&&this.executeRequest({url:"/files/"+b+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},e,g)};DriveClient.prototype.renameFile=function(b,c,e,g){null!=
-b&&null!=c&&this.executeRequest(this.createDriveRequest(b,{title:c}),e,g)};DriveClient.prototype.moveFile=function(b,c,e,g){null!=b&&null!=c&&this.executeRequest(this.createDriveRequest(b,{parents:[{kind:"drive#fileLink",id:c}]}),e,g)};DriveClient.prototype.createDriveRequest=function(b,c){return{url:"/files/"+b+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(b,c,e){return this.getFile(b,
-c,e,!0,!0)};DriveClient.prototype.loadDescriptor=function(b,c,e,g){this.executeRequest({url:"/files/"+b+"?supportsAllDrives=true&fields="+(null!=g?g:this.allFields)},c,e)};DriveClient.prototype.listFiles=function(b,c,e,g,m){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+"') "+(b?" and (title contains '"+b+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(e?" and ('me' in owners)":""))+
-"&orderBy=modifiedDate desc,title"},g,m)};DriveClient.prototype.getCustomProperty=function(b,c){var d=b.properties,e=null;if(null!=d)for(var m=0;m<d.length;m++)if(d[m].key==c){e=d[m].value;break}return e};DriveClient.prototype.getFile=function(d,c,e,g,m){g=null!=g?g:!1;m=null!=m?m:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+d+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(b){b.title=b.originalFilename;b.headRevisionId=b.id;b.id=d;this.getXmlFile(b,
-c,e)}),e):this.loadDescriptor(d,mxUtils.bind(this,function(d){try{if(null!=this.user){var f=/\.png$/i.test(d.title);/\.v(dx|sdx?)$/i.test(d.title)||/\.gliffy$/i.test(d.title)||!this.ui.useCanvasForExport&&f?this.ui.convertFile(d.downloadUrl,d.title,d.mimeType,this.extension,c,e,null,{Authorization:"Bearer "+b}):g||m||d.mimeType==this.libraryMimeType||d.mimeType==this.xmlMimeType?this.getXmlFile(d,c,e,!0,m):this.getXmlFile(d,c,e)}else e({message:mxResources.get("loggedOut")})}catch(n){if(null!=e)e(n);
-else throw n;}}),e)};DriveClient.prototype.isGoogleRealtimeMimeType=function(b){return null!=b&&"application/vnd.jgraph.mxfile."==b.substring(0,30)};DriveClient.prototype.getXmlFile=function(d,c,e,g,m){try{var f={Authorization:"Bearer "+b},k=d.downloadUrl;if(null==k)null!=e&&e({message:mxResources.get("exportOptionsDisabledDetails")});else{var n=0,p=mxUtils.bind(this,function(){this.ui.editor.loadUrl(k,mxUtils.bind(this,function(b){try{if(null==b)e({message:mxResources.get("invalidOrMissingFile")});
-else if(d.mimeType==this.libraryMimeType||m)d.mimeType!=this.libraryMimeType||m?c(new DriveLibrary(this.ui,b,d)):e({message:mxResources.get("notADiagramFile")});else{var f=!1;if(/\.png$/i.test(d.title)){var g=b.lastIndexOf(",");if(0<g){var l=this.ui.extractGraphModelFromPng(b);if(null!=l&&0<l.length)b=l;else try{var l=b.substring(g+1),n=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(l):atob(l),p=this.ui.editor.extractGraphModel(mxUtils.parseXml(n).documentElement,!0);null==p||0<p.getElementsByTagName("parsererror").length?
-f=!0:b=n}catch(z){f=!0}}}else/\.pdf$/i.test(d.title)?(l=Editor.extractGraphModelFromPdf(b),null!=l&&0<l.length&&(f=!0,b=l)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(n=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,k)?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?c(new LocalFile(this.ui,
-b.responseText,d.title+this.extension,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}catch(y){if(null!=e)e(y);else throw y;}}),d.title):c(f?new LocalFile(this.ui,b,d.title,!0):new DriveFile(this.ui,b,d))}}catch(z){if(null!=e)e(z);else throw z;}}),mxUtils.bind(this,function(b,c){if(n<this.maxRetries&&null!=c&&403==c.getStatus())n++,window.setTimeout(p,2*n*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=e)e(b);else throw b;}),null!=d.mimeType&&"image/"==d.mimeType.substring(0,
-6)&&"image/svg"!=d.mimeType.substring(0,9)||/\.png$/i.test(d.title)||/\.jpe?g$/i.test(d.title)||/\.pdf$/i.test(d.title),null,null,null,f)});p()}}catch(q){if(null!=e)e(q);else throw q;}};DriveClient.prototype.saveFile=function(b,c,e,g,m,f,l,n,p){try{var d=0;b.saveLevel=1;var k=mxUtils.bind(this,function(c){if(null!=g)g(c);else throw c;try{if(!b.isConflict(c)){var d="sl_"+b.saveLevel+"-error_"+(b.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
-b.getHash()+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+(b.changeListenerEnabled?"":"-nolisten")+(b.inConflictState?"-conflict":"")+(b.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync")})}}catch(I){}}),u=mxUtils.bind(this,function(b){k(b);try{EditorUi.logError(b.message,null,null,
-b)}catch(D){}});if(b.isEditable()&&null!=b.desc){var v=(new Date).getTime(),x=b.desc.etag,A=b.desc.modifiedDate,z=b.desc.headRevisionId,y=this.ui.useCanvasForExport&&/(\.png)$/i.test(b.getTitle());f=null!=f?f:!1;var B=null,C=!1,E={mimeType:b.desc.mimeType,title:b.getTitle()};if(this.isGoogleRealtimeMimeType(E.mimeType))E.mimeType=this.xmlMimeType,B=b.desc,C=c=!0;else if("application/octet-stream"==E.mimeType||"1"==urlParams["override-mime"]&&E.mimeType!=this.xmlMimeType)E.mimeType=this.xmlMimeType;
-var G=mxUtils.bind(this,function(g,m,q){try{b.saveLevel=3;b.constructor==DriveFile&&(null==n&&(n=[]),null==b.getChannelId()&&n.push({key:"channel",value:Editor.guid(32)}),null==b.getChannelKey()&&n.push({key:"key",value:Editor.guid(32)}),n.push({key:"secret",value:null!=p?p:Editor.guid(32)}));q||(null!=g||f||(g=this.placeholderThumbnail,m=this.placeholderMimeType),null!=g&&null!=m&&(E.thumbnail={image:g,mimeType:m}));var t=b.getData(),D=mxUtils.bind(this,function(d){try{if(b.saveDelay=(new Date).getTime()-
-v,b.saveLevel=11,null==d)k({message:mxResources.get("errorSavingFile")+": Empty response"});else{var f=(new Date(d.modifiedDate)).getTime()-(new Date(A)).getTime();if(0>=f||x==d.etag||c&&z==d.headRevisionId){b.saveLevel=12;var g=[];0>=f&&g.push("invalid modified time");x==d.etag&&g.push("stale etag");c&&z==d.headRevisionId&&g.push("stale revision");var l=g.join(", ");k({message:mxResources.get("errorSavingFile")+": "+l},d);try{EditorUi.logError("Critical: Error saving to Google Drive "+b.desc.id,
-null,"from-"+z+"."+A+"-"+this.ui.hashValue(x)+"-to-"+d.headRevisionId+"."+d.modifiedDate+"-"+this.ui.hashValue(d.etag)+(0<l.length?"-errors-"+l:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync"))}catch(S){}}else if(b.saveLevel=null,e(d,t),null!=B){this.executeRequest({url:"/files/"+B.id+"/revisions/"+B.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(b){b.pinned=!0;this.executeRequest({url:"/files/"+B.id+"/revisions/"+
-B.headRevisionId,method:"PUT",params:b})})));try{EditorUi.logEvent({category:b.convertedFrom+"-CONVERT-FILE-"+b.getHash(),action:"from_"+B.id+"."+B.headRevisionId+"-to_"+b.desc.id+"."+b.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=b.sync?"-client_"+b.sync.clientId:"nosync")})}catch(S){}}}}catch(S){u(S)}}),M=mxUtils.bind(this,function(e,f){b.saveLevel=4;try{null!=n&&(E.properties=n);var m=l||b.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
-null:b.getCurrentEtag(),p=mxUtils.bind(this,function(g){b.saveLevel=5;try{var l=b.desc.mimeType!=this.xmlMimeType&&b.desc.mimeType!=this.mimeType&&b.desc.mimeType!=this.libraryMimeType,n=!0,p=null;try{p=window.setTimeout(mxUtils.bind(this,function(){n=!1;k({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(b.getId(),E,e,c||g||l,f,g?null:m,C),mxUtils.bind(this,function(b){window.clearTimeout(p);n&&D(b)}),mxUtils.bind(this,function(c){window.clearTimeout(p);
-if(n){b.saveLevel=6;try{b.isConflict(c)?this.executeRequest({url:"/files/"+b.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){b.saveLevel=7;try{if(null!=e&&e.etag==m)if(d<this.staleEtagMaxRetries){d++;var f=2*d*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(q,f);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",d,"delay",f)}else{q(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+b.getHash(),action:"rev_"+
-b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+(b.changeListenerEnabled?"":"-nolisten")+(b.inConflictState?"-conflict":"")+(b.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync")})}catch(ca){}}else"1"==urlParams.test&&e.headRevisionId==z&&EditorUi.debug("DriveClient: Remote Etag Changed","local",m,
-"remote",e.etag,"rev",b.desc.headRevisionId,"response",[e],"file",[b]),k(c,e)}catch(ca){u(ca)}}),mxUtils.bind(this,function(){k(c)})):k(c)}catch(Y){u(Y)}}}))}catch(Z){u(Z)}}),q=mxUtils.bind(this,function(c){b.saveLevel=9;if(c||null==m)p(c);else{var d=!0,e=null;try{e=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(aa){}this.executeRequest({url:"/files/"+b.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(f){window.clearTimeout(e);
-if(d){b.saveLevel=10;try{null!=f&&f.headRevisionId==z?("1"==urlParams.test&&m!=f.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",m,"to",f.etag,"rev",b.desc.headRevisionId,"response",[f],"file",[b]),m=f.etag,p(c)):k({error:{code:412}},f)}catch(Z){u(Z)}}}),mxUtils.bind(this,function(c){window.clearTimeout(e);d&&(b.saveLevel=11,k(c))}))}});if(y&&null==g){b.saveLevel=8;var t=new Image;t.onload=mxUtils.bind(this,function(){try{var b=this.thumbnailWidth/t.width,c=document.createElement("canvas");
-c.width=this.thumbnailWidth;c.height=Math.floor(t.height*b);c.getContext("2d").drawImage(t,0,0,c.width,c.height);var d=c.toDataURL(),d=d.substring(d.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");E.thumbnail={image:d,mimeType:"image/png"};q(!1)}catch(aa){try{q(!1)}catch(Z){u(Z)}}});t.src="data:image/png;base64,"+e}else q(!1)}catch(X){u(X)}});if(y){var G=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){M(b,!0)}),k,this.ui.getCurrentFile()!=
-b?t:null,G.scale,G.border)}else M(t,!1)}catch(O){u(O)}});try{b.saveLevel=2,(f||y||b.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=E.mimeType&&"application/vnd.jgraph.mxfile"!=E.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=null;try{null!=b&&(c=b.toDataURL("image/png")),null!=c&&(c=c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(I){c=null}G(c,
-"image/png")}catch(I){u(I)}})))&&G(null,null,b.constructor!=DriveLibrary)}catch(F){u(F)}}else this.ui.editor.graph.reset(),k({message:mxResources.get("readOnly")})}catch(F){u(F)}};DriveClient.prototype.insertFile=function(b,c,e,g,m,f,l){f=null!=f?f:this.xmlMimeType;b={mimeType:f,title:b};null!=e&&(b.parents=[{kind:"drive#fileLink",id:e}]);this.executeRequest(this.createUploadRequest(null,b,c,!1,l),mxUtils.bind(this,function(b){f==this.libraryMimeType?g(new DriveLibrary(this.ui,c,b)):0==b?null!=m&&
-m({message:mxResources.get("errorSavingFile")}):g(new DriveFile(this.ui,c,b))}),m)};DriveClient.prototype.createUploadRequest=function(b,c,e,g,m,f,l){m=null!=m?m:!1;var d={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=f&&(d["If-Match"]=f);b={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=b?"/"+b:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=b?"PUT":"POST",headers:d,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
-JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=e?m?e:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(e):Graph.base64EncodeUnicode(e):"")+"\r\n---------314159265358979323846--"};g||(b.fullUrl+="&newRevision=false");l&&(b.fullUrl+="&pinned=true");return b};DriveClient.prototype.createLinkPicker=function(){var d=e.linkPicker;if(null==d||e.linkPickerToken!=b){e.linkPickerToken=b;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),
-c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),k=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0),d=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(e.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(c).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED)}return d};DriveClient.prototype.pickFile=function(d,c,k){this.filePickerCallback=
-null!=d?d:mxUtils.bind(this,function(b){this.ui.loadFile("G"+b)});this.filePicked=mxUtils.bind(this,function(b){b.action==google.picker.Action.PICKED&&this.filePickerCallback(b.docs[0].id,b.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var d=c?"genericPicker":"filePicker",m=mxUtils.bind(this,function(b){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(b).className&&(mxEvent.removeListener(document,
-"click",m),this[d].setVisible(!1),k&&k())});if(null==e[d]||e[d+"Token"]!=b){e[d+"Token"]=b;var f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),l=(new google.picker.DocsView).setIncludeFolders(!0),n=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),p=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(f.setMimeTypes("*/*"),l.setMimeTypes("*/*"),n.setMimeTypes("*/*")):(f.setMimeTypes(this.mimeTypes),l.setMimeTypes(this.mimeTypes),
-n.setMimeTypes(this.mimeTypes));e[d]=(new google.picker.PickerBuilder).setOAuthToken(e[d+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(f).addView(l).addView(n).addView(google.picker.ViewId.RECENTLY_PICKED).addView(p);if(urlParams.gPickerSize){var q=urlParams.gPickerSize.split(",");e[d]=e[d].setSize(q[0],q[1])}urlParams.topBaseUrl&&(e[d]=e[d].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e[d]=e[d].setCallback(mxUtils.bind(this,
-function(b){if(b.action==google.picker.Action.PICKED||b.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,"click",m),k&&b.action==google.picker.Action.CANCEL&&k();b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",m);e[d].setVisible(!0)}catch(t){this.ui.spinner.stop(),this.ui.handleError(t)}}))};DriveClient.prototype.pickFolder=function(d,c){this.folderPickerCallback=d;var k=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,
+null);this.setUser(new DrawioUser(e.id,c,f,g,e.locale));this.userId=e.id;null!=d&&d()}),c)}),c,null,null,null,null,e)}catch(k){if(null!=c)c(k);else throw k;}};DriveClient.prototype.copyFile=function(b,c,e,k){null!=b&&null!=c&&this.executeRequest({url:"/files/"+b+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},e,k)};DriveClient.prototype.renameFile=function(b,c,e,k){null!=
+b&&null!=c&&this.executeRequest(this.createDriveRequest(b,{title:c}),e,k)};DriveClient.prototype.moveFile=function(b,c,e,k){null!=b&&null!=c&&this.executeRequest(this.createDriveRequest(b,{parents:[{kind:"drive#fileLink",id:c}]}),e,k)};DriveClient.prototype.createDriveRequest=function(b,c){return{url:"/files/"+b+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(b,c,e){return this.getFile(b,
+c,e,!0,!0)};DriveClient.prototype.loadDescriptor=function(b,c,e,k){this.executeRequest({url:"/files/"+b+"?supportsAllDrives=true&fields="+(null!=k?k:this.allFields)},c,e)};DriveClient.prototype.listFiles=function(b,c,e,k,n){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+"') "+(b?" and (title contains '"+b+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(e?" and ('me' in owners)":""))+
+"&orderBy=modifiedDate desc,title"},k,n)};DriveClient.prototype.getCustomProperty=function(b,c){var d=b.properties,e=null;if(null!=d)for(var n=0;n<d.length;n++)if(d[n].key==c){e=d[n].value;break}return e};DriveClient.prototype.getFile=function(d,c,e,k,n){k=null!=k?k:!1;n=null!=n?n:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+d+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(b){b.title=b.originalFilename;b.headRevisionId=b.id;b.id=d;this.getXmlFile(b,
+c,e)}),e):this.loadDescriptor(d,mxUtils.bind(this,function(d){try{if(null!=this.user){var f=/\.png$/i.test(d.title);/\.v(dx|sdx?)$/i.test(d.title)||/\.gliffy$/i.test(d.title)||!this.ui.useCanvasForExport&&f?this.ui.convertFile(d.downloadUrl,d.title,d.mimeType,this.extension,c,e,null,{Authorization:"Bearer "+b}):k||n||d.mimeType==this.libraryMimeType||d.mimeType==this.xmlMimeType?this.getXmlFile(d,c,e,!0,n):this.getXmlFile(d,c,e)}else e({message:mxResources.get("loggedOut")})}catch(m){if(null!=e)e(m);
+else throw m;}}),e)};DriveClient.prototype.isGoogleRealtimeMimeType=function(b){return null!=b&&"application/vnd.jgraph.mxfile."==b.substring(0,30)};DriveClient.prototype.getXmlFile=function(d,c,e,k,n){try{var f={Authorization:"Bearer "+b},g=d.downloadUrl;if(null==g)null!=e&&e({message:mxResources.get("exportOptionsDisabledDetails")});else{var m=0,p=mxUtils.bind(this,function(){this.ui.editor.loadUrl(g,mxUtils.bind(this,function(b){try{if(null==b)e({message:mxResources.get("invalidOrMissingFile")});
+else if(d.mimeType==this.libraryMimeType||n)d.mimeType!=this.libraryMimeType||n?c(new DriveLibrary(this.ui,b,d)):e({message:mxResources.get("notADiagramFile")});else{var f=!1;if(/\.png$/i.test(d.title)){var k=b.lastIndexOf(",");if(0<k){var l=this.ui.extractGraphModelFromPng(b);if(null!=l&&0<l.length)b=l;else try{var l=b.substring(k+1),m=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(l):atob(l),p=this.ui.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,!0);null==p||0<p.getElementsByTagName("parsererror").length?
+f=!0:b=m}catch(z){f=!0}}}else/\.pdf$/i.test(d.title)?(l=Editor.extractGraphModelFromPdf(b),null!=l&&0<l.length&&(f=!0,b=l)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(m=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,g)?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?c(new LocalFile(this.ui,
+b.responseText,d.title+this.extension,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}catch(x){if(null!=e)e(x);else throw x;}}),d.title):c(f?new LocalFile(this.ui,b,d.title,!0):new DriveFile(this.ui,b,d))}}catch(z){if(null!=e)e(z);else throw z;}}),mxUtils.bind(this,function(b,c){if(m<this.maxRetries&&null!=c&&403==c.getStatus())m++,window.setTimeout(p,2*m*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=e)e(b);else throw b;}),null!=d.mimeType&&"image/"==d.mimeType.substring(0,
+6)&&"image/svg"!=d.mimeType.substring(0,9)||/\.png$/i.test(d.title)||/\.jpe?g$/i.test(d.title)||/\.pdf$/i.test(d.title),null,null,null,f)});p()}}catch(q){if(null!=e)e(q);else throw q;}};DriveClient.prototype.saveFile=function(b,c,e,k,n,f,l,m,p){try{var d=0;b.saveLevel=1;var g=mxUtils.bind(this,function(c){if(null!=k)k(c);else throw c;try{if(!b.isConflict(c)){var d="sl_"+b.saveLevel+"-error_"+(b.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
+b.getHash()+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+(b.changeListenerEnabled?"":"-nolisten")+(b.inConflictState?"-conflict":"")+(b.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync")})}}catch(I){}}),u=mxUtils.bind(this,function(b){g(b);try{EditorUi.logError(b.message,null,null,
+b)}catch(D){}});if(b.isEditable()&&null!=b.desc){var v=(new Date).getTime(),y=b.desc.etag,A=b.desc.modifiedDate,z=b.desc.headRevisionId,x=this.ui.useCanvasForExport&&/(\.png)$/i.test(b.getTitle());f=null!=f?f:!1;var B=null,C=!1,E={mimeType:b.desc.mimeType,title:b.getTitle()};if(this.isGoogleRealtimeMimeType(E.mimeType))E.mimeType=this.xmlMimeType,B=b.desc,C=c=!0;else if("application/octet-stream"==E.mimeType||"1"==urlParams["override-mime"]&&E.mimeType!=this.xmlMimeType)E.mimeType=this.xmlMimeType;
+var F=mxUtils.bind(this,function(k,n,q){try{b.saveLevel=3;b.constructor==DriveFile&&(null==m&&(m=[]),null==b.getChannelId()&&m.push({key:"channel",value:Editor.guid(32)}),null==b.getChannelKey()&&m.push({key:"key",value:Editor.guid(32)}),m.push({key:"secret",value:null!=p?p:Editor.guid(32)}));q||(null!=k||f||(k=this.placeholderThumbnail,n=this.placeholderMimeType),null!=k&&null!=n&&(E.thumbnail={image:k,mimeType:n}));var t=b.getData(),D=mxUtils.bind(this,function(d){try{if(b.saveDelay=(new Date).getTime()-
+v,b.saveLevel=11,null==d)g({message:mxResources.get("errorSavingFile")+": Empty response"});else{var f=(new Date(d.modifiedDate)).getTime()-(new Date(A)).getTime();if(0>=f||y==d.etag||c&&z==d.headRevisionId){b.saveLevel=12;var k=[];0>=f&&k.push("invalid modified time");y==d.etag&&k.push("stale etag");c&&z==d.headRevisionId&&k.push("stale revision");var l=k.join(", ");g({message:mxResources.get("errorSavingFile")+": "+l},d);try{EditorUi.logError("Critical: Error saving to Google Drive "+b.desc.id,
+null,"from-"+z+"."+A+"-"+this.ui.hashValue(y)+"-to-"+d.headRevisionId+"."+d.modifiedDate+"-"+this.ui.hashValue(d.etag)+(0<l.length?"-errors-"+l:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync"))}catch(S){}}else if(b.saveLevel=null,e(d,t),null!=B){this.executeRequest({url:"/files/"+B.id+"/revisions/"+B.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(b){b.pinned=!0;this.executeRequest({url:"/files/"+B.id+"/revisions/"+
+B.headRevisionId,method:"PUT",params:b})})));try{EditorUi.logEvent({category:b.convertedFrom+"-CONVERT-FILE-"+b.getHash(),action:"from_"+B.id+"."+B.headRevisionId+"-to_"+b.desc.id+"."+b.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=b.sync?"-client_"+b.sync.clientId:"nosync")})}catch(S){}}}}catch(S){u(S)}}),M=mxUtils.bind(this,function(e,f){b.saveLevel=4;try{null!=m&&(E.properties=m);var n=l||b.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
+null:b.getCurrentEtag(),p=mxUtils.bind(this,function(k){b.saveLevel=5;try{var l=b.desc.mimeType!=this.xmlMimeType&&b.desc.mimeType!=this.mimeType&&b.desc.mimeType!=this.libraryMimeType,m=!0,p=null;try{p=window.setTimeout(mxUtils.bind(this,function(){m=!1;g({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(b.getId(),E,e,c||k||l,f,k?null:n,C),mxUtils.bind(this,function(b){window.clearTimeout(p);m&&D(b)}),mxUtils.bind(this,function(c){window.clearTimeout(p);
+if(m){b.saveLevel=6;try{b.isConflict(c)?this.executeRequest({url:"/files/"+b.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){b.saveLevel=7;try{if(null!=e&&e.etag==n)if(d<this.staleEtagMaxRetries){d++;var f=2*d*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(q,f);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",d,"delay",f)}else{q(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+b.getHash(),action:"rev_"+
+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+(b.changeListenerEnabled?"":"-nolisten")+(b.inConflictState?"-conflict":"")+(b.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync")})}catch(ca){}}else"1"==urlParams.test&&e.headRevisionId==z&&EditorUi.debug("DriveClient: Remote Etag Changed","local",n,
+"remote",e.etag,"rev",b.desc.headRevisionId,"response",[e],"file",[b]),g(c,e)}catch(ca){u(ca)}}),mxUtils.bind(this,function(){g(c)})):g(c)}catch(Y){u(Y)}}}))}catch(Z){u(Z)}}),q=mxUtils.bind(this,function(c){b.saveLevel=9;if(c||null==n)p(c);else{var d=!0,e=null;try{e=window.setTimeout(mxUtils.bind(this,function(){d=!1;g({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(aa){}this.executeRequest({url:"/files/"+b.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(f){window.clearTimeout(e);
+if(d){b.saveLevel=10;try{null!=f&&f.headRevisionId==z?("1"==urlParams.test&&n!=f.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",n,"to",f.etag,"rev",b.desc.headRevisionId,"response",[f],"file",[b]),n=f.etag,p(c)):g({error:{code:412}},f)}catch(Z){u(Z)}}}),mxUtils.bind(this,function(c){window.clearTimeout(e);d&&(b.saveLevel=11,g(c))}))}});if(x&&null==k){b.saveLevel=8;var B=new Image;B.onload=mxUtils.bind(this,function(){try{var b=this.thumbnailWidth/B.width,c=document.createElement("canvas");
+c.width=this.thumbnailWidth;c.height=Math.floor(B.height*b);c.getContext("2d").drawImage(B,0,0,c.width,c.height);var d=c.toDataURL(),d=d.substring(d.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");E.thumbnail={image:d,mimeType:"image/png"};q(!1)}catch(aa){try{q(!1)}catch(Z){u(Z)}}});B.src="data:image/png;base64,"+e}else q(!1)}catch(X){u(X)}});if(x){var F=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){M(b,!0)}),g,this.ui.getCurrentFile()!=
+b?t:null,F.scale,F.border)}else M(t,!1)}catch(O){u(O)}});try{b.saveLevel=2,(f||x||b.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=E.mimeType&&"application/vnd.jgraph.mxfile"!=E.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=null;try{null!=b&&(c=b.toDataURL("image/png")),null!=c&&(c=c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(I){c=null}F(c,
+"image/png")}catch(I){u(I)}})))&&F(null,null,b.constructor!=DriveLibrary)}catch(G){u(G)}}else this.ui.editor.graph.reset(),g({message:mxResources.get("readOnly")})}catch(G){u(G)}};DriveClient.prototype.insertFile=function(b,c,e,k,n,f,l){f=null!=f?f:this.xmlMimeType;b={mimeType:f,title:b};null!=e&&(b.parents=[{kind:"drive#fileLink",id:e}]);this.executeRequest(this.createUploadRequest(null,b,c,!1,l),mxUtils.bind(this,function(b){f==this.libraryMimeType?k(new DriveLibrary(this.ui,c,b)):0==b?null!=n&&
+n({message:mxResources.get("errorSavingFile")}):k(new DriveFile(this.ui,c,b))}),n)};DriveClient.prototype.createUploadRequest=function(b,c,e,k,n,f,l){n=null!=n?n:!1;var d={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=f&&(d["If-Match"]=f);b={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=b?"/"+b:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=b?"PUT":"POST",headers:d,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
+JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=e?n?e:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(e):Graph.base64EncodeUnicode(e):"")+"\r\n---------314159265358979323846--"};k||(b.fullUrl+="&newRevision=false");l&&(b.fullUrl+="&pinned=true");return b};DriveClient.prototype.createLinkPicker=function(){var d=e.linkPicker;if(null==d||e.linkPickerToken!=b){e.linkPickerToken=b;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),
+c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),g=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0),d=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(e.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(c).addView(g).addView(google.picker.ViewId.RECENTLY_PICKED)}return d};DriveClient.prototype.pickFile=function(d,c,g){this.filePickerCallback=
+null!=d?d:mxUtils.bind(this,function(b){this.ui.loadFile("G"+b)});this.filePicked=mxUtils.bind(this,function(b){b.action==google.picker.Action.PICKED&&this.filePickerCallback(b.docs[0].id,b.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var d=c?"genericPicker":"filePicker",n=mxUtils.bind(this,function(b){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(b).className&&(mxEvent.removeListener(document,
+"click",n),this[d].setVisible(!1),g&&g())});if(null==e[d]||e[d+"Token"]!=b){e[d+"Token"]=b;var f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),l=(new google.picker.DocsView).setIncludeFolders(!0),m=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),p=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(f.setMimeTypes("*/*"),l.setMimeTypes("*/*"),m.setMimeTypes("*/*")):(f.setMimeTypes(this.mimeTypes),l.setMimeTypes(this.mimeTypes),
+m.setMimeTypes(this.mimeTypes));e[d]=(new google.picker.PickerBuilder).setOAuthToken(e[d+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(f).addView(l).addView(m).addView(google.picker.ViewId.RECENTLY_PICKED).addView(p);if(urlParams.gPickerSize){var q=urlParams.gPickerSize.split(",");e[d]=e[d].setSize(q[0],q[1])}urlParams.topBaseUrl&&(e[d]=e[d].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e[d]=e[d].setCallback(mxUtils.bind(this,
+function(b){if(b.action==google.picker.Action.PICKED||b.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,"click",n),g&&b.action==google.picker.Action.CANCEL&&g();b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",n);e[d].setVisible(!0)}catch(t){this.ui.spinner.stop(),this.ui.handleError(t)}}))};DriveClient.prototype.pickFolder=function(d,c){this.folderPickerCallback=d;var g=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,
mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(b){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(b).className&&(mxEvent.removeListener(document,"click",c),e.folderPicker.setVisible(!1))});if(null==e.folderPicker||e.folderPickerToken!=b){e.folderPickerToken=b;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),
-f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),l=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");e.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(e.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(f).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
-if(urlParams.gPickerSize){var k=urlParams.gPickerSize.split(",");e.folderPicker=e.folderPicker.setSize(k[0],k[1])}urlParams.topBaseUrl&&(e.folderPicker=e.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.folderPicker=e.folderPicker.setCallback(mxUtils.bind(this,function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);this.folderPickerCallback(b)})).build()}mxEvent.addListener(document,"click",c);e.folderPicker.setVisible(!0)}catch(p){this.ui.spinner.stop(),
-this.ui.handleError(p)}}))}catch(g){this.ui.handleError(g)}});c?k():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){k()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)};DriveClient.prototype.pickLibrary=function(d){this.filePickerCallback=d;this.filePicked=mxUtils.bind(this,function(b){b.action==google.picker.Action.PICKED?
+f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),g=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");e.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(e.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(f).addView(g).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
+if(urlParams.gPickerSize){var m=urlParams.gPickerSize.split(",");e.folderPicker=e.folderPicker.setSize(m[0],m[1])}urlParams.topBaseUrl&&(e.folderPicker=e.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.folderPicker=e.folderPicker.setCallback(mxUtils.bind(this,function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);this.folderPickerCallback(b)})).build()}mxEvent.addListener(document,"click",c);e.folderPicker.setVisible(!0)}catch(p){this.ui.spinner.stop(),
+this.ui.handleError(p)}}))}catch(k){this.ui.handleError(k)}});c?g():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){g()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)};DriveClient.prototype.pickLibrary=function(d){this.filePickerCallback=d;this.filePicked=mxUtils.bind(this,function(b){b.action==google.picker.Action.PICKED?
this.filePickerCallback(b.docs[0].id):b.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(b){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(b).className&&(mxEvent.removeListener(document,"click",c),e.libraryPicker.setVisible(!1))});if(null==e.libraryPicker||e.libraryPickerToken!=
-b){e.libraryPickerToken=b;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),g=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),m=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
-f=(new google.picker.DocsUploadView).setIncludeFolders(!0);e.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(e.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(g).addView(m).addView(google.picker.ViewId.RECENTLY_PICKED).addView(f);if(urlParams.gPickerSize){var l=urlParams.gPickerSize.split(",");e.libraryPicker=e.libraryPicker.setSize(l[0],l[1])}urlParams.topBaseUrl&&(e.libraryPicker=e.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));
-e.libraryPicker=e.libraryPicker.setCallback(mxUtils.bind(this,function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",c);e.libraryPicker.setVisible(!0)}catch(n){this.ui.spinner.stop(),this.ui.handleError(n)}}))};DriveClient.prototype.showPermissions=function(d){var c=mxUtils.bind(this,function(){var b=new ConfirmDialog(this.ui,
+b){e.libraryPickerToken=b;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),k=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),n=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
+f=(new google.picker.DocsUploadView).setIncludeFolders(!0);e.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(e.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(k).addView(n).addView(google.picker.ViewId.RECENTLY_PICKED).addView(f);if(urlParams.gPickerSize){var l=urlParams.gPickerSize.split(",");e.libraryPicker=e.libraryPicker.setSize(l[0],l[1])}urlParams.topBaseUrl&&(e.libraryPicker=e.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));
+e.libraryPicker=e.libraryPicker.setCallback(mxUtils.bind(this,function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",c);e.libraryPicker.setVisible(!0)}catch(m){this.ui.spinner.stop(),this.ui.handleError(m)}}))};DriveClient.prototype.showPermissions=function(d){var c=mxUtils.bind(this,function(){var b=new ConfirmDialog(this.ui,
mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){this.ui.editor.graph.openLink("https://drive.google.com/open?id="+d)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(b.container,360,190,!0,!0);b.init()});this.sharingFailed?c():this.checkToken(mxUtils.bind(this,function(){try{var e=new gapi.drive.share.ShareClient(this.appId);e.setOAuthToken(b);e.setItemIds([d]);e.showSettingsDialog();"MutationObserver"in window&&(null!=
this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(b){for(var d=!1,e=0;e<b.length;e++)for(var g=0;g<b[e].addedNodes.length;g++){var k=b[e].addedNodes[g];"BUTTON"==k.nodeName&&"ok"==k.getAttribute("name")&&null!=k.parentNode&&null!=k.parentNode.parentNode&&"dialog"==k.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,k.click(),c(),d=!0):"DIV"==k.nodeName&&"shr-q-shr-r-shr-xb"==k.className&&
-(d=!0)}d&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(g){this.ui.handleError(g)}}))};DriveClient.prototype.clearPersistentToken=function(){var b=JSON.parse(this.getPersistentToken(!0))||{};delete b.current;delete b[this.userId];for(var c in b){b.current={userId:c,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(b))};DriveClient.prototype.setPersistentToken=function(b,c){var d=
+(d=!0)}d&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(k){this.ui.handleError(k)}}))};DriveClient.prototype.clearPersistentToken=function(){var b=JSON.parse(this.getPersistentToken(!0))||{};delete b.current;delete b[this.userId];for(var c in b){b.current={userId:c,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(b))};DriveClient.prototype.setPersistentToken=function(b,c){var d=
JSON.parse(this.getPersistentToken(!0))||{};b.userId=this.userId;d.current=b;d[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(d),c)}})();DropboxFile=function(b,e,d){DrawioFile.call(this,b,e);this.stat=d};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};
DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};
-DropboxFile.prototype.getRevisions=function(b,e){var d=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});d.then(mxUtils.bind(this,function(c){try{for(var d=[],g=c.entries.length-1;0<=g;g--)mxUtils.bind(this,function(b){d.push({modifiedDate:b.client_modified,fileSize:b.size,getXml:mxUtils.bind(this,function(c,d){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:b.rev},c,d)}),getUrl:mxUtils.bind(this,function(c){return this.ui.getUrl(window.location.pathname+"?rev="+
-b.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=c?"&page="+c:""))+window.location.hash})})})(c.entries[g]);b(d)}catch(m){e(m)}}));d["catch"](function(b){e(b)})};DropboxFile.prototype.getLatestVersion=function(b,e){this.ui.dropbox.getFile(this.getId(),b,e)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,e,d,c,k){this.doSave(this.getTitle(),b,e,d,c,k)};DropboxFile.prototype.saveAs=function(b,e,d){this.doSave(b,!1,e,d)};
-DropboxFile.prototype.doSave=function(b,e,d,c,k,g){var m=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=m;this.saveFile(b,e,d,c,k,g)}),c,k,g])};
+DropboxFile.prototype.getRevisions=function(b,e){var d=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});d.then(mxUtils.bind(this,function(c){try{for(var d=[],k=c.entries.length-1;0<=k;k--)mxUtils.bind(this,function(b){d.push({modifiedDate:b.client_modified,fileSize:b.size,getXml:mxUtils.bind(this,function(c,d){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:b.rev},c,d)}),getUrl:mxUtils.bind(this,function(c){return this.ui.getUrl(window.location.pathname+"?rev="+
+b.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=c?"&page="+c:""))+window.location.hash})})})(c.entries[k]);b(d)}catch(n){e(n)}}));d["catch"](function(b){e(b)})};DropboxFile.prototype.getLatestVersion=function(b,e){this.ui.dropbox.getFile(this.getId(),b,e)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,e,d,c,g){this.doSave(this.getTitle(),b,e,d,c,g)};DropboxFile.prototype.saveAs=function(b,e,d){this.doSave(b,!1,e,d)};
+DropboxFile.prototype.doSave=function(b,e,d,c,g,k){var n=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=n;this.saveFile(b,e,d,c,g,k)}),c,g,k])};
DropboxFile.prototype.saveFile=function(b,e,d,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(e=mxUtils.bind(this,function(e){if(e)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var g=mxUtils.bind(this,function(e){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(b,e,mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=b;this.contentChanged();
-null!=d&&d()}),mxUtils.bind(this,function(b){this.savingFile=!1;null!=c&&c(b)}),f)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var k=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){g(this.ui.base64ToBlob(b,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,k.scale,k.border)}else g(this.getData())}catch(f){if(this.savingFile=!1,null!=c)c(f);else throw f;}else null!=c&&c()}),this.getTitle()==b?e(!0):this.ui.dropbox.checkExists(b,
+null!=d&&d()}),mxUtils.bind(this,function(b){this.savingFile=!1;null!=c&&c(b)}),f)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var n=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){g(this.ui.base64ToBlob(b,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,n.scale,n.border)}else g(this.getData())}catch(f){if(this.savingFile=!1,null!=c)c(f);else throw f;}else null!=c&&c()}),this.getTitle()==b?e(!0):this.ui.dropbox.checkExists(b,
e)):null!=d&&d()};DropboxFile.prototype.rename=function(b,e,d){this.ui.dropbox.renameFile(this,b,mxUtils.bind(this,function(c){this.hasSameExtension(b,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=e&&e()):(this.stat=c,this.descriptorChanged(),this.save(!0,e,d))}),d)};DropboxLibrary=function(b,e,d){DropboxFile.call(this,b,e,d)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};DropboxLibrary.prototype.open=function(){};(function(){var b=null;window.DropboxClient=function(b){DrawioClient.call(this,b,"dbauth");this.client=new Dropbox({clientId:this.clientId})};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;DropboxClient.prototype.clientId=window.DRAWIO_DROPBOX_ID;DropboxClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/dropbox";
-DropboxClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(e,d,c){var k=!0,g=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),m=this.client.usersGetCurrentAccount();
-m.then(mxUtils.bind(this,function(b){window.clearTimeout(g);k&&(this.setUser(new DrawioUser(b.account_id,b.email,b.name.display_name)),e())}));m["catch"](mxUtils.bind(this,function(f){window.clearTimeout(g);k&&(null==f||401!==f.status||c?d({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,d,!0)}),d)))}))};DropboxClient.prototype.authenticate=function(b,d){(new mxXmlRequest(this.redirectUri+
-"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),b,d):null!=d&&d(c)}),d)};DropboxClient.prototype.authenticateStep2=function(e,d,c){if(null==window.onDropboxCallback){var k=mxUtils.bind(this,function(){var g=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,
-function(e){200<=e.getStatus()&&299>=e.getStatus()?(b=JSON.parse(e.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),d()):(this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==e.getStatus()?k():c({message:mxResources.get("accessDenied"),retry:k}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,f){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+(m?"&token_access_type=offline":"")+"&redirect_uri="+
-encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(e,n){if(g){window.onDropboxCallback=null;g=!1;try{null==e?c({message:mxResources.get("accessDenied"),retry:k}):(null!=f&&f(),b=e.access_token,this.client.setAccessToken(b),this.setUser(null),m&&this.setPersistentToken("remembered"),d())}catch(p){c(p)}finally{null!=n&&n.close()}}else null!=
-n&&n.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:k})}),mxUtils.bind(this,function(){g&&(window.onDropboxCallback=null,g=!1,c({message:mxResources.get("accessDenied"),retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(e,d,c){var k=mxUtils.bind(this,function(m){var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;c({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout),n=e();n.then(mxUtils.bind(this,function(b){window.clearTimeout(l);
-f&&null!=d&&d(b)}));n["catch"](mxUtils.bind(this,function(d){window.clearTimeout(l);f&&(null==d||500!=d.status&&400!=d.status&&401!=d.status?c({message:mxResources.get("error")+" "+d.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,m?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},c)})}):this.authenticate(function(){k(!0)},c)))}))}),g=mxUtils.bind(this,function(b){null==this.user?this.updateUser(function(){g(!0)},
-c,b):k(b)});null==b?this.authenticate(function(){g(!0)},c):g(!1)};DropboxClient.prototype.getLibrary=function(b,d,c){this.getFile(b,d,c,!0)};DropboxClient.prototype.getFile=function(e,d,c,k){k=null!=k?k:!1;var g=/\.png$/i.test(e);if(/^https:\/\//i.test(e)||/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&g){var m=mxUtils.bind(this,function(){var b=e.split("/");this.ui.convertFile(e,0<b.length?b[b.length-1]:e,null,this.extension,d,c)});null!=b?m():this.authenticate(m,
-c)}else m={path:"/"+e},null!=urlParams.rev&&(m.rev=urlParams.rev),this.readFile(m,mxUtils.bind(this,function(b,c){var f=null;if(0<(g?b.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(b);null!=l&&0<l.length?b=l:f=new LocalFile(this,b,e,!0)}d(null!=f?f:k?new DropboxLibrary(this.ui,b,c):new DropboxFile(this.ui,b,c))}),c,g)};DropboxClient.prototype.readFile=function(e,d,c,k){var g=mxUtils.bind(this,function(f){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT})}),
-this.ui.timeout),p=this.client.filesGetMetadata({path:"/"+e.path.substring(1),include_deleted:!1});p.then(mxUtils.bind(this,function(b){}));p["catch"](function(b){window.clearTimeout(n);l&&null!=b&&409==b.status&&(l=!1,c({message:mxResources.get("fileNotFound")}))});p=this.client.filesDownload(e);p.then(mxUtils.bind(this,function(b){window.clearTimeout(n);if(l){l=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(c){d(e.result,b)});k?e.readAsDataURL(b.fileBlob):e.readAsText(b.fileBlob)}catch(u){c(u)}}}));
-p["catch"](mxUtils.bind(this,function(d){window.clearTimeout(n);l&&(l=!1,null==d||500!=d.status&&400!=d.status&&401!=d.status?c({message:mxResources.get("error")+" "+d.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,f?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},c)})}):this.authenticate(function(){g(!0)},c)))}))}),m=mxUtils.bind(this,function(b){null==this.user?this.updateUser(function(){m(!0)},c,b):g(b)});null==
-b?this.authenticate(function(){m(!0)},c):m(!1)};DropboxClient.prototype.checkExists=function(b,d,c){var e=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+b.toLowerCase(),include_deleted:!1})});this.executePromise(e,mxUtils.bind(this,function(e){c?d(!1,!0,e):this.ui.confirm(mxResources.get("replaceIt",[b]),function(){d(!0,!0,e)},function(){d(!1,!0,e)})}),function(b){d(!0,!1)})};DropboxClient.prototype.renameFile=function(b,d,c,k){if(/[\\\/:\?\*"\|]/.test(d))k({message:mxResources.get("dropboxCharsNotAllowed")});
-else{if(null!=b&&null!=d){var e=b.stat.path_display.substring(1),m=e.lastIndexOf("/");0<m&&(d=e.substring(0,m+1)+d)}null!=b&&null!=d&&b.stat.path_lower.substring(1)!==d.toLowerCase()?this.checkExists(d,mxUtils.bind(this,function(e,g,m){e?(e=mxUtils.bind(this,function(e){e=mxUtils.bind(this,function(){return this.client.filesMove({from_path:b.stat.path_display,to_path:"/"+d,autorename:!1})});this.executePromise(e,c,k)}),g&&m.path_lower.substring(1)!==d.toLowerCase()?(g=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+
-d.toLowerCase()})}),this.executePromise(g,e,k)):e()):k()})):k({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(b,d,c,k){this.insertFile(b,d,c,k,!0)};DropboxClient.prototype.insertFile=function(b,d,c,k,g){g=null!=g?g:!1;this.checkExists(b,mxUtils.bind(this,function(e){e?this.saveFile(b,d,mxUtils.bind(this,function(b){g?c(new DropboxLibrary(this.ui,d,b)):c(new DropboxFile(this.ui,d,b))}),k):k()}))};DropboxClient.prototype.saveFile=function(b,d,c,k,g){if(/[\\\/:\?\*"\|]/.test(b))k({message:mxResources.get("dropboxCharsNotAllowed")});
-else if(15E7<=d.length)k({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(d.length)+" / 150 MB)"});else{g=null!=g?g:"";var e=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+g+b,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([d],{type:"text/plain"})})});this.executePromise(e,c,k)}};DropboxClient.prototype.pickLibrary=function(b){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(d){if(this.ui.spinner.spin(document.body,
-mxResources.get("loading"))){var c=mxUtils.bind(this,function(b){this.ui.spinner.stop();this.ui.handleError(b)}),e=d[0].link.indexOf(this.appPath);if(0<e){var g=decodeURIComponent(d[0].link.substring(e+this.appPath.length-1));this.readFile({path:g},mxUtils.bind(this,function(e,f){if(null!=f&&f.id==d[0].id)try{this.ui.spinner.stop(),b(g.substring(1),new DropboxLibrary(this.ui,e,f))}catch(l){this.ui.handleError(l)}else this.createLibrary(d[0],b,c)}),c)}else this.createLibrary(d[0],b,c)}})})};DropboxClient.prototype.createLibrary=
-function(b,d,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[b.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(b.link,mxUtils.bind(this,function(e){this.insertFile(b.name,e,mxUtils.bind(this,function(b){try{this.ui.spinner.stop(),d(b.getHash().substring(1),b)}catch(m){c(m)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(b,d){null!=Dropbox.choose?(b=null!=b?b:mxUtils.bind(this,
-function(b,d){this.ui.loadFile(null!=b?"D"+encodeURIComponent(b):d.getHash(),null,d)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(d)this.ui.spinner.stop(),b(c[0].link);else{var e=mxUtils.bind(this,function(b){this.ui.spinner.stop();this.ui.handleError(b)}),g=mxUtils.bind(this,function(c,d){this.ui.spinner.stop();b(c,d)}),m=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||
-/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&m)g(c[0].link);else{var f=c[0].link.indexOf(this.appPath);if(0<f){var l=decodeURIComponent(c[0].link.substring(f+this.appPath.length-1));this.readFile({path:l},mxUtils.bind(this,function(d,f){if(null!=f&&f.id==c[0].id){var k=m?d.lastIndexOf(","):-1;this.ui.spinner.stop();var n=null;0<k&&(k=this.ui.extractGraphModelFromPng(d),null!=k&&0<k.length?d=k:n=new LocalFile(this,d,l,!0));b(l.substring(1),null!=n?n:new DropboxFile(this.ui,d,f))}else this.createFile(c[0],
-g,e)}),e,m)}else this.createFile(c[0],g,e)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(b,d,c){var e=/(\.png)$/i.test(b.name);this.ui.editor.loadUrl(b.link,mxUtils.bind(this,function(g){null!=g&&0<g.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[b.name]),mxUtils.bind(this,function(){var k=e?g.lastIndexOf(","):-1;0<k&&(k=this.ui.extractGraphModelFromPng(g.substring(k+
+DropboxClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(e,d,c){var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),n=this.client.usersGetCurrentAccount();
+n.then(mxUtils.bind(this,function(b){window.clearTimeout(k);g&&(this.setUser(new DrawioUser(b.account_id,b.email,b.name.display_name)),e())}));n["catch"](mxUtils.bind(this,function(f){window.clearTimeout(k);g&&(null==f||401!==f.status||c?d({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,d,!0)}),d)))}))};DropboxClient.prototype.authenticate=function(b,d){(new mxXmlRequest(this.redirectUri+
+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),b,d):null!=d&&d(c)}),d)};DropboxClient.prototype.authenticateStep2=function(e,d,c){if(null==window.onDropboxCallback){var g=mxUtils.bind(this,function(){var k=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,
+function(e){200<=e.getStatus()&&299>=e.getStatus()?(b=JSON.parse(e.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),d()):(this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==e.getStatus()?g():c({message:mxResources.get("accessDenied"),retry:g}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(n,f){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+(n?"&token_access_type=offline":"")+"&redirect_uri="+
+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(e,m){if(k){window.onDropboxCallback=null;k=!1;try{null==e?c({message:mxResources.get("accessDenied"),retry:g}):(null!=f&&f(),b=e.access_token,this.client.setAccessToken(b),this.setUser(null),n&&this.setPersistentToken("remembered"),d())}catch(p){c(p)}finally{null!=m&&m.close()}}else null!=
+m&&m.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:g})}),mxUtils.bind(this,function(){k&&(window.onDropboxCallback=null,k=!1,c({message:mxResources.get("accessDenied"),retry:g}))}))});g()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(e,d,c){var g=mxUtils.bind(this,function(n){var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;c({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout),m=e();m.then(mxUtils.bind(this,function(b){window.clearTimeout(l);
+f&&null!=d&&d(b)}));m["catch"](mxUtils.bind(this,function(d){window.clearTimeout(l);f&&(null==d||500!=d.status&&400!=d.status&&401!=d.status?c({message:mxResources.get("error")+" "+d.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,n?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){k(!0)},c)})}):this.authenticate(function(){g(!0)},c)))}))}),k=mxUtils.bind(this,function(b){null==this.user?this.updateUser(function(){k(!0)},
+c,b):g(b)});null==b?this.authenticate(function(){k(!0)},c):k(!1)};DropboxClient.prototype.getLibrary=function(b,d,c){this.getFile(b,d,c,!0)};DropboxClient.prototype.getFile=function(e,d,c,g){g=null!=g?g:!1;var k=/\.png$/i.test(e);if(/^https:\/\//i.test(e)||/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&k){var n=mxUtils.bind(this,function(){var b=e.split("/");this.ui.convertFile(e,0<b.length?b[b.length-1]:e,null,this.extension,d,c)});null!=b?n():this.authenticate(n,
+c)}else n={path:"/"+e},null!=urlParams.rev&&(n.rev=urlParams.rev),this.readFile(n,mxUtils.bind(this,function(b,c){var f=null;if(0<(k?b.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(b);null!=l&&0<l.length?b=l:f=new LocalFile(this,b,e,!0)}d(null!=f?f:g?new DropboxLibrary(this.ui,b,c):new DropboxFile(this.ui,b,c))}),c,k)};DropboxClient.prototype.readFile=function(e,d,c,g){var k=mxUtils.bind(this,function(f){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT})}),
+this.ui.timeout),p=this.client.filesGetMetadata({path:"/"+e.path.substring(1),include_deleted:!1});p.then(mxUtils.bind(this,function(b){}));p["catch"](function(b){window.clearTimeout(m);l&&null!=b&&409==b.status&&(l=!1,c({message:mxResources.get("fileNotFound")}))});p=this.client.filesDownload(e);p.then(mxUtils.bind(this,function(b){window.clearTimeout(m);if(l){l=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(c){d(e.result,b)});g?e.readAsDataURL(b.fileBlob):e.readAsText(b.fileBlob)}catch(u){c(u)}}}));
+p["catch"](mxUtils.bind(this,function(d){window.clearTimeout(m);l&&(l=!1,null==d||500!=d.status&&400!=d.status&&401!=d.status?c({message:mxResources.get("error")+" "+d.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,f?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){n(!0)},c)})}):this.authenticate(function(){k(!0)},c)))}))}),n=mxUtils.bind(this,function(b){null==this.user?this.updateUser(function(){n(!0)},c,b):k(b)});null==
+b?this.authenticate(function(){n(!0)},c):n(!1)};DropboxClient.prototype.checkExists=function(b,d,c){var e=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+b.toLowerCase(),include_deleted:!1})});this.executePromise(e,mxUtils.bind(this,function(e){c?d(!1,!0,e):this.ui.confirm(mxResources.get("replaceIt",[b]),function(){d(!0,!0,e)},function(){d(!1,!0,e)})}),function(b){d(!0,!1)})};DropboxClient.prototype.renameFile=function(b,d,c,g){if(/[\\\/:\?\*"\|]/.test(d))g({message:mxResources.get("dropboxCharsNotAllowed")});
+else{if(null!=b&&null!=d){var e=b.stat.path_display.substring(1),n=e.lastIndexOf("/");0<n&&(d=e.substring(0,n+1)+d)}null!=b&&null!=d&&b.stat.path_lower.substring(1)!==d.toLowerCase()?this.checkExists(d,mxUtils.bind(this,function(e,k,n){e?(e=mxUtils.bind(this,function(e){e=mxUtils.bind(this,function(){return this.client.filesMove({from_path:b.stat.path_display,to_path:"/"+d,autorename:!1})});this.executePromise(e,c,g)}),k&&n.path_lower.substring(1)!==d.toLowerCase()?(k=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+
+d.toLowerCase()})}),this.executePromise(k,e,g)):e()):g()})):g({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(b,d,c,g){this.insertFile(b,d,c,g,!0)};DropboxClient.prototype.insertFile=function(b,d,c,g,k){k=null!=k?k:!1;this.checkExists(b,mxUtils.bind(this,function(e){e?this.saveFile(b,d,mxUtils.bind(this,function(b){k?c(new DropboxLibrary(this.ui,d,b)):c(new DropboxFile(this.ui,d,b))}),g):g()}))};DropboxClient.prototype.saveFile=function(b,d,c,g,k){if(/[\\\/:\?\*"\|]/.test(b))g({message:mxResources.get("dropboxCharsNotAllowed")});
+else if(15E7<=d.length)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(d.length)+" / 150 MB)"});else{k=null!=k?k:"";var e=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+k+b,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([d],{type:"text/plain"})})});this.executePromise(e,c,g)}};DropboxClient.prototype.pickLibrary=function(b){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(d){if(this.ui.spinner.spin(document.body,
+mxResources.get("loading"))){var c=mxUtils.bind(this,function(b){this.ui.spinner.stop();this.ui.handleError(b)}),e=d[0].link.indexOf(this.appPath);if(0<e){var k=decodeURIComponent(d[0].link.substring(e+this.appPath.length-1));this.readFile({path:k},mxUtils.bind(this,function(e,f){if(null!=f&&f.id==d[0].id)try{this.ui.spinner.stop(),b(k.substring(1),new DropboxLibrary(this.ui,e,f))}catch(l){this.ui.handleError(l)}else this.createLibrary(d[0],b,c)}),c)}else this.createLibrary(d[0],b,c)}})})};DropboxClient.prototype.createLibrary=
+function(b,d,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[b.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(b.link,mxUtils.bind(this,function(e){this.insertFile(b.name,e,mxUtils.bind(this,function(b){try{this.ui.spinner.stop(),d(b.getHash().substring(1),b)}catch(n){c(n)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(b,d){null!=Dropbox.choose?(b=null!=b?b:mxUtils.bind(this,
+function(b,d){this.ui.loadFile(null!=b?"D"+encodeURIComponent(b):d.getHash(),null,d)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(d)this.ui.spinner.stop(),b(c[0].link);else{var e=mxUtils.bind(this,function(b){this.ui.spinner.stop();this.ui.handleError(b)}),k=mxUtils.bind(this,function(c,d){this.ui.spinner.stop();b(c,d)}),n=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||
+/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&n)k(c[0].link);else{var f=c[0].link.indexOf(this.appPath);if(0<f){var l=decodeURIComponent(c[0].link.substring(f+this.appPath.length-1));this.readFile({path:l},mxUtils.bind(this,function(d,f){if(null!=f&&f.id==c[0].id){var g=n?d.lastIndexOf(","):-1;this.ui.spinner.stop();var m=null;0<g&&(g=this.ui.extractGraphModelFromPng(d),null!=g&&0<g.length?d=g:m=new LocalFile(this,d,l,!0));b(l.substring(1),null!=m?m:new DropboxFile(this.ui,d,f))}else this.createFile(c[0],
+k,e)}),e,n)}else this.createFile(c[0],k,e)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(b,d,c){var e=/(\.png)$/i.test(b.name);this.ui.editor.loadUrl(b.link,mxUtils.bind(this,function(g){null!=g&&0<g.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[b.name]),mxUtils.bind(this,function(){var k=e?g.lastIndexOf(","):-1;0<k&&(k=this.ui.extractGraphModelFromPng(g.substring(k+
1)),null!=k&&0<k.length&&(g=k));this.insertFile(b.name,g,mxUtils.bind(this,function(c){d(b.name,c)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,e)}})();OneDriveFile=function(b,e,d){DrawioFile.call(this,b,e);this.meta=d};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=300;
OneDriveFile.prototype.share=function(){var b=this.meta.webUrl,b=b.substring(0,b.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)b="https://onedrive.live.com/?cid="+encodeURIComponent(this.meta.parentReference.driveId)+"&id="+encodeURIComponent(this.meta.id);else if("documentLibrary"==this.meta.parentReference.driveType)var e=this.meta.parentReference.path,e=e.substring(e.indexOf("/root:")+6),d=this.meta.webUrl,b=d.substring(0,d.length-e.length-
-this.meta.name.length-(0<e.length?1:0)),d=d.substring(d.indexOf("/",8)),b=b+"/Forms/AllItems.aspx?id="+d+"&parent="+d.substring(0,d.lastIndexOf("/"));else if("business"==this.meta.parentReference.driveType)var b=this.meta["@microsoft.graph.downloadUrl"],c=b.indexOf("/_layouts/15/download.aspx?"),e=d=this.meta.webUrl,d=d.substring(8),d=d.substring(d.indexOf("/")),e=e.substring(0,e.lastIndexOf("/")),e=e.substring(e.indexOf("/",8)),b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+d+"&parent="+e}catch(k){}this.ui.editor.graph.openLink(b)};
+this.meta.name.length-(0<e.length?1:0)),d=d.substring(d.indexOf("/",8)),b=b+"/Forms/AllItems.aspx?id="+d+"&parent="+d.substring(0,d.lastIndexOf("/"));else if("business"==this.meta.parentReference.driveType)var b=this.meta["@microsoft.graph.downloadUrl"],c=b.indexOf("/_layouts/15/download.aspx?"),e=d=this.meta.webUrl,d=d.substring(8),d=d.substring(d.indexOf("/")),e=e.substring(0,e.lastIndexOf("/")),e=e.substring(e.indexOf("/",8)),b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+d+"&parent="+e}catch(g){}this.ui.editor.graph.openLink(b)};
OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};OneDriveFile.prototype.getIdOf=function(b,e){return(null!=b.parentReference&&null!=b.parentReference.driveId?b.parentReference.driveId+"/":"")+(null!=e?b.parentReference.id:b.id)};OneDriveFile.prototype.getChannelId=function(){return"W-"+DrawioFile.prototype.getChannelId.apply(this,arguments)};OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.getId())};
OneDriveFile.prototype.getMode=function(){return App.MODE_ONEDRIVE};OneDriveFile.prototype.isAutosaveOptional=function(){return!0};OneDriveFile.prototype.getTitle=function(){return this.meta.name};OneDriveFile.prototype.isRenamable=function(){return!0};OneDriveFile.prototype.isOptimisticSync=function(){return!0};OneDriveFile.prototype.isSyncSupported=function(){return!0};OneDriveFile.prototype.getSize=function(){return this.meta.size};
OneDriveFile.prototype.isConflict=function(b){return null!=b&&(412==b.getStatus()||409==b.getStatus())};OneDriveFile.prototype.getCurrentUser=function(){return null!=this.ui.oneDrive?this.ui.oneDrive.user:null};OneDriveFile.prototype.loadDescriptor=function(b,e){this.ui.oneDrive.executeRequest(this.ui.oneDrive.getItemURL(this.getId()),mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()?b(JSON.parse(d.getText())):null!=e&&e()}),e)};
OneDriveFile.prototype.getLatestVersion=function(b,e){this.ui.oneDrive.getFile(this.getId(),b,e)};OneDriveFile.prototype.getDescriptor=function(){return this.meta};OneDriveFile.prototype.setDescriptor=function(b){this.meta=b};OneDriveFile.prototype.getDescriptorEtag=function(b){return b.eTag};OneDriveFile.prototype.setDescriptorEtag=function(b,e){b.eTag=e};
OneDriveFile.prototype.loadPatchDescriptor=function(b,e){var d=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(d+"?select=etag,file",mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?b(JSON.parse(c.getText())):e(this.ui.oneDrive.parseRequestText(c))}),e)};
-OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,e,d,c,k){this.doSave(this.getTitle(),b,e,d,c,k)};OneDriveFile.prototype.saveAs=function(b,e,d){this.doSave(b,!1,e,d)};
-OneDriveFile.prototype.doSave=function(b,e,d,c,k,g){var m=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=m;this.saveFile(b,e,d,c,k,g)}),c,k,g])};
-OneDriveFile.prototype.saveFile=function(b,e,d,c,k,g){if(!this.isEditable())null!=d&&d();else if(!this.savingFile)if(this.getTitle()==b){var m=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var b=g||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),e=this.meta;this.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(b,f){this.setModified(this.getShadowModified());
-this.savingFile=!1;this.meta=b;this.fileSaved(f,e,mxUtils.bind(this,function(){this.contentChanged();null!=d&&d()}),c)}),mxUtils.bind(this,function(b,d){try{this.savingFile=!1,this.isConflict(d)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();m()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
-c(b)}catch(q){if(this.savingFile=!1,null!=c)c(q);else throw q;}}),b)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}});m()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(b)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
-OneDriveFile.prototype.rename=function(b,e,d){var c=this.getCurrentEtag();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(k){this.hasSameExtension(b,this.getTitle())?(this.meta=k,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(k)):(this.meta=k,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,d))}),d)};
-OneDriveFile.prototype.move=function(b,e,d){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(b){this.meta=b;this.descriptorChanged();null!=e&&e(b)}),d)};OneDriveLibrary=function(b,e,d){OneDriveFile.call(this,b,e,d)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,e,d){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(b){this.desc=b;null!=e&&e(b)}),d)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(b,d,c,k){null==d&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(d=!0);null==c&&(null!=window.urlParams&&"1"==window.urlParams.inlinePicker||mxClient.IS_ANDROID||mxClient.IS_IOS)&&(c=!0);null==k&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(k=!0);DrawioClient.call(this,b,d?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=d;this.inlinePicker=c;this.noLogout=k;b=JSON.parse(this.token);null!=b&&(this.endpointHint=null!=
+OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,e,d,c,g){this.doSave(this.getTitle(),b,e,d,c,g)};OneDriveFile.prototype.saveAs=function(b,e,d){this.doSave(b,!1,e,d)};
+OneDriveFile.prototype.doSave=function(b,e,d,c,g,k){var n=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=n;this.saveFile(b,e,d,c,g,k)}),c,g,k])};
+OneDriveFile.prototype.saveFile=function(b,e,d,c,g,k){if(!this.isEditable())null!=d&&d();else if(!this.savingFile)if(this.getTitle()==b){var n=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var b=k||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),e=this.meta;this.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(b,f){this.setModified(this.getShadowModified());
+this.savingFile=!1;this.meta=b;this.fileSaved(f,e,mxUtils.bind(this,function(){this.contentChanged();null!=d&&d()}),c)}),mxUtils.bind(this,function(b,d){try{this.savingFile=!1,this.isConflict(d)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();n()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
+c(b)}catch(q){if(this.savingFile=!1,null!=c)c(q);else throw q;}}),b)}catch(m){if(this.savingFile=!1,null!=c)c(m);else throw m;}});n()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(b)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
+OneDriveFile.prototype.rename=function(b,e,d){var c=this.getCurrentEtag();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(g){this.hasSameExtension(b,this.getTitle())?(this.meta=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(g)):(this.meta=g,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,d))}),d)};
+OneDriveFile.prototype.move=function(b,e,d){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(b){this.meta=b;this.descriptorChanged();null!=e&&e(b)}),d)};OneDriveLibrary=function(b,e,d){OneDriveFile.call(this,b,e,d)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,e,d){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(b){this.desc=b;null!=e&&e(b)}),d)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(b,d,c,g){null==d&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(d=!0);null==c&&(null!=window.urlParams&&"1"==window.urlParams.inlinePicker||mxClient.IS_ANDROID||mxClient.IS_IOS)&&(c=!0);null==g&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(g=!0);DrawioClient.call(this,b,d?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=d;this.inlinePicker=c;this.noLogout=g;b=JSON.parse(this.token);null!=b&&(this.endpointHint=null!=
b.endpointHint?b.endpointHint.replace("/Documents","/_layouts/15/onedrive.aspx"):b.endpointHint)};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId=window.DRAWIO_MSGRAPH_CLIENT_ID||("test.draw.io"==window.location.hostname?"2e598409-107f-4b59-89ca-d7723c8e00a4":"45c10911-200f-4e27-a666-9e9fca147395");OneDriveClient.prototype.clientId="app.diagrams.net"==window.location.hostname?"b5ff67d6-3155-4fca-965a-59a3655c4476":OneDriveClient.prototype.clientId;OneDriveClient.prototype.clientId=
"viewer.diagrams.net"==window.location.hostname?"417a451a-a343-4788-b6c1-901e63182565":OneDriveClient.prototype.clientId;OneDriveClient.prototype.scopes="user.read files.readwrite.all sites.read.all";OneDriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/microsoft";OneDriveClient.prototype.pickerRedirectUri=window.location.protocol+"//"+window.location.host+"/onedrive3.html";OneDriveClient.prototype.defEndpointHint="api.onedrive.com";OneDriveClient.prototype.endpointHint=
OneDriveClient.prototype.defEndpointHint;OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=function(b){if(null==b||""===b)return!1;for(var d=0;d<this.invalidFilenameRegExs.length;d++)if(this.invalidFilenameRegExs[d].test(b))return!1;
-return!0};OneDriveClient.prototype.get=function(e,d,c){e=new mxXmlRequest(e,null,"GET");e.setRequestHeaders=mxUtils.bind(this,function(c,d){c.setRequestHeader("Authorization","Bearer "+b)});e.send(d,c);return e};OneDriveClient.prototype.updateUser=function(b,d,c){var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(k){window.clearTimeout(g);e&&(200>k.getStatus()||300<=k.getStatus()?c?d({message:mxResources.get("accessDenied")}):
-(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(b,d,!0)}),d)):(k=JSON.parse(k.getText()),this.setUser(new DrawioUser(k.id,null,k.displayName)),b()))}),mxUtils.bind(this,function(b){window.clearTimeout(g);e&&d(b)}))};OneDriveClient.prototype.resetTokenRefresh=function(b){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<b&&(this.tokenRefreshInterval=1E3*b,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,
+return!0};OneDriveClient.prototype.get=function(e,d,c){e=new mxXmlRequest(e,null,"GET");e.setRequestHeaders=mxUtils.bind(this,function(c,d){c.setRequestHeader("Authorization","Bearer "+b)});e.send(d,c);return e};OneDriveClient.prototype.updateUser=function(b,d,c){var e=!0,k=window.setTimeout(mxUtils.bind(this,function(){e=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(g){window.clearTimeout(k);e&&(200>g.getStatus()||300<=g.getStatus()?c?d({message:mxResources.get("accessDenied")}):
+(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(b,d,!0)}),d)):(g=JSON.parse(g.getText()),this.setUser(new DrawioUser(g.id,null,g.displayName)),b()))}),mxUtils.bind(this,function(b){window.clearTimeout(k);e&&d(b)}))};OneDriveClient.prototype.resetTokenRefresh=function(b){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<b&&(this.tokenRefreshInterval=1E3*b,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,
function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*b))};OneDriveClient.prototype.authenticate=function(b,d,c){if(this.isExtAuth)window.parent.oneDriveAuth(mxUtils.bind(this,function(c){this.updateAuthInfo(c,!0,null==this.endpointHint,b,d)}),d,null!=window.urlParams&&"1"==urlParams.odAuthCancellable);else(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?this.authenticateStep2(e.getText(),b,d,c):null!=
-d&&d(e)}),d)};OneDriveClient.prototype.updateAuthInfo=function(e,d,c,k,g){c&&this.setUser(null);b=e.access_token;delete e.access_token;e.expiresOn=Date.now()+1E3*e.expires_in;this.tokenExpiresOn=e.expiresOn;e.remember=d;this.setPersistentToken(JSON.stringify(e),!d);this.resetTokenRefresh(e.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){k()}),g):k()};OneDriveClient.prototype.authenticateStep2=function(e,d,c,k){if(null==window.onOneDriveCallback){var g=mxUtils.bind(this,function(){var m=
-!0,f=JSON.parse(this.getPersistentToken(!0));null!=f?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?this.updateAuthInfo(JSON.parse(e.getText()),f.remember,!1,d,c):(this.clearPersistentToken(),this.setUser(null),b=null,401!=e.getStatus()||k?c({message:mxResources.get("accessDenied"),retry:g}):g())}),c):this.ui.showAuthDialog(this,
-!0,mxUtils.bind(this,function(b,f){var k="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(b?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),k=window.open(k,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+
-Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=k&&(window.onOneDriveCallback=mxUtils.bind(this,function(e,k){if(m){window.onOneDriveCallback=null;m=!1;try{null==e?c({message:mxResources.get("accessDenied"),retry:g}):(null!=f&&f(),this.updateAuthInfo(e,b,!0,d,c))}catch(u){c(u)}finally{null!=k&&k.close()}}else null!=k&&k.close()}),k.focus())}),mxUtils.bind(this,function(){m&&(window.onOneDriveCallback=null,m=!1,c({message:mxResources.get("accessDenied"),
-retry:g}))}))});g()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(b,d){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var e=JSON.parse(c.getText());0<e.webUrl.indexOf(".sharepoint.com")?this.endpointHint=e.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var g=JSON.parse(this.getPersistentToken(!0));null!=g&&(g.endpointHint=this.endpointHint,
-this.setPersistentToken(JSON.stringify(g),!g.remember));b();return}}catch(m){}d({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),d)};OneDriveClient.prototype.executeRequest=function(e,d,c){var k=mxUtils.bind(this,function(b){var g=!0,f=window.setTimeout(mxUtils.bind(this,function(){g=!1;c({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(e){window.clearTimeout(f);g&&(200<=e.getStatus()&&299>=e.getStatus()||404==e.getStatus()?(null==
-this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),d(e)):b||401!==e.getStatus()&&400!==e.getStatus()?c(this.parseRequestText(e)):this.authenticate(function(){k(!0)},c,b))}),mxUtils.bind(this,function(b){window.clearTimeout(f);g&&c(b)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){k(!0)},c):k(!1)};OneDriveClient.prototype.checkToken=function(e){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,this.emptyFn):e()};OneDriveClient.prototype.getItemRef=
+d&&d(e)}),d)};OneDriveClient.prototype.updateAuthInfo=function(e,d,c,g,k){c&&this.setUser(null);b=e.access_token;delete e.access_token;e.expiresOn=Date.now()+1E3*e.expires_in;this.tokenExpiresOn=e.expiresOn;e.remember=d;this.setPersistentToken(JSON.stringify(e),!d);this.resetTokenRefresh(e.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){g()}),k):g()};OneDriveClient.prototype.authenticateStep2=function(e,d,c,g){if(null==window.onOneDriveCallback){var k=mxUtils.bind(this,function(){var n=
+!0,f=JSON.parse(this.getPersistentToken(!0));null!=f?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?this.updateAuthInfo(JSON.parse(e.getText()),f.remember,!1,d,c):(this.clearPersistentToken(),this.setUser(null),b=null,401!=e.getStatus()||g?c({message:mxResources.get("accessDenied"),retry:k}):k())}),c):this.ui.showAuthDialog(this,
+!0,mxUtils.bind(this,function(b,f){var g="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(b?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),g=window.open(g,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+
+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=g&&(window.onOneDriveCallback=mxUtils.bind(this,function(e,g){if(n){window.onOneDriveCallback=null;n=!1;try{null==e?c({message:mxResources.get("accessDenied"),retry:k}):(null!=f&&f(),this.updateAuthInfo(e,b,!0,d,c))}catch(u){c(u)}finally{null!=g&&g.close()}}else null!=g&&g.close()}),g.focus())}),mxUtils.bind(this,function(){n&&(window.onOneDriveCallback=null,n=!1,c({message:mxResources.get("accessDenied"),
+retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(b,d){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var e=JSON.parse(c.getText());0<e.webUrl.indexOf(".sharepoint.com")?this.endpointHint=e.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var k=JSON.parse(this.getPersistentToken(!0));null!=k&&(k.endpointHint=this.endpointHint,
+this.setPersistentToken(JSON.stringify(k),!k.remember));b();return}}catch(n){}d({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),d)};OneDriveClient.prototype.executeRequest=function(e,d,c){var g=mxUtils.bind(this,function(b){var k=!0,f=window.setTimeout(mxUtils.bind(this,function(){k=!1;c({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(e){window.clearTimeout(f);k&&(200<=e.getStatus()&&299>=e.getStatus()||404==e.getStatus()?(null==
+this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),d(e)):b||401!==e.getStatus()&&400!==e.getStatus()?c(this.parseRequestText(e)):this.authenticate(function(){g(!0)},c,b))}),mxUtils.bind(this,function(b){window.clearTimeout(f);k&&c(b)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){g(!0)},c):g(!1)};OneDriveClient.prototype.checkToken=function(e){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,this.emptyFn):e()};OneDriveClient.prototype.getItemRef=
function(b){var d=b.split("/");return 1<d.length?{driveId:d[0],id:d[1]}:{id:b}};OneDriveClient.prototype.getItemURL=function(b,d){var c=b.split("/");if(1<c.length){var e=c[1];return(d?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)}return(d?"":this.baseUrl)+"/me/drive/items/"+b};OneDriveClient.prototype.getLibrary=function(b,d,c){this.getFile(b,d,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(b){var d=b.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');
-0<d&&(b=b.substring(0,d));return b};OneDriveClient.prototype.getFile=function(b,d,c,k,g){g=null!=g?g:!1;this.executeRequest(this.getItemURL(b),mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){var e=JSON.parse(b.getText()),k=/\.png$/i.test(e.name);if(/\.v(dx|sdx?)$/i.test(e.name)||/\.gliffy$/i.test(e.name)||/\.pdf$/i.test(e.name)||!this.ui.useCanvasForExport&&k)this.ui.convertFile(e["@microsoft.graph.downloadUrl"],e.name,null!=e.file?e.file.mimeType:null,this.extension,d,c);
-else{var m=!0,p=window.setTimeout(mxUtils.bind(this,function(){m=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(e["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(b){try{if(window.clearTimeout(p),m){/\.html$/i.test(e.name)&&(b=this.removeExtraHtmlContent(b));var f=null;if(0<(k?b.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(b);null!=l&&0<l.length?b=l:f=new LocalFile(this.ui,b,e.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)){var n=
-b.substring(22);b=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,e["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?d(new LocalFile(this.ui,b.responseText,e.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=c)c(A);else throw A;}}),e.name):
-null!=f?d(f):g?d(new OneDriveLibrary(this.ui,b,e)):d(new OneDriveFile(this.ui,b,e))}}catch(x){if(null!=c)c(x);else throw x;}}),mxUtils.bind(this,function(b){window.clearTimeout(p);m&&c(this.parseRequestText(b))}),k||null!=e.file&&null!=e.file.mimeType&&("image/"==e.file.mimeType.substring(0,6)&&"image/svg"!=e.file.mimeType.substring(0,9)||"application/pdf"==e.file.mimeType))}}else c(this.parseRequestText(b))}),c)};OneDriveClient.prototype.renameFile=function(b,d,c,k){null!=b&&null!=d&&(this.isValidFilename(d)?
-this.checkExists(b.getParentId(),d,!1,mxUtils.bind(this,function(e){e?this.writeFile(this.getItemURL(b.getId()),JSON.stringify({name:d}),"PATCH","application/json",c,k):k()})):k({message:this.invalidFilenameRegExs[0].test(d)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(b,d,c,k){d=this.getItemRef(d);var e=this.getItemRef(b);d.driveId!=e.driveId?k({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):
-this.writeFile(this.getItemURL(b),JSON.stringify({parentReference:d}),"PATCH","application/json",c,k)};OneDriveClient.prototype.insertLibrary=function(b,d,c,k,g){this.insertFile(b,d,c,k,!0,g)};OneDriveClient.prototype.insertFile=function(b,d,c,k,g,m){this.isValidFilename(b)?(g=null!=g?g:!1,this.checkExists(m,b,!0,mxUtils.bind(this,function(e){if(e){e="/me/drive/root";null!=m&&(e=this.getItemURL(m,!0));var f=mxUtils.bind(this,function(b){g?c(new OneDriveLibrary(this.ui,d,b)):c(new OneDriveFile(this.ui,
-d,b))});e=this.baseUrl+e+"/children/"+encodeURIComponent(b)+"/content";4E6<=d.length?this.writeFile(e,"","PUT",null,mxUtils.bind(this,function(b){this.writeLargeFile(this.getItemURL(b.id),d,f,k)}),k):this.writeFile(e,d,"PUT",null,f,k)}else k()}))):k({message:this.invalidFilenameRegExs[0].test(b)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(b,d,c,k){var e="/me/drive/root";null!=b&&(e=this.getItemURL(b,!0));
-this.executeRequest(this.baseUrl+e+"/children/"+encodeURIComponent(d),mxUtils.bind(this,function(b){404==b.getStatus()?k(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[d]),function(){k(!0)},function(){k(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){k(!1)}))}),function(b){k(!1)},!0)};OneDriveClient.prototype.saveFile=function(b,d,c,k){try{var e=b.getData(),m=mxUtils.bind(this,function(f){var g=
-mxUtils.bind(this,function(b){d(b,e)}),l=this.getItemURL(b.getId());4E6<=f.length?this.writeLargeFile(l,f,g,c,k):this.writeFile(l+"/content/",f,"PUT",null,g,c,k)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)){var f=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){m(this.ui.base64ToBlob(b,"image/png"))}),c,this.ui.getCurrentFile()!=b?e:null,f.scale,f.border)}else m(e)}catch(l){c(l)}};OneDriveClient.prototype.writeLargeFile=function(e,
-d,c,k,g){try{if(null!=d){var m=mxUtils.bind(this,function(b,e,f){try{f=f||0;var g=!0,l=null,l=window.setTimeout(mxUtils.bind(this,function(){g=!1;k({code:App.ERROR_TIMEOUT})}),this.ui.timeout),n=d.substr(e,4194304),p=new mxXmlRequest(b,n,"PUT");p.setRequestHeaders=mxUtils.bind(this,function(b,c){b.setRequestHeader("Content-Length",n.length);b.setRequestHeader("Content-Range","bytes "+e+"-"+(e+n.length-1)+"/"+d.length)});p.send(mxUtils.bind(this,function(p){window.clearTimeout(l);if(g){var q=p.getStatus();
-200<=q&&299>=q?(q=e+n.length,q==d.length?c(JSON.parse(p.getText())):m(b,q,f)):500<=q&&599>=q&&2>f?(f++,m(b,e,f)):k(this.parseRequestText(p),p)}}),mxUtils.bind(this,function(b){window.clearTimeout(l);g&&k(this.parseRequestText(b))}))}catch(x){k(x)}}),f=mxUtils.bind(this,function(c){try{var d=!0,l=null;try{l=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(t){}var q=new mxXmlRequest(e+"/createUploadSession","{}","POST");q.setRequestHeaders=mxUtils.bind(this,
-function(c,d){c.setRequestHeader("Content-Type","application/json");c.setRequestHeader("Authorization","Bearer "+b);null!=g&&c.setRequestHeader("If-Match",g)});q.send(mxUtils.bind(this,function(b){window.clearTimeout(l);d&&(200<=b.getStatus()&&299>=b.getStatus()?(b=JSON.parse(b.getText()),m(b.uploadUrl,0)):c||401!==b.getStatus()?k(this.parseRequestText(b),b):this.authenticate(function(){f(!0)},k,c))}),mxUtils.bind(this,function(b){window.clearTimeout(l);d&&k(this.parseRequestText(b))}))}catch(t){k(t)}});
-null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){f(!0)},k):f(!1)}else k({message:mxResources.get("unknownError")})}catch(l){k(l)}};OneDriveClient.prototype.writeFile=function(e,d,c,k,g,m,f){try{if(null!=e&&null!=d){var l=mxUtils.bind(this,function(n){try{var p=!0,q=null;try{q=window.setTimeout(mxUtils.bind(this,function(){p=!1;m({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(u){}var t=new mxXmlRequest(e,d,c);t.setRequestHeaders=mxUtils.bind(this,function(c,d){c.setRequestHeader("Content-Type",
-k||" ");c.setRequestHeader("Authorization","Bearer "+b);null!=f&&c.setRequestHeader("If-Match",f)});t.send(mxUtils.bind(this,function(b){window.clearTimeout(q);p&&(200<=b.getStatus()&&299>=b.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),g(JSON.parse(b.getText()))):n||401!==b.getStatus()?m(this.parseRequestText(b),b):this.authenticate(function(){l(!0)},m,n))}),mxUtils.bind(this,function(b){window.clearTimeout(q);p&&m(this.parseRequestText(b))}))}catch(u){m(u)}});null==
-b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},m):l(!1)}else m({message:mxResources.get("unknownError")})}catch(n){m(n)}};OneDriveClient.prototype.parseRequestText=function(b){var d={message:mxResources.get("unknownError")};try{d=JSON.parse(b.getText())}catch(c){}return d};OneDriveClient.prototype.pickLibrary=function(b){this.pickFile(function(d){b(d)})};OneDriveClient.prototype.createInlinePicker=function(b,d){return mxUtils.bind(this,function(){var c=null,e=document.createElement("div");
-e.style.width="550px";e.style.height="435px";e.style.position="relative";var g=new CustomDialog(this.ui,e,mxUtils.bind(this,function(){var e=c.getSelectedItem();if(null!=e){if(d&&"object"==typeof e.folder){b({value:[e]});return}if(!e.folder){b(OneDriveFile.prototype.getIdOf(e));return}}return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(d?"save":"open"),null,null,null,null,!0);this.ui.showDialog(g.container,550,500,!0,!0);c=new mxODPicker(e,null,mxUtils.bind(this,
+0<d&&(b=b.substring(0,d));return b};OneDriveClient.prototype.getFile=function(b,d,c,g,k){k=null!=k?k:!1;this.executeRequest(this.getItemURL(b),mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){var e=JSON.parse(b.getText()),g=/\.png$/i.test(e.name);if(/\.v(dx|sdx?)$/i.test(e.name)||/\.gliffy$/i.test(e.name)||/\.pdf$/i.test(e.name)||!this.ui.useCanvasForExport&&g)this.ui.convertFile(e["@microsoft.graph.downloadUrl"],e.name,null!=e.file?e.file.mimeType:null,this.extension,d,c);
+else{var n=!0,p=window.setTimeout(mxUtils.bind(this,function(){n=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(e["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(b){try{if(window.clearTimeout(p),n){/\.html$/i.test(e.name)&&(b=this.removeExtraHtmlContent(b));var f=null;if(0<(g?b.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(b);null!=l&&0<l.length?b=l:f=new LocalFile(this.ui,b,e.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)){var m=
+b.substring(22);b=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,e["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?d(new LocalFile(this.ui,b.responseText,e.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=c)c(A);else throw A;}}),e.name):
+null!=f?d(f):k?d(new OneDriveLibrary(this.ui,b,e)):d(new OneDriveFile(this.ui,b,e))}}catch(y){if(null!=c)c(y);else throw y;}}),mxUtils.bind(this,function(b){window.clearTimeout(p);n&&c(this.parseRequestText(b))}),g||null!=e.file&&null!=e.file.mimeType&&("image/"==e.file.mimeType.substring(0,6)&&"image/svg"!=e.file.mimeType.substring(0,9)||"application/pdf"==e.file.mimeType))}}else c(this.parseRequestText(b))}),c)};OneDriveClient.prototype.renameFile=function(b,d,c,g){null!=b&&null!=d&&(this.isValidFilename(d)?
+this.checkExists(b.getParentId(),d,!1,mxUtils.bind(this,function(e){e?this.writeFile(this.getItemURL(b.getId()),JSON.stringify({name:d}),"PATCH","application/json",c,g):g()})):g({message:this.invalidFilenameRegExs[0].test(d)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(b,d,c,g){d=this.getItemRef(d);var e=this.getItemRef(b);d.driveId!=e.driveId?g({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):
+this.writeFile(this.getItemURL(b),JSON.stringify({parentReference:d}),"PATCH","application/json",c,g)};OneDriveClient.prototype.insertLibrary=function(b,d,c,g,k){this.insertFile(b,d,c,g,!0,k)};OneDriveClient.prototype.insertFile=function(b,d,c,g,k,n){this.isValidFilename(b)?(k=null!=k?k:!1,this.checkExists(n,b,!0,mxUtils.bind(this,function(e){if(e){e="/me/drive/root";null!=n&&(e=this.getItemURL(n,!0));var f=mxUtils.bind(this,function(b){k?c(new OneDriveLibrary(this.ui,d,b)):c(new OneDriveFile(this.ui,
+d,b))});e=this.baseUrl+e+"/children/"+encodeURIComponent(b)+"/content";4E6<=d.length?this.writeFile(e,"","PUT",null,mxUtils.bind(this,function(b){this.writeLargeFile(this.getItemURL(b.id),d,f,g)}),g):this.writeFile(e,d,"PUT",null,f,g)}else g()}))):g({message:this.invalidFilenameRegExs[0].test(b)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(b,d,c,g){var e="/me/drive/root";null!=b&&(e=this.getItemURL(b,!0));
+this.executeRequest(this.baseUrl+e+"/children/"+encodeURIComponent(d),mxUtils.bind(this,function(b){404==b.getStatus()?g(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[d]),function(){g(!0)},function(){g(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){g(!1)}))}),function(b){g(!1)},!0)};OneDriveClient.prototype.saveFile=function(b,d,c,g){try{var e=b.getData(),n=mxUtils.bind(this,function(f){var k=
+mxUtils.bind(this,function(b){d(b,e)}),l=this.getItemURL(b.getId());4E6<=f.length?this.writeLargeFile(l,f,k,c,g):this.writeFile(l+"/content/",f,"PUT",null,k,c,g)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)){var f=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){n(this.ui.base64ToBlob(b,"image/png"))}),c,this.ui.getCurrentFile()!=b?e:null,f.scale,f.border)}else n(e)}catch(l){c(l)}};OneDriveClient.prototype.writeLargeFile=function(e,
+d,c,g,k){try{if(null!=d){var n=mxUtils.bind(this,function(b,e,f){try{f=f||0;var k=!0,l=null,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;g({code:App.ERROR_TIMEOUT})}),this.ui.timeout),m=d.substr(e,4194304),p=new mxXmlRequest(b,m,"PUT");p.setRequestHeaders=mxUtils.bind(this,function(b,c){b.setRequestHeader("Content-Length",m.length);b.setRequestHeader("Content-Range","bytes "+e+"-"+(e+m.length-1)+"/"+d.length)});p.send(mxUtils.bind(this,function(p){window.clearTimeout(l);if(k){var q=p.getStatus();
+200<=q&&299>=q?(q=e+m.length,q==d.length?c(JSON.parse(p.getText())):n(b,q,f)):500<=q&&599>=q&&2>f?(f++,n(b,e,f)):g(this.parseRequestText(p),p)}}),mxUtils.bind(this,function(b){window.clearTimeout(l);k&&g(this.parseRequestText(b))}))}catch(y){g(y)}}),f=mxUtils.bind(this,function(c){try{var d=!0,l=null;try{l=window.setTimeout(mxUtils.bind(this,function(){d=!1;g({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(t){}var q=new mxXmlRequest(e+"/createUploadSession","{}","POST");q.setRequestHeaders=mxUtils.bind(this,
+function(c,d){c.setRequestHeader("Content-Type","application/json");c.setRequestHeader("Authorization","Bearer "+b);null!=k&&c.setRequestHeader("If-Match",k)});q.send(mxUtils.bind(this,function(b){window.clearTimeout(l);d&&(200<=b.getStatus()&&299>=b.getStatus()?(b=JSON.parse(b.getText()),n(b.uploadUrl,0)):c||401!==b.getStatus()?g(this.parseRequestText(b),b):this.authenticate(function(){f(!0)},g,c))}),mxUtils.bind(this,function(b){window.clearTimeout(l);d&&g(this.parseRequestText(b))}))}catch(t){g(t)}});
+null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){f(!0)},g):f(!1)}else g({message:mxResources.get("unknownError")})}catch(l){g(l)}};OneDriveClient.prototype.writeFile=function(e,d,c,g,k,n,f){try{if(null!=e&&null!=d){var l=mxUtils.bind(this,function(m){try{var p=!0,q=null;try{q=window.setTimeout(mxUtils.bind(this,function(){p=!1;n({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(u){}var t=new mxXmlRequest(e,d,c);t.setRequestHeaders=mxUtils.bind(this,function(c,d){c.setRequestHeader("Content-Type",
+g||" ");c.setRequestHeader("Authorization","Bearer "+b);null!=f&&c.setRequestHeader("If-Match",f)});t.send(mxUtils.bind(this,function(b){window.clearTimeout(q);p&&(200<=b.getStatus()&&299>=b.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),k(JSON.parse(b.getText()))):m||401!==b.getStatus()?n(this.parseRequestText(b),b):this.authenticate(function(){l(!0)},n,m))}),mxUtils.bind(this,function(b){window.clearTimeout(q);p&&n(this.parseRequestText(b))}))}catch(u){n(u)}});null==
+b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},n):l(!1)}else n({message:mxResources.get("unknownError")})}catch(m){n(m)}};OneDriveClient.prototype.parseRequestText=function(b){var d={message:mxResources.get("unknownError")};try{d=JSON.parse(b.getText())}catch(c){}return d};OneDriveClient.prototype.pickLibrary=function(b){this.pickFile(function(d){b(d)})};OneDriveClient.prototype.createInlinePicker=function(b,d){return mxUtils.bind(this,function(){var c=null,e=document.createElement("div");
+e.style.width="550px";e.style.height="435px";e.style.position="relative";var k=new CustomDialog(this.ui,e,mxUtils.bind(this,function(){var e=c.getSelectedItem();if(null!=e){if(d&&"object"==typeof e.folder){b({value:[e]});return}if(!e.folder){b(OneDriveFile.prototype.getIdOf(e));return}}return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(d?"save":"open"),null,null,null,null,!0);this.ui.showDialog(k.container,550,500,!0,!0);c=new mxODPicker(e,null,mxUtils.bind(this,
function(b,c,d){this.executeRequest(this.baseUrl+b,function(b){c(JSON.parse(b.getText()))},d)}),mxUtils.bind(this,function(b,c,d,e){this.executeRequest(this.baseUrl+"/drives/"+c+"/items/"+b,function(b){d(JSON.parse(b.getText()))},e)}),null,null,function(c){d?b({value:[c]}):b(OneDriveFile.prototype.getIdOf(c))},mxUtils.bind(this,function(b){this.ui.showError(mxResources.get("error"),b)}),d)})};OneDriveClient.prototype.pickFolder=function(e,d){var c=mxUtils.bind(this,function(b){this.ui.showError(mxResources.get("error"),
-b&&b.message?b.message:b)}),k=mxUtils.bind(this,function(d){var g=this.inlinePicker?this.createInlinePicker(e,!0):mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(c){e(c);mxClient.IS_IE11&&(b=c.accessToken)}),cancel:mxUtils.bind(this,
-function(){}),error:c})});d?g():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){e({value:[{id:"root",name:"root",parentReference:{driveId:"me"}}]})}),g,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){k(!1)}),c):k(d)};OneDriveClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(b){this.ui.loadFile("W"+
+b&&b.message?b.message:b)}),g=mxUtils.bind(this,function(d){var g=this.inlinePicker?this.createInlinePicker(e,!0):mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(c){e(c);mxClient.IS_IE11&&(b=c.accessToken)}),cancel:mxUtils.bind(this,
+function(){}),error:c})});d?g():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){e({value:[{id:"root",name:"root",parentReference:{driveId:"me"}}]})}),g,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){g(!1)}),c):g(d)};OneDriveClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(b){this.ui.loadFile("W"+
encodeURIComponent(b))});var d=mxUtils.bind(this,function(b){this.ui.showError(mxResources.get("error"),b&&b.message?b.message:b)}),c=this.inlinePicker?this.createInlinePicker(e):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(c){null!=
c&&null!=c.value&&0<c.value.length&&(mxClient.IS_IE11&&(b=c.accessToken),e(OneDriveFile.prototype.getIdOf(c.value[0]),c))}),cancel:mxUtils.bind(this,function(){}),error:d});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),mxUtils.bind(this,function(){this.ui.hideDialog();c()}))).container,300,140,!0,!0)}),d):c()};OneDriveClient.prototype.logout=
function(){if(isLocalStorage){var e=localStorage.getItem("odpickerv7cache");null!=e&&'{"odsdkLoginHint":{'==e.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}window.open("https://login.microsoftonline.com/common/oauth2/v2.0/logout","logout","width=525,height=525,status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes");this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();
@@ -11191,119 +11196,119 @@ this.setUser(null);b=null}})();GitHubFile=function(b,e,d){DrawioFile.call(this,b
GitHubFile.prototype.getId=function(){return encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+this.getId())};
GitHubFile.prototype.getPublicUrl=function(b){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(e){b(200<=e.getStatus()&&299>=e.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){b(null)})):b(null)};GitHubFile.prototype.isConflict=function(b){return null!=b&&409==b.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};
GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(b,e){this.peer.getFile(this.getId(),b,e)};GitHubFile.prototype.isCompressedStorage=function(){return!1};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(b){this.meta=b};GitHubFile.prototype.getDescriptorEtag=function(b){return b.sha};GitHubFile.prototype.setDescriptorEtag=function(b,e){b.sha=e};
-GitHubFile.prototype.save=function(b,e,d,c,k,g){this.doSave(this.getTitle(),e,d,c,k,g)};GitHubFile.prototype.saveAs=function(b,e,d){this.doSave(b,e,d)};GitHubFile.prototype.doSave=function(b,e,d,c,k,g){var m=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=m;this.saveFile(b,!1,e,d,c,k,g)}),d,c,k])};
-GitHubFile.prototype.saveFile=function(b,e,d,c,k,g,m){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var f=mxUtils.bind(this,function(e){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var f=this.getCurrentEtag(),k=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,b);this.fileSaved(k,f,mxUtils.bind(this,function(){this.contentChanged();
-null!=d&&d()}),c)}),mxUtils.bind(this,function(b){this.savingFile=!1;this.isConflict(b)?(this.inConflictState=!0,null!=c&&c({commitMessage:e})):null!=c&&c(b)}),g,e)}catch(q){if(this.savingFile=!1,null!=c)c(q);else throw q;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(f){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;null!=
-d&&d();this.ui.fileLoaded(b)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,f,e)}))});null!=m?f(m):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(b){f(b)}),c)}else null!=d&&d()};GitHubLibrary=function(b,e,d){GitHubFile.call(this,b,e,d)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(b,d){DrawioClient.call(this,b,d||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.location.protocol+
-"//"+window.location.host+"/github2";GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(e){b=e};GitHubClient.prototype.updateUser=function(e,d,c){var k=!0,g=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),m=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),f=this.authToken+" "+b;m.setRequestHeaders=function(b,c){b.setRequestHeader("Authorization",
-f)};m.send(mxUtils.bind(this,function(){window.clearTimeout(g);k&&(401===m.getStatus()?c?d({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,d,!0)}),d)):200>m.getStatus()||300<=m.getStatus()?d({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(m.getText()))),e()))}),d)};GitHubClient.prototype.createUser=function(b){return new DrawioUser(b.id,b.email,b.name)};GitHubClient.prototype.authenticate=
-function(b,d){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),b,d):null!=d&&d(c)}),d)};GitHubClient.prototype.authenticateStep2=function(e,d,c){if(null==window.onGitHubCallback){var k=mxUtils.bind(this,function(){var g=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,f){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&scope="+
-this.scope+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(e,n){g?(window.onGitHubCallback=null,g=!1,null==e?c({message:mxResources.get("accessDenied"),retry:k}):(null!=f&&f(),b=e.access_token,this.setUser(null),m&&this.setPersistentToken("remembered"),d(),null!=n&&n.close())):null!=n&&n.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:k})}),mxUtils.bind(this,function(){g&&
-(window.onGitHubCallback=null,g=!1,c({message:mxResources.get("accessDenied"),retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(b,d){try{var c=JSON.parse(b.getText());null!=c&&null!=c.message&&(d=c.message)}catch(k){}return d};GitHubClient.prototype.executeRequest=function(e,d,c,k){var g=mxUtils.bind(this,function(f){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),p=this.authToken+
-" "+b;e.setRequestHeaders=function(b,c){b.setRequestHeader("Authorization",p)};e.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(l)if(200<=e.getStatus()&&299>=e.getStatus()||k&&404==e.getStatus())d(e);else if(401===e.getStatus())f?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},c)})}):this.authenticate(function(){g(!0)},c);else if(403===e.getStatus()){var b=!1;try{var p=JSON.parse(e.getText());null!=p&&
-null!=p.errors&&0<p.errors.length&&(b="too_large"==p.errors[0].code)}catch(u){}c({message:mxResources.get(b?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(b){window.clearTimeout(n);l&&c(b)}))}),m=mxUtils.bind(this,function(b){null==
-this.user?this.updateUser(function(){m(!0)},c,b):g(b)});null==b?this.authenticate(function(){m(!0)},c):m(!1)};GitHubClient.prototype.getLibrary=function(b,d,c){this.getFile(b,d,c,!0)};GitHubClient.prototype.getSha=function(b,d,c,k,g,m){var e="&t="+(new Date).getTime();b=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+c+"?ref="+k+e,null,"HEAD");this.executeRequest(b,mxUtils.bind(this,function(b){try{g(b.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(n){m(n)}}),m)};GitHubClient.prototype.getFile=
-function(e,d,c,k,g){k=null!=k?k:!1;var m=e.split("/"),f=m[0],l=m[1],n=m[2];e=m.slice(3,m.length).join("/");m=/\.png$/i.test(e);if(!g&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&m))if(null!=b){g=this.baseUrl+"/repos/"+f+"/"+l+"/contents/"+e+"?ref="+n;var p={Authorization:"token "+b},m=e.split("/");this.ui.convertFile(g,0<m.length?m[m.length-1]:e,null,this.extension,d,c,null,p)}else c({message:mxResources.get("accessDenied")});else m="&t="+(new Date).getTime(),
-e=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+l+"/contents/"+e+"?ref="+n+m,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(b){try{d(this.createGitHubFile(f,l,n,JSON.parse(b.getText()),k))}catch(t){c(t)}}),c)};GitHubClient.prototype.createGitHubFile=function(b,d,c,k,g){b={org:b,repo:d,ref:c,name:k.name,path:k.path,sha:k.sha,html_url:k.html_url,download_url:k.download_url};d=k.content;"base64"===k.encoding&&(/\.jpe?g$/i.test(k.name)?d="data:image/jpeg;base64,"+d:/\.gif$/i.test(k.name)?
-d="data:image/gif;base64,"+d:/\.png$/i.test(k.name)?(k=this.ui.extractGraphModelFromPng(d),d=null!=k&&0<k.length?k:"data:image/png;base64,"+d):d=Base64.decode(d));return g?new GitHubLibrary(this.ui,d,b):new GitHubFile(this.ui,d,b)};GitHubClient.prototype.insertLibrary=function(b,d,c,k,g){this.insertFile(b,d,c,k,!0,g,!1)};GitHubClient.prototype.insertFile=function(b,d,c,k,g,m,f){g=null!=g?g:!1;m=m.split("/");var e=m[0],n=m[1],p=m[2],q=m.slice(3,m.length).join("/");0<q.length&&(q+="/");q+=b;this.checkExists(e+
-"/"+n+"/"+p+"/"+q,!0,mxUtils.bind(this,function(l,m){l?g?(f||(d=Base64.encode(d)),this.showCommitDialog(b,!0,mxUtils.bind(this,function(b){this.writeFile(e,n,p,q,b,d,m,mxUtils.bind(this,function(b){try{var d=JSON.parse(b.getText());c(this.createGitHubFile(e,n,p,d.content,g))}catch(z){k(z)}}),k)}),k)):c(new GitHubFile(this.ui,d,{org:e,repo:n,ref:p,name:b,path:q,sha:m,isNew:!0})):k()}))};GitHubClient.prototype.showCommitDialog=function(b,d,c,k){var e=this.ui.spinner.pause();b=new FilenameDialog(this.ui,
-mxResources.get(d?"addedFile":"updateFile",[b]),mxResources.get("ok"),mxUtils.bind(this,function(b){e();c(b)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){k()}),null,280);this.ui.showDialog(b.container,400,80,!0,!1);b.init()};GitHubClient.prototype.writeFile=function(b,d,c,k,g,m,f,l,n){m.length>=this.maxFileSize?n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(m.length)+" / 1 MB)"}):(c={path:k,branch:decodeURIComponent(c),message:g,content:m},
-null!=f&&(c.sha=f),b=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+k,JSON.stringify(c),"PUT"),this.executeRequest(b,mxUtils.bind(this,function(b){l(b)}),mxUtils.bind(this,function(b){404==b.code&&(b.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,b.code=null);n(b)})))};GitHubClient.prototype.checkExists=function(b,d,c){var e=b.split("/"),g=e[0],m=e[1],f=e[2];b=e.slice(3,e.length).join("/");this.getSha(g,m,b,f,mxUtils.bind(this,function(e){if(d){var f=this.ui.spinner.pause();
-this.ui.confirm(mxResources.get("replaceIt",[b]),function(){f();c(!0,e)},function(){f();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(b){c(!0)}),null,!0)};GitHubClient.prototype.saveFile=function(b,d,c,k,g){var e=b.meta.org,f=b.meta.repo,l=b.meta.ref,n=b.meta.path,p=mxUtils.bind(this,function(k,m){this.writeFile(e,f,l,n,g,m,k,mxUtils.bind(this,function(c){delete b.meta.isNew;
-d(JSON.parse(c.getText()).content.sha)}),mxUtils.bind(this,function(b){c(b)}))}),q=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(n)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){p(b.meta.sha,c)}),c,this.ui.getCurrentFile()!=b?b.getData():null,d.scale,d.border)}else p(b.meta.sha,Base64.encode(b.getData()))});k?this.getSha(e,f,n,l,mxUtils.bind(this,function(c){b.meta.sha=c;q()}),c):q()};GitHubClient.prototype.pickLibrary=
-function(b){this.pickFile(b)};GitHubClient.prototype.pickFolder=function(b){this.showGitHubDialog(!1,b)};GitHubClient.prototype.pickFile=function(b){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("H"+encodeURIComponent(b))});this.showGitHubDialog(!0,b)};GitHubClient.prototype.showGitHubDialog=function(b,d){var c=null,e=null,g=null,m=null,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,
-mxResources.get(b?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.border="1px solid lightgray";n.style.boxSizing="border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="274px";f.appendChild(n);var p=document.createElement("div");p.style.textOverflow="ellipsis";p.style.boxSizing="border-box";p.style.overflow=
-"hidden";p.style.padding="4px";p.style.width="100%";var q=new CustomDialog(this.ui,f,mxUtils.bind(this,function(){d(c+"/"+e+"/"+encodeURIComponent(g)+"/"+m)}));this.ui.showDialog(q.container,420,370,!0,!0);b&&q.okButton.parentNode.removeChild(q.okButton);var t=mxUtils.bind(this,function(b,c,d,e){var f=document.createElement("a");f.setAttribute("title",b);f.style.cursor="pointer";mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e&&(f.style.textDecoration="underline");null!=d&&(b=p.cloneNode(),b.style.padding=
-d,b.appendChild(f),f=b);return f}),u=mxUtils.bind(this,function(b){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(t(c+"/"+e,mxUtils.bind(this,function(){m=null;B()}),null,!0));b||(mxUtils.write(d," / "),d.appendChild(t(decodeURIComponent(g),mxUtils.bind(this,function(){m=null;y()}),null,!0)));if(null!=m&&0<m.length){var f=m.split("/");for(b=0;b<f.length;b++)(function(b){mxUtils.write(d," / ");d.appendChild(t(f[b],mxUtils.bind(this,function(){m=f.slice(0,b+1).join("/");
-z()}),null,!0))})(b)}n.appendChild(d)}),v=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(m=g=e=c=null,B()):this.ui.hideDialog()}),null,{})}),x=null,A=null,z=mxUtils.bind(this,function(f){null==f&&(n.innerHTML="",f=1);var k=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+e+"/contents/"+m+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+f,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));q.okButton.removeAttribute("disabled");
-null!=A&&(mxEvent.removeListener(n,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){z(f+1)});mxEvent.addListener(x,"click",l);this.executeRequest(k,mxUtils.bind(this,function(k){this.ui.spinner.stop();1==f&&(u(),n.appendChild(t("../ [Up]",mxUtils.bind(this,function(){if(""==m)m=null,B();else{var b=m.split("/");
-m=b.slice(0,b.length-1).join("/");z()}}),"4px")));var l=JSON.parse(k.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var y=!0,q=0;k=mxUtils.bind(this,function(f){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k,l){if(f==("dir"==k.type)){var B=p.cloneNode();B.style.backgroundColor=y?Editor.isDarkMode()?"#000000":"#eeeeee":"";y=!y;var u=document.createElement("img");u.src=IMAGE_PATH+"/"+("dir"==k.type?"folder.png":"file.png");u.setAttribute("align","absmiddle");
-u.style.marginRight="4px";u.style.marginTop="-4px";u.width=20;B.appendChild(u);B.appendChild(t(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(m=k.path,z()):b&&"file"==k.type&&(this.ui.hideDialog(),d(c+"/"+e+"/"+encodeURIComponent(g)+"/"+k.path))})));n.appendChild(B);q++}})(l[k],k)});k(!0);b&&k(!1)}}),v,!0)}),y=mxUtils.bind(this,function(b,d){null==b&&(n.innerHTML="",b=1);var f=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+e+"/branches?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(n,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){y(b+1)});mxEvent.addListener(x,"click",k);this.executeRequest(f,mxUtils.bind(this,function(c){this.ui.spinner.stop();1==b&&(u(!0),n.appendChild(t("../ [Up]",mxUtils.bind(this,
-function(){m=null;B()}),"4px")));c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(n,mxResources.get("noFiles"));else if(1==c.length&&d)g=c[0].name,m="",z();else{for(var e=0;e<c.length;e++)mxUtils.bind(this,function(b,c){var d=p.cloneNode();d.style.backgroundColor=0==c%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";d.appendChild(t(b.name,mxUtils.bind(this,function(){g=b.name;m="";z()})));n.appendChild(d)})(c[e],e);100==c.length&&(n.appendChild(x),A=function(){n.scrollTop>=n.scrollHeight-
-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",A))}}),v)}),B=mxUtils.bind(this,function(b){null==b&&(n.innerHTML="",b=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=A&&mxEvent.removeListener(n,"scroll",A);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,
-mxResources.get("more")+"...");var f=mxUtils.bind(this,function(){B(b+1)});mxEvent.addListener(x,"click",f);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==b&&(n.appendChild(t(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(b){if(null!=b){var d=b.split("/");
-if(1<d.length){b=d[0];var f=d[1];3>d.length?(c=b,e=f,m=g=null,y()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(b+"/"+f+"/"+d,mxUtils.bind(this,function(b){this.ui.spinner.stop();c=b.meta.org;e=b.meta.repo;g=decodeURIComponent(b.meta.ref);m="";z()}),mxUtils.bind(this,function(b){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),
-mxResources.get("enterValue"));this.ui.showDialog(b.container,300,80,!0,!1);b.init()}))),mxUtils.br(n),mxUtils.br(n));for(var k=0;k<d.length;k++)mxUtils.bind(this,function(b,d){var f=p.cloneNode();f.style.backgroundColor=0==d%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";f.appendChild(t(b.full_name,mxUtils.bind(this,function(){c=b.owner.login;e=b.name;m="";y(null,!0)})));n.appendChild(f)})(d[k],k)}100==d.length&&(n.appendChild(x),A=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&f()},mxEvent.addListener(n,
+GitHubFile.prototype.save=function(b,e,d,c,g,k){this.doSave(this.getTitle(),e,d,c,g,k)};GitHubFile.prototype.saveAs=function(b,e,d){this.doSave(b,e,d)};GitHubFile.prototype.doSave=function(b,e,d,c,g,k){var n=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=n;this.saveFile(b,!1,e,d,c,g,k)}),d,c,g])};
+GitHubFile.prototype.saveFile=function(b,e,d,c,g,k,n){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var f=mxUtils.bind(this,function(e){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var f=this.getCurrentEtag(),g=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,b);this.fileSaved(g,f,mxUtils.bind(this,function(){this.contentChanged();
+null!=d&&d()}),c)}),mxUtils.bind(this,function(b){this.savingFile=!1;this.isConflict(b)?(this.inConflictState=!0,null!=c&&c({commitMessage:e})):null!=c&&c(b)}),k,e)}catch(q){if(this.savingFile=!1,null!=c)c(q);else throw q;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(f){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;null!=
+d&&d();this.ui.fileLoaded(b)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,f,e)}))});null!=n?f(n):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(b){f(b)}),c)}else null!=d&&d()};GitHubLibrary=function(b,e,d){GitHubFile.call(this,b,e,d)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(b,d){DrawioClient.call(this,b,d||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.location.protocol+
+"//"+window.location.host+"/github2";GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(e){b=e};GitHubClient.prototype.updateUser=function(e,d,c){var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),n=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),f=this.authToken+" "+b;n.setRequestHeaders=function(b,c){b.setRequestHeader("Authorization",
+f)};n.send(mxUtils.bind(this,function(){window.clearTimeout(k);g&&(401===n.getStatus()?c?d({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,d,!0)}),d)):200>n.getStatus()||300<=n.getStatus()?d({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(n.getText()))),e()))}),d)};GitHubClient.prototype.createUser=function(b){return new DrawioUser(b.id,b.email,b.name)};GitHubClient.prototype.authenticate=
+function(b,d){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),b,d):null!=d&&d(c)}),d)};GitHubClient.prototype.authenticateStep2=function(e,d,c){if(null==window.onGitHubCallback){var g=mxUtils.bind(this,function(){var k=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(n,f){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&scope="+
+this.scope+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(e,m){k?(window.onGitHubCallback=null,k=!1,null==e?c({message:mxResources.get("accessDenied"),retry:g}):(null!=f&&f(),b=e.access_token,this.setUser(null),n&&this.setPersistentToken("remembered"),d(),null!=m&&m.close())):null!=m&&m.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:g})}),mxUtils.bind(this,function(){k&&
+(window.onGitHubCallback=null,k=!1,c({message:mxResources.get("accessDenied"),retry:g}))}))});g()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(b,d){try{var c=JSON.parse(b.getText());null!=c&&null!=c.message&&(d=c.message)}catch(g){}return d};GitHubClient.prototype.executeRequest=function(e,d,c,g){var k=mxUtils.bind(this,function(f){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),p=this.authToken+
+" "+b;e.setRequestHeaders=function(b,c){b.setRequestHeader("Authorization",p)};e.send(mxUtils.bind(this,function(){window.clearTimeout(m);if(l)if(200<=e.getStatus()&&299>=e.getStatus()||g&&404==e.getStatus())d(e);else if(401===e.getStatus())f?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){n(!0)},c)})}):this.authenticate(function(){k(!0)},c);else if(403===e.getStatus()){var b=!1;try{var p=JSON.parse(e.getText());null!=p&&
+null!=p.errors&&0<p.errors.length&&(b="too_large"==p.errors[0].code)}catch(u){}c({message:mxResources.get(b?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(b){window.clearTimeout(m);l&&c(b)}))}),n=mxUtils.bind(this,function(b){null==
+this.user?this.updateUser(function(){n(!0)},c,b):k(b)});null==b?this.authenticate(function(){n(!0)},c):n(!1)};GitHubClient.prototype.getLibrary=function(b,d,c){this.getFile(b,d,c,!0)};GitHubClient.prototype.getSha=function(b,d,c,g,k,n){var e="&t="+(new Date).getTime();b=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+c+"?ref="+g+e,null,"HEAD");this.executeRequest(b,mxUtils.bind(this,function(b){try{k(b.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(m){n(m)}}),n)};GitHubClient.prototype.getFile=
+function(e,d,c,g,k){g=null!=g?g:!1;var n=e.split("/"),f=n[0],l=n[1],m=n[2];e=n.slice(3,n.length).join("/");n=/\.png$/i.test(e);if(!k&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&n))if(null!=b){k=this.baseUrl+"/repos/"+f+"/"+l+"/contents/"+e+"?ref="+m;var p={Authorization:"token "+b},n=e.split("/");this.ui.convertFile(k,0<n.length?n[n.length-1]:e,null,this.extension,d,c,null,p)}else c({message:mxResources.get("accessDenied")});else n="&t="+(new Date).getTime(),
+e=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+l+"/contents/"+e+"?ref="+m+n,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(b){try{d(this.createGitHubFile(f,l,m,JSON.parse(b.getText()),g))}catch(t){c(t)}}),c)};GitHubClient.prototype.createGitHubFile=function(b,d,c,g,k){b={org:b,repo:d,ref:c,name:g.name,path:g.path,sha:g.sha,html_url:g.html_url,download_url:g.download_url};d=g.content;"base64"===g.encoding&&(/\.jpe?g$/i.test(g.name)?d="data:image/jpeg;base64,"+d:/\.gif$/i.test(g.name)?
+d="data:image/gif;base64,"+d:/\.png$/i.test(g.name)?(g=this.ui.extractGraphModelFromPng(d),d=null!=g&&0<g.length?g:"data:image/png;base64,"+d):d=Base64.decode(d));return k?new GitHubLibrary(this.ui,d,b):new GitHubFile(this.ui,d,b)};GitHubClient.prototype.insertLibrary=function(b,d,c,g,k){this.insertFile(b,d,c,g,!0,k,!1)};GitHubClient.prototype.insertFile=function(b,d,c,g,k,n,f){k=null!=k?k:!1;n=n.split("/");var e=n[0],m=n[1],p=n[2],q=n.slice(3,n.length).join("/");0<q.length&&(q+="/");q+=b;this.checkExists(e+
+"/"+m+"/"+p+"/"+q,!0,mxUtils.bind(this,function(l,n){l?k?(f||(d=Base64.encode(d)),this.showCommitDialog(b,!0,mxUtils.bind(this,function(b){this.writeFile(e,m,p,q,b,d,n,mxUtils.bind(this,function(b){try{var d=JSON.parse(b.getText());c(this.createGitHubFile(e,m,p,d.content,k))}catch(z){g(z)}}),g)}),g)):c(new GitHubFile(this.ui,d,{org:e,repo:m,ref:p,name:b,path:q,sha:n,isNew:!0})):g()}))};GitHubClient.prototype.showCommitDialog=function(b,d,c,g){var e=this.ui.spinner.pause();b=new FilenameDialog(this.ui,
+mxResources.get(d?"addedFile":"updateFile",[b]),mxResources.get("ok"),mxUtils.bind(this,function(b){e();c(b)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){g()}),null,280);this.ui.showDialog(b.container,400,80,!0,!1);b.init()};GitHubClient.prototype.writeFile=function(b,d,c,g,k,n,f,l,m){n.length>=this.maxFileSize?m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(n.length)+" / 1 MB)"}):(c={path:g,branch:decodeURIComponent(c),message:k,content:n},
+null!=f&&(c.sha=f),b=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+g,JSON.stringify(c),"PUT"),this.executeRequest(b,mxUtils.bind(this,function(b){l(b)}),mxUtils.bind(this,function(b){404==b.code&&(b.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,b.code=null);m(b)})))};GitHubClient.prototype.checkExists=function(b,d,c){var e=b.split("/"),k=e[0],n=e[1],f=e[2];b=e.slice(3,e.length).join("/");this.getSha(k,n,b,f,mxUtils.bind(this,function(e){if(d){var f=this.ui.spinner.pause();
+this.ui.confirm(mxResources.get("replaceIt",[b]),function(){f();c(!0,e)},function(){f();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(b){c(!0)}),null,!0)};GitHubClient.prototype.saveFile=function(b,d,c,g,k){var e=b.meta.org,f=b.meta.repo,l=b.meta.ref,m=b.meta.path,p=mxUtils.bind(this,function(g,n){this.writeFile(e,f,l,m,k,n,g,mxUtils.bind(this,function(c){delete b.meta.isNew;
+d(JSON.parse(c.getText()).content.sha)}),mxUtils.bind(this,function(b){c(b)}))}),q=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(m)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){p(b.meta.sha,c)}),c,this.ui.getCurrentFile()!=b?b.getData():null,d.scale,d.border)}else p(b.meta.sha,Base64.encode(b.getData()))});g?this.getSha(e,f,m,l,mxUtils.bind(this,function(c){b.meta.sha=c;q()}),c):q()};GitHubClient.prototype.pickLibrary=
+function(b){this.pickFile(b)};GitHubClient.prototype.pickFolder=function(b){this.showGitHubDialog(!1,b)};GitHubClient.prototype.pickFile=function(b){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("H"+encodeURIComponent(b))});this.showGitHubDialog(!0,b)};GitHubClient.prototype.showGitHubDialog=function(b,d){var c=null,e=null,k=null,n=null,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,
+mxResources.get(b?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.border="1px solid lightgray";m.style.boxSizing="border-box";m.style.padding="4px";m.style.overflow="auto";m.style.lineHeight="1.2em";m.style.height="274px";f.appendChild(m);var p=document.createElement("div");p.style.textOverflow="ellipsis";p.style.boxSizing="border-box";p.style.overflow=
+"hidden";p.style.padding="4px";p.style.width="100%";var q=new CustomDialog(this.ui,f,mxUtils.bind(this,function(){d(c+"/"+e+"/"+encodeURIComponent(k)+"/"+n)}));this.ui.showDialog(q.container,420,370,!0,!0);b&&q.okButton.parentNode.removeChild(q.okButton);var t=mxUtils.bind(this,function(b,c,d,e){var f=document.createElement("a");f.setAttribute("title",b);f.style.cursor="pointer";mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e&&(f.style.textDecoration="underline");null!=d&&(b=p.cloneNode(),b.style.padding=
+d,b.appendChild(f),f=b);return f}),u=mxUtils.bind(this,function(b){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(t(c+"/"+e,mxUtils.bind(this,function(){n=null;B()}),null,!0));b||(mxUtils.write(d," / "),d.appendChild(t(decodeURIComponent(k),mxUtils.bind(this,function(){n=null;x()}),null,!0)));if(null!=n&&0<n.length){var f=n.split("/");for(b=0;b<f.length;b++)(function(b){mxUtils.write(d," / ");d.appendChild(t(f[b],mxUtils.bind(this,function(){n=f.slice(0,b+1).join("/");
+z()}),null,!0))})(b)}m.appendChild(d)}),v=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(n=k=e=c=null,B()):this.ui.hideDialog()}),null,{})}),y=null,A=null,z=mxUtils.bind(this,function(f){null==f&&(m.innerHTML="",f=1);var g=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+e+"/contents/"+n+"?ref="+encodeURIComponent(k)+"&per_page=100&page="+f,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));q.okButton.removeAttribute("disabled");
+null!=A&&(mxEvent.removeListener(m,"scroll",A),A=null);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");y.style.display="block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){z(f+1)});mxEvent.addListener(y,"click",l);this.executeRequest(g,mxUtils.bind(this,function(g){this.ui.spinner.stop();1==f&&(u(),m.appendChild(t("../ [Up]",mxUtils.bind(this,function(){if(""==n)n=null,B();else{var b=n.split("/");
+n=b.slice(0,b.length-1).join("/");z()}}),"4px")));var l=JSON.parse(g.getText());if(null==l||0==l.length)mxUtils.write(m,mxResources.get("noFiles"));else{var x=!0,q=0;g=mxUtils.bind(this,function(f){for(var g=0;g<l.length;g++)mxUtils.bind(this,function(g,l){if(f==("dir"==g.type)){var B=p.cloneNode();B.style.backgroundColor=x?Editor.isDarkMode()?"#000000":"#eeeeee":"";x=!x;var u=document.createElement("img");u.src=IMAGE_PATH+"/"+("dir"==g.type?"folder.png":"file.png");u.setAttribute("align","absmiddle");
+u.style.marginRight="4px";u.style.marginTop="-4px";u.width=20;B.appendChild(u);B.appendChild(t(g.name+("dir"==g.type?"/":""),mxUtils.bind(this,function(){"dir"==g.type?(n=g.path,z()):b&&"file"==g.type&&(this.ui.hideDialog(),d(c+"/"+e+"/"+encodeURIComponent(k)+"/"+g.path))})));m.appendChild(B);q++}})(l[g],g)});g(!0);b&&g(!1)}}),v,!0)}),x=mxUtils.bind(this,function(b,d){null==b&&(m.innerHTML="",b=1);var f=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+e+"/branches?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(m,"scroll",A),A=null);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");y.style.display="block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var g=mxUtils.bind(this,function(){x(b+1)});mxEvent.addListener(y,"click",g);this.executeRequest(f,mxUtils.bind(this,function(c){this.ui.spinner.stop();1==b&&(u(!0),m.appendChild(t("../ [Up]",mxUtils.bind(this,
+function(){n=null;B()}),"4px")));c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(m,mxResources.get("noFiles"));else if(1==c.length&&d)k=c[0].name,n="",z();else{for(var e=0;e<c.length;e++)mxUtils.bind(this,function(b,c){var d=p.cloneNode();d.style.backgroundColor=0==c%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";d.appendChild(t(b.name,mxUtils.bind(this,function(){k=b.name;n="";z()})));m.appendChild(d)})(c[e],e);100==c.length&&(m.appendChild(y),A=function(){m.scrollTop>=m.scrollHeight-
+m.offsetHeight&&g()},mxEvent.addListener(m,"scroll",A))}}),v)}),B=mxUtils.bind(this,function(b){null==b&&(m.innerHTML="",b=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=A&&mxEvent.removeListener(m,"scroll",A);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");y.style.display="block";y.style.cursor="pointer";mxUtils.write(y,
+mxResources.get("more")+"...");var f=mxUtils.bind(this,function(){B(b+1)});mxEvent.addListener(y,"click",f);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==b&&(m.appendChild(t(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(b){if(null!=b){var d=b.split("/");
+if(1<d.length){b=d[0];var f=d[1];3>d.length?(c=b,e=f,n=k=null,x()):this.ui.spinner.spin(m,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(b+"/"+f+"/"+d,mxUtils.bind(this,function(b){this.ui.spinner.stop();c=b.meta.org;e=b.meta.repo;k=decodeURIComponent(b.meta.ref);n="";z()}),mxUtils.bind(this,function(b){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),
+mxResources.get("enterValue"));this.ui.showDialog(b.container,300,80,!0,!1);b.init()}))),mxUtils.br(m),mxUtils.br(m));for(var g=0;g<d.length;g++)mxUtils.bind(this,function(b,d){var f=p.cloneNode();f.style.backgroundColor=0==d%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";f.appendChild(t(b.full_name,mxUtils.bind(this,function(){c=b.owner.login;e=b.name;n="";x(null,!0)})));m.appendChild(f)})(d[g],g)}100==d.length&&(m.appendChild(y),A=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&f()},mxEvent.addListener(m,
"scroll",A))}),v)});B()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,d){DrawioFile.call(this,b,e);this.meta=d;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(b,e,d){this.doSave(this.getTitle(),e,d)};TrelloFile.prototype.saveAs=function(b,e,d){this.doSave(b,e,d)};TrelloFile.prototype.doSave=function(b,e,d){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,e,d)}),d])};
-TrelloFile.prototype.saveFile=function(b,e,d,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(k){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=k;this.contentChanged();null!=d&&d();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,d,c))}),mxUtils.bind(this,
-function(b){this.savingFile=!1;null!=c&&c(b)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(k){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(g){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(g);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,d,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,k)}))):null!=d&&d()};TrelloLibrary=function(b,e,d){TrelloFile.call(this,b,e,d)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
+TrelloFile.prototype.saveFile=function(b,e,d,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(g){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=g;this.contentChanged();null!=d&&d();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,d,c))}),mxUtils.bind(this,
+function(b){this.savingFile=!1;null!=c&&c(b)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(g){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(g){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(g);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,d,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,g)}))):null!=d&&d()};TrelloLibrary=function(b,e,d){TrelloFile.call(this,b,e,d)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
TrelloClient.prototype.authenticate=function(b,e,d){d&&this.logout();d=mxUtils.bind(this,function(c,d){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){null!=d&&d();b()},error:function(){null!=d&&d();null!=e&&e(mxResources.get("loggedOut"))}})});this.isAuthorized()?d(!0):this.ui.showAuthDialog(this,!0,d)};TrelloClient.prototype.getLibrary=function(b,e,d){this.getFile(b,e,d,!1,!0)};
-TrelloClient.prototype.getFile=function(b,e,d,c,k){k=null!=k?k:!1;var g=mxUtils.bind(this,function(){var c=b.split(this.SEPARATOR),f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;d({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);Trello.cards.get(c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(c){window.clearTimeout(l);if(f){var m=/\.png$/i.test(c.name),n={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(c.name)||
-/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&m?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(c.url),c.name,c.mimeType,this.extension,e,d,null,n):(f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(c.url),mxUtils.bind(this,function(d){window.clearTimeout(l);if(f){c.compoundId=b;if(0<(m?d.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(d);null!=g&&0<g.length&&
-(d=g)}k?e(new TrelloLibrary(this.ui,d,c)):e(new TrelloFile(this.ui,d,c))}}),mxUtils.bind(this,function(b,c){window.clearTimeout(l);f&&(401==c.status?this.authenticate(g,d,!0):d())}),m||null!=c.mimeType&&"image/"==c.mimeType.substring(0,6),null,null,null,n))}}),mxUtils.bind(this,function(b){window.clearTimeout(l);f&&(null!=b&&401==b.status?this.authenticate(g,d,!0):d())}))});this.authenticate(g,d)};TrelloClient.prototype.insertLibrary=function(b,e,d,c,k){this.insertFile(b,e,d,c,!0,k)};
-TrelloClient.prototype.insertFile=function(b,e,d,c,k,g){k=null!=k?k:!1;var m=mxUtils.bind(this,function(){var f=mxUtils.bind(this,function(f){this.writeFile(b,f,g,mxUtils.bind(this,function(b){k?d(new TrelloLibrary(this.ui,e,b)):d(new TrelloFile(this.ui,e,b))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){f(this.ui.base64ToBlob(b,"image/png"))}),c,e):f(e)});this.authenticate(m,c)};
-TrelloClient.prototype.saveFile=function(b,e,d){var c=b.meta.compoundId.split(this.SEPARATOR),k=mxUtils.bind(this,function(k){this.writeFile(b.meta.name,k,c[0],function(b){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){e(b)}),mxUtils.bind(this,function(b){null!=b&&401==b.status?this.authenticate(g,d,!0):d()}))},d)}),g=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){k(this.ui.base64ToBlob(b,
-"image/png"))}),d,this.ui.getCurrentFile()!=b?b.getData():null):k(b.getData())});this.authenticate(g,d)};
-TrelloClient.prototype.writeFile=function(b,e,d,c,k){if(null!=b&&null!=e)if(e.length>=this.maxFileSize)k({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var g=mxUtils.bind(this,function(){var m=!0,f=window.setTimeout(mxUtils.bind(this,function(){m=!1;k({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout),l=new FormData;l.append("key",Trello.key());l.append("token",Trello.token());l.append("file","string"===typeof e?new Blob([e]):e,b);l.append("name",
-b);var n=new XMLHttpRequest;n.responseType="json";n.onreadystatechange=mxUtils.bind(this,function(){if(4===n.readyState&&(window.clearTimeout(f),m))if(200==n.status){var b=n.response;b.compoundId=d+this.SEPARATOR+b.id;c(b)}else 401==n.status?this.authenticate(g,k,!0):k()});n.open("POST",this.baseUrl+"cards/"+d+"/attachments");n.send(l)});this.authenticate(g,k)}else k({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
+TrelloClient.prototype.getFile=function(b,e,d,c,g){g=null!=g?g:!1;var k=mxUtils.bind(this,function(){var c=b.split(this.SEPARATOR),f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;d({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout);Trello.cards.get(c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(c){window.clearTimeout(l);if(f){var n=/\.png$/i.test(c.name),m={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(c.name)||
+/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&n?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(c.url),c.name,c.mimeType,this.extension,e,d,null,m):(f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(c.url),mxUtils.bind(this,function(d){window.clearTimeout(l);if(f){c.compoundId=b;if(0<(n?d.lastIndexOf(","):-1)){var k=this.ui.extractGraphModelFromPng(d);null!=k&&0<k.length&&
+(d=k)}g?e(new TrelloLibrary(this.ui,d,c)):e(new TrelloFile(this.ui,d,c))}}),mxUtils.bind(this,function(b,c){window.clearTimeout(l);f&&(401==c.status?this.authenticate(k,d,!0):d())}),n||null!=c.mimeType&&"image/"==c.mimeType.substring(0,6),null,null,null,m))}}),mxUtils.bind(this,function(b){window.clearTimeout(l);f&&(null!=b&&401==b.status?this.authenticate(k,d,!0):d())}))});this.authenticate(k,d)};TrelloClient.prototype.insertLibrary=function(b,e,d,c,g){this.insertFile(b,e,d,c,!0,g)};
+TrelloClient.prototype.insertFile=function(b,e,d,c,g,k){g=null!=g?g:!1;var n=mxUtils.bind(this,function(){var f=mxUtils.bind(this,function(f){this.writeFile(b,f,k,mxUtils.bind(this,function(b){g?d(new TrelloLibrary(this.ui,e,b)):d(new TrelloFile(this.ui,e,b))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){f(this.ui.base64ToBlob(b,"image/png"))}),c,e):f(e)});this.authenticate(n,c)};
+TrelloClient.prototype.saveFile=function(b,e,d){var c=b.meta.compoundId.split(this.SEPARATOR),g=mxUtils.bind(this,function(g){this.writeFile(b.meta.name,g,c[0],function(b){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){e(b)}),mxUtils.bind(this,function(b){null!=b&&401==b.status?this.authenticate(k,d,!0):d()}))},d)}),k=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){g(this.ui.base64ToBlob(b,
+"image/png"))}),d,this.ui.getCurrentFile()!=b?b.getData():null):g(b.getData())});this.authenticate(k,d)};
+TrelloClient.prototype.writeFile=function(b,e,d,c,g){if(null!=b&&null!=e)if(e.length>=this.maxFileSize)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var k=mxUtils.bind(this,function(){var n=!0,f=window.setTimeout(mxUtils.bind(this,function(){n=!1;g({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout),l=new FormData;l.append("key",Trello.key());l.append("token",Trello.token());l.append("file","string"===typeof e?new Blob([e]):e,b);l.append("name",
+b);var m=new XMLHttpRequest;m.responseType="json";m.onreadystatechange=mxUtils.bind(this,function(){if(4===m.readyState&&(window.clearTimeout(f),n))if(200==m.status){var b=m.response;b.compoundId=d+this.SEPARATOR+b.id;c(b)}else 401==m.status?this.authenticate(k,g,!0):g()});m.open("POST",this.baseUrl+"cards/"+d+"/attachments");m.send(l)});this.authenticate(k,g)}else g({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(b){this.ui.showError(mxResources.get("error"),b)}))};TrelloClient.prototype.pickFile=function(b,e){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("T"+encodeURIComponent(b))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(b){this.ui.showError(mxResources.get("error"),b,mxResources.get("ok"))}))};
-TrelloClient.prototype.showTrelloDialog=function(b,e){var d=null,c="@me",k=0,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.height="224px";var m=document.createElement("h3");mxUtils.write(m,b?mxResources.get("selectFile"):mxResources.get("selectCard"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="auto";f.style.height=
-"194px";g.appendChild(f);g=new CustomDialog(this.ui,g);this.ui.showDialog(g.container,340,290,!0,!0);g.okButton.parentNode.removeChild(g.okButton);var l=mxUtils.bind(this,function(b,c,d){k++;var e=document.createElement("div");e.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==k%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var f=document.createElement("a");f.style.cursor="pointer";if(null!=d){var g=document.createElement("img");
-g.src=d.url;g.width=d.width;g.height=d.height;g.style="border: 1px solid black;margin:5px;vertical-align:middle";f.appendChild(g)}mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e.appendChild(f);return e}),n=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),p=mxUtils.bind(this,function(){k=0;f.innerHTML="";this.ui.spinner.spin(f,mxResources.get("loading"));var b=mxUtils.bind(this,function(){Trello.cards.get(d+
+TrelloClient.prototype.showTrelloDialog=function(b,e){var d=null,c="@me",g=0,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="224px";var n=document.createElement("h3");mxUtils.write(n,b?mxResources.get("selectFile"):mxResources.get("selectCard"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="auto";f.style.height=
+"194px";k.appendChild(f);k=new CustomDialog(this.ui,k);this.ui.showDialog(k.container,340,290,!0,!0);k.okButton.parentNode.removeChild(k.okButton);var l=mxUtils.bind(this,function(b,c,d){g++;var e=document.createElement("div");e.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==g%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var f=document.createElement("a");f.style.cursor="pointer";if(null!=d){var k=document.createElement("img");
+k.src=d.url;k.width=d.width;k.height=d.height;k.style="border: 1px solid black;margin:5px;vertical-align:middle";f.appendChild(k)}mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e.appendChild(f);return e}),m=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),p=mxUtils.bind(this,function(){g=0;f.innerHTML="";this.ui.spinner.spin(f,mxResources.get("loading"));var b=mxUtils.bind(this,function(){Trello.cards.get(d+
"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(b){this.ui.spinner.stop();f.appendChild(l("../ [Up]",mxUtils.bind(this,function(){u()})));mxUtils.br(f);null==b||0==b.length?mxUtils.write(f,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var c=0;c<b.length;c++)mxUtils.bind(this,function(b){f.appendChild(l(b.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(d+this.SEPARATOR+b.id)}),null!=b.previews?b.previews[0]:null))})(b[c])})()}),mxUtils.bind(this,function(c){401==
-c.status?this.authenticate(b,n,!0):null!=n&&n(c)}))});b()}),q=null,t=null,u=mxUtils.bind(this,function(g){null==g&&(k=0,f.innerHTML="",g=1);this.ui.spinner.spin(f,mxResources.get("loading"));null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var m=mxUtils.bind(this,function(){mxEvent.removeListener(f,"scroll",t);u(g+1)});mxEvent.addListener(q,"click",m);var v=mxUtils.bind(this,
-function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:g-1},mxUtils.bind(this,function(k){this.ui.spinner.stop();k=null!=k?k.cards:null;if(null==k||0==k.length)mxUtils.write(f,mxResources.get("noFiles"));else{1==g&&(f.appendChild(l(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(b){null!=b&&(c=b,u())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(b.container,300,80,!0,!1);b.init()}))),mxUtils.br(f));for(var n=0;n<k.length;n++)mxUtils.bind(this,function(c){f.appendChild(l(c.name,mxUtils.bind(this,function(){b?(d=c.id,p()):(this.ui.hideDialog(),e(c.id))})))})(k[n]);100==k.length&&(f.appendChild(q),t=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&m()},mxEvent.addListener(f,"scroll",t))}}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(v,n,!0):null!=n&&n({message:b.responseText})}))});v()});u()};
+c.status?this.authenticate(b,m,!0):null!=m&&m(c)}))});b()}),q=null,t=null,u=mxUtils.bind(this,function(k){null==k&&(g=0,f.innerHTML="",k=1);this.ui.spinner.spin(f,mxResources.get("loading"));null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var n=mxUtils.bind(this,function(){mxEvent.removeListener(f,"scroll",t);u(k+1)});mxEvent.addListener(q,"click",n);var v=mxUtils.bind(this,
+function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:k-1},mxUtils.bind(this,function(g){this.ui.spinner.stop();g=null!=g?g.cards:null;if(null==g||0==g.length)mxUtils.write(f,mxResources.get("noFiles"));else{1==k&&(f.appendChild(l(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(b){null!=b&&(c=b,u())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(b.container,300,80,!0,!1);b.init()}))),mxUtils.br(f));for(var m=0;m<g.length;m++)mxUtils.bind(this,function(c){f.appendChild(l(c.name,mxUtils.bind(this,function(){b?(d=c.id,p()):(this.ui.hideDialog(),e(c.id))})))})(g[m]);100==g.length&&(f.appendChild(q),t=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&n()},mxEvent.addListener(f,"scroll",t))}}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(v,m,!0):null!=m&&m({message:b.responseText})}))});v()});u()};
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(b){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(b,e,d){GitHubFile.call(this,b,e,d);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};
GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(b){return null!=b&&400==b.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(b){return b.last_commit_id};
GitLabFile.prototype.setDescriptorEtag=function(b,e){b.last_commit_id=e};GitLabLibrary=function(b,e,d){GitLabFile.call(this,b,e,d)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(b){GitHubClient.call(this,b,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/gitlab";GitLabClient.prototype.authenticate=
-function(b,d){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),b,d):null!=d&&d(c)}),d)};GitLabClient.prototype.authenticateStep2=function(e,d,c){if(null==window.onGitLabCallback){var k=mxUtils.bind(this,function(){var g=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+
-e),null,"GET")).send(mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?(b=JSON.parse(e.getText()).access_token,this.setToken(b),this.setUser(null),d()):(this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==e.getStatus()?k():c({message:mxResources.get("accessDenied"),retry:k}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,f){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+
-encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(e,n){g?(window.onGitLabCallback=null,g=!1,null==e?c({message:mxResources.get("accessDenied"),retry:k}):(null!=f&&f(),b=e.access_token,this.setToken(b),this.setUser(null),m&&this.setPersistentToken("remembered"),d(),null!=n&&n.close())):null!=n&&n.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),
-retry:k})}),mxUtils.bind(this,function(){g&&(window.onGitLabCallback=null,g=!1,c({message:mxResources.get("accessDenied"),retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,d,c,k){var g=mxUtils.bind(this,function(f){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),p=this.authToken+" "+b;e.setRequestHeaders=function(b,c){b.setRequestHeader("Authorization",
-p);b.setRequestHeader("PRIVATE_TOKEN",p);b.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(l)if(200<=e.getStatus()&&299>=e.getStatus()||k&&404==e.getStatus())d(e);else if(401===e.getStatus())f?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},c)})}):this.authenticate(function(){g(!0)},c);else if(403===e.getStatus()){var b=!1;try{var p=JSON.parse(e.getText());null!=p&&
-null!=p.errors&&0<p.errors.length&&(b="too_large"==p.errors[0].code)}catch(u){}c({message:mxResources.get(b?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):400===e.getStatus()?c({status:400}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(b){window.clearTimeout(n);l&&c(b)}))}),m=mxUtils.bind(this,function(b){null==this.user?this.updateUser(function(){m(!0)},
-c,b):g(b)});null==b?this.authenticate(function(){m(!0)},c):m(!1)};GitLabClient.prototype.getRefIndex=function(b,d,c,k,g,m){if(null!=g)c(b,g);else{var e=b.length-2,l=mxUtils.bind(this,function(){if(2>e)k({message:mxResources.get("fileNotFound")});else{var f=Math.max(e-1,0),g=b.slice(0,f).join("/"),f=b[f],q=b[e],t=b.slice(e+1,b.length).join("/"),g=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+f)+"/repository/"+(d?m?"branches?per_page=1&page=1&ref="+q:"tree?path="+t+"&ref="+q:"files/"+encodeURIComponent(t)+
-"?ref="+q),u=new mxXmlRequest(g,null,"HEAD");this.executeRequest(u,mxUtils.bind(this,function(){200==u.getStatus()?c(b,e):k({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==u.getStatus()?(e--,l()):k({message:mxResources.get("fileNotFound")})}))}});l()}};GitLabClient.prototype.getFile=function(e,d,c,k,g,m){k=null!=k?k:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(f,l){var m=Math.max(l-1,0),p=f.slice(0,m).join("/"),q=f[m],t=f[l];e=f.slice(l+1,f.length).join("/");
-m=/\.png$/i.test(e);if(!g&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&m))if(null!=b){var m="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/files/"+encodeURIComponent(e)+"?ref="+t;f=e.split("/");this.ui.convertFile(u+m,0<f.length?f[f.length-1]:e,null,this.extension,d,c,mxUtils.bind(this,function(b,c,d){b=new mxXmlRequest(b,null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){try{c(this.getFileContent(JSON.parse(b.getText())))}catch(y){d(y)}}),
-d)}))}else c({message:mxResources.get("accessDenied")});else m="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/files/"+encodeURIComponent(e)+"?ref="+t,m=new mxXmlRequest(u+m,null,"GET"),this.executeRequest(m,mxUtils.bind(this,function(b){try{d(this.createGitLabFile(p,q,t,JSON.parse(b.getText()),k,l))}catch(x){c(x)}}),c)}),c,m)};GitLabClient.prototype.getFileContent=function(b){var d=b.file_name,c=b.content;"base64"===b.encoding&&(/\.jpe?g$/i.test(d)?
-c="data:image/jpeg;base64,"+c:/\.gif$/i.test(d)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(d)?c="data:application/pdf;base64,"+c:/\.png$/i.test(d)?(b=this.ui.extractGraphModelFromPng(c),c=null!=b&&0<b.length?b:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(b,d,c,k,g,m){var e=DRAWIO_GITLAB_URL+"/";b={org:b,repo:d,ref:c,name:k.file_name,path:k.file_path,html_url:e+b+"/"+d+"/blob/"+c+"/"+k.file_path,download_url:e+b+"/"+d+"/raw/"+c+"/"+k.file_path+
-"?inline=false",last_commit_id:k.last_commit_id,refPos:m};k=this.getFileContent(k);return g?new GitLabLibrary(this.ui,k,b):new GitLabFile(this.ui,k,b)};GitLabClient.prototype.insertFile=function(b,d,c,k,g,m,f){g=null!=g?g:!1;m=m.split("/");this.getRefIndex(m,!0,mxUtils.bind(this,function(e,m){var l=Math.max(m-1,0),n=e.slice(0,l).join("/"),t=e[l],u=e[m];path=e.slice(m+1,e.length).join("/");0<path.length&&(path+="/");path+=b;this.checkExists(n+"/"+t+"/"+u+"/"+path,!0,mxUtils.bind(this,function(e,l){if(e)if(g)f||
-(d=Base64.encode(d)),this.showCommitDialog(b,!0,mxUtils.bind(this,function(b){this.writeFile(n,t,u,path,b,d,l,mxUtils.bind(this,function(b){try{var d=JSON.parse(b.getText());c(this.createGitLabFile(n,t,u,d.content,g,m))}catch(C){k(C)}}),k)}),k);else{var p=DRAWIO_GITLAB_URL+"/";c(new GitLabFile(this.ui,d,{org:n,repo:t,ref:u,name:b,path:path,html_url:p+n+"/"+t+"/blob/"+u+"/"+path,download_url:p+n+"/"+t+"/raw/"+u+"/"+path+"?inline=false",refPos:m,last_commit_id:l,isNew:!0}))}else k()}))}),k,null,4>=
-m.length)};GitLabClient.prototype.checkExists=function(b,d,c){this.getFile(b,mxUtils.bind(this,function(e){if(d){var g=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[b]),function(){g();c(!0,e.getCurrentEtag())},function(){g();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(b){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(b,d,c,k,g,m,
-f,l,n){if(m.length>=this.maxFileSize)n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(m.length)+" / 10 MB)"});else{var e="POST";c={path:encodeURIComponent(k),branch:decodeURIComponent(c),commit_message:g,content:m,encoding:"base64"};null!=f&&(c.last_commit_id=f,e="PUT");b=this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+d)+"/repository/files/"+encodeURIComponent(k);e=new mxXmlRequest(b,JSON.stringify(c),e);this.executeRequest(e,mxUtils.bind(this,function(b){l(b)}),n)}};
-GitLabClient.prototype.saveFile=function(b,d,c,k,g){var e=b.meta.org,f=b.meta.repo,l=b.meta.ref,n=b.meta.path,p=mxUtils.bind(this,function(k,m){this.writeFile(e,f,l,n,g,m,k,mxUtils.bind(this,function(g){delete b.meta.isNew;this.getFile(e+"/"+f+"/"+l+"/"+n,mxUtils.bind(this,function(c){c.getData()==b.getData()?d(c.getCurrentEtag()):d({content:b.getCurrentEtag()})}),c,null,null,b.meta.refPos)}),c)}),q=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(n)){var d=this.ui.getPngFileProperties(this.ui.fileNode);
-this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){p(b.meta.last_commit_id,c)}),c,this.ui.getCurrentFile()!=b?b.getData():null,d.scale,d.border)}else p(b.meta.last_commit_id,Base64.encode(b.getData()))});k?this.getFile(e+"/"+f+"/"+l+"/"+n,mxUtils.bind(this,function(c){b.meta.last_commit_id=c.meta.last_commit_id;q()}),c):q()};GitLabClient.prototype.pickFolder=function(b){this.showGitLabDialog(!1,b)};GitLabClient.prototype.pickFile=function(b){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("A"+
-encodeURIComponent(b))});this.showGitLabDialog(!0,b)};GitLabClient.prototype.showGitLabDialog=function(e,d){var c=null,k=null,g=null,m=null,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(e?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var n=document.createElement("div");n.style.whiteSpace=
-"nowrap";n.style.border="1px solid lightgray";n.style.boxSizing="border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="274px";f.appendChild(n);var p=document.createElement("div");p.style.textOverflow="ellipsis";p.style.boxSizing="border-box";p.style.overflow="hidden";p.style.padding="4px";p.style.width="100%";var q=new CustomDialog(this.ui,f,mxUtils.bind(this,function(){d(c+"/"+k+"/"+encodeURIComponent(g)+"/"+m)}));this.ui.showDialog(q.container,420,
-370,!0,!0);e&&q.okButton.parentNode.removeChild(q.okButton);var t=mxUtils.bind(this,function(b,c,d,e){var f=document.createElement("a");f.setAttribute("title",b);f.style.cursor="pointer";mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e&&(f.style.textDecoration="underline");null!=d&&(b=p.cloneNode(),b.style.padding=d,b.appendChild(f),f=b);return f}),u=mxUtils.bind(this,function(b){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(t(c+"/"+k,mxUtils.bind(this,function(){m=
-null;B()}),null,!0));b||(mxUtils.write(d," / "),d.appendChild(t(decodeURIComponent(g),mxUtils.bind(this,function(){m=null;y()}),null,!0)));if(null!=m&&0<m.length){var e=m.split("/");for(b=0;b<e.length;b++)(function(b){mxUtils.write(d," / ");d.appendChild(t(e[b],mxUtils.bind(this,function(){m=e.slice(0,b+1).join("/");z()}),null,!0))})(b)}n.appendChild(d)}),v=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(m=g=k=c=null,
-B()):this.ui.hideDialog()}))}),x=null,A=null,z=mxUtils.bind(this,function(b){null==b&&(n.innerHTML="",b=1);var f=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+k)+"/repository/tree?path="+m+"&ref="+g+"&per_page=100&page="+b,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));q.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(n,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display=
-"block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){z(b+1)});mxEvent.addListener(x,"click",l);this.executeRequest(f,mxUtils.bind(this,function(f){this.ui.spinner.stop();1==b&&(u(!g),n.appendChild(t("../ [Up]",mxUtils.bind(this,function(){if(""==m)m=null,B();else{var b=m.split("/");m=b.slice(0,b.length-1).join("/");z()}}),"4px")));var y=JSON.parse(f.getText());if(null==y||0==y.length)mxUtils.write(n,mxResources.get("noFiles"));else{var q=
-!0,v=0;f=mxUtils.bind(this,function(b){for(var f=0;f<y.length;f++)mxUtils.bind(this,function(f){if(b==("tree"==f.type)){var l=p.cloneNode();l.style.backgroundColor=q?Editor.isDarkMode()?"#000000":"#eeeeee":"";q=!q;var y=document.createElement("img");y.src=IMAGE_PATH+"/"+("tree"==f.type?"folder.png":"file.png");y.setAttribute("align","absmiddle");y.style.marginRight="4px";y.style.marginTop="-4px";y.width=20;l.appendChild(y);l.appendChild(t(f.name+("tree"==f.type?"/":""),mxUtils.bind(this,function(){"tree"==
-f.type?(m=f.path,z()):e&&"blob"==f.type&&(this.ui.hideDialog(),d(c+"/"+k+"/"+g+"/"+f.path))})));n.appendChild(l);v++}})(y[f])});f(!0);e&&f(!1);100==v&&(n.appendChild(x),A=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&l()},mxEvent.addListener(n,"scroll",A))}}),v,!0)}),y=mxUtils.bind(this,function(b,d){null==b&&(n.innerHTML="",b=1);var e=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+k)+"/repository/branches?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(n,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var f=mxUtils.bind(this,function(){y(b+1)});mxEvent.addListener(x,"click",f);this.executeRequest(e,mxUtils.bind(this,function(c){this.ui.spinner.stop();1==b&&(u(!0),n.appendChild(t("../ [Up]",mxUtils.bind(this,
-function(){m=null;B()}),"4px")));c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(n,mxResources.get("noFiles"));else if(1==c.length&&d)g=c[0].name,m="",z();else{for(var e=0;e<c.length;e++)mxUtils.bind(this,function(b,c){var d=p.cloneNode();d.style.backgroundColor=0==c%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";d.appendChild(t(b.name,mxUtils.bind(this,function(){g=encodeURIComponent(b.name);m="";z()})));n.appendChild(d)})(c[e],e);100==c.length&&(n.appendChild(x),A=function(){n.scrollTop>=
-n.scrollHeight-n.offsetHeight&&f()},mxEvent.addListener(n,"scroll",A))}}),v)});q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));var B=mxUtils.bind(this,function(b){var d=this.ui.spinner,e=0;this.ui.spinner.stop();var f=function(){d.spin(n,mxResources.get("loading"));e+=1},l=function(){--e;0===e&&d.stop()};null==b&&(n.innerHTML="",b=1);null!=A&&(mxEvent.removeListener(n,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");
-x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){0===e&&B(b+1)});mxEvent.addListener(x,"click",q);var u=mxUtils.bind(this,function(b){f();var c=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){b(JSON.parse(c.getText()));l()}),v)}),C=mxUtils.bind(this,function(b,c){f();var d=new mxXmlRequest(this.baseUrl+"/groups/"+b.id+"/projects?per_page=100",null,
-"GET");this.executeRequest(d,mxUtils.bind(this,function(d){c(b,JSON.parse(d.getText()));l()}),v)});u(mxUtils.bind(this,function(d){f();var B=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+b,null,"GET");this.executeRequest(B,mxUtils.bind(this,function(B){B=JSON.parse(B.getText());if(null!=B&&0!=B.length||null!=d&&0!=d.length){1==b&&(n.appendChild(t(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===e){var b=new FilenameDialog(this.ui,"org/repo/ref",
-mxResources.get("ok"),mxUtils.bind(this,function(b){null!=b&&(b=b.split("/"),1<b.length?(c=b[0],k=b[1],g=m=null,2<b.length?(g=encodeURIComponent(b.slice(2,b.length).join("/")),z()):y(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(b.container,300,80,!0,!1);b.init()}}))),mxUtils.br(n),mxUtils.br(n));for(var u=!0,v=0;v<B.length;v++)mxUtils.bind(this,function(b){var d=p.cloneNode();d.style.backgroundColor=
-u?Editor.isDarkMode()?"#000000":"#eeeeee":"";u=!u;d.appendChild(t(b.name_with_namespace,mxUtils.bind(this,function(){0===e&&(c=b.owner.username,k=b.path,m="",y(null,!0))})));n.appendChild(d)})(B[v]);for(v=0;v<d.length;v++)f(),C(d[v],mxUtils.bind(this,function(b,d){l();for(var f=0;f<d.length;f++){var g=p.cloneNode();g.style.backgroundColor=u?"dark"==uiTheme?"#000000":"#eeeeee":"";u=!u;mxUtils.bind(this,function(d){g.appendChild(t(d.name_with_namespace,mxUtils.bind(this,function(){0===e&&(c=b.full_path,
-k=d.path,m="",y(null,!0))})));n.appendChild(g)})(d[f])}}));l()}else mxUtils.write(n,mxResources.get("noFiles"));100==B.length&&(n.appendChild(x),A=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&q()},mxEvent.addListener(n,"scroll",A))}),v)}))});b?this.user?B():this.updateUser(function(){B()},v,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){B()},v,!0)}),v)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+
+function(b,d){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),b,d):null!=d&&d(c)}),d)};GitLabClient.prototype.authenticateStep2=function(e,d,c){if(null==window.onGitLabCallback){var g=mxUtils.bind(this,function(){var k=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+
+e),null,"GET")).send(mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?(b=JSON.parse(e.getText()).access_token,this.setToken(b),this.setUser(null),d()):(this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==e.getStatus()?g():c({message:mxResources.get("accessDenied"),retry:g}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(n,f){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+
+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(e,m){k?(window.onGitLabCallback=null,k=!1,null==e?c({message:mxResources.get("accessDenied"),retry:g}):(null!=f&&f(),b=e.access_token,this.setToken(b),this.setUser(null),n&&this.setPersistentToken("remembered"),d(),null!=m&&m.close())):null!=m&&m.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),
+retry:g})}),mxUtils.bind(this,function(){k&&(window.onGitLabCallback=null,k=!1,c({message:mxResources.get("accessDenied"),retry:g}))}))});g()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,d,c,g){var k=mxUtils.bind(this,function(f){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),p=this.authToken+" "+b;e.setRequestHeaders=function(b,c){b.setRequestHeader("Authorization",
+p);b.setRequestHeader("PRIVATE_TOKEN",p);b.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(m);if(l)if(200<=e.getStatus()&&299>=e.getStatus()||g&&404==e.getStatus())d(e);else if(401===e.getStatus())f?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){n(!0)},c)})}):this.authenticate(function(){k(!0)},c);else if(403===e.getStatus()){var b=!1;try{var p=JSON.parse(e.getText());null!=p&&
+null!=p.errors&&0<p.errors.length&&(b="too_large"==p.errors[0].code)}catch(u){}c({message:mxResources.get(b?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):400===e.getStatus()?c({status:400}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(b){window.clearTimeout(m);l&&c(b)}))}),n=mxUtils.bind(this,function(b){null==this.user?this.updateUser(function(){n(!0)},
+c,b):k(b)});null==b?this.authenticate(function(){n(!0)},c):n(!1)};GitLabClient.prototype.getRefIndex=function(b,d,c,g,k,n){if(null!=k)c(b,k);else{var e=b.length-2,l=mxUtils.bind(this,function(){if(2>e)g({message:mxResources.get("fileNotFound")});else{var f=Math.max(e-1,0),k=b.slice(0,f).join("/"),f=b[f],q=b[e],t=b.slice(e+1,b.length).join("/"),k=this.baseUrl+"/projects/"+encodeURIComponent(k+"/"+f)+"/repository/"+(d?n?"branches?per_page=1&page=1&ref="+q:"tree?path="+t+"&ref="+q:"files/"+encodeURIComponent(t)+
+"?ref="+q),u=new mxXmlRequest(k,null,"HEAD");this.executeRequest(u,mxUtils.bind(this,function(){200==u.getStatus()?c(b,e):g({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==u.getStatus()?(e--,l()):g({message:mxResources.get("fileNotFound")})}))}});l()}};GitLabClient.prototype.getFile=function(e,d,c,g,k,n){g=null!=g?g:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(f,l){var n=Math.max(l-1,0),p=f.slice(0,n).join("/"),q=f[n],t=f[l];e=f.slice(l+1,f.length).join("/");
+n=/\.png$/i.test(e);if(!k&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&n))if(null!=b){var n="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/files/"+encodeURIComponent(e)+"?ref="+t;f=e.split("/");this.ui.convertFile(u+n,0<f.length?f[f.length-1]:e,null,this.extension,d,c,mxUtils.bind(this,function(b,c,d){b=new mxXmlRequest(b,null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){try{c(this.getFileContent(JSON.parse(b.getText())))}catch(x){d(x)}}),
+d)}))}else c({message:mxResources.get("accessDenied")});else n="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/files/"+encodeURIComponent(e)+"?ref="+t,n=new mxXmlRequest(u+n,null,"GET"),this.executeRequest(n,mxUtils.bind(this,function(b){try{d(this.createGitLabFile(p,q,t,JSON.parse(b.getText()),g,l))}catch(y){c(y)}}),c)}),c,n)};GitLabClient.prototype.getFileContent=function(b){var d=b.file_name,c=b.content;"base64"===b.encoding&&(/\.jpe?g$/i.test(d)?
+c="data:image/jpeg;base64,"+c:/\.gif$/i.test(d)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(d)?c="data:application/pdf;base64,"+c:/\.png$/i.test(d)?(b=this.ui.extractGraphModelFromPng(c),c=null!=b&&0<b.length?b:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(b,d,c,g,k,n){var e=DRAWIO_GITLAB_URL+"/";b={org:b,repo:d,ref:c,name:g.file_name,path:g.file_path,html_url:e+b+"/"+d+"/blob/"+c+"/"+g.file_path,download_url:e+b+"/"+d+"/raw/"+c+"/"+g.file_path+
+"?inline=false",last_commit_id:g.last_commit_id,refPos:n};g=this.getFileContent(g);return k?new GitLabLibrary(this.ui,g,b):new GitLabFile(this.ui,g,b)};GitLabClient.prototype.insertFile=function(b,d,c,g,k,n,f){k=null!=k?k:!1;n=n.split("/");this.getRefIndex(n,!0,mxUtils.bind(this,function(e,n){var l=Math.max(n-1,0),m=e.slice(0,l).join("/"),t=e[l],u=e[n];path=e.slice(n+1,e.length).join("/");0<path.length&&(path+="/");path+=b;this.checkExists(m+"/"+t+"/"+u+"/"+path,!0,mxUtils.bind(this,function(e,l){if(e)if(k)f||
+(d=Base64.encode(d)),this.showCommitDialog(b,!0,mxUtils.bind(this,function(b){this.writeFile(m,t,u,path,b,d,l,mxUtils.bind(this,function(b){try{var d=JSON.parse(b.getText());c(this.createGitLabFile(m,t,u,d.content,k,n))}catch(C){g(C)}}),g)}),g);else{var p=DRAWIO_GITLAB_URL+"/";c(new GitLabFile(this.ui,d,{org:m,repo:t,ref:u,name:b,path:path,html_url:p+m+"/"+t+"/blob/"+u+"/"+path,download_url:p+m+"/"+t+"/raw/"+u+"/"+path+"?inline=false",refPos:n,last_commit_id:l,isNew:!0}))}else g()}))}),g,null,4>=
+n.length)};GitLabClient.prototype.checkExists=function(b,d,c){this.getFile(b,mxUtils.bind(this,function(e){if(d){var g=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[b]),function(){g();c(!0,e.getCurrentEtag())},function(){g();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(b){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(b,d,c,g,k,n,
+f,l,m){if(n.length>=this.maxFileSize)m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(n.length)+" / 10 MB)"});else{var e="POST";c={path:encodeURIComponent(g),branch:decodeURIComponent(c),commit_message:k,content:n,encoding:"base64"};null!=f&&(c.last_commit_id=f,e="PUT");b=this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+d)+"/repository/files/"+encodeURIComponent(g);e=new mxXmlRequest(b,JSON.stringify(c),e);this.executeRequest(e,mxUtils.bind(this,function(b){l(b)}),m)}};
+GitLabClient.prototype.saveFile=function(b,d,c,g,k){var e=b.meta.org,f=b.meta.repo,l=b.meta.ref,m=b.meta.path,p=mxUtils.bind(this,function(g,n){this.writeFile(e,f,l,m,k,n,g,mxUtils.bind(this,function(g){delete b.meta.isNew;this.getFile(e+"/"+f+"/"+l+"/"+m,mxUtils.bind(this,function(c){c.getData()==b.getData()?d(c.getCurrentEtag()):d({content:b.getCurrentEtag()})}),c,null,null,b.meta.refPos)}),c)}),q=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(m)){var d=this.ui.getPngFileProperties(this.ui.fileNode);
+this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){p(b.meta.last_commit_id,c)}),c,this.ui.getCurrentFile()!=b?b.getData():null,d.scale,d.border)}else p(b.meta.last_commit_id,Base64.encode(b.getData()))});g?this.getFile(e+"/"+f+"/"+l+"/"+m,mxUtils.bind(this,function(c){b.meta.last_commit_id=c.meta.last_commit_id;q()}),c):q()};GitLabClient.prototype.pickFolder=function(b){this.showGitLabDialog(!1,b)};GitLabClient.prototype.pickFile=function(b){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("A"+
+encodeURIComponent(b))});this.showGitLabDialog(!0,b)};GitLabClient.prototype.showGitLabDialog=function(e,d){var c=null,g=null,k=null,n=null,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(e?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var m=document.createElement("div");m.style.whiteSpace=
+"nowrap";m.style.border="1px solid lightgray";m.style.boxSizing="border-box";m.style.padding="4px";m.style.overflow="auto";m.style.lineHeight="1.2em";m.style.height="274px";f.appendChild(m);var p=document.createElement("div");p.style.textOverflow="ellipsis";p.style.boxSizing="border-box";p.style.overflow="hidden";p.style.padding="4px";p.style.width="100%";var q=new CustomDialog(this.ui,f,mxUtils.bind(this,function(){d(c+"/"+g+"/"+encodeURIComponent(k)+"/"+n)}));this.ui.showDialog(q.container,420,
+370,!0,!0);e&&q.okButton.parentNode.removeChild(q.okButton);var t=mxUtils.bind(this,function(b,c,d,e){var f=document.createElement("a");f.setAttribute("title",b);f.style.cursor="pointer";mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e&&(f.style.textDecoration="underline");null!=d&&(b=p.cloneNode(),b.style.padding=d,b.appendChild(f),f=b);return f}),u=mxUtils.bind(this,function(b){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(t(c+"/"+g,mxUtils.bind(this,function(){n=
+null;B()}),null,!0));b||(mxUtils.write(d," / "),d.appendChild(t(decodeURIComponent(k),mxUtils.bind(this,function(){n=null;x()}),null,!0)));if(null!=n&&0<n.length){var e=n.split("/");for(b=0;b<e.length;b++)(function(b){mxUtils.write(d," / ");d.appendChild(t(e[b],mxUtils.bind(this,function(){n=e.slice(0,b+1).join("/");z()}),null,!0))})(b)}m.appendChild(d)}),v=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(n=k=g=c=null,
+B()):this.ui.hideDialog()}))}),y=null,A=null,z=mxUtils.bind(this,function(b){null==b&&(m.innerHTML="",b=1);var f=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+g)+"/repository/tree?path="+n+"&ref="+k+"&per_page=100&page="+b,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));q.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(m,"scroll",A),A=null);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");y.style.display=
+"block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){z(b+1)});mxEvent.addListener(y,"click",l);this.executeRequest(f,mxUtils.bind(this,function(f){this.ui.spinner.stop();1==b&&(u(!k),m.appendChild(t("../ [Up]",mxUtils.bind(this,function(){if(""==n)n=null,B();else{var b=n.split("/");n=b.slice(0,b.length-1).join("/");z()}}),"4px")));var x=JSON.parse(f.getText());if(null==x||0==x.length)mxUtils.write(m,mxResources.get("noFiles"));else{var q=
+!0,v=0;f=mxUtils.bind(this,function(b){for(var f=0;f<x.length;f++)mxUtils.bind(this,function(f){if(b==("tree"==f.type)){var l=p.cloneNode();l.style.backgroundColor=q?Editor.isDarkMode()?"#000000":"#eeeeee":"";q=!q;var x=document.createElement("img");x.src=IMAGE_PATH+"/"+("tree"==f.type?"folder.png":"file.png");x.setAttribute("align","absmiddle");x.style.marginRight="4px";x.style.marginTop="-4px";x.width=20;l.appendChild(x);l.appendChild(t(f.name+("tree"==f.type?"/":""),mxUtils.bind(this,function(){"tree"==
+f.type?(n=f.path,z()):e&&"blob"==f.type&&(this.ui.hideDialog(),d(c+"/"+g+"/"+k+"/"+f.path))})));m.appendChild(l);v++}})(x[f])});f(!0);e&&f(!1);100==v&&(m.appendChild(y),A=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&l()},mxEvent.addListener(m,"scroll",A))}}),v,!0)}),x=mxUtils.bind(this,function(b,d){null==b&&(m.innerHTML="",b=1);var e=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+g)+"/repository/branches?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(m,"scroll",A),A=null);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");y.style.display="block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var f=mxUtils.bind(this,function(){x(b+1)});mxEvent.addListener(y,"click",f);this.executeRequest(e,mxUtils.bind(this,function(c){this.ui.spinner.stop();1==b&&(u(!0),m.appendChild(t("../ [Up]",mxUtils.bind(this,
+function(){n=null;B()}),"4px")));c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(m,mxResources.get("noFiles"));else if(1==c.length&&d)k=c[0].name,n="",z();else{for(var e=0;e<c.length;e++)mxUtils.bind(this,function(b,c){var d=p.cloneNode();d.style.backgroundColor=0==c%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";d.appendChild(t(b.name,mxUtils.bind(this,function(){k=encodeURIComponent(b.name);n="";z()})));m.appendChild(d)})(c[e],e);100==c.length&&(m.appendChild(y),A=function(){m.scrollTop>=
+m.scrollHeight-m.offsetHeight&&f()},mxEvent.addListener(m,"scroll",A))}}),v)});q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));var B=mxUtils.bind(this,function(b){var d=this.ui.spinner,e=0;this.ui.spinner.stop();var f=function(){d.spin(m,mxResources.get("loading"));e+=1},l=function(){--e;0===e&&d.stop()};null==b&&(m.innerHTML="",b=1);null!=A&&(mxEvent.removeListener(m,"scroll",A),A=null);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");
+y.style.display="block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){0===e&&B(b+1)});mxEvent.addListener(y,"click",q);var u=mxUtils.bind(this,function(b){f();var c=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){b(JSON.parse(c.getText()));l()}),v)}),C=mxUtils.bind(this,function(b,c){f();var d=new mxXmlRequest(this.baseUrl+"/groups/"+b.id+"/projects?per_page=100",null,
+"GET");this.executeRequest(d,mxUtils.bind(this,function(d){c(b,JSON.parse(d.getText()));l()}),v)});u(mxUtils.bind(this,function(d){f();var B=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+b,null,"GET");this.executeRequest(B,mxUtils.bind(this,function(B){B=JSON.parse(B.getText());if(null!=B&&0!=B.length||null!=d&&0!=d.length){1==b&&(m.appendChild(t(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===e){var b=new FilenameDialog(this.ui,"org/repo/ref",
+mxResources.get("ok"),mxUtils.bind(this,function(b){null!=b&&(b=b.split("/"),1<b.length?(c=b[0],g=b[1],k=n=null,2<b.length?(k=encodeURIComponent(b.slice(2,b.length).join("/")),z()):x(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(b.container,300,80,!0,!1);b.init()}}))),mxUtils.br(m),mxUtils.br(m));for(var u=!0,v=0;v<B.length;v++)mxUtils.bind(this,function(b){var d=p.cloneNode();d.style.backgroundColor=
+u?Editor.isDarkMode()?"#000000":"#eeeeee":"";u=!u;d.appendChild(t(b.name_with_namespace,mxUtils.bind(this,function(){0===e&&(c=b.owner.username,g=b.path,n="",x(null,!0))})));m.appendChild(d)})(B[v]);for(v=0;v<d.length;v++)f(),C(d[v],mxUtils.bind(this,function(b,d){l();for(var f=0;f<d.length;f++){var k=p.cloneNode();k.style.backgroundColor=u?"dark"==uiTheme?"#000000":"#eeeeee":"";u=!u;mxUtils.bind(this,function(d){k.appendChild(t(d.name_with_namespace,mxUtils.bind(this,function(){0===e&&(c=b.full_path,
+g=d.path,n="",x(null,!0))})));m.appendChild(k)})(d[f])}}));l()}else mxUtils.write(m,mxResources.get("noFiles"));100==B.length&&(m.appendChild(y),A=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&q()},mxEvent.addListener(m,"scroll",A))}),v)}))});b?this.user?B():this.updateUser(function(){B()},v,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){B()},v,!0)}),v)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+
this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();NotionFile=function(b,e,d){DrawioFile.call(this,b,e);this.meta=d;this.peer=this.ui.notion};mxUtils.extend(NotionFile,DrawioFile);NotionFile.prototype.getId=function(){return this.meta.id};NotionFile.prototype.getHash=function(){return encodeURIComponent("N"+this.getId())};NotionFile.prototype.getMode=function(){return App.MODE_NOTION};NotionFile.prototype.isAutosave=function(){return!1};NotionFile.prototype.getTitle=function(){return this.meta.name};NotionFile.prototype.isRenamable=function(){return!1};
-NotionFile.prototype.isCompressedStorage=function(){return!0};NotionFile.prototype.save=function(b,e,d,c,k){this.doSave(this.getTitle(),e,d,c,k)};NotionFile.prototype.saveAs=function(b,e,d){this.doSave(b,e,d)};NotionFile.prototype.doSave=function(b,e,d,c,k){var g=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=g;this.saveFile(b,!1,e,d,c,k)}),d,c,k])};
-NotionFile.prototype.saveFile=function(b,e,d,c,k,g){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else if(this.getTitle()==b)try{this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.peer.saveFile(this,mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.savingFile=!1;null!=d&&d()}),mxUtils.bind(this,function(b){this.savingFile=!1;null!=c&&c(b)}),g)}catch(m){if(this.savingFile=!1,null!=c)c(m);else throw m;}else this.savingFileTime=
+NotionFile.prototype.isCompressedStorage=function(){return!0};NotionFile.prototype.save=function(b,e,d,c,g){this.doSave(this.getTitle(),e,d,c,g)};NotionFile.prototype.saveAs=function(b,e,d){this.doSave(b,e,d)};NotionFile.prototype.doSave=function(b,e,d,c,g){var k=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=k;this.saveFile(b,!1,e,d,c,g)}),d,c,g])};
+NotionFile.prototype.saveFile=function(b,e,d,c,g,k){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else if(this.getTitle()==b)try{this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.peer.saveFile(this,mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.savingFile=!1;null!=d&&d()}),mxUtils.bind(this,function(b){this.savingFile=!1;null!=c&&c(b)}),k)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}else this.savingFileTime=
new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(e){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(b)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,e)}));else null!=d&&d()};NotionLibrary=function(b,e,d){NotionFile.call(this,b,e,d)};mxUtils.extend(NotionLibrary,NotionFile);NotionLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};NotionLibrary.prototype.open=function(){};(function(){var b=null;window.NotionClient=function(b){DrawioClient.call(this,b,"notionAuthInfo")};mxUtils.extend(NotionClient,DrawioClient);NotionClient.prototype.extension=".drawio";NotionClient.prototype.baseUrl=window.NOTION_API_URL||("test.draw.io"==window.location.hostname?"https://notion.jgraph.workers.dev/api":"/notion-api");NotionClient.prototype.getTitle=function(b){if("string"===typeof b.title)return b.title;for(var d=[],c=0;c<b.title.length;c++)d.push(b.title[c].text.content);return d.join(" ")};
-NotionClient.prototype.authenticate=function(e,d,c){var k=!0,g=mxUtils.bind(this,function(){k&&(k=!1,d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.ui.hideDialog();m()})}))}),m=mxUtils.bind(this,function(){k=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(d,l){var f=new FilenameDialog(this.ui,"",mxResources.get("ok"),mxUtils.bind(this,function(f){b=f;this.executeRequest("/v1/databases",null,"GET",mxUtils.bind(this,function(){this.executeRequest("/setToken",
-null,"GET",mxUtils.bind(this,function(){k=!1;d&&(b=null);null!=l&&l();e()}),g,c)}),g,c)}),mxResources.get("notionToken"),function(b){return null!=b&&0<b.length},null,"https://developers.notion.com/docs/getting-started#step-1-create-an-integration");this.ui.showDialog(f.container,300,80,!0,!0);f.init()}),g)});m()};NotionClient.prototype.executeRequest=function(e,d,c,k,g,m){var f=mxUtils.bind(this,function(){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;g({code:App.ERROR_TIMEOUT,retry:f})}),
-this.ui.timeout),p=new mxXmlRequest(this.baseUrl+e,d,c);p.withCredentials=!0;p.setRequestHeaders=mxUtils.bind(this,function(c,d){null!=b&&c.setRequestHeader("Authorization","Bearer "+b);c.setRequestHeader("Notion-Version","2021-05-13");c.setRequestHeader("Content-Type","application/json")});p.send(mxUtils.bind(this,function(b){window.clearTimeout(n);l&&(200<=b.getStatus()&&299>=b.getStatus()?(null==this.user&&this.setUser(new DrawioUser("notion",null,"Notion")),k(JSON.parse(b.getText()))):m||401!==
-b.getStatus()&&400!==b.getStatus()?g(this.parseRequestText(b)):(this.setUser(null),m=!0,this.authenticate(function(){f()},g,m)))}),mxUtils.bind(this,function(b){window.clearTimeout(n);l&&g(b)}))});f()};NotionClient.prototype.getLibrary=function(b,d,c){this.getFile(b,d,c,!1,!0)};NotionClient.prototype.getFile=function(b,d,c,k,g){g=null!=g?g:!1;this.executeRequest("/v1/pages/"+encodeURIComponent(b),null,"GET",mxUtils.bind(this,function(e){try{var f=e.properties.xml.rich_text,k="",m=this.getTitle(e.properties.Name);
-for(e=0;e<f.length;e++)k+=f[e].text.content;f={id:b,name:m};g?d(new NotionLibrary(this.ui,k,f)):d(new NotionFile(this.ui,k,f))}catch(p){if(null!=c)c(p);else throw p;}}),c)};NotionClient.prototype.insertLibrary=function(b,d,c,k,g){this.insertFile(b,d,c,k,!0,g)};NotionClient.prototype.insertFile=function(b,d,c,k,g,m){g=null!=g?g:!1;this.checkExists(m,b,!0,mxUtils.bind(this,function(e,l){e?this.writeFile(l?"/v1/pages/"+encodeURIComponent(l):"/v1/pages",l?null:m,b,d,l?"PATCH":"POST",mxUtils.bind(this,
-function(b){b={id:b.id,name:this.getTitle(b.properties.Name)};g?c(new NotionLibrary(this.ui,d,b)):c(new NotionFile(this.ui,d,b))}),k):k()}))};NotionClient.prototype.checkExists=function(b,d,c,k){this.executeRequest("/v1/databases/"+encodeURIComponent(b)+"/query",JSON.stringify({filter:{property:"Name",text:{equals:d}}}),"POST",mxUtils.bind(this,function(b){0==b.results.length?k(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[d]),function(){k(!0,b.results[0].id)},function(){k(!1)})):
-(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){k(!1)}))}),function(b){k(!1)})};NotionClient.prototype.saveFile=function(b,d,c){try{var e=b.getData();this.writeFile("/v1/pages/"+b.getId(),null,b.getTitle(),e,"PATCH",mxUtils.bind(this,function(b){d(b,e)}),c)}catch(g){c(g)}};NotionClient.prototype.writeFile=function(b,d,c,k,g,m,f){try{if(null!=b&&null!=k)if(2E5<k.length)f({message:mxResources.get("drawingTooLarge")+" ("+
-this.ui.formatFileSize(k.length)+" / 200 KB)"});else{for(var e=[],n=Math.ceil(k.length/2E3),p=0;p<n;p++)e.push({text:{content:k.substr(2E3*p,2E3)}});c={properties:{Name:{title:[{text:{content:c}}]},xml:{rich_text:e}}};d&&(c.parent={database_id:d});this.executeRequest(b,JSON.stringify(c),g,m,f)}else f({message:mxResources.get("unknownError")})}catch(q){f(q)}};NotionClient.prototype.parseRequestText=function(b){var d={message:mxResources.get("unknownError")};try{d=JSON.parse(b.getText())}catch(c){}return d};
-NotionClient.prototype.pickLibrary=function(b){this.pickFile(b)};NotionClient.prototype.pickFolder=function(b){this.showNotionDialog(!1,b)};NotionClient.prototype.pickFile=function(b){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("N"+encodeURIComponent(b))});this.showNotionDialog(!0,b)};NotionClient.prototype.showNotionDialog=function(b,d){var c,e,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.height="304px";var m=document.createElement("h3");
-mxUtils.write(m,mxResources.get(b?"officeSelDiag":"selectDB"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.border="1px solid lightgray";f.style.boxSizing="border-box";f.style.padding="4px";f.style.overflow="auto";f.style.lineHeight="1.2em";f.style.height="274px";g.appendChild(f);var l=document.createElement("div");l.style.textOverflow="ellipsis";l.style.boxSizing="border-box";
-l.style.overflow="hidden";l.style.padding="4px";l.style.width="100%";var n=new CustomDialog(this.ui,g,mxUtils.bind(this,function(){d(c)}));this.ui.showDialog(n.container,420,380,!0,!0);b&&n.okButton.parentNode.removeChild(n.okButton);var p=mxUtils.bind(this,function(b,c,d,e){var f=document.createElement("a");f.setAttribute("title",b);f.style.cursor="pointer";mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e&&(f.style.textDecoration="underline");null!=d&&(b=l.cloneNode(),b.style.padding=d,b.appendChild(f),
-f=b);return f}),q=mxUtils.bind(this,function(){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(p(e,mxUtils.bind(this,function(){c=null;A()}),null,!0));f.appendChild(b)}),t=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(c=null,A()):this.ui.hideDialog()}),null,{})}),u=null,v=null,x=mxUtils.bind(this,function(b){null==b&&(f.innerHTML="");this.ui.spinner.spin(f,mxResources.get("loading"));
-n.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(f,"scroll",v),v=null);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.style.cursor="pointer";mxUtils.write(u,mxResources.get("more")+"...");var e=mxUtils.bind(this,function(){x(b)});mxEvent.addListener(u,"click",e);var g={page_size:100};null!=b&&(g.start_cursor=b);this.executeRequest("/v1/databases/"+encodeURIComponent(c)+"/query",JSON.stringify(g),"POST",mxUtils.bind(this,
-function(g){this.ui.spinner.stop();null==b&&(q(),f.appendChild(p("../ [Up]",mxUtils.bind(this,function(){c=null;A()}),"4px")));var k=g.results;if(null==k||0==k.length)mxUtils.write(f,mxResources.get("noFiles"));else{for(var m=!0,n=0;n<k.length;n++)mxUtils.bind(this,function(b,c){var e=l.cloneNode();e.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;var g=document.createElement("img");g.src=IMAGE_PATH+"/file.png";g.setAttribute("align","absmiddle");g.style.marginRight="4px";
-g.style.marginTop="-4px";g.width=20;e.appendChild(g);e.appendChild(p(this.getTitle(b.properties.Name),mxUtils.bind(this,function(){this.ui.hideDialog();d(b.id)})));f.appendChild(e)})(k[n],n);g.has_more&&(b=g.next_cursor,f.appendChild(u),v=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&e()},mxEvent.addListener(f,"scroll",v))}}),t,!0)}),A=mxUtils.bind(this,function(g){null==g&&(f.innerHTML="");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(f,mxResources.get("loading"));
-null!=v&&mxEvent.removeListener(f,"scroll",v);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.style.cursor="pointer";mxUtils.write(u,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){A(g)});mxEvent.addListener(u,"click",k);this.executeRequest("/v1/databases?page_size=100"+(null!=g?"&start_cursor="+g:""),null,"GET",mxUtils.bind(this,function(m){this.ui.spinner.stop();var n=m.results,y=0;if(null==n||0==n.length)mxUtils.write(f,
-mxResources.get("noDBs"));else for(var q=0;q<n.length;q++)n[q].properties.Name&&"title"==n[q].properties.Name.type&&n[q].properties.xml&&"rich_text"==n[q].properties.xml.type&&(mxUtils.bind(this,function(g,k){var m=l.cloneNode();m.style.backgroundColor=0==k%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";m.appendChild(p(this.getTitle(g),mxUtils.bind(this,function(){c=g.id;e=this.getTitle(g);b?x():(this.ui.hideDialog(),d(c))})));f.appendChild(m)})(n[q],q),y++);m.has_more?(g=m.next_cursor,0==y?k():(f.appendChild(u),
-v=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&k()},mxEvent.addListener(f,"scroll",v))):0==y&&""==f.innerHTML&&mxUtils.write(f,mxResources.get("noDBs"))}),t)});A()};NotionClient.prototype.logout=function(){this.executeRequest("/removeToken",null,"GET",function(){},function(){});this.setUser(null);b=null}})();DrawioComment=function(b,e,d,c,k,g,m){this.file=b;this.id=e;this.content=d;this.modifiedDate=c;this.createdDate=k;this.isResolved=g;this.user=m;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,d,c,k){e()};DrawioComment.prototype.editComment=function(b,e,d){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,d,c,k,g,m,f){DrawioComment.call(this,b,e,d,c,k,g,m);this.pCommentId=f};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,d,c,k){b={content:b.content};c?b.verb="resolve":k&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(b){e(b.replyId)}),d)};
+NotionClient.prototype.authenticate=function(e,d,c){var g=!0,k=mxUtils.bind(this,function(){g&&(g=!1,d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.ui.hideDialog();n()})}))}),n=mxUtils.bind(this,function(){g=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(d,l){var f=new FilenameDialog(this.ui,"",mxResources.get("ok"),mxUtils.bind(this,function(f){b=f;this.executeRequest("/v1/databases",null,"GET",mxUtils.bind(this,function(){this.executeRequest("/setToken",
+null,"GET",mxUtils.bind(this,function(){g=!1;d&&(b=null);null!=l&&l();e()}),k,c)}),k,c)}),mxResources.get("notionToken"),function(b){return null!=b&&0<b.length},null,"https://developers.notion.com/docs/getting-started#step-1-create-an-integration");this.ui.showDialog(f.container,300,80,!0,!0);f.init()}),k)});n()};NotionClient.prototype.executeRequest=function(e,d,c,g,k,n){var f=mxUtils.bind(this,function(){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;k({code:App.ERROR_TIMEOUT,retry:f})}),
+this.ui.timeout),p=new mxXmlRequest(this.baseUrl+e,d,c);p.withCredentials=!0;p.setRequestHeaders=mxUtils.bind(this,function(c,d){null!=b&&c.setRequestHeader("Authorization","Bearer "+b);c.setRequestHeader("Notion-Version","2021-05-13");c.setRequestHeader("Content-Type","application/json")});p.send(mxUtils.bind(this,function(b){window.clearTimeout(m);l&&(200<=b.getStatus()&&299>=b.getStatus()?(null==this.user&&this.setUser(new DrawioUser("notion",null,"Notion")),g(JSON.parse(b.getText()))):n||401!==
+b.getStatus()&&400!==b.getStatus()?k(this.parseRequestText(b)):(this.setUser(null),n=!0,this.authenticate(function(){f()},k,n)))}),mxUtils.bind(this,function(b){window.clearTimeout(m);l&&k(b)}))});f()};NotionClient.prototype.getLibrary=function(b,d,c){this.getFile(b,d,c,!1,!0)};NotionClient.prototype.getFile=function(b,d,c,g,k){k=null!=k?k:!1;this.executeRequest("/v1/pages/"+encodeURIComponent(b),null,"GET",mxUtils.bind(this,function(e){try{var f=e.properties.xml.rich_text,g="",n=this.getTitle(e.properties.Name);
+for(e=0;e<f.length;e++)g+=f[e].text.content;f={id:b,name:n};k?d(new NotionLibrary(this.ui,g,f)):d(new NotionFile(this.ui,g,f))}catch(p){if(null!=c)c(p);else throw p;}}),c)};NotionClient.prototype.insertLibrary=function(b,d,c,g,k){this.insertFile(b,d,c,g,!0,k)};NotionClient.prototype.insertFile=function(b,d,c,g,k,n){k=null!=k?k:!1;this.checkExists(n,b,!0,mxUtils.bind(this,function(e,l){e?this.writeFile(l?"/v1/pages/"+encodeURIComponent(l):"/v1/pages",l?null:n,b,d,l?"PATCH":"POST",mxUtils.bind(this,
+function(b){b={id:b.id,name:this.getTitle(b.properties.Name)};k?c(new NotionLibrary(this.ui,d,b)):c(new NotionFile(this.ui,d,b))}),g):g()}))};NotionClient.prototype.checkExists=function(b,d,c,g){this.executeRequest("/v1/databases/"+encodeURIComponent(b)+"/query",JSON.stringify({filter:{property:"Name",text:{equals:d}}}),"POST",mxUtils.bind(this,function(b){0==b.results.length?g(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[d]),function(){g(!0,b.results[0].id)},function(){g(!1)})):
+(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){g(!1)}))}),function(b){g(!1)})};NotionClient.prototype.saveFile=function(b,d,c){try{var e=b.getData();this.writeFile("/v1/pages/"+b.getId(),null,b.getTitle(),e,"PATCH",mxUtils.bind(this,function(b){d(b,e)}),c)}catch(k){c(k)}};NotionClient.prototype.writeFile=function(b,d,c,g,k,n,f){try{if(null!=b&&null!=g)if(2E5<g.length)f({message:mxResources.get("drawingTooLarge")+" ("+
+this.ui.formatFileSize(g.length)+" / 200 KB)"});else{for(var e=[],m=Math.ceil(g.length/2E3),p=0;p<m;p++)e.push({text:{content:g.substr(2E3*p,2E3)}});c={properties:{Name:{title:[{text:{content:c}}]},xml:{rich_text:e}}};d&&(c.parent={database_id:d});this.executeRequest(b,JSON.stringify(c),k,n,f)}else f({message:mxResources.get("unknownError")})}catch(q){f(q)}};NotionClient.prototype.parseRequestText=function(b){var d={message:mxResources.get("unknownError")};try{d=JSON.parse(b.getText())}catch(c){}return d};
+NotionClient.prototype.pickLibrary=function(b){this.pickFile(b)};NotionClient.prototype.pickFolder=function(b){this.showNotionDialog(!1,b)};NotionClient.prototype.pickFile=function(b){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("N"+encodeURIComponent(b))});this.showNotionDialog(!0,b)};NotionClient.prototype.showNotionDialog=function(b,d){var c,e,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="304px";var n=document.createElement("h3");
+mxUtils.write(n,mxResources.get(b?"officeSelDiag":"selectDB"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.border="1px solid lightgray";f.style.boxSizing="border-box";f.style.padding="4px";f.style.overflow="auto";f.style.lineHeight="1.2em";f.style.height="274px";k.appendChild(f);var l=document.createElement("div");l.style.textOverflow="ellipsis";l.style.boxSizing="border-box";
+l.style.overflow="hidden";l.style.padding="4px";l.style.width="100%";var m=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){d(c)}));this.ui.showDialog(m.container,420,380,!0,!0);b&&m.okButton.parentNode.removeChild(m.okButton);var p=mxUtils.bind(this,function(b,c,d,e){var f=document.createElement("a");f.setAttribute("title",b);f.style.cursor="pointer";mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e&&(f.style.textDecoration="underline");null!=d&&(b=l.cloneNode(),b.style.padding=d,b.appendChild(f),
+f=b);return f}),q=mxUtils.bind(this,function(){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(p(e,mxUtils.bind(this,function(){c=null;A()}),null,!0));f.appendChild(b)}),t=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(c=null,A()):this.ui.hideDialog()}),null,{})}),u=null,v=null,y=mxUtils.bind(this,function(b){null==b&&(f.innerHTML="");this.ui.spinner.spin(f,mxResources.get("loading"));
+m.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(f,"scroll",v),v=null);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.style.cursor="pointer";mxUtils.write(u,mxResources.get("more")+"...");var e=mxUtils.bind(this,function(){y(b)});mxEvent.addListener(u,"click",e);var g={page_size:100};null!=b&&(g.start_cursor=b);this.executeRequest("/v1/databases/"+encodeURIComponent(c)+"/query",JSON.stringify(g),"POST",mxUtils.bind(this,
+function(g){this.ui.spinner.stop();null==b&&(q(),f.appendChild(p("../ [Up]",mxUtils.bind(this,function(){c=null;A()}),"4px")));var k=g.results;if(null==k||0==k.length)mxUtils.write(f,mxResources.get("noFiles"));else{for(var n=!0,m=0;m<k.length;m++)mxUtils.bind(this,function(b,c){var e=l.cloneNode();e.style.backgroundColor=n?Editor.isDarkMode()?"#000000":"#eeeeee":"";n=!n;var g=document.createElement("img");g.src=IMAGE_PATH+"/file.png";g.setAttribute("align","absmiddle");g.style.marginRight="4px";
+g.style.marginTop="-4px";g.width=20;e.appendChild(g);e.appendChild(p(this.getTitle(b.properties.Name),mxUtils.bind(this,function(){this.ui.hideDialog();d(b.id)})));f.appendChild(e)})(k[m],m);g.has_more&&(b=g.next_cursor,f.appendChild(u),v=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&e()},mxEvent.addListener(f,"scroll",v))}}),t,!0)}),A=mxUtils.bind(this,function(g){null==g&&(f.innerHTML="");m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(f,mxResources.get("loading"));
+null!=v&&mxEvent.removeListener(f,"scroll",v);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.style.cursor="pointer";mxUtils.write(u,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){A(g)});mxEvent.addListener(u,"click",k);this.executeRequest("/v1/databases?page_size=100"+(null!=g?"&start_cursor="+g:""),null,"GET",mxUtils.bind(this,function(n){this.ui.spinner.stop();var m=n.results,x=0;if(null==m||0==m.length)mxUtils.write(f,
+mxResources.get("noDBs"));else for(var q=0;q<m.length;q++)m[q].properties.Name&&"title"==m[q].properties.Name.type&&m[q].properties.xml&&"rich_text"==m[q].properties.xml.type&&(mxUtils.bind(this,function(g,k){var n=l.cloneNode();n.style.backgroundColor=0==k%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";n.appendChild(p(this.getTitle(g),mxUtils.bind(this,function(){c=g.id;e=this.getTitle(g);b?y():(this.ui.hideDialog(),d(c))})));f.appendChild(n)})(m[q],q),x++);n.has_more?(g=n.next_cursor,0==x?k():(f.appendChild(u),
+v=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&k()},mxEvent.addListener(f,"scroll",v))):0==x&&""==f.innerHTML&&mxUtils.write(f,mxResources.get("noDBs"))}),t)});A()};NotionClient.prototype.logout=function(){this.executeRequest("/removeToken",null,"GET",function(){},function(){});this.setUser(null);b=null}})();DrawioComment=function(b,e,d,c,g,k,n){this.file=b;this.id=e;this.content=d;this.modifiedDate=c;this.createdDate=g;this.isResolved=k;this.user=n;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,d,c,g){e()};DrawioComment.prototype.editComment=function(b,e,d){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,d,c,g,k,n,f){DrawioComment.call(this,b,e,d,c,g,k,n);this.pCommentId=f};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,d,c,g){b={content:b.content};c?b.verb="resolve":g&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(b){e(b.replyId)}),d)};
DriveComment.prototype.editComment=function(b,e,d){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},e,d)};
DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};App=function(b,e,d){EditorUi.call(this,b,e,null!=d?d:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()){var d={category:"DISCARD-FILE-"+b.getHash(),action:(b.savingFile?"saving":"")+(b.savingFile&&null!=b.savingFileTime?"_"+Math.round((Date.now()-b.savingFileTime.getTime())/1E3):"")+(null!=b.saveLevel?"-sl_"+b.saveLevel:"")+"-age_"+(null!=
b.ageStart?Math.round((Date.now()-b.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+"-open_"+(null!=b.opened?Math.round((Date.now()-b.opened.getTime())/1E3):"x")+"-save_"+(null!=b.lastSaved?Math.round((Date.now()-b.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=b.lastChanged?Math.round((Date.now()-b.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=b.sync?"client_"+b.sync.clientId:"nosync"};
@@ -11327,20 +11332,20 @@ App.main=function(b,e){function d(c){mxUtils.getAll("1"!=urlParams.dev?[c]:[c,ST
(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&
(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?"1"==urlParams.inlinePicker||mxClient.IS_ANDROID||mxClient.IS_IOS?mxscript(App.ONEDRIVE_INLINE_PICKER_URL,function(){window.OneDrive={};window.DrawOneDriveClientCallback()}):mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&
"1"==urlParams.tr&&(null==navigator.userAgent||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!=b&&b(c);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[c,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(c[0].getText());
-if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var f=function(b){if(null!=b)for(var c=0;c<b.length;c++)if(!g[b[c]])throw Error(mxResources.get("invalidInput")+' "'+b[c])+'"';return!0},g={},k;for(k in App.pluginRegistry)g[App.pluginRegistry[k]]=!0;var l=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=l&&f(l.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(l));if(null!=l.merge){var m=localStorage.getItem(Editor.configurationKey);
-if(null!=m)try{var n=JSON.parse(m);for(k in l.merge)n[k]=l.merge[k];l=n}catch(B){window.location.hash="",alert(B)}else l=l.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(l)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(B){window.location.hash="",alert(B)}2<c.length&&(Graph.prototype.defaultThemes["default-style2"]=c[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=
+if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var f=function(b){if(null!=b)for(var c=0;c<b.length;c++)if(!g[b[c]])throw Error(mxResources.get("invalidInput")+' "'+b[c])+'"';return!0},g={},k;for(k in App.pluginRegistry)g[App.pluginRegistry[k]]=!0;var l=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=l&&f(l.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(l));if(null!=l.merge){var n=localStorage.getItem(Editor.configurationKey);
+if(null!=n)try{var m=JSON.parse(n);for(k in l.merge)m[k]=l.merge[k];l=m}catch(B){window.location.hash="",alert(B)}else l=l.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(l)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(B){window.location.hash="",alert(B)}2<c.length&&(Graph.prototype.defaultThemes["default-style2"]=c[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=
c[2].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?d():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],d))},function(b){b=document.getElementById("geStatus");null!=b&&(b.innerHTML="Error loading page. <a>Please try refreshing.</a>",b.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}
function c(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?"#2a2a2a":"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var b=parseInt(mxSettings.settings.autosaveDelay);!isNaN(b)&&0<b?(DrawioFile.prototype.autosaveDelay=b,EditorUi.debug("Setting autosaveDelay",b)):EditorUi.debug("Invalid autosaveDelay",b)}null!=mxSettings.settings.defaultEdgeLength&&(b=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(b)&&0<b?(Graph.prototype.defaultEdgeLength=
b,EditorUi.debug("Using defaultEdgeLength",b)):EditorUi.debug("Invalid defaultEdgeLength",b))}}catch(t){null!=window.console&&console.error(t)}if(null!=Menus.prototype.defaultFonts)for(b=0;b<Menus.prototype.defaultFonts.length;b++){var c=Menus.prototype.defaultFonts[b];"string"!==typeof c&&null!=c.fontFamily&&null!=c.fontUrl&&Graph.addFont(c.fontFamily,c.fontUrl)}mxResources.loadDefaultBundle=!1;d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}
-window.onerror=function(b,c,d,e,f){EditorUi.logError("Global: "+(null!=b?b:""),c,d,e,f,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||/aj\.draw\.io$/.test(window.location.hostname)))document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>';else{if("1"==urlParams.embed||"1"==urlParams.lightbox){var k=document.getElementById("geInfo");null!=k&&
-k.parentNode.removeChild(k)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){k=document.getElementsByTagName("script");if(null!=k&&0<k.length){var g=mxUtils.getTextContent(k[0]);"b02227617087e21bd49f2faa15164112"!=CryptoJS.MD5(g).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",
-CryptoJS.MD5(g).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=k&&1<k.length&&(g=mxUtils.getTextContent(k[k.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(g).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(g).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?
+window.onerror=function(b,c,d,e,f){EditorUi.logError("Global: "+(null!=b?b:""),c,d,e,f,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||/aj\.draw\.io$/.test(window.location.hostname)))document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>';else{if("1"==urlParams.embed||"1"==urlParams.lightbox){var g=document.getElementById("geInfo");null!=g&&
+g.parentNode.removeChild(g)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){g=document.getElementsByTagName("script");if(null!=g&&0<g.length){var k=mxUtils.getTextContent(g[0]);"b02227617087e21bd49f2faa15164112"!=CryptoJS.MD5(k).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",
+CryptoJS.MD5(k).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=g&&1<g.length&&(k=mxUtils.getTextContent(g[g.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(k).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(k).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?
App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("/service-worker.js")}catch(p){null!=window.console&&console.error(p)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==
-urlParams.rtCursors&&(mxscript(App.SOCKET_IO_URL),mxscript(App.SIMPLE_PEER_URL)));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){k=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var m=JSON.parse(localStorage.getItem(mxSettings.key));null!=m&&(k=m.plugins)}catch(p){}m=urlParams.p;App.initPluginCallback();null!=m&&App.loadPlugins(m.split(";"));if(null!=k&&0<k.length&&"0"!=urlParams.plugins){for(var m=window.location.protocol+
-"//"+window.location.host,g=!0,f=0;f<k.length&&g;f++)"/"!=k[f].charAt(0)&&k[f].substring(0,m.length)!=m&&(g=!1);if(g||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[k.join("\n")]).replace(/\\n/g,"\n")))for(f=0;f<k.length;f++)try{null==App.pluginsLoaded[k[f]]&&(App.pluginsLoaded[k[f]]=
-!0,App.embedModePluginsCount++,"/"==k[f].charAt(0)&&(k[f]=PLUGINS_BASE_PATH+k[f]),mxscript(k[f]))}catch(p){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=
-null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var l=window.opener||window.parent,n=function(b){if(b.source==l)try{var d=JSON.parse(b.data);null!=d&&"configure"==d.action&&(mxEvent.removeListener(window,"message",n),Editor.configure(d.config,!0),mxSettings.load(),c())}catch(t){null!=window.console&&console.log("Error in configure message: "+t,b.data)}};mxEvent.addListener(window,"message",n);l.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=
-window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(p){null!=window.console&&console.error(p)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(k=localStorage.getItem(Editor.configurationKey),null!=k))try{k=JSON.parse(k),null!=k&&(EditorUi.debug("Using local configuration",k),Editor.configure(k),mxSettings.load())}catch(p){null!=window.console&&console.error(p)}}c()}}};
+urlParams.rtCursors&&(mxscript(App.SOCKET_IO_URL),mxscript(App.SIMPLE_PEER_URL)));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){g=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var n=JSON.parse(localStorage.getItem(mxSettings.key));null!=n&&(g=n.plugins)}catch(p){}n=urlParams.p;App.initPluginCallback();null!=n&&App.loadPlugins(n.split(";"));if(null!=g&&0<g.length&&"0"!=urlParams.plugins){for(var n=window.location.protocol+
+"//"+window.location.host,k=!0,f=0;f<g.length&&k;f++)"/"!=g[f].charAt(0)&&g[f].substring(0,n.length)!=n&&(k=!1);if(k||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",[g.join("\n")]).replace(/\\n/g,"\n")))for(f=0;f<g.length;f++)try{null==App.pluginsLoaded[g[f]]&&(App.pluginsLoaded[g[f]]=
+!0,App.embedModePluginsCount++,"/"==g[f].charAt(0)&&(g[f]=PLUGINS_BASE_PATH+g[f]),mxscript(g[f]))}catch(p){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=
+null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var l=window.opener||window.parent,m=function(b){if(b.source==l)try{var d=JSON.parse(b.data);null!=d&&"configure"==d.action&&(mxEvent.removeListener(window,"message",m),Editor.configure(d.config,!0),mxSettings.load(),c())}catch(t){null!=window.console&&console.log("Error in configure message: "+t,b.data)}};mxEvent.addListener(window,"message",m);l.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=
+window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(p){null!=window.console&&console.error(p)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(g=localStorage.getItem(Editor.configurationKey),null!=g))try{g=JSON.parse(g),null!=g&&(EditorUi.debug("Using local configuration",g),Editor.configure(g),mxSettings.load())}catch(p){null!=window.console&&console.error(p)}}c()}}};
mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
IMAGE_PATH+"/chevron-up.png";
@@ -11351,19 +11356,19 @@ App.prototype.formatShowImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
App.prototype.formatHideImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=":IMAGE_PATH+
"/format-hide.png";App.prototype.fullscreenImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABpJREFUCNdjgAAbGxAy4AEh5gNwBBGByoIBAIueBd12TUjqAAAAAElFTkSuQmCC":IMAGE_PATH+"/fullscreen.png";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;
App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
-App.loadPlugins=function(b,e){EditorUi.debug("Loading plugins",b);for(var d=0;d<b.length;d++)if(null!=b[d]&&0<b[d].length)try{var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[d]];null!=c?null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(c):mxscript(c):e?mxinclude(c):mxscript(drawDevUrl+c)):null!=window.console&&console.log("Unknown plugin:",b[d])}catch(k){null!=window.console&&console.log("Error loading plugin:",b[d],k)}};
+App.loadPlugins=function(b,e){EditorUi.debug("Loading plugins",b);for(var d=0;d<b.length;d++)if(null!=b[d]&&0<b[d].length)try{var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[d]];null!=c?null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(c):mxscript(c):e?mxinclude(c):mxscript(drawDevUrl+c)):null!=window.console&&console.log("Unknown plugin:",b[d])}catch(g){null!=window.console&&console.log("Error loading plugin:",b[d],g)}};
App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};
App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this);null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));
this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this);null!=this.gitLab&&this.gitLab.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));this.notion="1"==urlParams.ntn?new NotionClient(this):null;null!=this.notion&&this.notion.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));
if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var e=mxUtils.bind(this,function(){if("undefined"!==
-typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(g){null!=window.console&&console.error(g)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var d=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var b=
+typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(k){null!=window.console&&console.error(k)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var d=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var b=
mxUtils.bind(this,function(){this.drive=new DriveClient(this);this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b),window.DrawGapiClientCallback=null):b()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=d)});d()}if("1"!=
-urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(g){null!=window.console&&console.error(g)}}else null==window.DrawDropboxClientCallback&&
+urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(k){null!=window.console&&console.error(k)}}else null==window.DrawDropboxClientCallback&&
(window.DrawDropboxClientCallback=c)});c()}if("1"!=urlParams.embed){if(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||
mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(b){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){b.prompt()})})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOffline()||mxClient.IS_ANDROID||mxClient.IS_IOS||null!=urlParams.open||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var b=this.getCurrentFile(),b=null!=b?b.getMode():null;b==App.MODE_DEVICE||
-b==App.MODE_BROWSER?this.showDownloadDesktopBanner():"1"!=urlParams.embed&&this.getServiceName()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var k=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var b=this.getCurrentFile();null!=b&&null!=b.sync&&(b.sync.destroy(),b.sync=null,b=mxUtils.htmlEntities(mxResources.get("timeout")),
-this.editor.setStatus('<div title="'+b+'" class="geStatusAlert" style="overflow:hidden;">'+b+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout);(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(b){window.clearTimeout(k)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display=
+b==App.MODE_BROWSER?this.showDownloadDesktopBanner():"1"!=urlParams.embed&&this.getServiceName()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var g=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var b=this.getCurrentFile();null!=b&&null!=b.sync&&(b.sync.destroy(),b.sync=null,b=mxUtils.htmlEntities(mxResources.get("timeout")),
+this.editor.setStatus('<div title="'+b+'" class="geStatusAlert" style="overflow:hidden;">'+b+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout);(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(b){window.clearTimeout(g)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display=
"inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),
this.icon.style.padding="6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(b){this.appIconClicked(b)})),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild));this.editor.graph.isViewer()&&this.initializeViewerMode()};
App.prototype.scheduleSanityCheck=function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.sanityCheckThread||(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};
@@ -11377,10 +11382,10 @@ App.prototype.showRatingBanner=function(){if(!(this.bannerShowing||this.hideBann
"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.closeImage);e.setAttribute("title",mxResources.get("close"));e.setAttribute("border","0");e.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(e);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var d=document.createElement("img");
d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.setAttribute("title","1 star");d.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");d.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(d);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.setAttribute("title","2 star");c.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");c.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(c);var k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.setAttribute("title","3 star");k.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");k.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(k);var g=document.createElement("img");g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.setAttribute("title","4 star");g.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");g.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(g);this.bannerShowing=!0;var m=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));mxEvent.addListener(c,"click",mxUtils.bind(this,
-function(b){mxEvent.consume(b);m()}));mxEvent.addListener(k,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");m()}));e=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m()}),1E3)});window.setTimeout(mxUtils.bind(this,
+b.appendChild(c);var g=document.createElement("img");g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.setAttribute("title","3 star");g.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");g.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(g);var k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.setAttribute("title","4 star");k.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");k.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(k);this.bannerShowing=!0;var n=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);n()}));mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);n()}));mxEvent.addListener(c,"click",mxUtils.bind(this,
+function(b){mxEvent.consume(b);n()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);n()}));mxEvent.addListener(k,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");n()}));e=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){n()}),1E3)});window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(e,6E4)}};
App.prototype.checkLicense=function(){var b=this.drive.getUser(),e=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=e&&null!=b.id){var d=e.lastIndexOf("@"),c=0<=d?e.substring(d+1):"",b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(b){try{if(200<=b.getStatus()&&299>=b.getStatus()){var d=b.getText();if(0<d.length){var e=JSON.parse(d);null!=e&&this.handleLicense(e,
c)}}}catch(f){}}))}};App.prototype.handleLicense=function(b,e){null!=b&&null!=b.plugins&&App.loadPlugins(b.plugins.split(";"),!0)};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
@@ -11388,14 +11393,14 @@ App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var e
App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(e){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,e=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=e&&(b=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}};
-App.prototype.getThumbnail=function(b,e){var d=!1;try{var c=!0,k=window.setTimeout(mxUtils.bind(this,function(){c=!1;e(null)}),this.timeout),g=mxUtils.bind(this,function(b){window.clearTimeout(k);c&&e(b)});null==this.thumbImageCache&&(this.thumbImageCache={});var m=this.editor.graph,f=m.backgroundImage,l=null!=m.themes&&"darkTheme"==m.defaultThemeName;if(null!=this.pages&&(l||this.currentPage!=this.pages[0])){var n=m.getGlobalVariable,m=this.createTemporaryGraph(l?m.getDefaultStylesheet():m.getStylesheet()),
-p=this.pages[0];null!=p.viewState&&null!=p.viewState?(f=p.viewState.backgroundImage,m.backgroundImage=f):this.currentPage==this.pages[0]&&(m.backgroundImage=f);l&&(m.defaultThemeName="default");m.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:n.apply(this,arguments)};m.getGlobalVariable=n;document.body.appendChild(m.container);m.model.setRoot(p.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(b){try{m!=this.editor.graph&&
-null!=m.container.parentNode&&m.container.parentNode.removeChild(m.container)}catch(I){b=null}g(b)}),b,this.thumbImageCache,"#ffffff",function(){g()},null,null,null,null,null,null,m,null,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var q=document.createElement("canvas"),t=m.getGraphBounds(),u=m.view.translate,v=m.view.scale;null!=f&&t.add(new mxRectangle((u.x+f.x)*v,(u.y+f.y)*v,f.width*v,f.height*v));var x=b/t.width,x=Math.min(1,Math.min(3*b/(4*t.height),
-x)),A=Math.floor(t.x),z=Math.floor(t.y);q.setAttribute("width",Math.ceil(x*(t.width+4)));q.setAttribute("height",Math.ceil(x*(t.height+4)));var y=q.getContext("2d");y.scale(x,x);y.translate(-A,-z);var B=m.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";y.save();y.fillStyle=B;y.fillRect(A,z,Math.ceil(t.width+4),Math.ceil(t.height+4));y.restore();if(null!=f){var C=new Image;C.src=f.src;y.drawImage(C,f.x*x,f.y*x,f.width*x,f.height*x)}var E=new mxJsCanvas(q),G=new mxAsyncCanvas(this.thumbImageCache);
-E.images=this.thumbImageCache.images;var F=new mxImageExport;F.drawShape=function(b,c){b.shape instanceof mxShape&&b.shape.checkBounds()&&(c.save(),c.translate(.5,.5),b.shape.paint(c),c.translate(-.5,-.5),c.restore())};F.drawText=function(b,c){};F.drawState(m.getView().getState(m.model.root),G);G.finish(mxUtils.bind(this,function(){try{F.drawState(m.getView().getState(m.model.root),E),m!=this.editor.graph&&null!=m.container.parentNode&&m.container.parentNode.removeChild(m.container)}catch(D){q=null}g(q)}));
-d=!0}}catch(D){d=!1,null!=m&&m!=this.editor.graph&&null!=m.container.parentNode&&m.container.parentNode.removeChild(m.container)}d||window.clearTimeout(k);return d};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
+App.prototype.getThumbnail=function(b,e){var d=!1;try{var c=!0,g=window.setTimeout(mxUtils.bind(this,function(){c=!1;e(null)}),this.timeout),k=mxUtils.bind(this,function(b){window.clearTimeout(g);c&&e(b)});null==this.thumbImageCache&&(this.thumbImageCache={});var n=this.editor.graph,f=n.backgroundImage,l=null!=n.themes&&"darkTheme"==n.defaultThemeName;if(null!=this.pages&&(l||this.currentPage!=this.pages[0])){var m=n.getGlobalVariable,n=this.createTemporaryGraph(l?n.getDefaultStylesheet():n.getStylesheet()),
+p=this.pages[0];null!=p.viewState&&null!=p.viewState?(f=p.viewState.backgroundImage,n.backgroundImage=f):this.currentPage==this.pages[0]&&(n.backgroundImage=f);l&&(n.defaultThemeName="default");n.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,arguments)};n.getGlobalVariable=m;document.body.appendChild(n.container);n.model.setRoot(p.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(b){try{n!=this.editor.graph&&
+null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}catch(I){b=null}k(b)}),b,this.thumbImageCache,"#ffffff",function(){k()},null,null,null,null,null,null,n,null,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var q=document.createElement("canvas"),t=n.getGraphBounds(),u=n.view.translate,v=n.view.scale;null!=f&&t.add(new mxRectangle((u.x+f.x)*v,(u.y+f.y)*v,f.width*v,f.height*v));var y=b/t.width,y=Math.min(1,Math.min(3*b/(4*t.height),
+y)),A=Math.floor(t.x),z=Math.floor(t.y);q.setAttribute("width",Math.ceil(y*(t.width+4)));q.setAttribute("height",Math.ceil(y*(t.height+4)));var x=q.getContext("2d");x.scale(y,y);x.translate(-A,-z);var B=n.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";x.save();x.fillStyle=B;x.fillRect(A,z,Math.ceil(t.width+4),Math.ceil(t.height+4));x.restore();if(null!=f){var C=new Image;C.src=f.src;x.drawImage(C,f.x*y,f.y*y,f.width*y,f.height*y)}var E=new mxJsCanvas(q),F=new mxAsyncCanvas(this.thumbImageCache);
+E.images=this.thumbImageCache.images;var G=new mxImageExport;G.drawShape=function(b,c){b.shape instanceof mxShape&&b.shape.checkBounds()&&(c.save(),c.translate(.5,.5),b.shape.paint(c),c.translate(-.5,-.5),c.restore())};G.drawText=function(b,c){};G.drawState(n.getView().getState(n.model.root),F);F.finish(mxUtils.bind(this,function(){try{G.drawState(n.getView().getState(n.model.root),E),n!=this.editor.graph&&null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}catch(D){q=null}k(q)}));
+d=!0}}catch(D){d=!1,null!=n&&n!=this.editor.graph&&null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}d||window.clearTimeout(g);return d};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(e,d){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();e=null!=c?c.getMode():e;e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
-this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(d)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var k=new Date;k.setYear(k.getFullYear()+1);document.cookie="MODE="+e+"; expires="+k.toUTCString()}}catch(g){}}})();
+this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(d)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var g=new Date;g.setYear(g.getFullYear()+1);document.cookie="MODE="+e+"; expires="+g.toUTCString()}}catch(k){}}})();
App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var e=this.getCurrentFile(),d=null!=e?e.getMode():null;d==App.MODE_GOOGLE?null!=e&&null!=e.desc&&null!=e.desc.parents&&0<e.desc.parents.length&&!mxEvent.isShiftDown(b)?this.openLink("https://drive.google.com/drive/folders/"+e.desc.parents[0].id):null!=e&&null!=e.getId()?this.openLink("https://drive.google.com/open?id="+e.getId()):this.openLink("https://drive.google.com/?authuser=0"):d==App.MODE_ONEDRIVE?null!=
e&&null!=e.meta&&null!=e.meta.webUrl?(d=e.meta.webUrl,e=encodeURIComponent(e.meta.name),d.substring(d.length-e.length,d.length)==e&&(d=d.substring(0,d.length-e.length)),this.openLink(d)):this.openLink("https://onedrive.live.com/"):d==App.MODE_DROPBOX?null!=e&&null!=e.stat&&null!=e.stat.path_display?(d="https://www.dropbox.com/home/Apps/drawio"+e.stat.path_display,mxEvent.isShiftDown(b)||(d=d.substring(0,d.length-e.stat.name.length)),this.openLink(d)):this.openLink("https://www.dropbox.com/"):d==App.MODE_TRELLO?
this.openLink("https://trello.com/"):d==App.MODE_NOTION?this.openLink("https://www.notion.so/"):d==App.MODE_GITHUB?null!=e&&e.constructor==GitHubFile?this.openLink(e.meta.html_url):this.openLink("https://github.com/"):d==App.MODE_GITLAB?null!=e&&e.constructor==GitLabFile?this.openLink(e.meta.html_url):this.openLink(DRAWIO_GITLAB_URL):d==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(b)};
@@ -11408,20 +11413,20 @@ App.prototype.showRefreshDialog=function(b,e){if(!this.showingRefreshDialog&&(th
this.createRealtimeNotice();d.style.left="0";d.style.right="0";d.style.borderRadius="0";d.style.borderLeftStyle="none";d.style.borderRightStyle="none";d.style.marginBottom="26px";d.style.padding="8px 0 8px 0";this.dialog.container.appendChild(d)}};
App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=
mxResources.get("close");e.appendChild(b);mxEvent.addListener(b,"click",function(b){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(b))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)},2E3)},15E3)}};
-App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(c,d,e,k,n){"ResizeObserver loop limit exceeded"!=c&&(EditorUi.logError("Uncaught: "+(null!=c?c:""),d,e,k,n,null,!0),b.handleError({message:c},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
-function(b){var c=this.getCurrentFile();EditorUi.debug("storage event",b,c);null!=c&&".draft-alive-check"==b.key&&null!=b.newValue&&null!=c.draftId&&(this.draftAliveCheck=b.newValue,c.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(g){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(b){try{this.hideDialog();
-var c=this.getDiagramId(),d=this.getCurrentFile();null!=d&&d.getHash()==c||this.loadFile(c,!0)}catch(l){null!=document.body&&this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var b=this.getCurrentFile();window.location.hash=null!=b?b.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}catch(g){this.handleError(g,
+App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(c,d,e,g,m){"ResizeObserver loop limit exceeded"!=c&&(EditorUi.logError("Uncaught: "+(null!=c?c:""),d,e,g,m,null,!0),b.handleError({message:c},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
+function(b){var c=this.getCurrentFile();EditorUi.debug("storage event",b,c);null!=c&&".draft-alive-check"==b.key&&null!=b.newValue&&null!=c.draftId&&(this.draftAliveCheck=b.newValue,c.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(k){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(b){try{this.hideDialog();
+var c=this.getDiagramId(),d=this.getCurrentFile();null!=d&&d.getHash()==c||this.loadFile(c,!0)}catch(l){null!=document.body&&this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var b=this.getCurrentFile();window.location.hash=null!=b?b.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}catch(k){this.handleError(k,
mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var e=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 b=mxUtils.bind(this,function(b){"data:image/png;base64,"==b.substring(0,22)&&(b=this.extractGraphModelFromPng(b));var c=urlParams.title,
c=null!=c?decodeURIComponent(c):this.defaultFilename;b=new LocalFile(this,b,c,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(b.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(b);this.getCurrentFile().setModified(!this.editor.chromeless)}),c=window.opener||window.parent;if(c!=window){var d=urlParams.create;null!=d?b(c[decodeURIComponent(d)]):(d=urlParams.data,null!=d?b(decodeURIComponent(d)):this.installMessageHandler(mxUtils.bind(this,function(d,
e){e.source==c&&b(d)})))}}else if(null==this.dialog)if("1"==urlParams.demo)d=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=d;else{d=!1;try{d=null!=window.opener&&null!=window.opener.openFile}catch(l){}d?this.spinner.spin(document.body,mxResources.get("loading")):(d=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode&&!EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||null!=d&&0!=d.length||this.editor.isChromelessView()?
null!=d&&0<d.length?this.loadFile(d,null,null,mxUtils.bind(this,function(){var b=decodeURIComponent(urlParams.viewbox||"");if(""!=b)try{var c=JSON.parse(b);this.editor.graph.fitWindow(c,c.border)}catch(p){console.error(p)}})):"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),d=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=d&&0<d.length&&
-this.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),k=mxUtils.bind(this,function(b){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,b,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var c=urlParams.title,c=null!=c?decodeURIComponent(c):this.defaultFilename;b=this.getServiceCount(!0);
+this.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),g=mxUtils.bind(this,function(b){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,b,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var c=urlParams.title,c=null!=c?decodeURIComponent(c):this.defaultFilename;b=this.getServiceCount(!0);
isLocalStorage&&b++;var d=4>=b?2:6<b?4:3,c=new CreateDialog(this,c,mxUtils.bind(this,function(b,c){if(null==c){this.hideDialog();var d=Editor.useLocalStorage;this.createFile(0<b.length?b:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=d}else this.pickFolder(c,mxUtils.bind(this,function(d){this.createFile(b,this.getFileData(!0),null,c,null,!0,d)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,d,null,null,null,this.editor.fileExtensions);this.showDialog(c.container,
-400,b>d?390:270,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&this.showSplash()}));c.init()}}),d=decodeURIComponent(d);if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))try{null!=window.opener&&null!=window.opener[d]?k(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(g){this.handleError(g,mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(b){k(b)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),
+400,b>d?390:270,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&this.showSplash()}));c.init()}}),d=decodeURIComponent(d);if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))try{null!=window.opener&&null!=window.opener[d]?g(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(b){g(b)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),
c)}))}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.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&
-window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open"])),window.location.hash=urlParams.open),e())}}catch(g){this.handleError(g)}};
+window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open"])),window.location.hash=urlParams.open),e())}}catch(k){this.handleError(k)}};
App.prototype.loadDraft=function(b,e){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var b=this.getCurrentFile();null!=b&&(b.fileChanged(),null!=e&&e())}),0)}),null,null,!0)};
-App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.getDatabaseItems(mxUtils.bind(this,function(e){for(var d=[],c=0;c<e.length;c++)try{var k=e[c].key;if(null!=k&&".draft_"==k.substring(0,7)){var g=JSON.parse(e[c].data);null!=g&&"draft"==g.type&&g.aliveCheck!=b&&(g.key=k,d.push(g))}}catch(m){}1==d.length?this.loadDraft(d[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(d[0].key)})):
+App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.getDatabaseItems(mxUtils.bind(this,function(e){for(var d=[],c=0;c<e.length;c++)try{var g=e[c].key;if(null!=g&&".draft_"==g.substring(0,7)){var k=JSON.parse(e[c].data);null!=k&&"draft"==k.type&&k.aliveCheck!=b&&(k.key=g,d.push(k))}}catch(n){}1==d.length?this.loadDraft(d[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(d[0].key)})):
1<d.length?(e=new Date(d[0].modified),e=new DraftDialog(this,1<d.length?mxResources.get("selectDraft"):mxResources.get("draftFound",[e.toLocaleDateString()+" "+e.toLocaleTimeString()]),1<d.length?null:d[0].data,mxUtils.bind(this,function(b){this.hideDialog();b=""!=b?b:0;this.loadDraft(d[b].data,mxUtils.bind(this,function(){this.removeDatabaseItem(d[b].key)}))}),mxUtils.bind(this,function(b,c){b=""!=b?b:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(d[b].key);
null!=c&&c()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<d.length?d:null),this.showDialog(e.container,640,480,!0,!1,mxUtils.bind(this,function(b){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)})),e.init()):"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}),mxUtils.bind(this,function(){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(e){}};
@@ -11430,92 +11435,92 @@ mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash
App.prototype.addLanguageMenu=function(b,e){var d=null;if(null!=this.menus.get("language")){d=document.createElement("div");d.setAttribute("title",mxResources.get("language"));d.className="geIcon geSprite geSprite-globe";d.style.position="absolute";d.style.cursor="pointer";d.style.bottom="20px";d.style.right="20px";if(e){d.style.direction="rtl";d.style.textAlign="right";d.style.right="24px";var c=document.createElement("span");c.style.display="inline-block";c.style.fontSize="12px";c.style.margin=
"5px 24px 0 0";c.style.color="gray";c.style.userSelect="none";mxUtils.write(c,mxResources.get("language"));d.appendChild(c)}mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(this.menus.get("language").funct);c.div.className+=" geMenubarMenu";c.smartSeparators=!0;c.showDisabled=!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var e=mxUtils.getOffset(d);
c.popup(e.x,e.y+d.offsetHeight,null,b);this.setCurrentMenu(c)}));b.appendChild(d)}return d};
-App.prototype.loadFileSystemEntry=function(b,e,d){d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});try{b.getFile().then(mxUtils.bind(this,function(c){var k=new FileReader;k.onload=mxUtils.bind(this,function(g){try{if(null!=e){var k=g.target.result;"image/png"==c.type&&(k=this.extractGraphModelFromPng(k));e(new LocalFile(this,k,c.name,null,b,c))}else this.openFileHandle(g.target.result,c.name,c,!1,b)}catch(f){d(f)}});k.onerror=d;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||
-"image/svg"===c.type.substring(0,9)?k.readAsText(c):k.readAsDataURL(c)}),d)}catch(c){d(c)}};
-App.prototype.createFileSystemOptions=function(b){var e=[],d=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(d=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var k={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};k.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==d?e.splice(0,0,
-k):this.editor.diagramFileTypes[c].extension==d?e.splice(0,0,k):e.push(k)}return{types:e,fileName:b}};App.prototype.showSaveFilePicker=function(b,e,d){e=null!=e?e:mxUtils.bind(this,function(b){"AbortError"!=b.name&&this.handleError(b)});d=null!=d?d:this.createFileSystemOptions();window.showSaveFilePicker(d).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(d){b(c,d)}),e)}),e)};
+App.prototype.loadFileSystemEntry=function(b,e,d){d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});try{b.getFile().then(mxUtils.bind(this,function(c){var g=new FileReader;g.onload=mxUtils.bind(this,function(g){try{if(null!=e){var k=g.target.result;"image/png"==c.type&&(k=this.extractGraphModelFromPng(k));e(new LocalFile(this,k,c.name,null,b,c))}else this.openFileHandle(g.target.result,c.name,c,!1,b)}catch(f){d(f)}});g.onerror=d;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||
+"image/svg"===c.type.substring(0,9)?g.readAsText(c):g.readAsDataURL(c)}),d)}catch(c){d(c)}};
+App.prototype.createFileSystemOptions=function(b){var e=[],d=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(d=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var g={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};g.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==d?e.splice(0,0,
+g):this.editor.diagramFileTypes[c].extension==d?e.splice(0,0,g):e.push(g)}return{types:e,fileName:b}};App.prototype.showSaveFilePicker=function(b,e,d){e=null!=e?e:mxUtils.bind(this,function(b){"AbortError"!=b.name&&this.handleError(b)});d=null!=d?d:this.createFileSystemOptions();window.showSaveFilePicker(d).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(d){b(c,d)}),e)}),e)};
App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getPeerForMode(b);if(null!=e)e.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(b[0])}),
mxUtils.bind(this,function(b){"AbortError"!=b.name&&this.handleError(b)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.openFiles(d.files),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.openFileInputElt=d}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(b,c){StorageFile.listFiles(this,"F",b,c)});window.openBrowserFile=mxUtils.bind(this,function(b,c,d){StorageFile.getFileContent(this,b,c,d)});window.deleteBrowserFile=mxUtils.bind(this,function(b,c,d){StorageFile.deleteFile(this,b,c,d)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(c,d){var e=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=d.substring(d.length-4)||(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,c,d):new LocalFile(this,c,d))}),f=this.getCurrentFile();null!=f&&f.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}));var k=this.dialog,g=k.close;this.dialog.close=mxUtils.bind(this,function(b){Editor.useLocalStorage=
-c;g.apply(k,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(m){this.handleError(m)}};
-App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO||b==App.MODE_NOTION){var e=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:b==App.MODE_NOTION?this.notion:this.dropbox;null!=e&&e.pickLibrary(mxUtils.bind(this,function(b,c){if(null!=c)try{this.loadLibrary(c)}catch(m){this.handleError(m,
+function(c,d){var e=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=d.substring(d.length-4)||(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,c,d):new LocalFile(this,c,d))}),f=this.getCurrentFile();null!=f&&f.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}));var g=this.dialog,k=g.close;this.dialog.close=mxUtils.bind(this,function(b){Editor.useLocalStorage=
+c;k.apply(g,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(n){this.handleError(n)}};
+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO||b==App.MODE_NOTION){var e=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:b==App.MODE_NOTION?this.notion:this.dropbox;null!=e&&e.pickLibrary(mxUtils.bind(this,function(b,c){if(null!=c)try{this.loadLibrary(c)}catch(n){this.handleError(n,
mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,mxResources.get("loading"))&&e.getLibrary(b,mxUtils.bind(this,function(b){this.spinner.stop();try{this.loadLibrary(b)}catch(f){this.handleError(f,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(b){this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var d=document.createElement("input");d.setAttribute("type",
"file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files){for(var b=0;b<d.files.length;b++)mxUtils.bind(this,function(b){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{this.loadLibrary(new LocalLibrary(this,c.target.result,b.name))}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}});c.readAsText(b)})(d.files[b]);d.type="";d.type="file";d.value=""}}));d.style.display="none";document.body.appendChild(d);this.libFileInputElt=d}this.libFileInputElt.click()}else{window.openNew=
!1;window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(b,c){StorageFile.listFiles(this,"L",b,c)});window.openBrowserFile=mxUtils.bind(this,function(b,c,d){StorageFile.getFileContent(this,b,c,d)});window.deleteBrowserFile=mxUtils.bind(this,function(b,c,d){StorageFile.deleteFile(this,b,c,d)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,
-function(c,d){try{this.loadLibrary(b==App.MODE_BROWSER?new StorageLibrary(this,c,d):new LocalLibrary(this,c,d))}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=c;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,e,d,c,k,g,m){try{c=null!=c?c:this.mode;k=null!=k?k:!1;g=null!=g?g:!1;var f=this.createLibraryDataFromImages(e),l=mxUtils.bind(this,function(b){this.spinner.stop();null!=m&&m();this.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)});null==d&&c==App.MODE_DEVICE&&(d=new LocalLibrary(this,f,b));if(null==d)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+function(c,d){try{this.loadLibrary(b==App.MODE_BROWSER?new StorageLibrary(this,c,d):new LocalLibrary(this,c,d))}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=c;window.openFile=null})}};
+App.prototype.saveLibrary=function(b,e,d,c,g,k,n){try{c=null!=c?c:this.mode;g=null!=g?g:!1;k=null!=k?k:!1;var f=this.createLibraryDataFromImages(e),l=mxUtils.bind(this,function(b){this.spinner.stop();null!=n&&n();this.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)});null==d&&c==App.MODE_DEVICE&&(d=new LocalLibrary(this,f,b));if(null==d)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
this.drive.insertFile(b,f,d,mxUtils.bind(this,function(b){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(b,e)}),l,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,f,mxUtils.bind(this,function(b){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(b,e)}),l,d):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
f,mxUtils.bind(this,function(b){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(b,e)}),l,d):c==App.MODE_NOTION&&null!=this.notion&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.notion.insertLibrary(b,f,mxUtils.bind(this,function(b){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(b,e)}),l,d):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,f,mxUtils.bind(this,function(b){this.spinner.stop();
this.hideDialog(!0);this.libraryLoaded(b,e)}),l,d):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,f,mxUtils.bind(this,function(b){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(b,e)}),l,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,f,mxUtils.bind(this,function(b){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(b,
-e)}),l,d):c==App.MODE_BROWSER?(d=mxUtils.bind(this,function(){var c=new StorageLibrary(this,f,b);c.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,e)}),l)}),null==localStorage.getItem(b)?d():this.confirm(mxResources.get("replaceIt",[b]),d)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(k||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(f);var n=mxUtils.bind(this,function(){d.save(!0,mxUtils.bind(this,
-function(b){this.spinner.stop();this.hideDialog(!0);g||this.libraryLoaded(d,e);null!=m&&m()}),l)});if(b!=d.getTitle()){var p=d.getHash();d.rename(b,mxUtils.bind(this,function(b){d.constructor!=LocalLibrary&&p!=d.getHash()&&(mxSettings.removeCustomLibrary(p),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(p);n()}),l)}else n()}}catch(q){this.handleError(q)}};
+e)}),l,d):c==App.MODE_BROWSER?(d=mxUtils.bind(this,function(){var c=new StorageLibrary(this,f,b);c.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,e)}),l)}),null==localStorage.getItem(b)?d():this.confirm(mxResources.get("replaceIt",[b]),d)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(f);var m=mxUtils.bind(this,function(){d.save(!0,mxUtils.bind(this,
+function(b){this.spinner.stop();this.hideDialog(!0);k||this.libraryLoaded(d,e);null!=n&&n()}),l)});if(b!=d.getTitle()){var p=d.getHash();d.rename(b,mxUtils.bind(this,function(b){d.constructor!=LocalLibrary&&p!=d.getHash()&&(mxSettings.removeCustomLibrary(p),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(p);m()}),l)}else m()}}catch(q){this.handleError(q)}};
App.prototype.saveFile=function(b,e){var d=this.getCurrentFile();if(null!=d){var c=mxUtils.bind(this,function(){EditorUi.enableDrafts&&d.removeDraft();this.getCurrentFile()==d||d.isModified()||(d.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=e&&e()});if(b||null==d.getTitle()||null!=d.invalidFileHandle||null==this.mode)if(null!=d&&d.constructor==LocalFile&&null!=d.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
-function(b,e){d.invalidFileHandle=null;d.fileHandle=b;d.title=e.name;d.desc=e;this.save(e.name,c)}),null,this.createFileSystemOptions(d.getTitle()));else{var k=null!=d.getTitle()?d.getTitle():this.defaultFilename,g=!mxClient.IS_IOS||!navigator.standalone,m=this.mode,f=this.getServiceCount(!0);isLocalStorage&&f++;var l=4>=f?2:6<f?4:3,k=new CreateDialog(this,k,mxUtils.bind(this,function(b,e,f){null!=b&&0<b.length&&(/(\.pdf)$/i.test(b)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
-function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){f.value=b.split(".").slice(0,-1).join(".");f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?f.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==m&&e==App.MODE_DEVICE?null!=d&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(b,e){d.fileHandle=b;d.mode=App.MODE_DEVICE;d.title=e.name;
-d.desc=e;this.setMode(App.MODE_DEVICE);this.save(e.name,c)}),mxUtils.bind(this,function(b){"AbortError"!=b.name&&this.handleError(b)}),this.createFileSystemOptions(b)):(this.setMode(App.MODE_DEVICE),this.save(b,c)):"download"==e?(new LocalFile(this,null,b)).save():"_blank"==e?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):m!=e?this.pickFolder(e,mxUtils.bind(this,function(d){this.createFile(b,
-this.getFileData(/(\.xml)$/i.test(b)||0>b.indexOf(".")||/(\.drawio)$/i.test(b),/(\.svg)$/i.test(b),/(\.html)$/i.test(b)),null,e,c,null==this.mode,d)})):null!=e&&this.save(b,c)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,g,null,!0,l,null,null,null,this.editor.fileExtensions,!1);this.showDialog(k.container,400,f>l?390:270,!0,!0);k.init()}else this.save(d.getTitle(),c)}};
-App.prototype.loadTemplate=function(b,e,d,c,k){var g=!1,m=b;this.editor.isCorsEnabledForUrl(m)||(m="t="+(new Date).getTime(),m=PROXY_URL+"?url="+encodeURIComponent(b)+"&base64=1&"+m,g=!0);var f=null!=c?c:b;this.editor.loadUrl(m,mxUtils.bind(this,function(c){try{var l=g?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c):c,m=/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f);if(m||this.isVisioData(l))m||(f=k?this.isRemoteVisioData(l)?"raw.vss":"raw.vssx":this.isRemoteVisioData(l)?
+function(b,e){d.invalidFileHandle=null;d.fileHandle=b;d.title=e.name;d.desc=e;this.save(e.name,c)}),null,this.createFileSystemOptions(d.getTitle()));else{var g=null!=d.getTitle()?d.getTitle():this.defaultFilename,k=!mxClient.IS_IOS||!navigator.standalone,n=this.mode,f=this.getServiceCount(!0);isLocalStorage&&f++;var l=4>=f?2:6<f?4:3,g=new CreateDialog(this,g,mxUtils.bind(this,function(b,e,f){null!=b&&0<b.length&&(/(\.pdf)$/i.test(b)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
+function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){f.value=b.split(".").slice(0,-1).join(".");f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?f.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==n&&e==App.MODE_DEVICE?null!=d&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(b,e){d.fileHandle=b;d.mode=App.MODE_DEVICE;d.title=e.name;
+d.desc=e;this.setMode(App.MODE_DEVICE);this.save(e.name,c)}),mxUtils.bind(this,function(b){"AbortError"!=b.name&&this.handleError(b)}),this.createFileSystemOptions(b)):(this.setMode(App.MODE_DEVICE),this.save(b,c)):"download"==e?(new LocalFile(this,null,b)).save():"_blank"==e?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):n!=e?this.pickFolder(e,mxUtils.bind(this,function(d){this.createFile(b,
+this.getFileData(/(\.xml)$/i.test(b)||0>b.indexOf(".")||/(\.drawio)$/i.test(b),/(\.svg)$/i.test(b),/(\.html)$/i.test(b)),null,e,c,null==this.mode,d)})):null!=e&&this.save(b,c)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,k,null,!0,l,null,null,null,this.editor.fileExtensions,!1);this.showDialog(g.container,400,f>l?390:270,!0,!0);g.init()}else this.save(d.getTitle(),c)}};
+App.prototype.loadTemplate=function(b,e,d,c,g){var k=!1,n=b;this.editor.isCorsEnabledForUrl(n)||(n="t="+(new Date).getTime(),n=PROXY_URL+"?url="+encodeURIComponent(b)+"&base64=1&"+n,k=!0);var f=null!=c?c:b;this.editor.loadUrl(n,mxUtils.bind(this,function(c){try{var l=k?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c):c,n=/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f);if(n||this.isVisioData(l))n||(f=g?this.isRemoteVisioData(l)?"raw.vss":"raw.vssx":this.isRemoteVisioData(l)?
"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(c.substring(c.indexOf(",")+1)),function(b){e(b)},d,f);else if(!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,f))this.parseFile(new Blob([l],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&e(b.responseText)}),b);else if(this.isLucidChartData(l))this.convertLucidChart(l,mxUtils.bind(this,function(b){e(b)}),
-mxUtils.bind(this,function(b){d(b)}));else{if(/(\.png)($|\?)/i.test(f)||this.isPngData(l))l=this.extractGraphModelFromPng(c);e(l)}}catch(q){d(q)}}),d,/(\.png)($|\?)/i.test(f)||/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f),null,null,g)};
+mxUtils.bind(this,function(b){d(b)}));else{if(/(\.png)($|\?)/i.test(f)||this.isPngData(l))l=this.extractGraphModelFromPng(c);e(l)}}catch(q){d(q)}}),d,/(\.png)($|\?)/i.test(f)||/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f),null,null,k)};
App.prototype.getPeerForMode=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_TRELLO?this.trello:b==App.MODE_NOTION?this.notion:null};
-App.prototype.createFile=function(b,e,d,c,k,g,m,f,l){c=f?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var n=mxUtils.bind(this,function(){this.spinner.stop()}),p=mxUtils.bind(this,function(b){n();null==b&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=b&&this.handleError(b)});try{c==App.MODE_GOOGLE&&null!=this.drive?(null==m&&null!=this.stateArg&&null!=this.stateArg.folderId&&(m=this.stateArg.folderId),
-this.drive.insertFile(b,e,m,mxUtils.bind(this,function(b){n();this.fileCreated(b,d,g,k,l)}),p)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,mxUtils.bind(this,function(b){n();this.fileCreated(b,d,g,k,l)}),p,!1,m):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,mxUtils.bind(this,function(b){n();this.fileCreated(b,d,g,k,l)}),p,!1,m):c==App.MODE_NOTION&&null!=this.notion?this.notion.insertFile(b,e,mxUtils.bind(this,function(b){n();this.fileCreated(b,d,g,k,l)}),p,
-!1,m):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,mxUtils.bind(this,function(b){n();this.fileCreated(b,d,g,k,l)}),p,!1,m):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,mxUtils.bind(this,function(b){n();this.fileCreated(b,d,g,k,l)}),p):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,e,mxUtils.bind(this,function(b){n();this.fileCreated(b,d,g,k,l)}),p,!1,m):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,mxUtils.bind(this,function(b){n();
-this.fileCreated(b,d,g,k,l)}),p):!f&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(n(),this.showSaveFilePicker(mxUtils.bind(this,function(b,c){var f=new LocalFile(this,e,c.name,null,b,c);f.saveFile(c.name,!1,mxUtils.bind(this,function(){this.fileCreated(f,d,g,k,l)}),p,!0)}),mxUtils.bind(this,function(b){"AbortError"!=b.name&&p(b)}),this.createFileSystemOptions(b))):(n(),this.fileCreated(new LocalFile(this,e,b,null==c),d,g,k,l))}catch(q){n(),this.handleError(q)}}};
-App.prototype.fileCreated=function(b,e,d,c,k){var g=window.location.pathname;null!=e&&0<e.length&&(g+="?libs="+e);null!=k&&0<k.length&&(g+="?clibs="+k);g=this.getUrl(g);b.getMode()!=App.MODE_DEVICE&&(g+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var m=b.getData(),m=0<m.length?this.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,!0):null,f=window.location.protocol+"//"+window.location.hostname+g,l=m,n=null;null!=m&&/\.svg$/i.test(b.getTitle())&&
-(n=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(n.container),l=this.decodeNodeIntoGraph(l,n));b.setData(this.createFileData(m,n,b,f));null!=n&&n.container.parentNode.removeChild(n.container);var p=mxUtils.bind(this,function(){this.spinner.stop()}),q=mxUtils.bind(this,function(){p();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var l=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);d&&b.addAllSavedStatus();
-null!=e&&this.sidebar.showEntries(e);if(null!=k){for(var c=[],f=k.split(";"),g=0;g<f.length;g++)c.push(decodeURIComponent(f[g]));this.loadLibraries(c)}}),m=mxUtils.bind(this,function(){d||null==f||!f.isModified()?l():this.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==d||d?m():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
-null==b.getMode())),null!=c&&c(),window.openWindow(g,null,m))});b.constructor==LocalFile?q():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){q()}),mxUtils.bind(this,function(b){p();this.handleError(b)}))}};
-App.prototype.loadFile=function(b,e,d,c,k){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var g=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var f=mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var b=this.getCurrentFile();
+App.prototype.createFile=function(b,e,d,c,g,k,n,f,l){c=f?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var m=mxUtils.bind(this,function(){this.spinner.stop()}),p=mxUtils.bind(this,function(b){m();null==b&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=b&&this.handleError(b)});try{c==App.MODE_GOOGLE&&null!=this.drive?(null==n&&null!=this.stateArg&&null!=this.stateArg.folderId&&(n=this.stateArg.folderId),
+this.drive.insertFile(b,e,n,mxUtils.bind(this,function(b){m();this.fileCreated(b,d,k,g,l)}),p)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,mxUtils.bind(this,function(b){m();this.fileCreated(b,d,k,g,l)}),p,!1,n):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,mxUtils.bind(this,function(b){m();this.fileCreated(b,d,k,g,l)}),p,!1,n):c==App.MODE_NOTION&&null!=this.notion?this.notion.insertFile(b,e,mxUtils.bind(this,function(b){m();this.fileCreated(b,d,k,g,l)}),p,
+!1,n):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,mxUtils.bind(this,function(b){m();this.fileCreated(b,d,k,g,l)}),p,!1,n):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,mxUtils.bind(this,function(b){m();this.fileCreated(b,d,k,g,l)}),p):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,e,mxUtils.bind(this,function(b){m();this.fileCreated(b,d,k,g,l)}),p,!1,n):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,mxUtils.bind(this,function(b){m();
+this.fileCreated(b,d,k,g,l)}),p):!f&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(m(),this.showSaveFilePicker(mxUtils.bind(this,function(b,c){var f=new LocalFile(this,e,c.name,null,b,c);f.saveFile(c.name,!1,mxUtils.bind(this,function(){this.fileCreated(f,d,k,g,l)}),p,!0)}),mxUtils.bind(this,function(b){"AbortError"!=b.name&&p(b)}),this.createFileSystemOptions(b))):(m(),this.fileCreated(new LocalFile(this,e,b,null==c),d,k,g,l))}catch(q){m(),this.handleError(q)}}};
+App.prototype.fileCreated=function(b,e,d,c,g){var k=window.location.pathname;null!=e&&0<e.length&&(k+="?libs="+e);null!=g&&0<g.length&&(k+="?clibs="+g);k=this.getUrl(k);b.getMode()!=App.MODE_DEVICE&&(k+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var n=b.getData(),n=0<n.length?this.editor.extractGraphModel(mxUtils.parseXml(n).documentElement,!0):null,f=window.location.protocol+"//"+window.location.hostname+k,l=n,m=null;null!=n&&/\.svg$/i.test(b.getTitle())&&
+(m=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(m.container),l=this.decodeNodeIntoGraph(l,m));b.setData(this.createFileData(n,m,b,f));null!=m&&m.container.parentNode.removeChild(m.container);var p=mxUtils.bind(this,function(){this.spinner.stop()}),q=mxUtils.bind(this,function(){p();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var l=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);d&&b.addAllSavedStatus();
+null!=e&&this.sidebar.showEntries(e);if(null!=g){for(var c=[],f=g.split(";"),k=0;k<f.length;k++)c.push(decodeURIComponent(f[k]));this.loadLibraries(c)}}),n=mxUtils.bind(this,function(){d||null==f||!f.isModified()?l():this.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==d||d?n():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
+null==b.getMode())),null!=c&&c(),window.openWindow(k,null,n))});b.constructor==LocalFile?q():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){q()}),mxUtils.bind(this,function(b){p();this.handleError(b)}))}};
+App.prototype.loadFile=function(b,e,d,c,g){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var k=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var f=mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var b=this.getCurrentFile();
window.location.hash=null!=b?b.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(d){null!=d?(this.fileLoaded(new StorageFile(this,d,b)),null!=c&&c()):f({message:mxResources.get("fileNotFound")})}),f)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var b=this.getCurrentFile();window.location.hash=null!=b?b.getHash():""}));else if(null!=d)this.spinner.stop(),
this.fileLoaded(d),null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var g=decodeURIComponent(b.substring(1));"<"!=g.charAt(0)&&(g=Graph.decompress(g));g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):
this.defaultFilename,!0);g.getHash=function(){return b};this.fileLoaded(g);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(b,d){this.spinner.stop();this.fileLoaded(new EmbedFile(this,b,d));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var k=decodeURIComponent(b.substring(1)),m=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=k.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var b=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var b=k.substring(31,k.lastIndexOf("&ex"));this.loadFile("G"+b,e,null,mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&this.editor.chromeless&&
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var k=decodeURIComponent(b.substring(1)),n=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=k.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var b=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var b=k.substring(31,k.lastIndexOf("&ex"));this.loadFile("G"+b,e,null,mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&this.editor.chromeless&&
!this.editor.editable&&(d.getHash=function(){return"G"+b},window.location.hash="#"+d.getHash());null!=c&&c()}));return!0}return!1});!b()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",b);return!0});this.loadTemplate(k,mxUtils.bind(this,function(d){this.spinner.stop();if(null!=d&&0<d.length){var e=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var f=k,g=k.lastIndexOf("."),l=f.lastIndexOf("/");g>l&&0<l&&(f=f.substring(l+1,g),g=k.substring(g),
-this.useCanvasForExport||".png"!=g||(g=".drawio"),".svg"===g||".xml"===g||".html"===g||".png"===g||".drawio"===g)&&(e=f+g)}d=new LocalFile(this,d,null!=urlParams.title?decodeURIComponent(urlParams.title):e,!0);d.getHash=function(){return b};this.fileLoaded(d,!0)?null!=c&&c():m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
-function(){m()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(g=null,"G"==b.charAt(0)?g=this.drive:"D"==b.charAt(0)?g=this.dropbox:"W"==b.charAt(0)?g=this.oneDrive:"H"==b.charAt(0)?g=this.gitHub:"A"==b.charAt(0)?g=this.gitLab:"T"==b.charAt(0)?g=this.trello:"N"==b.charAt(0)&&(g=this.notion),null==g)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
+this.useCanvasForExport||".png"!=g||(g=".drawio"),".svg"===g||".xml"===g||".html"===g||".png"===g||".drawio"===g)&&(e=f+g)}d=new LocalFile(this,d,null!=urlParams.title?decodeURIComponent(urlParams.title):e,!0);d.getHash=function(){return b};this.fileLoaded(d,!0)?null!=c&&c():n()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else n()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+function(){n()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(g=null,"G"==b.charAt(0)?g=this.drive:"D"==b.charAt(0)?g=this.dropbox:"W"==b.charAt(0)?g=this.oneDrive:"H"==b.charAt(0)?g=this.gitHub:"A"==b.charAt(0)?g=this.gitLab:"T"==b.charAt(0)?g=this.trello:"N"==b.charAt(0)&&(g=this.notion),null==g)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var b=this.getCurrentFile();window.location.hash=null!=b?b.getHash():""}));else{var t=b.charAt(0);b=decodeURIComponent(b.substring(1));g.getFile(b,mxUtils.bind(this,function(d){this.spinner.stop();this.fileLoaded(d);var e=this.getCurrentFile();null==e?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(e.getHash=function(){return t+b},window.location.hash="#"+e.getHash()):d==e&&null==d.getMode()&&
-(d=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+d+'" class="geStatusAlert" style="overflow:hidden;">'+d+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(c){null!=window.console&&null!=c&&console.log("error in loadFile:",b,c);this.handleError(c,null!=c?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var b=this.getCurrentFile();null==b?(window.location.hash="",this.showSplash()):window.location.hash="#"+b.getHash()}),null,null,"#"+t+b)}))}}),m=this.getCurrentFile(),
-f=mxUtils.bind(this,function(){k||null==m||!m.isModified()?g():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=m&&(window.location.hash=m.getHash())}),g,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?f():null==m||e?f():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,f)).container,320,140,!0,!0)};
+(d=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+d+'" class="geStatusAlert" style="overflow:hidden;">'+d+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(c){null!=window.console&&null!=c&&console.log("error in loadFile:",b,c);this.handleError(c,null!=c?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var b=this.getCurrentFile();null==b?(window.location.hash="",this.showSplash()):window.location.hash="#"+b.getHash()}),null,null,"#"+t+b)}))}}),n=this.getCurrentFile(),
+f=mxUtils.bind(this,function(){g||null==n||!n.isModified()?k():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=n&&(window.location.hash=n.getHash())}),k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?f():null==n||e?f():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,f)).container,320,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var e=b.getTitle();b.constructor!=LocalLibrary&&(e+="\n"+b.getHash());b.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?e+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};App.prototype.restoreLibraries=function(){this.loadLibraries(mxSettings.getCustomLibraries(),mxUtils.bind(this,function(){this.loadLibraries((urlParams.clibs||"").split(";"))}))};
-App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var d=mxUtils.bind(this,function(b,c){c||mxSettings.removeCustomLibrary(b);delete this.pendingLibraries[b]}),c=0,k=[],g=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var d=b.length-1;0<=d;d--)null!=k[d]&&this.loadLibrary(k[d]);null!=e&&e()}});if(null!=b)for(var m=0;m<b.length;m++){var f=encodeURIComponent(decodeURIComponent(b[m]));mxUtils.bind(this,function(b,e){if(null!=
-b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){c++;var f=mxUtils.bind(this,function(d){delete this.pendingLibraries[b];k[e]=d;c--;g()}),l=mxUtils.bind(this,function(e){d(b,e);c--;g()});this.pendingLibraries[b]=!0;var m=b.substring(0,1);if("L"==m)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var c=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,c,mxUtils.bind(this,function(b){".scratchpad"==c&&null==b&&
-(b=this.emptyLibraryXml);null!=b?f(new StorageLibrary(this,b,c)):l()}),l)}catch(z){l()}}),0);else if("U"==m){var n=decodeURIComponent(b.substring(1));this.isOffline()||this.loadTemplate(n,mxUtils.bind(this,function(b){null!=b&&0<b.length?f(new UrlLibrary(this,b,n)):l()}),function(){l()},null,!0)}else if("R"==m){m=decodeURIComponent(b.substring(1));try{var m=JSON.parse(m),v={id:m[0],title:m[1],downloadUrl:m[2]};this.remoteInvoke("getFileContent",[v.downloadUrl],null,mxUtils.bind(this,function(b){try{f(new RemoteLibrary(this,
-b,v))}catch(z){l()}}),function(){l()})}catch(A){l()}}else if("S"==m&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(b.substring(1)),function(b){f(b)},l)}catch(A){l()}else{var x=null;"G"==m?null!=this.drive&&null!=this.drive.user&&(x=this.drive):"H"==m?null!=this.gitHub&&null!=this.gitHub.getUser()&&(x=this.gitHub):"T"==m?null!=this.trello&&this.trello.isAuthorized()&&(x=this.trello):"D"==m?null!=this.dropbox&&null!=this.dropbox.getUser()&&(x=this.dropbox):"W"==m&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(x=this.oneDrive);null!=x?x.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(b){try{f(b)}catch(z){l()}}),function(b){l()}):l(!0)}}})(f,m)}g()}};
+App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var d=mxUtils.bind(this,function(b,c){c||mxSettings.removeCustomLibrary(b);delete this.pendingLibraries[b]}),c=0,g=[],k=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var d=b.length-1;0<=d;d--)null!=g[d]&&this.loadLibrary(g[d]);null!=e&&e()}});if(null!=b)for(var n=0;n<b.length;n++){var f=encodeURIComponent(decodeURIComponent(b[n]));mxUtils.bind(this,function(b,e){if(null!=
+b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){c++;var f=mxUtils.bind(this,function(d){delete this.pendingLibraries[b];g[e]=d;c--;k()}),l=mxUtils.bind(this,function(e){d(b,e);c--;k()});this.pendingLibraries[b]=!0;var n=b.substring(0,1);if("L"==n)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var c=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,c,mxUtils.bind(this,function(b){".scratchpad"==c&&null==b&&
+(b=this.emptyLibraryXml);null!=b?f(new StorageLibrary(this,b,c)):l()}),l)}catch(z){l()}}),0);else if("U"==n){var m=decodeURIComponent(b.substring(1));this.isOffline()||this.loadTemplate(m,mxUtils.bind(this,function(b){null!=b&&0<b.length?f(new UrlLibrary(this,b,m)):l()}),function(){l()},null,!0)}else if("R"==n){n=decodeURIComponent(b.substring(1));try{var n=JSON.parse(n),v={id:n[0],title:n[1],downloadUrl:n[2]};this.remoteInvoke("getFileContent",[v.downloadUrl],null,mxUtils.bind(this,function(b){try{f(new RemoteLibrary(this,
+b,v))}catch(z){l()}}),function(){l()})}catch(A){l()}}else if("S"==n&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(b.substring(1)),function(b){f(b)},l)}catch(A){l()}else{var y=null;"G"==n?null!=this.drive&&null!=this.drive.user&&(y=this.drive):"H"==n?null!=this.gitHub&&null!=this.gitHub.getUser()&&(y=this.gitHub):"T"==n?null!=this.trello&&this.trello.isAuthorized()&&(y=this.trello):"D"==n?null!=this.dropbox&&null!=this.dropbox.getUser()&&(y=this.dropbox):"W"==n&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(y=this.oneDrive);null!=y?y.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(b){try{f(b)}catch(z){l()}}),function(b){l()}):l(!0)}}})(f,n)}k()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+
Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),
this.commentButton=null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&this.fetchAndShowNotification(urlParams.notif):(null!=b?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage=
"none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth="0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),b=document.createElement("img"),b.setAttribute("src",this.shareImage),b.setAttribute("align","absmiddle"),b.style.marginRight="4px",b.style.marginTop="-3px",this.shareButton.appendChild(b),
Editor.isDarkMode()||"atlas"==uiTheme||(this.shareButton.style.color="black",b.style.filter="invert(100%)"),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null),this.fetchAndShowNotification("device"==this.mode||"google"==this.mode?
this.mode:null))}};
-App.prototype.fetchAndShowNotification=function(b){if(!this.fetchingNotif){b=b||"online";var e=null,d=mxUtils.bind(this,function(c){c=c.filter(function(c){return!c.targets||-1<c.targets.indexOf(b)});for(var d=b+"NotifReadTS",e=parseInt(localStorage.getItem(d)),m=0;m<c.length;m++)c[m].isNew=!e||c[m].timestamp>e;this.showNotification(c,d)});try{e=JSON.parse(localStorage.getItem(".notifCache"))}catch(c){}null==e||e.ts+864E5<Date.now()?(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,
+App.prototype.fetchAndShowNotification=function(b){if(!this.fetchingNotif){b=b||"online";var e=null,d=mxUtils.bind(this,function(c){c=c.filter(function(c){return!c.targets||-1<c.targets.indexOf(b)});for(var d=b+"NotifReadTS",e=parseInt(localStorage.getItem(d)),n=0;n<c.length;n++)c[n].isNew=!e||c[n].timestamp>e;this.showNotification(c,d)});try{e=JSON.parse(localStorage.getItem(".notifCache"))}catch(c){}null==e||e.ts+864E5<Date.now()?(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,
function(b){200<=b.getStatus()&&299>=b.getStatus()&&(b=JSON.parse(b.getText()),b.sort(function(b,c){return c.timestamp-b.timestamp}),localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:b})),this.fetchingNotif=!1,d(b))}))):d(e.notifs)}};
App.prototype.showNotification=function(b,e){function d(b){var c=document.querySelector(".geNotification-count");null==c?EditorUi.logError("Error: element (.geNotification-count) is null in showNotification in shouldAnimate",null,5769):(c.innerHTML=b,c.style.display=0==b?"none":"",c=document.querySelector(".geNotification-bell"),c.style.animation=0==b?"none":"",c.className="geNotification-bell"+(0==b?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==b?"none":"")}
-var c=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var c=this.notificationWin.querySelectorAll(".circle.active"),d=0;d<c.length;d++)c[d].className="circle";b[0]&&localStorage.setItem(e,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme&&(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px");var k=document.createElement("span");k.className=
-"geNotification-count";this.notificationBtn.appendChild(k);k=document.createElement("div");k.className="geNotification-bell";k.style.opacity="min"==uiTheme?"0.5":"";var g=document.createElement("span");g.className="geBell-top";k.appendChild(g);g=document.createElement("span");g.className="geBell-middle";k.appendChild(g);g=document.createElement("span");g.className="geBell-bottom";k.appendChild(g);g=document.createElement("span");g.className="geBell-rad";k.appendChild(g);this.notificationBtn.appendChild(k);
-this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);g=document.createElement("div");g.className="header";k=document.createElement("span");k.className="title";k.textContent=mxResources.get("notifications");g.appendChild(k);k=document.createElement("span");k.className="closeBtn";
-k.textContent="x";g.appendChild(k);this.notificationWin.appendChild(g);g=document.createElement("div");g.className="notifications clearfix";var m=document.createElement("div");m.setAttribute("id","geNotifList");m.style.position="relative";g.appendChild(m);this.notificationWin.appendChild(g);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=
-0;var b=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=b.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=b.right-this.notificationWin.clientWidth+"px";d(0)}else c()}));mxEvent.addListener(k,"click",c)}var f=0,l=document.getElementById("geNotifList");if(null==l)EditorUi.logError("Error: element (geNotifList) is null in showNotification",null,5859);else if(0==b.length)l.innerHTML='<div class="line"></div><div class="notification">'+mxUtils.htmlEntities(mxResources.get("none"))+
-"</div>";else for(l.innerHTML='<div class="line"></div>',k=0;k<b.length;k++)(function(b,c){c.isNew&&f++;var d=document.createElement("div");d.className="notification";var e=b.timeSince(new Date(c.timestamp));null==e&&(e=mxResources.get("lessThanAMinute"));d.innerHTML='<div class="circle'+(c.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[e],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(c.content)+"</p>";c.link&&mxEvent.addListener(d,"click",function(){window.open(c.link,
-"notifWin")});l.appendChild(d)})(this,b[k]);d(f)};
-App.prototype.save=function(b,e){var d=this.getCurrentFile();if(null!=d&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.bind(this,function(){d.handleFileSuccess(!0);null!=e&&e()}),k=mxUtils.bind(this,function(c){d.isModified()&&Editor.addRetryToError(c,mxUtils.bind(this,function(){this.save(b,e)}));d.handleFileError(c,!0)});try{b==d.getTitle()?d.save(!0,c,k):d.saveAs(b,c,k)}catch(g){k(g)}}};
-App.prototype.pickFolder=function(b,e,d,c,k){d=null!=d?d:!0;var g=this.spinner.pause();d&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(b){g();if(b.action==google.picker.Action.PICKED){var c=null;null!=b.docs&&0<b.docs.length&&"folder"==b.docs[0].type&&(c=b.docs[0].id);e(c)}}),k):d&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(b){g();null!=b&&null!=b.value&&0<b.value.length&&(b=OneDriveFile.prototype.getIdOf(b.value[0]),
-e(b))}),c):d&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(b){g();e(b)})):d&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(b){g();e(b)})):d&&b==App.MODE_NOTION&&null!=this.notion?this.notion.pickFolder(mxUtils.bind(this,function(b){g();e(b)})):d&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(b){g();e(b)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(b,e,d,c,k,g){k==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,c?this.base64ToBlob(b,d):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)})):k==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,b,g,mxUtils.bind(this,function(b){this.spinner.stop()}),
-mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),d,c):k==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,c?this.base64ToBlob(b,d):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),!1,g):k==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,b,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),!0,g,c):k==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,c?this.base64ToBlob(b,d):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),!1,g):k==App.MODE_BROWSER&&(d=mxUtils.bind(this,function(){localStorage.setItem(e,b)}),null==localStorage.getItem(e)?
+var c=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var c=this.notificationWin.querySelectorAll(".circle.active"),d=0;d<c.length;d++)c[d].className="circle";b[0]&&localStorage.setItem(e,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme&&(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px");var g=document.createElement("span");g.className=
+"geNotification-count";this.notificationBtn.appendChild(g);g=document.createElement("div");g.className="geNotification-bell";g.style.opacity="min"==uiTheme?"0.5":"";var k=document.createElement("span");k.className="geBell-top";g.appendChild(k);k=document.createElement("span");k.className="geBell-middle";g.appendChild(k);k=document.createElement("span");k.className="geBell-bottom";g.appendChild(k);k=document.createElement("span");k.className="geBell-rad";g.appendChild(k);this.notificationBtn.appendChild(g);
+this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);k=document.createElement("div");k.className="header";g=document.createElement("span");g.className="title";g.textContent=mxResources.get("notifications");k.appendChild(g);g=document.createElement("span");g.className="closeBtn";
+g.textContent="x";k.appendChild(g);this.notificationWin.appendChild(k);k=document.createElement("div");k.className="notifications clearfix";var n=document.createElement("div");n.setAttribute("id","geNotifList");n.style.position="relative";k.appendChild(n);this.notificationWin.appendChild(k);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=
+0;var b=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=b.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=b.right-this.notificationWin.clientWidth+"px";d(0)}else c()}));mxEvent.addListener(g,"click",c)}var f=0,l=document.getElementById("geNotifList");if(null==l)EditorUi.logError("Error: element (geNotifList) is null in showNotification",null,5859);else if(0==b.length)l.innerHTML='<div class="line"></div><div class="notification">'+mxUtils.htmlEntities(mxResources.get("none"))+
+"</div>";else for(l.innerHTML='<div class="line"></div>',g=0;g<b.length;g++)(function(b,c){c.isNew&&f++;var d=document.createElement("div");d.className="notification";var e=b.timeSince(new Date(c.timestamp));null==e&&(e=mxResources.get("lessThanAMinute"));d.innerHTML='<div class="circle'+(c.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[e],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(c.content)+"</p>";c.link&&mxEvent.addListener(d,"click",function(){window.open(c.link,
+"notifWin")});l.appendChild(d)})(this,b[g]);d(f)};
+App.prototype.save=function(b,e){var d=this.getCurrentFile();if(null!=d&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.bind(this,function(){d.handleFileSuccess(!0);null!=e&&e()}),g=mxUtils.bind(this,function(c){d.isModified()&&Editor.addRetryToError(c,mxUtils.bind(this,function(){this.save(b,e)}));d.handleFileError(c,!0)});try{b==d.getTitle()?d.save(!0,c,g):d.saveAs(b,c,g)}catch(k){g(k)}}};
+App.prototype.pickFolder=function(b,e,d,c,g){d=null!=d?d:!0;var k=this.spinner.pause();d&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(b){k();if(b.action==google.picker.Action.PICKED){var c=null;null!=b.docs&&0<b.docs.length&&"folder"==b.docs[0].type&&(c=b.docs[0].id);e(c)}}),g):d&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(b){k();null!=b&&null!=b.value&&0<b.value.length&&(b=OneDriveFile.prototype.getIdOf(b.value[0]),
+e(b))}),c):d&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(b){k();e(b)})):d&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(b){k();e(b)})):d&&b==App.MODE_NOTION&&null!=this.notion?this.notion.pickFolder(mxUtils.bind(this,function(b){k();e(b)})):d&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(b){k();e(b)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(b,e,d,c,g,k){g==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,c?this.base64ToBlob(b,d):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)})):g==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,b,k,mxUtils.bind(this,function(b){this.spinner.stop()}),
+mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),d,c):g==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,c?this.base64ToBlob(b,d):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),!1,k):g==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,b,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),!0,k,c):g==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,c?this.base64ToBlob(b,d):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),!1,k):g==App.MODE_BROWSER&&(d=mxUtils.bind(this,function(){localStorage.setItem(e,b)}),null==localStorage.getItem(e)?
d():this.confirm(mxResources.get("replaceIt",[e]),d))};
App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var e=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}var e=this.editor.graph,d=b.isEditable()&&!b.invalidChecksum;e.isEnabled()&&!d&&e.reset();e.setEnabled(d);null==urlParams.rev&&(this.updateDocumentTitle(),e=b.getHash(),0<e.length?
window.location.hash=e:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
-App.prototype.showAuthDialog=function(b,e,d,c){var k=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(b){try{null!=d&&d(b,mxUtils.bind(this,function(){this.hideDialog();k()}))}catch(m){this.editor.setStatus(mxUtils.htmlEntities(m.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(b){null!=c&&c(b);b&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,e,d,c,k,g,m,f){var l=e;/\.svg$/i.test(l)||(l=l.substring(0,e.lastIndexOf("."))+c);var n=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(n=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var p=new XMLHttpRequest;p.open("GET",b,!0);n||(p.responseType="blob");if(f)for(var q in f)p.setRequestHeader(q,f[q]);p.onload=mxUtils.bind(this,function(){if(200<=
-p.status&&299>=p.status){var b=null;n?(b=JSON.parse(p.responseText),b=this.base64ToBlob(b.content,"application/octet-stream")):b=new Blob([p.response],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(b){k(new LocalFile(this,b,l,!0))}),g,e)}else null!=g&&g({message:mxResources.get("errorLoadingFile")})});p.onerror=g;p.send()}else{var t=mxUtils.bind(this,function(c){try{if(/\.pdf$/i.test(e)){var d=Editor.extractGraphModelFromPdf(c);null!=d&&0<d.length&&k(new LocalFile(this,
-d,l,!0))}else/\.png$/i.test(e)?(d=this.extractGraphModelFromPng(c),null!=d?k(new LocalFile(this,d,l,!0)):k(new LocalFile(this,c,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,b)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?k(new LocalFile(this,b.responseText,l,!0)):null!=g&&g({message:mxResources.get("errorLoadingFile")}))}),e):k(new LocalFile(this,c,l,!0))}catch(x){null!=
-g&&g(x)}});d=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||/\.pdf$/i.test(e)||null!=d&&"image/"==d.substring(0,6);n?mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=k){b=JSON.parse(b.getText());var c=b.content;"base64"===b.encoding&&(c=/\.png$/i.test(e)?"data:image/png;base64,"+c:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+c:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c));t(c)}}else null!=g&&g({code:App.ERROR_UNKNOWN})}),function(){null!=
-g&&g({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=g&&g({code:App.ERROR_TIMEOUT,retry:fn})},f):null!=m?m(b,t,g,d):this.editor.loadUrl(b,t,g,d,null,null,null,f)}};
+App.prototype.showAuthDialog=function(b,e,d,c){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(b){try{null!=d&&d(b,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(n){this.editor.setStatus(mxUtils.htmlEntities(n.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(b){null!=c&&c(b);b&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(b,e,d,c,g,k,n,f){var l=e;/\.svg$/i.test(l)||(l=l.substring(0,e.lastIndexOf("."))+c);var m=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(m=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var p=new XMLHttpRequest;p.open("GET",b,!0);m||(p.responseType="blob");if(f)for(var q in f)p.setRequestHeader(q,f[q]);p.onload=mxUtils.bind(this,function(){if(200<=
+p.status&&299>=p.status){var b=null;m?(b=JSON.parse(p.responseText),b=this.base64ToBlob(b.content,"application/octet-stream")):b=new Blob([p.response],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(b){g(new LocalFile(this,b,l,!0))}),k,e)}else null!=k&&k({message:mxResources.get("errorLoadingFile")})});p.onerror=k;p.send()}else{var t=mxUtils.bind(this,function(c){try{if(/\.pdf$/i.test(e)){var d=Editor.extractGraphModelFromPdf(c);null!=d&&0<d.length&&g(new LocalFile(this,
+d,l,!0))}else/\.png$/i.test(e)?(d=this.extractGraphModelFromPng(c),null!=d?g(new LocalFile(this,d,l,!0)):g(new LocalFile(this,c,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,b)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?g(new LocalFile(this,b.responseText,l,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),e):g(new LocalFile(this,c,l,!0))}catch(y){null!=
+k&&k(y)}});d=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||/\.pdf$/i.test(e)||null!=d&&"image/"==d.substring(0,6);m?mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=g){b=JSON.parse(b.getText());var c=b.content;"base64"===b.encoding&&(c=/\.png$/i.test(e)?"data:image/png;base64,"+c:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+c:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c));t(c)}}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})},f):null!=n?n(b,t,k,d):this.editor.loadUrl(b,t,k,d,null,null,null,f)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";"dark"!=uiTheme&&(this.appIcon.style.backgroundColor="#f08705");mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,
"click",mxUtils.bind(this,function(b){this.appIconClicked(b)}));var b=mxClient.IS_SVG?"dark"==uiTheme?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJFYmVuZV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjI1IDIyNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjI1IDIyNTsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MXtmaWxsOiNERjZDMEM7fQoJLnN0MntmaWxsOiNGRkZGRkY7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMjI1LDIxNS40YzAsNS4zLTQuMyw5LjYtOS41LDkuNmwwLDBINzcuMWwtNDQuOC00NS41TDYwLjIsMTM0bDgyLjctMTAyLjdsODIuMSw4NC41VjIxNS40eiIvPgo8cGF0aCBjbGFzcz0ic3QyIiBkPSJNMTg0LjYsMTI1LjhoLTIzLjdsLTI1LTQyLjdjNS43LTEuMiw5LjgtNi4yLDkuNy0xMlYzOWMwLTYuOC01LjQtMTIuMy0xMi4yLTEyLjNoLTAuMUg5MS42CgljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMlYzOXYzMi4xYzAsNS44LDQsMTAuOCw5LjcsMTJsLTI1LDQyLjdINDAuNGMtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xCgljMCw2LjgsNS40LDEyLjMsMTIuMiwxMi4zaDAuMWg0MS43YzYuOCwwLDEyLjMtNS40LDEyLjMtMTIuMnYtMC4xdi0zMi4xYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM2gtMC4xaC00bDI0LjgtNDIuNGgxOS4zCglsMjQuOSw0Mi40SDE0M2MtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuM2gwLjFoNDEuN2M2LjgsMCwxMi4zLTUuNCwxMi4zLTEyLjJ2LTAuMXYtMzIuMQoJYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM0MxODQuNywxMjUuOCwxODQuNywxMjUuOCwxODQuNiwxMjUuOHoiLz4KPC9zdmc+Cg==)":
@@ -11541,138 +11546,138 @@ App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive
"absolute",this.userElement.style.fontSize="8pt",this.userElement.style.top="atlas"==uiTheme?"8px":"2px",this.userElement.style.right="30px",this.userElement.style.margin="4px",this.userElement.style.padding="2px",this.userElement.style.paddingRight="16px",this.userElement.style.verticalAlign="middle",this.userElement.style.backgroundImage="url("+IMAGE_PATH+"/expanded.gif)",this.userElement.style.backgroundPosition="100% 60%",this.userElement.style.backgroundRepeat="no-repeat",this.menubarContainer.appendChild(this.userElement),
mxEvent.addListener(this.userElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()})),mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(b){if(null==this.userPanel){var d=document.createElement("div");d.className="geDialog";d.style.position="absolute";d.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";d.style.right="36px";d.style.padding="0px";d.style.cursor="default";this.userPanel=d}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);
else{var c=!1;this.userPanel.innerHTML="";d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.className="geDialogClose";d.style.top="8px";d.style.right="8px";mxEvent.addListener(d,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(d);if(null!=this.drive&&(d=this.drive.getUsersList(),0<d.length)){var e=mxUtils.bind(this,
-function(b,c){var d=this.getCurrentFile();null!=d&&d.constructor==DriveFile?(this.spinner.spin(document.body,c),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();b()}),2E3)):b()}),g=mxUtils.bind(this,function(b){var c=document.createElement("tr");c.style.cssText=b.isCurrent?"":"background-color: whitesmoke; cursor: pointer";c.setAttribute("title","User ID: "+b.id);c.innerHTML='<td valign="middle" style="height: 59px;width: 66px;'+(b.isCurrent?"":"border-top: 1px solid rgb(224, 224, 224);")+
+function(b,c){var d=this.getCurrentFile();null!=d&&d.constructor==DriveFile?(this.spinner.spin(document.body,c),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();b()}),2E3)):b()}),k=mxUtils.bind(this,function(b){var c=document.createElement("tr");c.style.cssText=b.isCurrent?"":"background-color: whitesmoke; cursor: pointer";c.setAttribute("title","User ID: "+b.id);c.innerHTML='<td valign="middle" style="height: 59px;width: 66px;'+(b.isCurrent?"":"border-top: 1px solid rgb(224, 224, 224);")+
'"><img width="50" height="50" style="margin: 4px 8px 0 8px;border-radius:50%;" src="'+(null!=b.pictureUrl?b.pictureUrl:this.defaultUserPicture)+'"/></td><td valign="middle" style="white-space:nowrap;'+(null!=b.pictureUrl?"padding-top:4px;":"")+(b.isCurrent?"":"border-top: 1px solid rgb(224, 224, 224);")+'">'+mxUtils.htmlEntities(b.displayName)+'<br><small style="color:gray;">'+mxUtils.htmlEntities(b.email)+'</small><div style="margin-top:4px;"><i>'+mxResources.get("googleDrive")+"</i></div>";b.isCurrent||
-mxEvent.addListener(c,"click",mxUtils.bind(this,function(c){e(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(b);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(c)}));return c}),c=!0,m=document.createElement("table");m.style.cssText="font-size:10pt;padding: 20px 0 0 0;min-width: 300px;border-spacing: 0;";
-for(var f=0;f<d.length;f++)m.appendChild(g(d[f]));this.userPanel.appendChild(m);d=document.createElement("div");d.style.textAlign="left";d.style.padding="8px";d.style.whiteSpace="nowrap";d.style.borderTop="1px solid rgb(224, 224, 224)";g=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){e(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),
-mxResources.get("signOut"))}))}));g.className="geBtn";g.style["float"]="right";d.appendChild(g);g=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var b=this.drive.createAuthWin();b.blur();window.focus();e(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(b){this.handleError(b)}),!0,b)}),mxResources.get("closingFile")+"...")}));
-g.className="geBtn";g.style.margin="0px";d.appendChild(g);this.userPanel.appendChild(d)}d=mxUtils.bind(this,function(b,d,e,f){if(null!=b){c&&this.userPanel.appendChild(document.createElement("hr"));c=!0;var g=document.createElement("table");g.style.cssText="font-size:10pt;padding:"+(c?"10":"20")+"px 20px 10px 10px;";g.innerHTML+='<tr><td valign="top">'+(null!=d?'<img style="margin-right:6px;" src="'+d+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;">'+mxUtils.htmlEntities(b.displayName)+
+mxEvent.addListener(c,"click",mxUtils.bind(this,function(c){e(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(b);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(c)}));return c}),c=!0,n=document.createElement("table");n.style.cssText="font-size:10pt;padding: 20px 0 0 0;min-width: 300px;border-spacing: 0;";
+for(var f=0;f<d.length;f++)n.appendChild(k(d[f]));this.userPanel.appendChild(n);d=document.createElement("div");d.style.textAlign="left";d.style.padding="8px";d.style.whiteSpace="nowrap";d.style.borderTop="1px solid rgb(224, 224, 224)";k=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){e(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),
+mxResources.get("signOut"))}))}));k.className="geBtn";k.style["float"]="right";d.appendChild(k);k=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var b=this.drive.createAuthWin();b.blur();window.focus();e(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(b){this.handleError(b)}),!0,b)}),mxResources.get("closingFile")+"...")}));
+k.className="geBtn";k.style.margin="0px";d.appendChild(k);this.userPanel.appendChild(d)}d=mxUtils.bind(this,function(b,d,e,f){if(null!=b){c&&this.userPanel.appendChild(document.createElement("hr"));c=!0;var g=document.createElement("table");g.style.cssText="font-size:10pt;padding:"+(c?"10":"20")+"px 20px 10px 10px;";g.innerHTML+='<tr><td valign="top">'+(null!=d?'<img style="margin-right:6px;" src="'+d+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;">'+mxUtils.htmlEntities(b.displayName)+
(null!=b.email?'<br><small style="color:gray;">'+mxUtils.htmlEntities(b.email)+"</small>":"")+(null!=f?'<div style="margin-top:4px;"><i>'+mxUtils.htmlEntities(f)+"</i></div>":"")+"</td></tr>";this.userPanel.appendChild(g);b=document.createElement("div");b.style.textAlign="center";b.style.paddingBottom="12px";b.style.whiteSpace="nowrap";null!=e&&(e=mxUtils.button(mxResources.get("signOut"),e),e.className="geBtn",b.appendChild(e));this.userPanel.appendChild(b)}});null!=this.dropbox&&d(this.dropbox.getUser(),
IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.constructor==DropboxFile){var c=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&d(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?
null:mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.constructor==OneDriveFile){var c=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&d(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var b=this.getCurrentFile();
if(null!=b&&b.constructor==GitHubFile){var c=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&d(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.constructor==GitLabFile){var c=mxUtils.bind(this,
function(){this.gitLab.logout();window.location.hash=""});b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.notion&&d(this.notion.getUser(),IMAGE_PATH+"/notion-logo.svg",mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.constructor==NotionFile){var c=mxUtils.bind(this,function(){this.notion.logout();window.location.hash=""});b.isModified()?
this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.notion.logout()}),mxResources.get("notion"));null!=this.trello&&d(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.constructor==TrelloFile){var c=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),
-mxResources.get("discardChanges")):c()}else this.trello.logout()}),mxResources.get("trello"));c||(d=document.createElement("div"),d.style.textAlign="center",d.style.padding="20px 20px 10px 10px",d.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(d));d=document.createElement("div");d.style.textAlign="center";d.style.padding="12px";d.style.background=Editor.isDarkMode()?"":"whiteSmoke";d.style.borderTop="1px solid #e0e0e0";d.style.whiteSpace="nowrap";"1"==urlParams.sketch?(g=mxUtils.button(mxResources.get("share"),
-mxUtils.bind(this,function(){this.actions.get("share").funct()})),g.className="geBtn",d.appendChild(g),this.userPanel.appendChild(d),this.commentsSupported()&&(g=mxUtils.button(mxResources.get("comments"),mxUtils.bind(this,function(){this.actions.get("comments").funct()})),g.className="geBtn",d.appendChild(g),this.userPanel.appendChild(d))):(g=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){mxEvent.isConsumed(b)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})),
-g.className="geBtn",d.appendChild(g),this.userPanel.appendChild(d));document.body.appendChild(this.userPanel)}mxEvent.consume(b)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(b){mxEvent.isConsumed(b)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=
+mxResources.get("discardChanges")):c()}else this.trello.logout()}),mxResources.get("trello"));c||(d=document.createElement("div"),d.style.textAlign="center",d.style.padding="20px 20px 10px 10px",d.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(d));d=document.createElement("div");d.style.textAlign="center";d.style.padding="12px";d.style.background=Editor.isDarkMode()?"":"whiteSmoke";d.style.borderTop="1px solid #e0e0e0";d.style.whiteSpace="nowrap";"1"==urlParams.sketch?(k=mxUtils.button(mxResources.get("share"),
+mxUtils.bind(this,function(){this.actions.get("share").funct()})),k.className="geBtn",d.appendChild(k),this.userPanel.appendChild(d),this.commentsSupported()&&(k=mxUtils.button(mxResources.get("comments"),mxUtils.bind(this,function(){this.actions.get("comments").funct()})),k.className="geBtn",d.appendChild(k),this.userPanel.appendChild(d))):(k=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){mxEvent.isConsumed(b)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})),
+k.className="geBtn",d.appendChild(k),this.userPanel.appendChild(d));document.body.appendChild(this.userPanel)}mxEvent.consume(b)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(b){mxEvent.isConsumed(b)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=
this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()?b=this.gitLab.getUser():null!=this.notion&&null!=this.notion.getUser()&&(b=this.notion.getUser());null!=b?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),
this.userElement=null)};App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){b.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(b){var c=document.createElement("span");c.setAttribute("title",mxResources.get("help"));c.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var d=document.createElement("img");mxUtils.setOpacity(d,50);d.style.height="16px";d.style.width="16px";d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);c.appendChild(d);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){this.editorUi.hideCurrentMenu();this.editorUi.openLink(b);mxEvent.consume(c)}));return c};Menus.prototype.addLinkToItem=function(b,c){null!=b&&b.firstChild.nextSibling.appendChild(this.createHelpLink(c))};var e=Menus.prototype.init;
-Menus.prototype.init=function(){function b(b,c,d){this.ui=b;this.previousExtFonts=this.extFonts=c;this.prevCustomFonts=this.customFonts=d}e.apply(this,arguments);var c=this.editorUi,k=c.editor.graph,g=mxUtils.bind(k,k.isEnabled),m=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),f=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
-(null==document.documentMode||9<document.documentMode),l=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),n="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
+Menus.prototype.init=function(){function b(b,c,d){this.ui=b;this.previousExtFonts=this.extFonts=c;this.prevCustomFonts=this.customFonts=d}e.apply(this,arguments);var c=this.editorUi,g=c.editor.graph,k=mxUtils.bind(g,g.isEnabled),n=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),f=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
+(null==document.documentMode||9<document.documentMode),l=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),m="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(b){return"file"!=b}));c.actions.addAction("new...",function(){var b=c.isOffline();if(b||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var d=new NewDialog(c,b,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(d.container,b?350:620,b?70:460,!0,!0,function(b){c.sidebar.hideTooltip();b&&null==c.getCurrentFile()&&c.showSplash()});
d.init()}else{var e=function(b){return{id:b.id,isExt:!0,url:b.downloadUrl,title:b.title,imgUrl:b.thumbnailLink,changedBy:b.lastModifyingUserName,lastModifiedOn:b.modifiedDate}},b=new TemplatesDialog(c,function(b,d,e){var f=e.libs,g=e.clibs;c.pickFolder(c.mode,function(e){c.createFile(d,b,null!=f&&0<f.length?f:null,null,function(){c.hideDialog()},null,e,null,null!=g&&0<g.length?g:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(b,d,f){var g=new Date;g.setDate(g.getDate()-
-7);c.drive.listFiles(null,g,f?!0:!1,function(c){for(var d=[],f=0;f<c.items.length;f++)d.push(e(c.items[f]));b(d)},d)},function(b,d,f,g){c.drive.listFiles(b,null,g?!0:!1,function(b){for(var c=[],f=0;f<b.items.length;f++)c.push(e(b.items[f]));d(c)},f)},function(b,d,e){c.drive.getFile(b.id,function(b){d(b.data)},e)},null,null,!1,!1);c.showDialog(b.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(k.isEnabled()&&
-!k.isCellLocked(k.getDefaultParent())){var b=new NewDialog(c,null,!1,function(b){c.hideDialog();if(null!=b){var d=c.editor.graph.getFreeInsertPoint();k.setSelectionCells(c.importXml(b,Math.max(d.x,20),Math.max(d.y,20),!0,null,null,!0));k.scrollCellToVisible(k.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(b.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});b.init()}})).isEnabled=g;var p=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});
+7);c.drive.listFiles(null,g,f?!0:!1,function(c){for(var d=[],f=0;f<c.items.length;f++)d.push(e(c.items[f]));b(d)},d)},function(b,d,f,g){c.drive.listFiles(b,null,g?!0:!1,function(b){for(var c=[],f=0;f<b.items.length;f++)c.push(e(b.items[f]));d(c)},f)},function(b,d,e){c.drive.getFile(b.id,function(b){d(b.data)},e)},null,null,!1,!1);c.showDialog(b.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(g.isEnabled()&&
+!g.isCellLocked(g.getDefaultParent())){var b=new NewDialog(c,null,!1,function(b){c.hideDialog();if(null!=b){var d=c.editor.graph.getFreeInsertPoint();g.setSelectionCells(c.importXml(b,Math.max(d.x,20),Math.max(d.y,20),!0,null,null,!0));g.scrollCellToVisible(g.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(b.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});b.init()}})).isEnabled=k;var p=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});
p.setToggleAction(!0);p.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.POINTS});p=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});p=c.actions.addAction("millimeters",function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});
this.put("units",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,["points","millimeters"],c)})));p=c.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=c.ruler?(c.ruler.destroy(),c.ruler=null):c.ruler=new mxDualRuler(c,c.editor.graph.view.unit);c.refresh()});p.setEnabled(c.canvasSupported&&9!=document.documentMode);p.setToggleAction(!0);p.setSelectedCallback(function(){return null!=c.ruler});p=c.actions.addAction("fullscreen",function(){null==
-document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});p.visible=document.fullscreenEnabled&&null!=document.body.requestFullscreen;p.setToggleAction(!0);p.setSelectedCallback(function(){return null!=document.fullscreenElement});c.actions.addAction("properties...",function(){var b=new FilePropertiesDialog(c);c.showDialog(b.container,320,120,!0,!0);b.init()}).isEnabled=g;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",
-function(b){k.isEnabled()&&(null==this.freehandWindow&&(this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,84)),k.freehand.isDrawing()?k.freehand.stopDrawing():k.freehand.startDrawing(),this.freehandWindow.window.setVisible(k.freehand.isDrawing()))})).isEnabled=function(){return g()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var d=null==c.pages||1>=
-c.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=c.addCheckbox(b,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),g=c.addCheckbox(b,mxResources.get("compressed"),!0),l=c.addCheckbox(b,mxResources.get("allPages"),!d,d);l.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?l.setAttribute("disabled","disabled"):l.removeAttribute("disabled")});
-b=new CustomDialog(c,b,mxUtils.bind(this,function(){c.downloadFile("xml",!g.checked,null,!f.checked,d||!l.checked)}),null,mxResources.get("export"));c.showDialog(b.container,300,200,!0,!0)}));c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(b,d,e,f,g,k,l,m,n){l=[];n&&l.push("tags={}");b=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,null,!0,l));c.showDialog(b.container,440,240,!0,!0);b.init()})}));c.actions.put("exportHtml",
-new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,b,function(b,d,e,f,g,k,l,m,n,y){c.createHtml(b,d,e,f,g,k,l,m,n,y,mxUtils.bind(this,function(b,d){var e=c.getBaseFilename(l),f='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(e)+
+document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});p.visible=document.fullscreenEnabled&&null!=document.body.requestFullscreen;p.setToggleAction(!0);p.setSelectedCallback(function(){return null!=document.fullscreenElement});c.actions.addAction("properties...",function(){var b=new FilePropertiesDialog(c);c.showDialog(b.container,320,120,!0,!0);b.init()}).isEnabled=k;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",
+function(b){g.isEnabled()&&(null==this.freehandWindow&&(this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,84)),g.freehand.isDrawing()?g.freehand.stopDrawing():g.freehand.startDrawing(),this.freehandWindow.window.setVisible(g.freehand.isDrawing()))})).isEnabled=function(){return k()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var d=null==c.pages||1>=
+c.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=c.addCheckbox(b,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),k=c.addCheckbox(b,mxResources.get("compressed"),!0),l=c.addCheckbox(b,mxResources.get("allPages"),!d,d);l.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?l.setAttribute("disabled","disabled"):l.removeAttribute("disabled")});
+b=new CustomDialog(c,b,mxUtils.bind(this,function(){c.downloadFile("xml",!k.checked,null,!f.checked,d||!l.checked)}),null,mxResources.get("export"));c.showDialog(b.container,300,200,!0,!0)}));c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(b,d,e,f,g,k,l,n,m){l=[];m&&l.push("tags={}");b=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,null,!0,l));c.showDialog(b.container,440,240,!0,!0);b.init()})}));c.actions.put("exportHtml",
+new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,b,function(b,d,e,f,g,k,l,n,m,p,x){c.createHtml(b,d,e,f,g,k,l,n,m,p,x,mxUtils.bind(this,function(b,d){var e=c.getBaseFilename(l),f='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(e)+
'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+d+"\n</body>\n</html>";c.saveData(e+(".drawio"==e.substring(e.lenth-7)?"":".drawio")+".html","html",f,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var b=null==c.pages||1>=c.pages.length,d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatPdf"));
-e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=function(){n!=this&&this.checked?(x.removeAttribute("disabled"),x.checked=!k.pageVisible):(x.setAttribute("disabled","disabled"),x.checked=!1)},e=200,g=1,l=null;if(c.pdfPageExport&&!b){var m=function(){u.value=Math.max(1,Math.min(g,Math.max(parseInt(u.value),parseInt(q.value))));q.value=Math.max(1,Math.min(g,Math.min(parseInt(u.value),parseInt(q.value))))},n=c.addRadiobox(d,"pages",mxResources.get("allPages"),
+e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=function(){m!=this&&this.checked?(y.removeAttribute("disabled"),y.checked=!g.pageVisible):(y.setAttribute("disabled","disabled"),y.checked=!1)},e=200,k=1,l=null;if(c.pdfPageExport&&!b){var n=function(){u.value=Math.max(1,Math.min(k,Math.max(parseInt(u.value),parseInt(q.value))));q.value=Math.max(1,Math.min(k,Math.min(parseInt(u.value),parseInt(q.value))))},m=c.addRadiobox(d,"pages",mxResources.get("allPages"),
!0),p=c.addRadiobox(d,"pages",mxResources.get("pages")+":",!1,null,!0),q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.style.width="50px";d.appendChild(q);var t=document.createElement("span");mxUtils.write(t,mxResources.get("to"));d.appendChild(t);var u=q.cloneNode(!0);d.appendChild(u);mxEvent.addListener(q,"focus",function(){p.checked=!0});mxEvent.addListener(u,"focus",function(){p.checked=
-!0});mxEvent.addListener(q,"change",m);mxEvent.addListener(u,"change",m);if(null!=c.pages&&(g=c.pages.length,null!=c.currentPage))for(m=0;m<c.pages.length;m++)if(c.currentPage==c.pages[m]){l=m+1;q.value=l;u.value=l;break}q.setAttribute("max",g);u.setAttribute("max",g);mxUtils.br(d);var v=c.addRadiobox(d,"pages",mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),x=c.addCheckbox(d,mxResources.get("crop"),!1,!0),z=c.addCheckbox(d,mxResources.get("grid"),!1,!1);mxEvent.addListener(n,"change",f);
-mxEvent.addListener(p,"change",f);mxEvent.addListener(v,"change",f);e+=64}else v=c.addCheckbox(d,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),x=c.addCheckbox(d,mxResources.get("crop"),!k.pageVisible||!c.pdfPageExport,!c.pdfPageExport),z=c.addCheckbox(d,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(v,"change",f);var f=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName(),A=null,S=null;if(EditorUi.isElectronApp||f)S=c.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
-Editor.defaultIncludeDiagram),e+=30;f&&(A=c.addCheckbox(d,mxResources.get("transparentBackground"),!1),e+=30);d=new CustomDialog(c,d,mxUtils.bind(this,function(){var d=null;if(!b)var d=parseInt(q.value),e=parseInt(u.value),d=n.checked||d==l&&e==l?null:{from:Math.max(0,Math.min(g-1,d-1)),to:Math.max(0,Math.min(g-1,e-1))};c.downloadFile("pdf",null,null,!v.checked,b?!0:!n.checked&&null==d,!x.checked,null!=A&&A.checked,null,null,z.checked,null!=S&&S.checked,d)}),null,mxResources.get("export"));c.showDialog(d.container,
+!0});mxEvent.addListener(q,"change",n);mxEvent.addListener(u,"change",n);if(null!=c.pages&&(k=c.pages.length,null!=c.currentPage))for(n=0;n<c.pages.length;n++)if(c.currentPage==c.pages[n]){l=n+1;q.value=l;u.value=l;break}q.setAttribute("max",k);u.setAttribute("max",k);mxUtils.br(d);var v=c.addRadiobox(d,"pages",mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),y=c.addCheckbox(d,mxResources.get("crop"),!1,!0),z=c.addCheckbox(d,mxResources.get("grid"),!1,!1);mxEvent.addListener(m,"change",f);
+mxEvent.addListener(p,"change",f);mxEvent.addListener(v,"change",f);e+=64}else v=c.addCheckbox(d,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),y=c.addCheckbox(d,mxResources.get("crop"),!g.pageVisible||!c.pdfPageExport,!c.pdfPageExport),z=c.addCheckbox(d,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(v,"change",f);var f=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName(),A=null,S=null;if(EditorUi.isElectronApp||f)S=c.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
+Editor.defaultIncludeDiagram),e+=30;f&&(A=c.addCheckbox(d,mxResources.get("transparentBackground"),!1),e+=30);d=new CustomDialog(c,d,mxUtils.bind(this,function(){var d=null;if(!b)var d=parseInt(q.value),e=parseInt(u.value),d=m.checked||d==l&&e==l?null:{from:Math.max(0,Math.min(k-1,d-1)),to:Math.max(0,Math.min(k-1,e-1))};c.downloadFile("pdf",null,null,!v.checked,b?!0:!m.checked&&null==d,!y.checked,null!=A&&A.checked,null,null,z.checked,null!=S&&S.checked,d)}),null,mxResources.get("export"));c.showDialog(d.container,
300,e,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?450:370,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function b(){null!=d&&d.removeDraft();c.fileLoaded(null)}var d=c.getCurrentFile();null!=d&&d.isModified()?c.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):
-b()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){k.getSelectionCells();if(1==k.getSelectionCount()){var b=k.getSelectionCell(),d=k.view.getState(b);null!=d&&null!=d.shape&&null!=d.shape.stencil&&(b=new EditShapeDialog(c,b,mxResources.get("editShape")+":",630,400),c.showDialog(b.container,640,480,!0,!1),b.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,
+b()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){g.getSelectionCells();if(1==g.getSelectionCount()){var b=g.getSelectionCell(),d=g.view.getState(b);null!=d&&null!=d.shape&&null!=d.shape.stencil&&(b=new EditShapeDialog(c,b,mxResources.get("editShape")+":",630,400),c.showDialog(b.container,640,480,!0,!1),b.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,
function(b,d){c.spinner.stop();var e=new RevisionDialog(c,b,d);c.showDialog(e.container,640,480,!0,!0);e.init()}),mxUtils.bind(this,function(b){c.handleError(b)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");p=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&
(p.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var b=c.getCurrentFile();null!=b&&(window.drawdata=c.getFileData(),b=null!=b.getTitle()?b.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b),null,!0))});"undefined"!==typeof MathJax&&(p=c.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(c);b.ignoreColor=
-!0;b.ignoreImage=!0;b.mathEnabled=!c.isMathEnabled();k.model.execute(b)}),p.setToggleAction(!0),p.setSelectedCallback(function(){return c.isMathEnabled()}),p.isEnabled=g);isLocalStorage&&(p=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var q=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});
-q.setToggleAction(!0);q.setSelectedCallback(function(){return q.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var b=k.getSelectionCells(),d=[],e=0;e<b.length;e++)k.getModel().isVertex(b[e])&&d.push(b[e]);0<d.length&&(b=new EditGeometryDialog(c,d),c.showDialog(b.container,200,270,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var t=null;c.actions.addAction("copyStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&(t=k.copyStyle(k.getSelectionCell()))},
-null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&null!=t&&k.pasteStyle(t,k.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var b=new BackgroundImageDialog(c,function(b){c.setBackgroundImage(b)});c.showDialog(b.container,320,170,!0,!0);b.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+
-"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(b,d,e,f,g,k,l,m,n,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportSvg(b/100,d,e,f,g,k,l,!m,!1,p,t,u)}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
-mxUtils.bind(this,function(b,d,e,f,g,k,l,m,n,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportImage(b/100,d,e,f,g,l,!m,!1,null,q,null,t,u)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,d,e,f,g){c.downloadFile(d?"xmlpng":"png",null,null,b,null,null,e,f,g)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?
-c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(b,d,e,f,g,k,l,m,n,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportImage(b/100,!1,e,f,!1,l,!m,!1,"jpeg",q,null,t,u)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,d,e,f,g){c.downloadFile("jpeg",null,null,b,null,null,null,f,g)}),!0,!0)}));p=c.actions.addAction("copyAsImage",
-mxUtils.bind(this,function(){var b=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),d=mxUtils.getXml(0==b.length?c.editor.getGraphXml():k.encodeCells(b));c.copyImage(b,d)}));p.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;p=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){k.setShadowVisible(!k.shadowVisible)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return k.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+
+!0;b.ignoreImage=!0;b.mathEnabled=!c.isMathEnabled();g.model.execute(b)}),p.setToggleAction(!0),p.setSelectedCallback(function(){return c.isMathEnabled()}),p.isEnabled=k);isLocalStorage&&(p=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var q=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});
+q.setToggleAction(!0);q.setSelectedCallback(function(){return q.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var b=g.getSelectionCells(),d=[],e=0;e<b.length;e++)g.getModel().isVertex(b[e])&&d.push(b[e]);0<d.length&&(b=new EditGeometryDialog(c,d),c.showDialog(b.container,200,270,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var t=null;c.actions.addAction("copyStyle",function(){g.isEnabled()&&!g.isSelectionEmpty()&&(t=g.copyStyle(g.getSelectionCell()))},
+null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){g.isEnabled()&&!g.isSelectionEmpty()&&null!=t&&g.pasteStyle(t,g.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var b=new BackgroundImageDialog(c,function(b){c.setBackgroundImage(b)});c.showDialog(b.container,320,170,!0,!0);b.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+
+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(b,d,e,f,g,k,l,n,m,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportSvg(b/100,d,e,f,g,k,l,!n,!1,p,t,u)}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
+mxUtils.bind(this,function(b,d,e,f,g,k,l,n,m,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportImage(b/100,d,e,f,g,l,!n,!1,null,q,null,t,u)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,d,e,f,g){c.downloadFile(d?"xmlpng":"png",null,null,b,null,null,e,f,g)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?
+c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(b,d,e,f,g,k,l,n,m,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportImage(b/100,!1,e,f,!1,l,!n,!1,"jpeg",q,null,t,u)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,d,e,f,g){c.downloadFile("jpeg",null,null,b,null,null,null,f,g)}),!0,!0)}));p=c.actions.addAction("copyAsImage",
+mxUtils.bind(this,function(){var b=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),d=mxUtils.getXml(0==b.length?c.editor.getGraphXml():g.encodeCells(b));c.copyImage(b,d)}));p.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;p=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){g.setShadowVisible(!g.shadowVisible)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return g.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+
" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.alert(c.editor.appName+" "+EditorUi.VERSION):c.openLink("https://www.diagrams.net/")}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},
mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var b=new FeedbackDialog(c);c.showDialog(b.container,610,360,!0,!1);b.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});
-c.actions.addAction("forkme",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop"):c.openLink("https://github.com/jgraph/drawio")}).label="Fork me on GitHub...";c.actions.addAction("downloadDesktop...",function(){c.openLink("https://get.diagrams.net/")});p=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,220,220),this.tagsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("tags"))}),
-this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));p=c.actions.addAction("findReplace...",mxUtils.bind(this,function(b,d){var e=k.isEnabled()&&(null==d||!mxEvent.isShiftDown(d)),
-f=e?"findReplace":"find",g=f+"Window";if(null==this[g]){var l=e?"min"==uiTheme?330:300:240;this[g]=new FindWindow(c,document.body.offsetWidth-(l+20),100,l,e?"min"==uiTheme?304:288:170,e);this[g].window.addListener("show",function(){c.fireEvent(new mxEventObject(f))});this[g].window.addListener("hide",function(){c.fireEvent(new mxEventObject(f))});this[g].window.setVisible(!0)}else this[g].window.setVisible(!this[g].window.isVisible())}),null,null,Editor.ctrlKey+"+F");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,
-function(){var b=k.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[b]&&this[b].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var b=null==c.pages||1>=c.pages.length;if(b)c.exportVisio();else{var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatVsdx"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);
+c.actions.addAction("forkme",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop"):c.openLink("https://github.com/jgraph/drawio")}).label="Fork me on GitHub...";c.actions.addAction("downloadDesktop...",function(){c.openLink("https://get.diagrams.net/")});p=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,220),this.tagsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("tags"))}),
+this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));p=c.actions.addAction("findReplace...",mxUtils.bind(this,function(b,d){var e=g.isEnabled()&&(null==d||!mxEvent.isShiftDown(d)),
+f=e?"findReplace":"find",k=f+"Window";if(null==this[k]){var l=e?"min"==uiTheme?330:300:240;this[k]=new FindWindow(c,document.body.offsetWidth-(l+20),100,l,e?"min"==uiTheme?304:288:170,e);this[k].window.addListener("show",function(){c.fireEvent(new mxEventObject(f))});this[k].window.addListener("hide",function(){c.fireEvent(new mxEventObject(f))});this[k].window.setVisible(!0)}else this[k].window.setVisible(!this[k].window.isVisible())}),null,null,Editor.ctrlKey+"+F");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,
+function(){var b=g.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[b]&&this[b].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var b=null==c.pages||1>=c.pages.length;if(b)c.exportVisio();else{var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatVsdx"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);
var f=c.addCheckbox(d,mxResources.get("allPages"),!b,b);f.style.marginBottom="16px";b=new CustomDialog(c,d,mxUtils.bind(this,function(){c.exportVisio(!f.checked)}),null,mxResources.get("export"));c.showDialog(b.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var b=localStorage.getItem(Editor.configurationKey),d=[[mxResources.get("reset"),function(b,d){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),
-mxEvent.isShiftDown(b)&&(localStorage.removeItem(".drawio-config"),localStorage.removeItem(".mode")),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(G){c.handleError(G)}})}]];EditorUi.isElectronApp||d.push([mxResources.get("share"),function(b,d){if(0<d.value.length)try{var e=JSON.parse(d.value),f=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(e)),g=new EmbedDialog(c,f);c.showDialog(g.container,440,240,!0);g.init()}catch(I){c.handleError(I)}else c.handleError({message:mxResources.get("invalidInput")})}]);
-b=new TextareaDialog(c,mxResources.get("configuration")+":",null!=b?JSON.stringify(JSON.parse(b),null,2):"",function(b){if(null!=b)try{if(0<b.length){var d=JSON.parse(b);localStorage.setItem(Editor.configurationKey,JSON.stringify(d))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}catch(G){c.handleError(G)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",d);b.textarea.style.width=
+mxEvent.isShiftDown(b)&&(localStorage.removeItem(".drawio-config"),localStorage.removeItem(".mode")),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(F){c.handleError(F)}})}]];EditorUi.isElectronApp||d.push([mxResources.get("share"),function(b,d){if(0<d.value.length)try{var e=JSON.parse(d.value),f=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(e)),g=new EmbedDialog(c,f);c.showDialog(g.container,440,240,!0);g.init()}catch(I){c.handleError(I)}else c.handleError({message:mxResources.get("invalidInput")})}]);
+b=new TextareaDialog(c,mxResources.get("configuration")+":",null!=b?JSON.stringify(JSON.parse(b),null,2):"",function(b){if(null!=b)try{if(0<b.length){var d=JSON.parse(b);localStorage.setItem(Editor.configurationKey,JSON.stringify(d))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}catch(F){c.handleError(F)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",d);b.textarea.style.width=
"600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!1);b.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(b,d){var e=mxUtils.bind(this,function(e){var f=""==e?mxResources.get("automatic"):mxLanguageMap[e],g=null;""!=f&&(g=b.addItem(f,null,mxUtils.bind(this,function(){mxSettings.setLanguage(e);mxSettings.save();mxClient.language=e;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),
d),(e==mxLanguage||""==e&&null==mxLanguage)&&b.addCheckmark(g,Editor.checkmarkImage));return g});e("");b.addSeparator(d);for(var f in mxLanguageMap)e(f)})));var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(b){var c=u.apply(this,arguments);if(null!=c&&"1"!=urlParams.noLangIcon){var d=this.get("language");if(null!=d){d=c.addMenu("",d.funct);d.setAttribute("title",mxResources.get("language"));d.style.width="16px";d.style.paddingTop="2px";d.style.paddingLeft="4px";d.style.zIndex=
"1";d.style.position="absolute";d.style.display="block";d.style.cursor="pointer";d.style.right="17px";"atlas"==uiTheme?(d.style.top="6px",d.style.right="15px"):d.style.top="min"==uiTheme?"2px":"0px";var e=document.createElement("div");e.style.backgroundImage="url("+Editor.globeImage+")";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";e.style.backgroundSize="19px 19px";e.style.position="absolute";e.style.height="19px";e.style.width="19px";e.style.marginTop="2px";e.style.zIndex=
"1";d.appendChild(e);mxUtils.setOpacity(d,40);if("atlas"==uiTheme||"dark"==uiTheme)d.style.opacity="0.85",d.style.filter="invert(100%)";document.body.appendChild(d)}}return c}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var b=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(b){if(0<b.length)try{var d=
JSON.parse(b);c.executeLayoutList(d);c.customLayoutConfig=d}catch(E){c.handleError(E),null!=window.console&&console.error(E)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");b.textarea.style.width="600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!0);b.init()});var p=this.get("layout"),v=p.funct;p.funct=function(b,d){v.apply(this,arguments);b.addItem(mxResources.get("orgChart"),null,function(){function b(){"undefined"!==typeof mxOrgChartLayout||
c.loadingOrgChart||c.isOffline(!0)?k():c.spinner.spin(document.body,mxResources.get("loading"))&&(c.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",k)})})}):mxscript("js/extensions.min.js",k))}var d=null,e=20,f=20,g=!0,k=function(){c.loadingOrgChart=!1;c.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&
-null!=d&&g){var b=c.editor.graph,k=new mxOrgChartLayout(b,d,e,f),l=b.getDefaultParent();1<b.model.getChildCount(b.getSelectionCell())&&(l=b.getSelectionCell());k.execute(l);g=!1}},l=document.createElement("div"),m=document.createElement("div");m.style.marginTop="6px";m.style.display="inline-block";m.style.width="140px";mxUtils.write(m,mxResources.get("orgChartType")+": ");l.appendChild(m);var n=document.createElement("select");n.style.width="200px";n.style.boxSizing="border-box";for(var m=[mxResources.get("linear"),
-mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")],p=0;p<m.length;p++){var y=document.createElement("option");mxUtils.write(y,m[p]);y.value=p;2==p&&y.setAttribute("selected","selected");n.appendChild(y)}mxEvent.addListener(n,"change",function(){d=n.value});l.appendChild(n);m=document.createElement("div");m.style.marginTop="6px";m.style.display="inline-block";
-m.style.width="140px";mxUtils.write(m,mxResources.get("parentChildSpacing")+": ");l.appendChild(m);var q=document.createElement("input");q.type="number";q.value=e;q.style.width="200px";q.style.boxSizing="border-box";l.appendChild(q);mxEvent.addListener(q,"change",function(){e=q.value});m=document.createElement("div");m.style.marginTop="6px";m.style.display="inline-block";m.style.width="140px";mxUtils.write(m,mxResources.get("siblingSpacing")+": ");l.appendChild(m);var t=document.createElement("input");
-t.type="number";t.value=f;t.style.width="200px";t.style.boxSizing="border-box";l.appendChild(t);mxEvent.addListener(t,"change",function(){f=t.value});l=new CustomDialog(c,l,function(){null==d&&(d=2);b()});c.showDialog(l.container,355,140,!0,!0)},d,null,g());b.addSeparator(d);b.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var b=new mxParallelEdgeLayout(k);b.checkOverlap=!0;b.spacing=20;c.executeLayout(function(){b.execute(k.getDefaultParent(),k.isSelectionEmpty()?null:k.getSelectionCells())},
+null!=d&&g){var b=c.editor.graph,k=new mxOrgChartLayout(b,d,e,f),l=b.getDefaultParent();1<b.model.getChildCount(b.getSelectionCell())&&(l=b.getSelectionCell());k.execute(l);g=!1}},l=document.createElement("div"),n=document.createElement("div");n.style.marginTop="6px";n.style.display="inline-block";n.style.width="140px";mxUtils.write(n,mxResources.get("orgChartType")+": ");l.appendChild(n);var m=document.createElement("select");m.style.width="200px";m.style.boxSizing="border-box";for(var n=[mxResources.get("linear"),
+mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")],p=0;p<n.length;p++){var x=document.createElement("option");mxUtils.write(x,n[p]);x.value=p;2==p&&x.setAttribute("selected","selected");m.appendChild(x)}mxEvent.addListener(m,"change",function(){d=m.value});l.appendChild(m);n=document.createElement("div");n.style.marginTop="6px";n.style.display="inline-block";
+n.style.width="140px";mxUtils.write(n,mxResources.get("parentChildSpacing")+": ");l.appendChild(n);var q=document.createElement("input");q.type="number";q.value=e;q.style.width="200px";q.style.boxSizing="border-box";l.appendChild(q);mxEvent.addListener(q,"change",function(){e=q.value});n=document.createElement("div");n.style.marginTop="6px";n.style.display="inline-block";n.style.width="140px";mxUtils.write(n,mxResources.get("siblingSpacing")+": ");l.appendChild(n);var B=document.createElement("input");
+B.type="number";B.value=f;B.style.width="200px";B.style.boxSizing="border-box";l.appendChild(B);mxEvent.addListener(B,"change",function(){f=B.value});l=new CustomDialog(c,l,function(){null==d&&(d=2);b()});c.showDialog(l.container,355,140,!0,!0)},d,null,k());b.addSeparator(d);b.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var b=new mxParallelEdgeLayout(g);b.checkOverlap=!0;b.spacing=20;c.executeLayout(function(){b.execute(g.getDefaultParent(),g.isSelectionEmpty()?null:g.getSelectionCells())},
!1)}),d);b.addSeparator(d);c.menus.addMenuItem(b,"runLayout",d,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(b,d){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(b,["about"],d);else{var e=b.addItem("Search:",null,null,d,null,null,!1);e.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft=
"8px";mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(b){var c=mxUtils.trim(f.value);13==b.keyCode&&0<c.length?(this.editorUi.openLink("https://www.google.com/search?q=site%3Adiagrams.net+inurl%3A%2Fdoc%2Ffaq%2F+"+encodeURIComponent(c)),f.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:c}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==b.keyCode&&(f.value="")}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,
function(b){document.activeElement!=f&&f.focus();mxEvent.consume(b)},function(b){mxEvent.consume(b)},function(b){mxEvent.consume(b)});window.setTimeout(function(){f.focus()},0);EditorUi.isElectronApp?(console.log("electron help menu"),this.addMenuItems(b,"- keyboardShortcuts quickStart support - forkme - about".split(" "),d)):this.addMenuItems(b,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),d)}"1"==urlParams.test&&(b.addSeparator(d),this.addSubmenu("testDevelop",
-b,d))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var b=prompt("Language Code",Graph.diagramLanguage||"");null!=b&&(Graph.diagramLanguage=0<b.length?b:null,k.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");
-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");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!k.isSelectionEmpty()){var b=k.cloneCells(k.getSelectionCells()),d=k.getBoundingBoxFromGeometry(b),b=k.moveCells(b,-d.x,-d.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+
-d.width+", "+d.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(k.encodeCells(b)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var b=k.getGraphBounds(),c=k.view.translate,d=k.view.scale;k.insertVertex(k.getDefaultParent(),null,"",b.x/d-c.x,b.y/d-c.y,b.width/d,b.height/d,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var b=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):
-"",b=new TextareaDialog(c,"Paste Data:",b,function(b){if(0<b.length)try{var d=function(b){function c(b){if(null==p[b]){if(p[b]=!0,null!=f[b]){for(;0<f[b].length;){var e=f[b].pop();c(e)}delete f[b]}}else mxLog.debug(d+": Visited: "+b)}var d=b.parentNode.id,e=b.childNodes;b={};for(var f={},g=null,k={},l=0;l<e.length;l++){var m=e[l];if(null!=m.id&&0<m.id.length)if(null==b[m.id]){b[m.id]=m.id;var n=m.getAttribute("parent");null==n?null!=g?mxLog.debug(d+": Multiple roots: "+m.id):g=m.id:(null==f[n]&&(f[n]=
-[]),f[n].push(m.id))}else k[m.id]=m.id}0<Object.keys(k).length?(e=d+": "+Object.keys(k).length+" Duplicates: "+Object.keys(k).join(", "),mxLog.debug(e+" (see console)")):mxLog.debug(d+": Checked");var p={};null==g?mxLog.debug(d+": No root"):(c(g),Object.keys(p).length!=Object.keys(b).length&&(mxLog.debug(d+": Invalid tree: (see console)"),console.log(d+": Invalid tree",f)))};"<"!=b.charAt(0)&&(b=Graph.decompress(b),mxLog.debug("See console for uncompressed XML"),console.log("xml",b));var e=mxUtils.parseXml(b),
-f=c.getPagesForNode(e.documentElement,"mxGraphModel");if(null!=f&&0<f.length)try{var g=c.getHashValueForPages(f);mxLog.debug("Checksum: ",g)}catch(I){mxLog.debug("Error: ",I.message)}else mxLog.debug("No pages found for checksum");var k=e.getElementsByTagName("root");for(b=0;b<k.length;b++)d(k[b]);mxLog.show()}catch(I){c.handleError(I),null!=window.console&&console.error(I)}});b.textarea.style.width="600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!0);b.init()}));var x=
-null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var b=new TextareaDialog(c,"Diff/Sync:","",function(b){var d=c.getCurrentFile();if(0<b.length&&null!=d)try{var e=JSON.parse(b);d.patch([e],null,!0);c.hideDialog()}catch(G){c.handleError(G)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(d,e){x=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement);b.textarea.value="Snapshot updated "+(new Date).toLocaleString()}],["Diff",function(d,
-e){try{b.textarea.value=JSON.stringify(c.diffPages(x,c.pages),null,2)}catch(E){c.handleError(E)}}]]);b.textarea.style.width="600px";b.textarea.style.height="380px";null==x?(x=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement),b.textarea.value="Snapshot created "+(new Date).toLocaleString()):b.textarea.value=JSON.stringify(c.diffPages(x,c.pages),null,2);c.showDialog(b.container,620,460,!0,!0);b.init()}else c.alert("No pages")}));c.actions.addAction("testInspect",mxUtils.bind(this,
-function(){console.log(c,k.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var b=new mxImageExport,c=k.getGraphBounds(),d=k.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-c.x)/d),Math.floor((1-c.y)/d));e.scale(1/d);var g=0,l=e.save;e.save=function(){g++;l.apply(this,arguments)};var m=e.restore;e.restore=function(){g--;m.apply(this,arguments)};var n=b.drawShape;b.drawShape=function(b){mxLog.debug("entering shape",
-b,g);n.apply(this,arguments);mxLog.debug("leaving shape",b,g)};b.drawState(k.getView().getState(k.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),
-c)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(b){k.isEnabled()&&(b=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),b.vertex=!0,b=new EditShapeDialog(c,
-b,mxResources.get("editShape")+":",630,400),c.showDialog(b.container,640,480,!0,!1),b.init())})).isEnabled=g;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",b,function(b,d,e,f,g,k,l,m,n,p){c.createHtml(b,d,e,f,g,k,l,m,n,p,mxUtils.bind(this,function(b,d){var e=
-new EmbedDialog(c,b+"\n"+d,null,null,function(){var e=window.open(),f=e.document;if(null!=f){"CSS1Compat"===document.compatMode&&f.writeln("<!DOCTYPE html>");f.writeln("<html>");f.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');f.writeln("<body>");f.writeln(b);var g=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;g&&f.writeln(d);f.writeln("</body>");f.writeln("</html>");f.close();if(!g){var k=e.document.createElement("div");
+b,d))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var b=prompt("Language Code",Graph.diagramLanguage||"");null!=b&&(Graph.diagramLanguage=0<b.length?b:null,g.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");
+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");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!g.isSelectionEmpty()){var b=g.cloneCells(g.getSelectionCells()),d=g.getBoundingBoxFromGeometry(b),b=g.moveCells(b,-d.x,-d.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+
+d.width+", "+d.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(g.encodeCells(b)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var b=g.getGraphBounds(),c=g.view.translate,d=g.view.scale;g.insertVertex(g.getDefaultParent(),null,"",b.x/d-c.x,b.y/d-c.y,b.width/d,b.height/d,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var b=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):
+"",b=new TextareaDialog(c,"Paste Data:",b,function(b){if(0<b.length)try{var d=function(b){function c(b){if(null==p[b]){if(p[b]=!0,null!=f[b]){for(;0<f[b].length;){var e=f[b].pop();c(e)}delete f[b]}}else mxLog.debug(d+": Visited: "+b)}var d=b.parentNode.id,e=b.childNodes;b={};for(var f={},g=null,k={},l=0;l<e.length;l++){var n=e[l];if(null!=n.id&&0<n.id.length)if(null==b[n.id]){b[n.id]=n.id;var m=n.getAttribute("parent");null==m?null!=g?mxLog.debug(d+": Multiple roots: "+n.id):g=n.id:(null==f[m]&&(f[m]=
+[]),f[m].push(n.id))}else k[n.id]=n.id}0<Object.keys(k).length?(e=d+": "+Object.keys(k).length+" Duplicates: "+Object.keys(k).join(", "),mxLog.debug(e+" (see console)")):mxLog.debug(d+": Checked");var p={};null==g?mxLog.debug(d+": No root"):(c(g),Object.keys(p).length!=Object.keys(b).length&&(mxLog.debug(d+": Invalid tree: (see console)"),console.log(d+": Invalid tree",f)))};"<"!=b.charAt(0)&&(b=Graph.decompress(b),mxLog.debug("See console for uncompressed XML"),console.log("xml",b));var e=mxUtils.parseXml(b),
+f=c.getPagesForNode(e.documentElement,"mxGraphModel");if(null!=f&&0<f.length)try{var g=c.getHashValueForPages(f);mxLog.debug("Checksum: ",g)}catch(I){mxLog.debug("Error: ",I.message)}else mxLog.debug("No pages found for checksum");var k=e.getElementsByTagName("root");for(b=0;b<k.length;b++)d(k[b]);mxLog.show()}catch(I){c.handleError(I),null!=window.console&&console.error(I)}});b.textarea.style.width="600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!0);b.init()}));var y=
+null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var b=new TextareaDialog(c,"Diff/Sync:","",function(b){var d=c.getCurrentFile();if(0<b.length&&null!=d)try{var e=JSON.parse(b);d.patch([e],null,!0);c.hideDialog()}catch(F){c.handleError(F)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(d,e){y=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement);b.textarea.value="Snapshot updated "+(new Date).toLocaleString()}],["Diff",function(d,
+e){try{b.textarea.value=JSON.stringify(c.diffPages(y,c.pages),null,2)}catch(E){c.handleError(E)}}]]);b.textarea.style.width="600px";b.textarea.style.height="380px";null==y?(y=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement),b.textarea.value="Snapshot created "+(new Date).toLocaleString()):b.textarea.value=JSON.stringify(c.diffPages(y,c.pages),null,2);c.showDialog(b.container,620,460,!0,!0);b.init()}else c.alert("No pages")}));c.actions.addAction("testInspect",mxUtils.bind(this,
+function(){console.log(c,g.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var b=new mxImageExport,c=g.getGraphBounds(),d=g.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-c.x)/d),Math.floor((1-c.y)/d));e.scale(1/d);var k=0,l=e.save;e.save=function(){k++;l.apply(this,arguments)};var n=e.restore;e.restore=function(){k--;n.apply(this,arguments)};var m=b.drawShape;b.drawShape=function(b){mxLog.debug("entering shape",
+b,k);m.apply(this,arguments);mxLog.debug("leaving shape",b,k)};b.drawState(g.getView().getState(g.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",k)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),
+c)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(b){g.isEnabled()&&(b=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),b.vertex=!0,b=new EditShapeDialog(c,
+b,mxResources.get("editShape")+":",630,400),c.showDialog(b.container,640,480,!0,!1),b.init())})).isEnabled=k;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",b,function(b,d,e,f,g,k,l,n,m,p,x){c.createHtml(b,d,e,f,g,k,l,n,m,p,x,mxUtils.bind(this,function(b,
+d){var e=new EmbedDialog(c,b+"\n"+d,null,null,function(){var e=window.open(),f=e.document;if(null!=f){"CSS1Compat"===document.compatMode&&f.writeln("<!DOCTYPE html>");f.writeln("<html>");f.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');f.writeln("<body>");f.writeln(b);var g=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;g&&f.writeln(d);f.writeln("</body>");f.writeln("</html>");f.close();if(!g){var k=e.document.createElement("div");
k.marginLeft="26px";k.marginTop="26px";mxUtils.write(k,mxResources.get("updatingDocument"));g=e.document.createElement("img");g.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");g.style.marginLeft="6px";k.appendChild(g);e.document.body.insertBefore(k,e.document.body.firstChild);window.setTimeout(function(){var b=document.createElement("script");b.type="text/javascript";b.src=/<script.*?src="(.*?)"/.exec(d)[1];f.body.appendChild(b);k.parentNode.removeChild(k)},
20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(e.container,440,240,!0,!0);e.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var b=c.getCurrentFile();null!=b&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(d){c.spinner.stop();null!=d?(d=new EmbedDialog(c,'<img src="'+(b.constructor!=DriveFile?d:"https://drive.google.com/uc?id="+b.getId())+'"/>'),c.showDialog(d.container,
440,240,!0,!0),d.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(b,d,e,f,g,k){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(b,d,e,f,g,k,function(b){c.spinner.stop();b=new EmbedDialog(c,b);c.showDialog(b.container,440,240,!0,!0);b.init()},function(b){c.spinner.stop();c.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),
c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(b,d,e,f,g,k){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(b,d,e,f,g,k,function(b){c.spinner.stop();b=new EmbedDialog(c,b);c.showDialog(b.container,440,240,!0,!0);b.init()},function(b){c.spinner.stop();c.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
-c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=k.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(b.height/k.view.scale)+2,function(b,d,e,f,g,k,l,m,n){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(p){c.spinner.stop();var y=[];n&&y.push("tags={}");p=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+l+";height:"+m+';" src="'+c.createLink(b,d,e,f,g,k,p,null,
-y)+'"></iframe>');c.showDialog(p.container,440,240,!0,!0);p.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(b,d,e,f,g,k,l,m,n){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();var m=["border=0"];n&&m.push("tags={}");l=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,l,null,m,!0));c.showDialog(l.container,440,
-240,!0,!0);l.init()})},!0)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(b,d,e,f,g,k,l,m,n){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();var m=[];n&&m.push("tags={}");l=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,l,null,m));c.showDialog(l.container,440,240,!0,!0);l.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});
+c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=g.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(b.height/g.view.scale)+2,function(b,d,e,f,g,k,l,n,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(p){c.spinner.stop();var x=[];m&&x.push("tags={}");p=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+l+";height:"+n+';" src="'+c.createLink(b,d,e,f,g,k,p,null,
+x)+'"></iframe>');c.showDialog(p.container,440,240,!0,!0);p.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(b,d,e,f,g,k,l,n,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();var n=["border=0"];m&&n.push("tags={}");l=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,l,null,n,!0));c.showDialog(l.container,440,
+240,!0,!0);l.init()})},!0)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(b,d,e,f,g,k,l,n,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();var n=[];m&&n.push("tags={}");l=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,l,null,n));c.showDialog(l.container,440,240,!0,!0);l.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});
c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();b=new GoogleSitesDialog(c,b);c.showDialog(b.container,420,
256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)p=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,360,170,!0,!1)});p=c.actions.addAction("search",function(){var b=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=
-!b,mxSettings.save())});p.label=mxResources.get("searchShapes");p.setToggleAction(!0);p.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(c.actions.get("save").funct=function(b){k.isEditing()&&k.stopEditing();var d="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var e=c.createLoadMessage("save");e.xml=d;b&&(e.exit=!0);d=JSON.stringify(e)}(window.opener||window.parent).postMessage(d,
+!b,mxSettings.save())});p.label=mxResources.get("searchShapes");p.setToggleAction(!0);p.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(c.actions.get("save").funct=function(b){g.isEditing()&&g.stopEditing();var d="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var e=c.createLoadMessage("save");e.xml=d;b&&(e.exit=!0);d=JSON.stringify(e)}(window.opener||window.parent).postMessage(d,
"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));b=c.getCurrentFile();null==b||b.constructor==EmbedFile||b.constructor==LocalFile&&null==b.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){var b=function(){c.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",
modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,d){c.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],d),c.jpgSupported&&this.addMenuItems(b,["exportJpg"],d)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],d);this.addMenuItems(b,
["exportSvg","-"],d);c.isOffline()||c.printPdfExport?this.addMenuItems(b,["exportPdf"],d):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],d);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(b,["exportVsdx"],d);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],d);c.isOffline()||(b.addSeparator(d),this.addMenuItem(b,"export",d).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",
-new Menu(mxUtils.bind(this,function(b,d){function e(b){b.pickFile(function(d){c.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(d,function(b){var d="data:image/"==b.getData().substring(0,11)?p(b.getTitle()):"text/xml";/\.svg$/i.test(b.getTitle())&&!c.editor.isDataSvg(b.getData())&&(b.setData(Editor.createSvgDataUri(b.getData())),d="image/svg+xml");g(b.getData(),d,b.getTitle())},function(b){c.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==c.drive)},!0)}var g=
-mxUtils.bind(this,function(b,d,e){var f=k.view,g=k.getGraphBounds(),l=k.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*k.gridSize)),m=k.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*k.gridSize));"data:image/"==b.substring(0,11)?c.loadImage(b,mxUtils.bind(this,function(f){var g=!0,n=mxUtils.bind(this,function(){c.resizeImage(f,b,mxUtils.bind(this,function(f,n,p){f=g?Math.min(1,Math.min(c.maxImageSize/n,c.maxImageSize/p)):1;c.importFile(b,d,l,m,Math.round(n*f),Math.round(p*
-f),e,function(b){c.spinner.stop();k.setSelectionCells(b);k.scrollCellToVisible(k.getSelectionCell())})}),g)});b.length>c.resampleThreshold?c.confirmImageResize(function(b){g=b;n()}):n()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(b,d,l,m,0,0,e,function(b){c.spinner.stop();k.setSelectionCells(b);k.scrollCellToVisible(k.getSelectionCell())})}),p=mxUtils.bind(this,function(b){var c="text/xml";/\.png$/i.test(b)?c="image/png":/\.jpe?g$/i.test(b)?
-c="image/jpg":/\.gif$/i.test(b)?c="image/gif":/\.pdf$/i.test(b)&&(c="application/pdf");return c});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){e(c.drive)},d):m&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){e(c.oneDrive)},d):
+new Menu(mxUtils.bind(this,function(b,d){function e(b){b.pickFile(function(d){c.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(d,function(b){var d="data:image/"==b.getData().substring(0,11)?p(b.getTitle()):"text/xml";/\.svg$/i.test(b.getTitle())&&!c.editor.isDataSvg(b.getData())&&(b.setData(Editor.createSvgDataUri(b.getData())),d="image/svg+xml");k(b.getData(),d,b.getTitle())},function(b){c.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==c.drive)},!0)}var k=
+mxUtils.bind(this,function(b,d,e){var f=g.view,k=g.getGraphBounds(),l=g.snap(Math.ceil(Math.max(0,k.x/f.scale-f.translate.x)+4*g.gridSize)),n=g.snap(Math.ceil(Math.max(0,(k.y+k.height)/f.scale-f.translate.y)+4*g.gridSize));"data:image/"==b.substring(0,11)?c.loadImage(b,mxUtils.bind(this,function(f){var k=!0,m=mxUtils.bind(this,function(){c.resizeImage(f,b,mxUtils.bind(this,function(f,m,p){f=k?Math.min(1,Math.min(c.maxImageSize/m,c.maxImageSize/p)):1;c.importFile(b,d,l,n,Math.round(m*f),Math.round(p*
+f),e,function(b){c.spinner.stop();g.setSelectionCells(b);g.scrollCellToVisible(g.getSelectionCell())})}),k)});b.length>c.resampleThreshold?c.confirmImageResize(function(b){k=b;m()}):m()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(b,d,l,n,0,0,e,function(b){c.spinner.stop();g.setSelectionCells(b);g.scrollCellToVisible(g.getSelectionCell())})}),p=mxUtils.bind(this,function(b){var c="text/xml";/\.png$/i.test(b)?c="image/png":/\.jpe?g$/i.test(b)?
+c="image/jpg":/\.gif$/i.test(b)?c="image/gif":/\.pdf$/i.test(b)&&(c="application/pdf");return c});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){e(c.drive)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){e(c.oneDrive)},d):
l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){e(c.dropbox)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){e(c.gitHub)},d);
-null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){e(c.gitLab)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){e(c.notion)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){e(c.trello)},d):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
-"...",null,function(){c.importLocalFile(!1)},d);b.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},d);c.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(c,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var d=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(c){g(c,d,b)},
-function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==d)}},mxResources.get("url"));c.showDialog(b.container,300,80,!0,!0);b.init()},d))}))).isEnabled=g;this.put("theme",new Menu(mxUtils.bind(this,function(b,d){var e="1"==urlParams.sketch?"sketch":mxSettings.getUi(),f=b.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");c.alert(mxResources.get("restartForChangeRequired"))},d);"kennedy"!=e&&"atlas"!=e&&"dark"!=e&&"min"!=e&&"sketch"!=
+null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){e(c.gitLab)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){e(c.notion)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){e(c.trello)},d):m&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
+"...",null,function(){c.importLocalFile(!1)},d);b.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},d);c.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(c,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var d=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(c){k(c,d,b)},
+function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==d)}},mxResources.get("url"));c.showDialog(b.container,300,80,!0,!0);b.init()},d))}))).isEnabled=k;this.put("theme",new Menu(mxUtils.bind(this,function(b,d){var e="1"==urlParams.sketch?"sketch":mxSettings.getUi(),f=b.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");c.alert(mxResources.get("restartForChangeRequired"))},d);"kennedy"!=e&&"atlas"!=e&&"dark"!=e&&"min"!=e&&"sketch"!=
e&&b.addCheckmark(f,Editor.checkmarkImage);b.addSeparator(d);f=b.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");c.alert(mxResources.get("restartForChangeRequired"))},d);"kennedy"==e&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");c.alert(mxResources.get("restartForChangeRequired"))},d);"min"==e&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");
c.alert(mxResources.get("restartForChangeRequired"))},d);"atlas"==e&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");c.alert(mxResources.get("restartForChangeRequired"))},d);"dark"==e&&b.addCheckmark(f,Editor.checkmarkImage);b.addSeparator(d);f=b.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");c.alert(mxResources.get("restartForChangeRequired"))},d);"sketch"==e&&b.addCheckmark(f,Editor.checkmarkImage)})));
p=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b)if(b.constructor==LocalFile&&null!=b.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(d,e){b.invalidFileHandle=null;b.fileHandle=d;b.title=e.name;b.desc=e;c.save(e.name)}),null,c.createFileSystemOptions(b.getTitle()));else{var d=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,d=new FilenameDialog(this.editorUi,d,mxResources.get("rename"),mxUtils.bind(this,
function(c){null!=c&&0<c.length&&null!=b&&c!=b.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(c,mxUtils.bind(this,function(b){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(b){this.editorUi.handleError(b,null!=b?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),
-mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(d.container,340,96,!0,!0);d.init()}}));p.isEnabled=function(){return this.enabled&&g.apply(this,arguments)};p.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=c.getCurrentFile();if(null!=b){var d=c.getCopyFilename(b);b.constructor==DriveFile?(d=new CreateDialog(c,d,mxUtils.bind(this,function(d,e){"_blank"==e?c.editor.editAsNew(c.getFileData(),d):("download"==
+mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(d.container,340,96,!0,!0);d.init()}}));p.isEnabled=function(){return this.enabled&&k.apply(this,arguments)};p.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=c.getCurrentFile();if(null!=b){var d=c.getCopyFilename(b);b.constructor==DriveFile?(d=new CreateDialog(c,d,mxUtils.bind(this,function(d,e){"_blank"==e?c.editor.editAsNew(c.getFileData(),d):("download"==
e&&(e=App.MODE_GOOGLE),null!=d&&0<d.length&&(e==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&b.saveAs(d,mxUtils.bind(this,function(d){b.desc=d;b.save(!1,mxUtils.bind(this,function(){c.spinner.stop();b.setModified(!1);b.addAllSavedStatus()}),mxUtils.bind(this,function(b){c.handleError(b)}))}),mxUtils.bind(this,function(b){c.handleError(b)})):c.createFile(d,c.getFileData(!0),null,e)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),
null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(d.container,420,380,!0,!0),d.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),d)}}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=c.getCurrentFile();if(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE){var d=!1;if(b.getMode()==App.MODE_GOOGLE&&null!=b.desc.parents)for(var e=0;e<b.desc.parents.length;e++)if(b.desc.parents[e].isRoot){d=!0;break}c.pickFolder(b.getMode(),mxUtils.bind(this,
function(d){c.spinner.spin(document.body,mxResources.get("moving"))&&b.move(d,mxUtils.bind(this,function(b){c.spinner.stop()}),mxUtils.bind(this,function(b){c.handleError(b)}))}),null,!0,d)}}));this.put("publish",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,["publishLink"],c)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));c.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",
function(){c.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var b=c.getCurrentFile();null!=b&&b.share()}catch(B){c.handleError(B)}}));this.put("embed",new Menu(mxUtils.bind(this,function(b,d){var e=c.getCurrentFile();null==e||e.getMode()!=App.MODE_GOOGLE&&e.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(e.getTitle())||this.addMenuItems(b,["liveImage","-"],d);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],d);navigator.standalone||
c.isOffline()||this.addMenuItems(b,["embedIframe"],d);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(b,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),d)})));c.addInsertItem=function(b,d,e,f){("plantUml"!=f||EditorUi.enablePlantUml&&!c.isOffline())&&b.addItem(e,null,mxUtils.bind(this,function(){if("fromText"==f||"formatSql"==f||"plantUml"==f||"mermaid"==f){var b=new ParseDialog(c,e,f);c.showDialog(b.container,620,420,!0,!1);c.dialog.container.style.overflow=
-"auto"}else b=new CreateGraphDialog(c,e,f),c.showDialog(b.container,620,420,!0,!1);b.init()}),d,null,g())};var A=function(b,d,e,f){var g=new mxCell(b,new mxGeometry(0,0,d,e),f);g.vertex=!0;b=k.getCenterInsertPoint(k.getBoundingBoxFromGeometry([g],!0));g.geometry.x=b.x;g.geometry.y=b.y;k.getModel().beginUpdate();try{g=k.addCell(g),k.fireEvent(new mxEventObject("cellsInserted","cells",[g]))}finally{k.getModel().endUpdate()}k.scrollCellToVisible(g);k.setSelectionCell(g);k.container.focus();k.editAfterInsert&&
-k.startEditing(g);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(k.view.getState(g))},0);return g};c.actions.put("insertText",new Action(mxResources.get("text"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&k.startEditingAtCell(A("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=g;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),
-function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=g;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=g;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&
-A("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=g;c.addInsertMenuItems=mxUtils.bind(this,function(b,d,e){for(var f=0;f<e.length;f++)"-"==e[f]?b.addSeparator(d):c.addInsertItem(b,d,mxResources.get(e[f])+"...",e[f])});this.put("insert",new Menu(mxUtils.bind(this,function(b,d){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),d);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(b,["insertTemplate"],
+"auto"}else b=new CreateGraphDialog(c,e,f),c.showDialog(b.container,620,420,!0,!1);b.init()}),d,null,k())};var A=function(b,d,e,f){var k=new mxCell(b,new mxGeometry(0,0,d,e),f);k.vertex=!0;b=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry([k],!0));k.geometry.x=b.x;k.geometry.y=b.y;g.getModel().beginUpdate();try{k=g.addCell(k),g.fireEvent(new mxEventObject("cellsInserted","cells",[k]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(k);g.setSelectionCell(k);g.container.focus();g.editAfterInsert&&
+g.startEditing(k);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(g.view.getState(k))},0);return k};c.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&g.startEditingAtCell(A("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),
+function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=k;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&
+A("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=k;c.addInsertMenuItems=mxUtils.bind(this,function(b,d,e){for(var f=0;f<e.length;f++)"-"==e[f]?b.addSeparator(d):c.addInsertItem(b,d,mxResources.get(e[f])+"...",e[f])});this.put("insert",new Menu(mxUtils.bind(this,function(b,d){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),d);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(b,["insertTemplate"],
d);b.addSeparator(d);this.addSubmenu("insertLayout",b,d,mxResources.get("layout"));this.addSubmenu("insertAdvanced",b,d,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,d){c.addInsertMenuItems(b,d,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,d){c.addInsertMenuItems(b,d,["fromText","plantUml","mermaid","-","formatSql"]);b.addItem(mxResources.get("csv")+
-"...",null,function(){c.showImportCsvDialog()},d,null,g())})));this.put("openRecent",new Menu(function(b,d){var e=c.getRecent();if(null!=e){for(var f=0;f<e.length;f++)(function(e){var f=e.mode;f==App.MODE_GOOGLE?f="googleDrive":f==App.MODE_ONEDRIVE&&(f="oneDrive");b.addItem(e.title+" ("+mxResources.get(f)+")",null,function(){c.loadFile(e.id)},d)})(e[f]);b.addSeparator(d)}b.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},d)}));this.put("openFrom",new Menu(function(b,d){null!=c.drive?
-b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},d):m&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,
+"...",null,function(){c.showImportCsvDialog()},d,null,k())})));this.put("openRecent",new Menu(function(b,d){var e=c.getRecent();if(null!=e){for(var f=0;f<e.length;f++)(function(e){var f=e.mode;f==App.MODE_GOOGLE?f="googleDrive":f==App.MODE_ONEDRIVE&&(f="oneDrive");b.addItem(e.title+" ("+mxResources.get(f)+")",null,function(){c.loadFile(e.id)},d)})(e[f]);b.addSeparator(d)}b.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},d)}));this.put("openFrom",new Menu(function(b,d){null!=c.drive?
+b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,
null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},d);null!=
-c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){c.pickFile(App.MODE_NOTION)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},d):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},
+c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){c.pickFile(App.MODE_NOTION)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},d):m&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},
d);b.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},d);c.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(c,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==c.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"));
-c.showDialog(b.container,300,80,!0,!0);b.init()},d))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},d):m&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.oneDrive?
+c.showDialog(b.container,300,80,!0,!0);b.init()},d))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.oneDrive?
b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_NOTION)},d));null!=c.trello?b.addItem(mxResources.get("trello")+
-"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},d);b.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,
-null,App.MODE_DEVICE)},d)})),this.put("openLibraryFrom",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},d):m&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},
+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):m&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},d);b.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,
+null,App.MODE_DEVICE)},d)})),this.put("openLibraryFrom",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},
d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},
-d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){c.pickLibrary(App.MODE_NOTION)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},d):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);
+d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){c.pickLibrary(App.MODE_NOTION)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},d):m&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);
isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},d);b.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},d);c.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(c,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var d=b;c.editor.isCorsEnabledForUrl(b)||
(d=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(d,function(d){if(200<=d.getStatus()&&299>=d.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,d.getText(),b))}catch(D){c.handleError(D,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));c.showDialog(b.container,300,80,!0,!0);b.init()},d));"1"==urlParams.confLib&&
(b.addSeparator(d),b.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},d))})));this.put("edit",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));p=c.actions.addAction("comments",mxUtils.bind(this,
@@ -11690,12 +11695,12 @@ EditorUi.isElectronApp||null==e||e.constructor==LocalFile&&null==e.fileHandle||(
navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],d):(this.addMenuItems(b,["makeCopy"],d),null!=e&&e.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],d)));b.addSeparator(d);this.addSubmenu("importFrom",b,d);this.addSubmenu("exportAs",b,d);b.addSeparator(d);this.addSubmenu("embed",b,d);this.addSubmenu("publish",b,d);b.addSeparator(d);this.addSubmenu("newLibrary",b,d);this.addSubmenu("openLibraryFrom",b,d);c.isRevisionHistorySupported()&&
this.addMenuItems(b,["-","revisionHistory"],d);null!=e&&null!=c.fileNode&&(e=null!=e.getTitle()?e.getTitle():c.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["-","properties"]));this.addMenuItems(b,["-","pageSetup"],d);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],d);this.addMenuItems(b,["-","close"])}})));b.prototype.execute=function(){var b=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;
this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var c=b.extFonts,d=0;null!=c&&d<c.length;d++){var e=document.getElementById("extFont_"+c[d].name);null!=e&&e.parentNode.removeChild(e)}b.extFonts=[];for(d=0;null!=this.previousExtFonts&&d<this.previousExtFonts.length;d++)this.ui.editor.graph.addExtFont(this.previousExtFonts[d].name,this.previousExtFonts[d].url);this.previousExtFonts=c};this.put("fontFamily",new Menu(mxUtils.bind(this,
-function(d,e){for(var f=mxUtils.bind(this,function(f,g,k,l,m){var n=this.editorUi.editor.graph;l=this.styleChange(d,l||f,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[f,null!=g?encodeURIComponent(g):null,null]:[f],null,e,function(){"1"!=urlParams["ext-fonts"]?n.setFont(f,g):(document.execCommand("fontname",!1,f),n.addExtFont(f,g))},function(){n.updateLabelElements(n.getSelectionCells(),function(b){b.removeAttribute("face");
-b.style.fontFamily=null;"PRE"==b.nodeName&&n.replaceElement(b,"div")});"1"==urlParams["ext-fonts"]&&n.addExtFont(f,g)});k&&(k=document.createElement("span"),k.className="geSprite geSprite-delete",k.style.cursor="pointer",k.style.display="inline-block",l.firstChild.nextSibling.nextSibling.appendChild(k),mxEvent.addListener(k,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(d){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[f.toLowerCase()];for(var e=0;e<this.customFonts.length;e++)if(this.customFonts[e].name==
+function(d,e){for(var f=mxUtils.bind(this,function(f,g,k,l,n){var m=this.editorUi.editor.graph;l=this.styleChange(d,l||f,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[f,null!=g?encodeURIComponent(g):null,null]:[f],null,e,function(){"1"!=urlParams["ext-fonts"]?m.setFont(f,g):(document.execCommand("fontname",!1,f),m.addExtFont(f,g))},function(){m.updateLabelElements(m.getSelectionCells(),function(b){b.removeAttribute("face");
+b.style.fontFamily=null;"PRE"==b.nodeName&&m.replaceElement(b,"div")});"1"==urlParams["ext-fonts"]&&m.addExtFont(f,g)});k&&(k=document.createElement("span"),k.className="geSprite geSprite-delete",k.style.cursor="pointer",k.style.display="inline-block",l.firstChild.nextSibling.nextSibling.appendChild(k),mxEvent.addListener(k,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(d){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[f.toLowerCase()];for(var e=0;e<this.customFonts.length;e++)if(this.customFonts[e].name==
f&&this.customFonts[e].url==g){this.customFonts.splice(e,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var k=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=k&&0<k.length)for(e=0;e<k.length;e++)if(k[e].name==f){k.splice(e,1);break}for(var l=mxUtils.clone(this.customFonts),e=0;e<l.length;e++)if(l[e].name==f){l.splice(e,1);break}e=new b(this.editorUi,k,l);this.editorUi.editor.graph.model.execute(e)}this.editorUi.hideCurrentMenu();mxEvent.consume(d)})));Graph.addFont(f,
-g);l.firstChild.nextSibling.style.fontFamily=f;null!=m&&l.setAttribute("title",m)}),g={},k=0;k<this.defaultFonts.length;k++){var l=this.defaultFonts[k];"string"===typeof l?f(l):null!=l.fontFamily&&null!=l.fontUrl&&(g[encodeURIComponent(l.fontFamily)+"@"+encodeURIComponent(l.fontUrl)]=!0,f(l.fontFamily,l.fontUrl))}d.addSeparator(e);if("1"!=urlParams["ext-fonts"]){for(var l=function(b){var c=encodeURIComponent(b.name)+(null==b.url?"":"@"+encodeURIComponent(b.url));if(!g[c]){for(var d=b.name,e=0;null!=
-n[d.toLowerCase()];)d=b.name+" ("+ ++e+")";null==m[c]&&(p.push({name:b.name,url:b.url,label:d,title:b.url}),n[d.toLowerCase()]=b,m[c]=b)}},m={},n={},p=[],k=0;k<this.customFonts.length;k++)l(this.customFonts[k]);for(var q in Graph.recentCustomFonts)l(Graph.recentCustomFonts[q]);p.sort(function(b,c){return b.label<c.label?-1:b.label>c.label?1:0});if(0<p.length){for(k=0;k<p.length;k++)f(p[k].name,p[k].url,!0,p[k].label,p[k].url);d.addSeparator(e)}d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,
-function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),e);d.addSeparator(e)}else{q=this.editorUi.editor.graph.extFonts;if(null!=q&&0<q.length){for(var l={},t=!1,k=0;k<this.customFonts.length;k++)l[this.customFonts[k].name]=!0;for(k=0;k<q.length;k++)l[q[k].name]||(this.customFonts.push(q[k]),t=!0);t&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(k=0;k<this.customFonts.length;k++)q=
+g);l.firstChild.nextSibling.style.fontFamily=f;null!=n&&l.setAttribute("title",n)}),g={},k=0;k<this.defaultFonts.length;k++){var l=this.defaultFonts[k];"string"===typeof l?f(l):null!=l.fontFamily&&null!=l.fontUrl&&(g[encodeURIComponent(l.fontFamily)+"@"+encodeURIComponent(l.fontUrl)]=!0,f(l.fontFamily,l.fontUrl))}d.addSeparator(e);if("1"!=urlParams["ext-fonts"]){for(var l=function(b){var c=encodeURIComponent(b.name)+(null==b.url?"":"@"+encodeURIComponent(b.url));if(!g[c]){for(var d=b.name,e=0;null!=
+m[d.toLowerCase()];)d=b.name+" ("+ ++e+")";null==n[c]&&(p.push({name:b.name,url:b.url,label:d,title:b.url}),m[d.toLowerCase()]=b,n[c]=b)}},n={},m={},p=[],k=0;k<this.customFonts.length;k++)l(this.customFonts[k]);for(var q in Graph.recentCustomFonts)l(Graph.recentCustomFonts[q]);p.sort(function(b,c){return b.label<c.label?-1:b.label>c.label?1:0});if(0<p.length){for(k=0;k<p.length;k++)f(p[k].name,p[k].url,!0,p[k].label,p[k].url);d.addSeparator(e)}d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,
+function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),e);d.addSeparator(e)}else{q=this.editorUi.editor.graph.extFonts;if(null!=q&&0<q.length){for(var l={},x=!1,k=0;k<this.customFonts.length;k++)l[this.customFonts[k].name]=!0;for(k=0;k<q.length;k++)l[q[k].name]||(this.customFonts.push(q[k]),x=!0);x&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(k=0;k<this.customFonts.length;k++)q=
this.customFonts[k].name,l=this.customFonts[k].url,f(q,l,!0),this.editorUi.editor.graph.addExtFont(q,l,!0);d.addSeparator(e);d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var d=new b(this.editorUi,[],[]);c.editor.graph.model.execute(d)}),e);d.addSeparator(e)}}d.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var b=this.editorUi.editor.graph,c=b.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],d="s",e=null;if("1"!=urlParams["ext-fonts"]&&
b.isEditing()){var f=b.getSelectedEditingElement();null!=f&&(f=mxUtils.getCurrentStyle(f),null!=f&&(c=Graph.stripQuotes(f.fontFamily),e=Graph.getFontUrl(c,null),null!=e&&(Graph.isGoogleFontUrl(e)?(e=null,d="g"):d="w")))}else f=b.getView().getState(b.getSelectionCell()),null!=f&&(c=f.style[mxConstants.STYLE_FONTFAMILY]||c,"1"!=urlParams["ext-fonts"]?(f=f.style.fontSource,null!=f&&(f=decodeURIComponent(f),Graph.isGoogleFontUrl(f)?d="g":(d="w",e=f))):(d=f.style.FType||d,"w"==d&&(e=this.editorUi.editor.graph.extFonts,
f=null,null!=e&&(f=e.find(function(b){return b.name==c})),e=null!=f?f.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=e&&e.substring(0,PROXY_URL.length)==PROXY_URL&&(e=decodeURIComponent(e.substr((PROXY_URL+"?url=").length)));var g=null;document.activeElement==b.cellEditor.textarea&&(g=b.cellEditor.saveSelection());d=new FontDialog(this.editorUi,c,e,d,mxUtils.bind(this,function(c,d,e){null!=g&&(b.cellEditor.restoreSelection(g),g=null);if(null!=c&&0<c.length)if("1"!=urlParams["ext-fonts"]&&
@@ -11706,48 +11711,48 @@ function MovePage(b,e,d){this.ui=b;this.oldIndex=e;this.newIndex=d}MovePage.prot
function SelectPage(b,e,d){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=d&&(e.viewState=d,this.neverShown=!1))}
SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){var b=this.ui.currentPage,e=this.ui.editor,d=e.graph,c=Graph.compressNode(e.getGraphXml(!0));mxUtils.setTextContent(b.node,c);b.viewState=d.getViewState();b.root=d.model.root;null!=b.model&&b.model.rootChanged(b.root);d.view.clear(b.root,!0);d.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;d.model.prefix=Editor.guid()+"-";d.model.rootChanged(b.root);
d.setViewState(b.viewState);d.gridEnabled=d.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.updateGraphComponents();d.view.validate();d.blockMathRender=!0;d.sizeDidChange();d.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,d.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(b,e,d,c,k){SelectPage.call(this,b,d);this.relatedPage=e;this.index=c;this.previousIndex=null;this.noSelect=k}mxUtils.extend(ChangePage,SelectPage);
+function ChangePage(b,e,d,c,g){SelectPage.call(this,b,d);this.relatedPage=e;this.index=c;this.previousIndex=null;this.noSelect=g}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var d=0;d<this.pages.length;d++)if(this.pages[d]==b){e=d;break}return e};EditorUi.prototype.getPageById=function(b){if(null!=this.pages)for(var e=0;e<this.pages.length;e++)if(this.pages[e].getId()==b)return this.pages[e];return null};
EditorUi.prototype.createImageForPageLink=function(b,e){var d=b.indexOf(","),c=null;0<d&&(d=this.getPageById(b.substring(d+1)),null!=d&&d!=e&&(c=this.getImageForPage(d,e),c.originalSrc=b));null==c&&(c={originalSrc:b});return c};
-EditorUi.prototype.getImageForPage=function(b,e){var d=this.editor.graph.getGlobalVariable,c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),k=this.getPageIndex(null!=e?e:this.currentPage);c.getGlobalVariable=function(b){return"pagenumber"==b?k+1:"page"==b&&null!=e?e.getName():d.apply(this,arguments)};document.body.appendChild(c.container);this.updatePageRoot(b);c.model.setRoot(b.root);var g=c.getSvg(),m=c.getGraphBounds();document.body.removeChild(c.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(g)),
-m.width,m.height,m.x,m.y)};
+EditorUi.prototype.getImageForPage=function(b,e){var d=this.editor.graph.getGlobalVariable,c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),g=this.getPageIndex(null!=e?e:this.currentPage);c.getGlobalVariable=function(b){return"pagenumber"==b?g+1:"page"==b&&null!=e?e.getName():d.apply(this,arguments)};document.body.appendChild(c.container);this.updatePageRoot(b);c.model.setRoot(b.root);var k=c.getSvg(),n=c.getGraphBounds();document.body.removeChild(c.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),
+n.width,n.height,n.x,n.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var c=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";c!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var d=null,c=mxUtils.bind(this,function(){this.updateTabContainer();var c=this.currentPage;null!=c&&c!=d&&(null==c.viewState||null==c.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+c.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+c.viewState.scrollTop),d=c);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=
this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,d){for(var e=d.getProperty("edit").changes,f=0;f<e.length;f++)if(e[f]instanceof SelectPage||e[f]instanceof RenamePage||e[f]instanceof MovePage||e[f]instanceof mxRootChange){c();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,e,d){b=null!=b?this.getPageById(b.getId()):null;var c=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(c.setViewState(e),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+e.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+e.scrollTop,c.restoreSelection(d))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),d=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),k=parseFloat(b.getAttribute("pageHeight")),g=b.getAttribute("background"),m=this.parseBackgroundImage(b.getAttribute("backgroundImage")),f=b.getAttribute("extFonts");if(f)try{f=f.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}})}catch(l){console.log("ExtFonts format error: "+l.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=g&&0<g.length?g:null,backgroundImage:m,pageScale:isNaN(d)?mxGraph.prototype.pageScale:d,pageFormat:isNaN(c)||isNaN(k)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,c,k),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:f||[]}};
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),d=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),g=parseFloat(b.getAttribute("pageHeight")),k=b.getAttribute("background"),n=this.parseBackgroundImage(b.getAttribute("backgroundImage")),f=b.getAttribute("extFonts");if(f)try{f=f.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}})}catch(l){console.log("ExtFonts format error: "+l.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=k&&0<k.length?k:null,backgroundImage:n,pageScale:isNaN(d)?mxGraph.prototype.pageScale:d,pageFormat:isNaN(c)||isNaN(g)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,c,g),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:f||[]}};
Graph.prototype.saveViewState=function(b,e,d,c){d||(e.setAttribute("grid",null==b||b.gridEnabled?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("page",null==b&&this.defaultPageVisible||null!=b&&b.pageVisible?"1":"0"),e.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);d=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=d&&(e.setAttribute("pageWidth",d.width),e.setAttribute("pageHeight",d.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),c=this.getBackgroundImageObject(b.backgroundImage,c),null!=c&&e.setAttribute("backgroundImage",
JSON.stringify(c)));e.setAttribute("math",null!=b&&b.mathEnabled?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(b){return b.name+"^"+b.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
Graph.prototype.setViewState=function(b,e){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
-this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var d=this.extFonts;this.extFonts=b.extFonts||[];if(e&&null!=d)for(var c=0;c<d.length;c++){var k=document.getElementById("extFont_"+d[c].name);null!=k&&k.parentNode.removeChild(k)}for(c=0;c<this.extFonts.length;c++)this.addExtFont(this.extFonts[c].name,this.extFonts[c].url,
+this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var d=this.extFonts;this.extFonts=b.extFonts||[];if(e&&null!=d)for(var c=0;c<d.length;c++){var g=document.getElementById("extFont_"+d[c].name);null!=g&&g.parentNode.removeChild(g)}for(c=0;c<this.extFonts.length;c++)this.addExtFont(this.extFonts[c].name,this.extFonts[c].url,
!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=
"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0,this.hiddenTags=
[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};
-Graph.prototype.addExtFont=function(b,e,d){if(b&&e){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:e});var c="extFont_"+b;if(null==document.getElementById(c))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,c);else{document.getElementsByTagName("head");var k=document.createElement("style");k.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));k.setAttribute("id",c);document.getElementsByTagName("head")[0].appendChild(k)}if(!d){null==
-this.extFonts&&(this.extFonts=[]);d=this.extFonts;c=!0;for(k=0;k<d.length;k++)if(d[k].name==b){c=!1;break}c&&this.extFonts.push({name:b,url:e})}}};
+Graph.prototype.addExtFont=function(b,e,d){if(b&&e){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:e});var c="extFont_"+b;if(null==document.getElementById(c))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,c);else{document.getElementsByTagName("head");var g=document.createElement("style");g.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));g.setAttribute("id",c);document.getElementsByTagName("head")[0].appendChild(g)}if(!d){null==
+this.extFonts&&(this.extFonts=[]);d=this.extFonts;c=!0;for(g=0;g<d.length;g++)if(d[g].name==b){c=!1;break}c&&this.extFonts.push({name:b,url:e})}}};
EditorUi.prototype.updatePageRoot=function(b,e){if(null==b.root){var d=this.editor.extractGraphModel(b.node,null,e),c=Editor.extractParserError(d);if(c)throw Error(c);null!=d?(b.graphModelNode=d,b.viewState=this.editor.graph.createViewState(d),c=new mxCodec(d.ownerDocument),b.root=c.decode(d).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){d=this.editor.extractGraphModel(b.node);if(c=Editor.extractParserError(d))throw Error(c);null!=d&&(b.graphModelNode=
d)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,e,d){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var c=this.editor.graph.model.createUndoableEdit();c.ignoreEdit=!0;var k=new SelectPage(this,b,d);k.execute();c.add(k);c.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c))}}catch(g){this.handleError(g)}};
+EditorUi.prototype.selectPage=function(b,e,d){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var c=this.editor.graph.model.createUndoableEdit();c.ignoreEdit=!0;var g=new SelectPage(this,b,d);g.execute();c.add(g);c.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c))}}catch(k){this.handleError(k)}};
EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),b?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(b,e){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:this.createPage(null,this.createPageId());e=null!=e?e:this.pages.length;var d=new ChangePage(this,b,b,e);this.editor.graph.model.execute(d)}return b};EditorUi.prototype.createPageId=function(){var b;do b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,e){var d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);d.setName(null!=b?b:this.createPageName());return d};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var d=this.pages[e].getName();null!=d&&0<d.length&&(b[d]=d)}e=this.pages.length;do d=mxResources.get("pageWithNumber",[++e]);while(null!=b[d]);return d};
-EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,d=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=d){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(d==this.pages.length-1?d--:d++,c=this.pages[d]):1>=this.pages.length&&(c=this.insertPage(),e.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,c))}finally{e.model.endUpdate()}}}catch(k){this.handleError(k)}return b};
-EditorUi.prototype.duplicatePage=function(b,e){var d=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var k=b.node.cloneNode(!1);k.removeAttribute("id");var g={},m=c.createCellLookup([c.model.root]),d=new DiagramPage(k);d.root=c.cloneCell(c.model.root,null,g);d.viewState=c.getViewState();d.viewState.scale=1;d.viewState.scrollLeft=null;d.viewState.scrollTop=null;d.viewState.currentRoot=null;d.viewState.defaultParent=null;d.setName(e);d=this.insertPage(d,mxUtils.indexOf(this.pages,
-b)+1);c.updateCustomLinks(c.createCellMapping(g,m),[d.root])}}catch(f){this.handleError(f)}return d};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,b,d))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};
+EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,d=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=d){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(d==this.pages.length-1?d--:d++,c=this.pages[d]):1>=this.pages.length&&(c=this.insertPage(),e.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,c))}finally{e.model.endUpdate()}}}catch(g){this.handleError(g)}return b};
+EditorUi.prototype.duplicatePage=function(b,e){var d=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var g=b.node.cloneNode(!1);g.removeAttribute("id");var k={},n=c.createCellLookup([c.model.root]),d=new DiagramPage(g);d.root=c.cloneCell(c.model.root,null,k);d.viewState=c.getViewState();d.viewState.scale=1;d.viewState.scrollLeft=null;d.viewState.scrollTop=null;d.viewState.currentRoot=null;d.viewState.defaultParent=null;d.setName(e);d=this.insertPage(d,mxUtils.indexOf(this.pages,
+b)+1);c.updateCustomLinks(c.createCellMapping(k,n),[d.root])}}catch(f){this.handleError(f)}return d};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,b,d))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};
EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var d=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-d)/this.pages.length)+
-1),k=null,g=0;g<this.pages.length;g++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(d){b.isEnabled()?(mxClient.IS_FF&&d.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(d)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(b){k=null;b.stopPropagation();
-b.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null!=k&&(b.dataTransfer.dropEffect="move");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=k&&c!=k&&this.movePage(k,c);b.stopPropagation();b.preventDefault()}));e.appendChild(d)})(g,this.createTabForPage(this.pages[g],c,this.pages[g]!=this.currentPage,g+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);c=this.createPageMenuTab();this.tabContainer.appendChild(c);
-c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(e.clientWidth>this.tabContainer.clientWidth-d){null!=c&&(c.style.position="absolute",c.style.right="0px",e.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 f=this.createControlTab(4,"&nbsp;&#10095;");f.style.position="absolute";
-f.style.right=this.editor.chromeless?"0px":"29px";f.style.fontSize="13pt";this.tabContainer.appendChild(f);var l=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=l+"px";mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){e.scrollLeft-=Math.max(20,l-20);mxUtils.setOpacity(m,0<e.scrollLeft?100:50);mxUtils.setOpacity(f,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(b)}));mxUtils.setOpacity(m,0<e.scrollLeft?100:50);mxUtils.setOpacity(f,
-e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){e.scrollLeft+=Math.max(20,l-20);mxUtils.setOpacity(m,0<e.scrollLeft?100:50);mxUtils.setOpacity(f,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(b)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+1),g=null,k=0;k<this.pages.length;k++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(d){b.isEnabled()?(mxClient.IS_FF&&d.dataTransfer.setData("Text","<diagram/>"),g=c):mxEvent.consume(d)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(b){g=null;b.stopPropagation();
+b.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null!=g&&(b.dataTransfer.dropEffect="move");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=g&&c!=g&&this.movePage(g,c);b.stopPropagation();b.preventDefault()}));e.appendChild(d)})(k,this.createTabForPage(this.pages[k],c,this.pages[k]!=this.currentPage,k+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);c=this.createPageMenuTab();this.tabContainer.appendChild(c);
+c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(e.clientWidth>this.tabContainer.clientWidth-d){null!=c&&(c.style.position="absolute",c.style.right="0px",e.style.marginRight="30px");var n=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");n.style.position="absolute";n.style.right=this.editor.chromeless?"29px":"55px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var f=this.createControlTab(4,"&nbsp;&#10095;");f.style.position="absolute";
+f.style.right=this.editor.chromeless?"0px":"29px";f.style.fontSize="13pt";this.tabContainer.appendChild(f);var l=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=l+"px";mxEvent.addListener(n,"click",mxUtils.bind(this,function(b){e.scrollLeft-=Math.max(20,l-20);mxUtils.setOpacity(n,0<e.scrollLeft?100:50);mxUtils.setOpacity(f,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(b)}));mxUtils.setOpacity(n,0<e.scrollLeft?100:50);mxUtils.setOpacity(f,
+e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){e.scrollLeft+=Math.max(20,l-20);mxUtils.setOpacity(n,0<e.scrollLeft?100:50);mxUtils.setOpacity(f,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(b)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(b){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(b))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(b){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(b)})));return e};
EditorUi.prototype.createControlTab=function(b,e,d){d=this.createTab(null!=d?d:!0);d.style.lineHeight=this.tabContainerHeight+"px";d.style.paddingTop=b+"px";d.style.cursor="pointer";d.style.width="30px";d.innerHTML=e;null!=d.firstChild&&null!=d.firstChild.style&&mxUtils.setOpacity(d.firstChild,40);return d};
@@ -11756,62 +11761,62 @@ this.pages.length;d++)mxUtils.bind(this,function(d){var e=b.addItem(this.pages[d
this.currentPage;null!=e&&(b.addSeparator(c),d=e.getName(),b.addItem(mxResources.get("removeIt",[d]),null,mxUtils.bind(this,function(){this.removePage(e)}),c),b.addItem(mxResources.get("renameIt",[d]),null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),c),b.addSeparator(c),b.addItem(mxResources.get("duplicateIt",[d]),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),c))}}));d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=
!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});var c=mxEvent.getClientX(b),e=mxEvent.getClientY(b);d.popup(c,e,null,b);this.setCurrentMenu(d);mxEvent.consume(b)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){this.insertPage();mxEvent.consume(b)}));return b};
-EditorUi.prototype.createTabForPage=function(b,e,d,c){d=this.createTab(d);var k=b.getName()||mxResources.get("untitled"),g=b.getId();d.setAttribute("title",k+(null!=g?" ("+g+")":"")+" ["+c+"]");mxUtils.write(d,k);d.style.maxWidth=e+"px";d.style.width=e+"px";this.addTabListeners(b,d);42<e&&(d.style.textOverflow="ellipsis");return d};
-EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var d=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(c){this.renamePage(b);mxEvent.consume(c)}));var c=!1,k=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(e){c=null!=this.currentMenu;k=b==this.currentPage;d.isMouseDown||k||this.selectPage(b)}),null,mxUtils.bind(this,function(g){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(g)&&k||mxEvent.isPopupTrigger(g))){d.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(g)||!c){var m=new mxPopupMenu(this.createPageMenu(b));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 f=mxEvent.getClientX(g),l=mxEvent.getClientY(g);m.popup(f,l,null,g);this.setCurrentMenu(m,e)}mxEvent.consume(g)}}))};
-EditorUi.prototype.getLinkForPage=function(b,e,d){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var c=this.getCurrentFile();if(null!=c&&c.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var k=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),k=k+((0==k.length?"?":"&")+"page-id="+b.getId());null!=e&&(k+="&"+e.join("&"));return(d&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+k+"#"+c.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(d,c){var k=this.editor.graph;d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),c);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),c);null!=this.getLinkForPage(b)&&(d.addSeparator(c),d.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,d,e,l,n,p){c=this.createUrlParameters(c,d,e,l,n,p);e||c.push("hide-pages=1");k.isSelectionEmpty()||(e=k.getBoundingBox(k.getSelectionCells()),d=k.view.translate,n=k.view.scale,e.width/=n,e.height/=n,e.x=e.x/n-d.x,e.y=e.y/n-d.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height),border:100}))));
+EditorUi.prototype.createTabForPage=function(b,e,d,c){d=this.createTab(d);var g=b.getName()||mxResources.get("untitled"),k=b.getId();d.setAttribute("title",g+(null!=k?" ("+k+")":"")+" ["+c+"]");mxUtils.write(d,g);d.style.maxWidth=e+"px";d.style.width=e+"px";this.addTabListeners(b,d);42<e&&(d.style.textOverflow="ellipsis");return d};
+EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var d=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(c){this.renamePage(b);mxEvent.consume(c)}));var c=!1,g=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(e){c=null!=this.currentMenu;g=b==this.currentPage;d.isMouseDown||g||this.selectPage(b)}),null,mxUtils.bind(this,function(k){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(k)&&g||mxEvent.isPopupTrigger(k))){d.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!c){var n=new mxPopupMenu(this.createPageMenu(b));n.div.className+=" geMenubarMenu";n.smartSeparators=!0;n.showDisabled=!0;n.autoExpand=!0;n.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(n,arguments);this.resetCurrentMenu();n.destroy()});var f=mxEvent.getClientX(k),l=mxEvent.getClientY(k);n.popup(f,l,null,k);this.setCurrentMenu(n,e)}mxEvent.consume(k)}}))};
+EditorUi.prototype.getLinkForPage=function(b,e,d){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var c=this.getCurrentFile();if(null!=c&&c.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var g=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),g=g+((0==g.length?"?":"&")+"page-id="+b.getId());null!=e&&(g+="&"+e.join("&"));return(d&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+g+"#"+c.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(d,c){var g=this.editor.graph;d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),c);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),c);null!=this.getLinkForPage(b)&&(d.addSeparator(c),d.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,d,e,l,m,p){c=this.createUrlParameters(c,d,e,l,m,p);e||c.push("hide-pages=1");g.isSelectionEmpty()||(e=g.getBoundingBox(g.getSelectionCells()),d=g.view.translate,m=g.view.scale,e.width/=m,e.height/=m,e.x=e.x/m-d.x,e.y=e.y/m-d.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height),border:100}))));
l=new EmbedDialog(this,this.getLinkForPage(b,c,l));this.showDialog(l.container,440,240,!0,!0);l.init()}))})));d.addSeparator(c);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(d.addSeparator(c),d.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),c))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};b.afterDecode=function(b,d,c){b=c.oldIndex;c.oldIndex=c.newIndex;c.newIndex=b;return c};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};b.afterDecode=function(b,d,c){b=c.previous;c.previous=c.name;c.name=b;return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),e="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");b.afterEncode=function(b,c,k){k.setAttribute("relatedPage",c.relatedPage.getId());null==c.index&&(k.setAttribute("name",c.relatedPage.getName()),null!=c.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(c.relatedPage.viewState,function(b,c){return 0>mxUtils.indexOf(e,
-b)?c:void 0})),null!=c.relatedPage.root&&b.encodeCell(c.relatedPage.root,k));return k};b.beforeDecode=function(b,c,e){e.ui=b.ui;e.relatedPage=e.ui.getPageById(c.getAttribute("relatedPage"));if(null==e.relatedPage){var d=c.ownerDocument.createElement("diagram");d.setAttribute("id",c.getAttribute("relatedPage"));d.setAttribute("name",c.getAttribute("name"));e.relatedPage=new DiagramPage(d);d=c.getAttribute("viewState");null!=d&&(e.relatedPage.viewState=JSON.parse(d),c.removeAttribute("viewState"));
-c=c.cloneNode(!0);d=c.firstChild;if(null!=d)for(e.relatedPage.root=b.decodeCell(d,!1),e=d.nextSibling,d.parentNode.removeChild(d),d=e;null!=d;){e=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var k=d.getAttribute("id");null==b.lookup(k)&&b.decodeCell(d)}d.parentNode.removeChild(d);d=e}}return c};b.afterDecode=function(b,c,e){e.index=e.previousIndex;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,d,e,m,f){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var g=e.slice(),k=0;k<e.length;k++)"1"==mxUtils.getValue(this.getCurrentCellStyle(e[k]),"treeFolding","0")&&this.foldTreeCell(c,e[k]);e=g;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};Graph.prototype.foldTreeCell=
-function(b,d){this.model.beginUpdate();try{var c=[];this.traverse(d,!0,mxUtils.bind(this,function(b,e){var f=null!=e&&this.isTreeEdge(e);f&&c.push(e);b==d||null!=e&&!f||c.push(b);return(null==e||f)&&(b==d||!this.model.isCollapsed(b))}));this.model.setCollapsed(d,b);for(var e=0;e<c.length;e++)this.model.setVisible(c[e],!b)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(b){return!this.isEdgeIgnored(b)};Graph.prototype.getTreeEdges=function(b,d,e,m,f,l){return this.model.filterCells(this.getEdges(b,
-d,e,m,f,l),mxUtils.bind(this,function(b){return this.isTreeEdge(b)}))};Graph.prototype.getIncomingTreeEdges=function(b,d){return this.getTreeEdges(b,d,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(b,d){return this.getTreeEdges(b,d,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(b){return x.isVertex(b)&&e(b)}function d(b){var c=
-!1;null!=b&&(c="1"==v.getCurrentCellStyle(b).treeMoving);return c}function e(b){var c=!1;null!=b&&(b=x.getParent(b),c=v.view.getState(b),c="tree"==(null!=c?c.style:v.getCellStyle(b)).containerType);return c}function m(b){var c=!1;null!=b&&(b=x.getParent(b),c=v.view.getState(b),v.view.getState(b),c=null!=(null!=c?c.style:v.getCellStyle(b)).childLayout);return c}function f(b){b=v.view.getState(b);if(null!=b){var c=v.getIncomingTreeEdges(b.cell);if(0<c.length&&(c=v.view.getState(c[0]),null!=c&&(c=c.absolutePoints,
+(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),e="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");b.afterEncode=function(b,c,g){g.setAttribute("relatedPage",c.relatedPage.getId());null==c.index&&(g.setAttribute("name",c.relatedPage.getName()),null!=c.relatedPage.viewState&&g.setAttribute("viewState",JSON.stringify(c.relatedPage.viewState,function(b,c){return 0>mxUtils.indexOf(e,
+b)?c:void 0})),null!=c.relatedPage.root&&b.encodeCell(c.relatedPage.root,g));return g};b.beforeDecode=function(b,c,e){e.ui=b.ui;e.relatedPage=e.ui.getPageById(c.getAttribute("relatedPage"));if(null==e.relatedPage){var d=c.ownerDocument.createElement("diagram");d.setAttribute("id",c.getAttribute("relatedPage"));d.setAttribute("name",c.getAttribute("name"));e.relatedPage=new DiagramPage(d);d=c.getAttribute("viewState");null!=d&&(e.relatedPage.viewState=JSON.parse(d),c.removeAttribute("viewState"));
+c=c.cloneNode(!0);d=c.firstChild;if(null!=d)for(e.relatedPage.root=b.decodeCell(d,!1),e=d.nextSibling,d.parentNode.removeChild(d),d=e;null!=d;){e=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var g=d.getAttribute("id");null==b.lookup(g)&&b.decodeCell(d)}d.parentNode.removeChild(d);d=e}}return c};b.afterDecode=function(b,c,e){e.index=e.previousIndex;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,d,e,n,f){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var g=e.slice(),k=0;k<e.length;k++)"1"==mxUtils.getValue(this.getCurrentCellStyle(e[k]),"treeFolding","0")&&this.foldTreeCell(c,e[k]);e=g;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};Graph.prototype.foldTreeCell=
+function(b,d){this.model.beginUpdate();try{var c=[];this.traverse(d,!0,mxUtils.bind(this,function(b,e){var f=null!=e&&this.isTreeEdge(e);f&&c.push(e);b==d||null!=e&&!f||c.push(b);return(null==e||f)&&(b==d||!this.model.isCollapsed(b))}));this.model.setCollapsed(d,b);for(var e=0;e<c.length;e++)this.model.setVisible(c[e],!b)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(b){return!this.isEdgeIgnored(b)};Graph.prototype.getTreeEdges=function(b,d,e,n,f,l){return this.model.filterCells(this.getEdges(b,
+d,e,n,f,l),mxUtils.bind(this,function(b){return this.isTreeEdge(b)}))};Graph.prototype.getIncomingTreeEdges=function(b,d){return this.getTreeEdges(b,d,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(b,d){return this.getTreeEdges(b,d,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(b){return y.isVertex(b)&&e(b)}function d(b){var c=
+!1;null!=b&&(c="1"==v.getCurrentCellStyle(b).treeMoving);return c}function e(b){var c=!1;null!=b&&(b=y.getParent(b),c=v.view.getState(b),c="tree"==(null!=c?c.style:v.getCellStyle(b)).containerType);return c}function n(b){var c=!1;null!=b&&(b=y.getParent(b),c=v.view.getState(b),v.view.getState(b),c=null!=(null!=c?c.style:v.getCellStyle(b)).childLayout);return c}function f(b){b=v.view.getState(b);if(null!=b){var c=v.getIncomingTreeEdges(b.cell);if(0<c.length&&(c=v.view.getState(c[0]),null!=c&&(c=c.absolutePoints,
null!=c&&0<c.length&&(c=c[c.length-1],null!=c)))){if(c.y==b.y&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_SOUTH;if(c.y==b.y+b.height&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_NORTH;if(c.x>b.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function l(b,c){c=null!=c?c:!0;v.model.beginUpdate();try{var d=v.model.getParent(b),e=v.getIncomingTreeEdges(b),g=v.cloneCells([e[0],b]);v.model.setTerminal(g[0],v.model.getTerminal(e[0],
-!0),!0);var k=f(b),l=d.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;v.view.currentRoot!=d&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var m=v.view.getState(b),n=v.view.scale;if(null!=m){var p=mxRectangle.fromRectangle(m);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?p.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*n:p.y+=(c?
-b.geometry.height+10:-g[1].geometry.height-10)*n;var q=v.getOutgoingTreeEdges(v.model.getTerminal(e[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,y=l=e=0;y<q.length;y++){var u=v.model.getTerminal(q[y],!1);if(k==f(u)){var x=v.view.getState(u);u!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY())&&mxUtils.intersects(p,x)&&(e=10+Math.max(e,(Math.min(p.x+p.width,x.x+x.width)-Math.max(p.x,x.x))/n),l=10+Math.max(l,(Math.min(p.y+
-p.height,x.y+x.height)-Math.max(p.y,x.y))/n))}}t?l=0:e=0;for(y=0;y<q.length;y++)if(u=v.model.getTerminal(q[y],!1),k==f(u)&&(x=v.view.getState(u),u!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY()))){var B=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&B.push(c);(null==c||d)&&B.push(b);return null==c||d});v.moveCells(B,(c?1:-1)*e,(c?1:-1)*l)}}}return v.addCells(g,d)}finally{v.model.endUpdate()}}function n(b){v.model.beginUpdate();try{var c=
-f(b),d=v.getIncomingTreeEdges(b),e=v.cloneCells([d[0],b]);v.model.setTerminal(d[0],e[1],!1);v.model.setTerminal(e[0],e[1],!0);v.model.setTerminal(e[0],b,!1);var g=v.model.getParent(b),k=g.geometry,l=[];v.view.currentRoot!=g&&(e[1].geometry.x-=k.x,e[1].geometry.y-=k.y);v.traverse(b,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var m=b.geometry.width+40,n=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?m=0:c==mxConstants.DIRECTION_NORTH?
-(m=0,n=-n):c==mxConstants.DIRECTION_WEST?(m=-m,n=0):c==mxConstants.DIRECTION_EAST&&(n=0);v.moveCells(l,m,n);return v.addCells(e,g)}finally{v.model.endUpdate()}}function p(b,c){v.model.beginUpdate();try{var d=v.model.getParent(b),e=v.getIncomingTreeEdges(b),g=f(b);0==e.length&&(e=[v.createEdge(d,null,"",null,null,v.createCurrentEdgeStyle())],g=c);var k=v.cloneCells([e[0],b]);v.model.setTerminal(k[0],b,!0);if(null==v.model.getTerminal(k[0],!1)){v.model.setTerminal(k[0],k[1],!1);var l=v.getCellStyle(k[1]).newEdgeStyle;
-if(null!=l)try{var m=JSON.parse(l),n;for(n in m)v.setCellStyles(n,m[n],[k[0]]),"edgeStyle"==n&&"elbowEdgeStyle"==m[n]&&v.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(ia){}}var e=v.getOutgoingTreeEdges(b),p=d.geometry,l=[];v.view.currentRoot==d&&(p=new mxRectangle);for(m=0;m<e.length;m++){var q=v.model.getTerminal(e[m],!1);null!=q&&l.push(q)}var t=v.view.getBounds(l),y=v.view.translate,u=v.view.scale;g==mxConstants.DIRECTION_SOUTH?
-(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/u-y.x-p.x+10,k[1].geometry.y+=k[1].geometry.height-p.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/u-y.x+-p.x+10,k[1].geometry.y-=k[1].geometry.height+p.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+p.x+40):k[1].geometry.x+(k[1].geometry.width-p.x+40),k[1].geometry.y=null==t?b.geometry.y+
-(b.geometry.height-k[1].geometry.height)/2:(t.y+t.height)/u-y.y+-p.y+10);return v.addCells(k,d)}finally{v.model.endUpdate()}}function q(b,c,d){b=v.getOutgoingTreeEdges(b);d=v.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=v.view.getState(v.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
+!0),!0);var k=f(b),l=d.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;v.view.currentRoot!=d&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var n=v.view.getState(b),m=v.view.scale;if(null!=n){var p=mxRectangle.fromRectangle(n);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?p.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*m:p.y+=(c?
+b.geometry.height+10:-g[1].geometry.height-10)*m;var q=v.getOutgoingTreeEdges(v.model.getTerminal(e[0],!0));if(null!=q){for(var x=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,t=l=e=0;t<q.length;t++){var u=v.model.getTerminal(q[t],!1);if(k==f(u)){var y=v.view.getState(u);u!=b&&null!=y&&(x&&c!=y.getCenterX()<n.getCenterX()||!x&&c!=y.getCenterY()<n.getCenterY())&&mxUtils.intersects(p,y)&&(e=10+Math.max(e,(Math.min(p.x+p.width,y.x+y.width)-Math.max(p.x,y.x))/m),l=10+Math.max(l,(Math.min(p.y+
+p.height,y.y+y.height)-Math.max(p.y,y.y))/m))}}x?l=0:e=0;for(t=0;t<q.length;t++)if(u=v.model.getTerminal(q[t],!1),k==f(u)&&(y=v.view.getState(u),u!=b&&null!=y&&(x&&c!=y.getCenterX()<n.getCenterX()||!x&&c!=y.getCenterY()<n.getCenterY()))){var B=[];v.traverse(y.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&B.push(c);(null==c||d)&&B.push(b);return null==c||d});v.moveCells(B,(c?1:-1)*e,(c?1:-1)*l)}}}return v.addCells(g,d)}finally{v.model.endUpdate()}}function m(b){v.model.beginUpdate();try{var c=
+f(b),d=v.getIncomingTreeEdges(b),e=v.cloneCells([d[0],b]);v.model.setTerminal(d[0],e[1],!1);v.model.setTerminal(e[0],e[1],!0);v.model.setTerminal(e[0],b,!1);var g=v.model.getParent(b),k=g.geometry,l=[];v.view.currentRoot!=g&&(e[1].geometry.x-=k.x,e[1].geometry.y-=k.y);v.traverse(b,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var n=b.geometry.width+40,m=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?n=0:c==mxConstants.DIRECTION_NORTH?
+(n=0,m=-m):c==mxConstants.DIRECTION_WEST?(n=-n,m=0):c==mxConstants.DIRECTION_EAST&&(m=0);v.moveCells(l,n,m);return v.addCells(e,g)}finally{v.model.endUpdate()}}function p(b,c){v.model.beginUpdate();try{var d=v.model.getParent(b),e=v.getIncomingTreeEdges(b),g=f(b);0==e.length&&(e=[v.createEdge(d,null,"",null,null,v.createCurrentEdgeStyle())],g=c);var k=v.cloneCells([e[0],b]);v.model.setTerminal(k[0],b,!0);if(null==v.model.getTerminal(k[0],!1)){v.model.setTerminal(k[0],k[1],!1);var l=v.getCellStyle(k[1]).newEdgeStyle;
+if(null!=l)try{var n=JSON.parse(l),m;for(m in n)v.setCellStyles(m,n[m],[k[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==n[m]&&v.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(ia){}}var e=v.getOutgoingTreeEdges(b),p=d.geometry,l=[];v.view.currentRoot==d&&(p=new mxRectangle);for(n=0;n<e.length;n++){var q=v.model.getTerminal(e[n],!1);null!=q&&l.push(q)}var x=v.view.getBounds(l),t=v.view.translate,u=v.view.scale;g==mxConstants.DIRECTION_SOUTH?
+(k[1].geometry.x=null==x?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(x.x+x.width)/u-t.x-p.x+10,k[1].geometry.y+=k[1].geometry.height-p.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==x?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(x.x+x.width)/u-t.x+-p.x+10,k[1].geometry.y-=k[1].geometry.height+p.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+p.x+40):k[1].geometry.x+(k[1].geometry.width-p.x+40),k[1].geometry.y=null==x?b.geometry.y+
+(b.geometry.height-k[1].geometry.height)/2:(x.y+x.height)/u-t.y+-p.y+10);return v.addCells(k,d)}finally{v.model.endUpdate()}}function q(b,c,d){b=v.getOutgoingTreeEdges(b);d=v.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=v.view.getState(v.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
d.y-d.height})}return e}function t(b,c){var d=f(b),e=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=c?u.actions.get("selectParent").funct():d==c?(e=v.getOutgoingTreeEdges(b),null!=e&&0<e.length&&v.setSelectionCell(v.model.getTerminal(e[0],!1))):(d=v.getIncomingTreeEdges(b),null!=d&&0<d.length&&(e=q(v.model.getTerminal(d[0],!0),e,b),d=v.view.getState(b),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=c==mxConstants.DIRECTION_NORTH||
-c==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&v.setSelectionCell(e[d].cell)))))}var u=this,v=u.editor.graph,x=v.getModel(),A=u.menus.createPopupMenu;u.menus.createPopupMenu=function(c,d,e){A.apply(this,arguments);if(1==v.getSelectionCount()){d=v.getSelectionCell();var f=v.getOutgoingTreeEdges(d);c.addSeparator();0<f.length&&(b(v.getSelectionCell())&&this.addMenuItems(c,["selectChildren"],null,e),this.addMenuItems(c,["selectDescendants"],null,e));b(v.getSelectionCell())?(c.addSeparator(),
+c==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&v.setSelectionCell(e[d].cell)))))}var u=this,v=u.editor.graph,y=v.getModel(),A=u.menus.createPopupMenu;u.menus.createPopupMenu=function(c,d,e){A.apply(this,arguments);if(1==v.getSelectionCount()){d=v.getSelectionCell();var f=v.getOutgoingTreeEdges(d);c.addSeparator();0<f.length&&(b(v.getSelectionCell())&&this.addMenuItems(c,["selectChildren"],null,e),this.addMenuItems(c,["selectDescendants"],null,e));b(v.getSelectionCell())?(c.addSeparator(),
0<v.getIncomingTreeEdges(d).length&&this.addMenuItems(c,["selectSiblings","selectParent"],null,e)):0<v.model.getEdgeCount(d)&&this.addMenuItems(c,["selectConnections"],null,e)}};u.actions.addAction("selectChildren",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getOutgoingTreeEdges(b);if(null!=b){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(v.isEnabled()&&
1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);if(null!=b&&0<b.length&&(b=v.getOutgoingTreeEdges(v.model.getTerminal(b[0],!0)),null!=b)){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);null!=b&&0<b.length&&v.setSelectionCell(v.model.getTerminal(b[0],
!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(b,c){var d=v.getSelectionCell();if(v.isEnabled()&&v.model.isVertex(d)){if(null!=c&&mxEvent.isAltDown(c))v.setSelectionCells(v.model.getTreeEdges(d,null==c||!mxEvent.isShiftDown(c),null==c||!mxEvent.isControlDown(c)));else{var e=[];v.traverse(d,!0,function(b,d){var f=null!=d&&v.isTreeEdge(d);f&&e.push(d);null!=d&&!f||null!=c&&mxEvent.isShiftDown(c)||e.push(b);return null==d||f})}v.setSelectionCells(e)}},null,null,"Alt+Shift+D");
-var z=v.removeCells;v.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];x.isEdge(k)&&e(k)&&(f.push(k),k=x.getTerminal(k,!1));if(b(k)){var l=[];v.traverse(k,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=v.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
-f;return z.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var y=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=y.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
-v.getIncomingTreeEdges(l[f]),k=v.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var n=this.cloneCell(k[0]);this.addEdge(n,v.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var B=v.moveCells;v.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var n=g,p=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||v.model.isEdge(c[q])&&null==v.model.getTerminal(c[q],
-!0)){g=v.model.getParent(c[q]);break}if(null!=n&&g!=n&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var y=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=y){var u=v.view.getState(n);null!=u&&(d=(u.getCenterX()-y.getCenterX())/v.view.scale,e=(u.getCenterY()-y.getCenterY())/v.view.scale)}}}}m=B.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
-!0))&&this.model.setTerminal(m[q],n,!0);else if(b(c[q])&&(t=v.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(n)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],n,!0);else if(0==v.getIncomingTreeEdges(m[q]).length){p=n;if(null==p||p==v.model.getParent(c[q]))p=v.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,v.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=u.sidebar){var C=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
-function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=C.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=v.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var E={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},G=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
-!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var d=null;0<v.getIncomingTreeEdges(v.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?n(v.getSelectionCell()):p(v.getSelectionCell()):13==c.which&&(d=l(v.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&v.model.isEdge(d[0])?v.setSelectionCell(v.model.getTerminal(d[0],!1)):v.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
+var z=v.removeCells;v.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];y.isEdge(k)&&e(k)&&(f.push(k),k=y.getTerminal(k,!1));if(b(k)){var l=[];v.traverse(k,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=v.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
+f;return z.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var x=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=x.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var n=
+v.getIncomingTreeEdges(l[f]),k=v.getIncomingTreeEdges(c[f]);if(0==n.length&&0<k.length){var m=this.cloneCell(k[0]);this.addEdge(m,v.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var B=v.moveCells;v.moveCells=function(c,d,e,f,g,k,l){var n=null;this.model.beginUpdate();try{var m=g,p=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||v.model.isEdge(c[q])&&null==v.model.getTerminal(c[q],
+!0)){g=v.model.getParent(c[q]);break}if(null!=m&&g!=m&&null!=this.view.getState(c[0])){var x=v.getIncomingTreeEdges(c[0]);if(0<x.length){var t=v.view.getState(v.model.getTerminal(x[0],!0));if(null!=t){var u=v.view.getState(m);null!=u&&(d=(u.getCenterX()-t.getCenterX())/v.view.scale,e=(u.getCenterY()-t.getCenterY())/v.view.scale)}}}}n=B.apply(this,arguments);if(null!=n&&null!=c&&n.length==c.length)for(q=0;q<n.length;q++)if(this.model.isEdge(n[q]))b(m)&&0>mxUtils.indexOf(n,this.model.getTerminal(n[q],
+!0))&&this.model.setTerminal(n[q],m,!0);else if(b(c[q])&&(x=v.getIncomingTreeEdges(c[q]),0<x.length))if(!f)b(m)&&0>mxUtils.indexOf(c,this.model.getTerminal(x[0],!0))&&this.model.setTerminal(x[0],m,!0);else if(0==v.getIncomingTreeEdges(n[q]).length){p=m;if(null==p||p==v.model.getParent(c[q]))p=v.model.getTerminal(x[0],!0);f=this.cloneCell(x[0]);this.addEdge(f,v.getDefaultParent(),p,n[q])}}finally{this.model.endUpdate()}return n};if(null!=u.sidebar){var C=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
+function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=C.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var n=v.getCellGeometry(k[l]);n.points=null;null!=n.getTerminalPoint(!0)&&n.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var E={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},F=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
+!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var d=null;0<v.getIncomingTreeEdges(v.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?m(v.getSelectionCell()):p(v.getSelectionCell()):13==c.which&&(d=l(v.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&v.model.isEdge(d[0])?v.setSelectionCell(v.model.getTerminal(d[0],!1)):v.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=E[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(t(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(c))}}catch(H){u.handleError(H)}mxEvent.isConsumed(c)||G.apply(this,arguments)};var F=v.connectVertex;v.connectVertex=function(c,d,e,g,k,m,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var y=f(c),u=y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST,x=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return y==d||0==t.length?p(c,d):u==x?n(c):l(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};v.getSubtree=function(c){var e=
-[c];!d(c)&&!b(c)||m(c)||v.traverse(c,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var D=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){D.apply(this,arguments);(d(this.state.cell)||b(this.state.cell))&&!m(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+mxEvent.consume(c))}}catch(H){u.handleError(H)}mxEvent.isConsumed(c)||F.apply(this,arguments)};var G=v.connectVertex;v.connectVertex=function(c,d,e,g,k,n,q){var x=v.getIncomingTreeEdges(c);if(b(c)){var t=f(c),u=t==mxConstants.DIRECTION_EAST||t==mxConstants.DIRECTION_WEST,y=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return t==d||0==x.length?p(c,d):u==y?m(c):l(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return G.apply(this,arguments)};v.getSubtree=function(c){var e=
+[c];!d(c)&&!b(c)||n(c)||v.traverse(c,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var D=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){D.apply(this,arguments);(d(this.state.cell)||b(this.state.cell))&&!n(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(b){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(b);
this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(b)})))};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){K.apply(this,
arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var L=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){L.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=d.apply(this,arguments),e=this.graph;return b.concat([this.addEntry("tree container",
function(){var b=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");b.vertex=!0;var c=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);b.insert(e);b.insert(c);b.insert(d);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var b=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
b.vertex=!0;var c=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');c.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);var k=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-k.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;c.insertEdge(p,!0);k.insertEdge(p,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+g.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;c.insertEdge(p,!0);g.insertEdge(p,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
q.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;c.insertEdge(t,!0);q.insertEdge(t,!1);var u=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-u.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");v.geometry.relative=!0;v.edge=!0;c.insertEdge(v,!0);u.insertEdge(v,!1);b.insert(e);b.insert(p);b.insert(t);b.insert(v);b.insert(c);b.insert(d);b.insert(k);b.insert(q);b.insert(u);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=new mxCell("Central Idea",
+u.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");v.geometry.relative=!0;v.edge=!0;c.insertEdge(v,!0);u.insertEdge(v,!1);b.insert(e);b.insert(p);b.insert(t);b.insert(v);b.insert(c);b.insert(d);b.insert(g);b.insert(q);b.insert(u);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=new mxCell("Central Idea",
new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');b.vertex=!0;return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var b=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var b=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree orgchart organization division",function(){var b=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
b.vertex=!0;var c=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');e.setAttributeForCell(c,"treeRoot","1");c.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-d.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);d.insertEdge(k,!1);var n=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');n.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-p.geometry.relative=!0;p.edge=!0;c.insertEdge(p,!0);n.insertEdge(p,!1);b.insert(k);b.insert(p);b.insert(c);b.insert(d);b.insert(n);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree root",function(){var b=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');e.setAttributeForCell(b,"treeRoot",
+d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;c.insertEdge(g,!0);d.insertEdge(g,!1);var m=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');m.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+p.geometry.relative=!0;p.edge=!0;c.insertEdge(p,!0);m.insertEdge(p,!1);b.insert(g);b.insert(p);b.insert(c);b.insert(d);b.insert(m);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree root",function(){var b=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');e.setAttributeForCell(b,"treeRoot",
"1");b.vertex=!0;return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree division",function(){var b=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
c.geometry.setTerminalPoint(new mxPoint(0,0),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree sub sections",function(){var b=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");e.geometry.setTerminalPoint(new mxPoint(110,-40),!0);e.geometry.relative=
@@ -11828,20 +11833,20 @@ this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,argume
Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').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.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="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
-EditorUi.prototype.setDarkMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(b);mxSettings.settings.darkMode=b;mxSettings.save();this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var k=document.createElement("link");k.setAttribute("rel","stylesheet");k.setAttribute("href",STYLE_PATH+"/dark.css");k.setAttribute("charset","UTF-8");k.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=
+EditorUi.prototype.setDarkMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(b);mxSettings.settings.darkMode=b;mxSettings.save();this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var g=document.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("href",STYLE_PATH+"/dark.css");g.setAttribute("charset","UTF-8");g.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=
function(b){if(Editor.darkMode!=b){var c=this.editor.graph;Editor.darkMode=b;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";this.setGridColor(Editor.isDarkMode()?c.view.defaultDarkGridColor:c.view.defaultGridColor);c.defaultPageBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";c.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";c.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";c.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";c.loadStylesheet();
null!=this.actions.layersWindow&&(b=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,b&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Dialog.backdropColor=Editor.isDarkMode()?"#2a2a2a":"white";
StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;
-document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";g.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==k.parentNode&&document.getElementsByTagName("head")[0].appendChild(k):null!=k.parentNode&&k.parentNode.removeChild(k)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }":
+document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";k.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==g.parentNode&&document.getElementsByTagName("head")[0].appendChild(g):null!=g.parentNode&&g.parentNode.removeChild(g)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?"#2a2a2a":"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"html .geStatusAlertOrange, html .geStatusAlert { margin-top: -2px; }a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var g=document.createElement("style");g.type="text/css";g.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(g);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=
-function(){return!1};var m=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");m.apply(this,arguments)};var f=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){f.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=
-Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(b,c){null!=c.shortcut&&900>d&&!mxClient.IS_IOS?b.firstChild.nextSibling.setAttribute("title",c.shortcut):l.apply(this,arguments)};var n=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){n.apply(this,arguments);if(null!=this.userElement){var b=this.userElement;b.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+b.style.display;b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage=
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"html .geStatusAlertOrange, html .geStatusAlert { margin-top: -2px; }a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var k=document.createElement("style");k.type="text/css";k.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(k);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=
+function(){return!1};var n=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");n.apply(this,arguments)};var f=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){f.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=
+Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(b,c){null!=c.shortcut&&900>d&&!mxClient.IS_IOS?b.firstChild.nextSibling.setAttribute("title",c.shortcut):l.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var b=this.userElement;b.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+b.style.display;b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage=
"url("+Editor.userImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";b.style.cssFloat="right";b.setAttribute("title",mxResources.get("changeUser"));"none"!=b.style.display&&(b.style.display="inline-block")}};var p=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){p.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText=
"display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.shareImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop=
"4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var b=document.createElement("div");b.style.display="inline-block";b.style.position="relative";b.style.marginTop="6px";b.style.marginRight="4px";var c=document.createElement("a");c.className="geMenuItem gePrimaryBtn";c.style.marginLeft="8px";c.style.padding="6px";if("1"==urlParams.noSaveBtn){var d="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,d);c.setAttribute("title",
@@ -11853,7 +11858,7 @@ this.addMenuItems(b,["collapsible","-","lockUnlock","enterGroup"],null,d),b.addS
Menus.prototype.addPopupMenuEditItems=function(b,c,d){u.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(b,["copyAsImage"],null,d)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var v=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&
(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);v.apply(this,arguments)};
-var x=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(b){x.apply(this,arguments);if(b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=c||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};
+var y=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(b){y.apply(this,arguments);if(b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=c||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};
EditorUi.prototype.chromelessWindowResize=function(){};var A=Menus.prototype.init;Menus.prototype.init=function(){A.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.get("tags").label=mxResources.get("tags")+"...";c.actions.get("forkme").visible=
"1"!=urlParams.sketch;c.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;var f=c.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(b){c.setDarkMode(!Editor.darkMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.isDarkMode()});c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var b=
new ParseDialog(c,"Insert from Text");c.showDialog(b.container,620,420,!0,!1);b.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var b=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(b.container,620,420,!0,!1);b.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){e(c)},null,null,Editor.ctrlKey+"+Shift+K"));c.actions.put("toggleFormat",new Action(mxResources.get("format")+
@@ -11864,99 +11869,99 @@ d){var e=c.getCurrentFile();"1"!=urlParams.sketch&&(c.menus.addSubmenu("extras",
c.menus.addSubmenu("importFrom",b,d);"1"!=urlParams.sketch&&(c.menus.addMenuItems(b,["-","outline","layers"],d),c.commentsSupported()&&c.menus.addMenuItems(b,["comments"],d));c.menus.addMenuItems(b,["-","findReplace"],d);"1"!=urlParams.sketch&&c.menus.addMenuItems(b,["tags"],d);"1"!=urlParams.sketch&&null!=e&&null!=c.fileNode&&(e=null!=e.getTitle()?e.getTitle():c.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["-","properties"]));mxClient.IS_IOS&&navigator.standalone||
c.menus.addMenuItems(b,["-","print","-"],d);"1"==urlParams.sketch&&(c.menus.addSubmenu("extras",b,d,mxResources.get("preferences")),b.addSeparator(d));c.menus.addSubmenu("help",b,d);"1"==urlParams.embed?c.menus.addMenuItems(b,["-","exit"],d):c.menus.addMenuItems(b,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(b,d){var e=c.getCurrentFile();null!=e&&e.constructor==DriveFile?c.menus.addMenuItems(b,["save","makeCopy","-","rename","moveToFolder"],d):(c.menus.addMenuItems(b,["save",
"saveAs","-","rename"],d),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],d):c.menus.addMenuItems(b,["makeCopy"],d));"1"!=urlParams.sketch||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||c.menus.addMenuItems(b,["-","synchronize"],d);c.menus.addMenuItems(b,["-","autosave"],d);null!=e&&e.isRevisionHistorySupported()&&c.menus.addMenuItems(b,["-","revisionHistory"],d)})));var k=this.get("exportAs");this.put("exportAs",
-new Menu(mxUtils.bind(this,function(b,d){k.funct(b,d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||c.menus.addMenuItems(b,["publishLink"],d);b.addSeparator(d);c.menus.addSubmenu("embed",b,d)})));var l=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(b,d){c.menus.addInsertTableCellItem(b,d)})));var m=this.get("importFrom");this.put("importFrom",new Menu(mxUtils.bind(this,function(b,e){m.funct(b,e);this.addMenuItems(b,["editDiagram"],e);"1"==urlParams.sketch&&(b.addSeparator(e),
+new Menu(mxUtils.bind(this,function(b,d){k.funct(b,d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||c.menus.addMenuItems(b,["publishLink"],d);b.addSeparator(d);c.menus.addSubmenu("embed",b,d)})));var l=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(b,d){c.menus.addInsertTableCellItem(b,d)})));var n=this.get("importFrom");this.put("importFrom",new Menu(mxUtils.bind(this,function(b,e){n.funct(b,e);this.addMenuItems(b,["editDiagram"],e);"1"==urlParams.sketch&&(b.addSeparator(e),
b.addItem(mxResources.get("csv")+"...",null,function(){c.showImportCsvDialog()},e,null,mxUtils.bind(d,d.isEnabled)),c.addInsertMenuItems(b,e,["formatSql","-","fromText","plantUml","mermaid"]))})));this.put("extras",new Menu(mxUtils.bind(this,function(b,d){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",b,d);null!=l&&c.menus.addSubmenu("language",b,d);c.menus.addSubmenu("units",b,d);b.addSeparator(d);c.menus.addMenuItem(b,"configuration",d);b.addSeparator(d);c.menus.addMenuItems(b,["scrollbars","tooltips"],
d);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(b,["-","search","scratchpad","-","showStartScreen"],d);!c.isOfflineApp()&&isLocalStorage&&c.menus.addMenuItem(b,"plugins",d);b.addSeparator(d)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,d){c.menus.addMenuItems(b,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),d)})));mxUtils.bind(this,function(){var b=this.get("insert"),d=b.funct;b.funct=function(b,
-e){"1"==urlParams.sketch?(c.menus.addMenuItems(b,["insertFreehand"],e),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(b,["insertTemplate"],e)):(d.apply(this,arguments),c.menus.addSubmenu("table",b,e),b.addSeparator(e));c.menus.addMenuItems(b,["-","toggleShapes"],e)}})();var n="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,d,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(c,e,f);c.showDialog(b.container,
-620,420,!0,!1);b.init()}),d)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,c){for(var d=0;d<n.length;d++)"-"==n[d]?b.addSeparator(c):p(b,c,mxResources.get(n[d])+"...",n[d])})));this.put("view",new Menu(mxUtils.bind(this,function(b,d){c.menus.addMenuItems(b,"grid guides ruler - connectionArrows connectionPoints -".split(" "),d);if("undefined"!==typeof MathJax){var e=c.menus.addMenuItem(b,"mathematicalTypesetting",d);c.menus.addLinkToItem(e,"https://www.diagrams.net/doc/faq/math-typesetting")}c.menus.addMenuItems(b,
+e){"1"==urlParams.sketch?(c.menus.addMenuItems(b,["insertFreehand"],e),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(b,["insertTemplate"],e)):(d.apply(this,arguments),c.menus.addSubmenu("table",b,e),b.addSeparator(e));c.menus.addMenuItems(b,["-","toggleShapes"],e)}})();var m="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,d,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(c,e,f);c.showDialog(b.container,
+620,420,!0,!1);b.init()}),d)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,c){for(var d=0;d<m.length;d++)"-"==m[d]?b.addSeparator(c):p(b,c,mxResources.get(m[d])+"...",m[d])})));this.put("view",new Menu(mxUtils.bind(this,function(b,d){c.menus.addMenuItems(b,"grid guides ruler - connectionArrows connectionPoints -".split(" "),d);if("undefined"!==typeof MathJax){var e=c.menus.addMenuItem(b,"mathematicalTypesetting",d);c.menus.addLinkToItem(e,"https://www.diagrams.net/doc/faq/math-typesetting")}c.menus.addMenuItems(b,
["copyConnect","collapseExpand","-"],d);e=c.getCurrentFile();null!=e&&null!=c.fileNode&&(e=null!=e.getTitle()?e.getTitle():c.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["properties"],d));c.menus.addMenuItems(b,["pageScale"],d);"1"!=urlParams.sketch?c.menus.addMenuItems(b,["-","fullscreen","toggleDarkMode"],d):c.menus.addMenuItems(b,["pageSetup","-","layers","tags"],d)})))};EditorUi.prototype.installFormatToolbar=function(b){var c=this.editor.graph,d=document.createElement("div");
d.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var z=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(b,
-c,d){var e=n.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));n.menus.menuCreated(e,f,"geMenuItem");null!=d?(f.style.backgroundImage="url("+d+")",f.style.backgroundPosition=
+c,d){var e=m.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));m.menus.menuCreated(e,f,"geMenuItem");null!=d?(f.style.backgroundImage="url("+d+")",f.style.backgroundPosition=
"center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML=""):c||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function f(b,c,d,e,f,g){var k=document.createElement("a");k.className="geMenuItem";k.style.display="inline-block";k.style.boxSizing="border-box";k.style.height="30px";k.style.padding=
-"6px";k.style.position="relative";k.style.verticalAlign="top";k.style.top="0px";"1"==urlParams.sketch&&(k.style.borderStyle="none",k.style.boxShadow="none",k.style.padding="6px",k.style.margin="0px");null!=n.statusContainer?q.insertBefore(k,n.statusContainer):q.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",k.style.backgroundSize="24px 24px",k.style.width="34px"):mxUtils.write(k,b);mxEvent.addListener(k,
+"6px";k.style.position="relative";k.style.verticalAlign="top";k.style.top="0px";"1"==urlParams.sketch&&(k.style.borderStyle="none",k.style.boxShadow="none",k.style.padding="6px",k.style.margin="0px");null!=m.statusContainer?q.insertBefore(k,m.statusContainer):q.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",k.style.backgroundSize="24px 24px",k.style.width="34px"):mxUtils.write(k,b);mxEvent.addListener(k,
mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(k,"click",function(b){"disabled"!=k.getAttribute("disabled")&&c(b);mxEvent.consume(b)});null==d&&(k.style.marginRight="4px");null!=e&&k.setAttribute("title",e);null!=f&&(b=function(){f.isEnabled()?(k.removeAttribute("disabled"),k.style.cursor="pointer"):(k.setAttribute("disabled","disabled"),k.style.cursor="default")},f.addListener("stateChanged",b),p.addListener("enabledChanged",
b),b());return k}function g(b,c,d){d=document.createElement("div");d.className="geMenuItem";d.style.display="inline-block";d.style.verticalAlign="top";d.style.marginRight="6px";d.style.padding="0 4px 0 4px";d.style.height="30px";d.style.position="relative";d.style.top="0px";"1"==urlParams.sketch&&(d.style.boxShadow="none");for(var e=0;e<b.length;e++)null!=b[e]&&("1"==urlParams.sketch&&(b[e].style.padding="10px 8px",b[e].style.width="30px"),b[e].style.margin="0px",b[e].style.boxShadow="none",d.appendChild(b[e]));
-null!=c&&mxUtils.setOpacity(d,c);null!=n.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(d,n.statusContainer):q.appendChild(d);return d}function k(){for(var b=q.firstChild;null!=b;){var e=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=e}t=q.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>d||"1"==urlParams.sketch,k=null;b||(k=c("diagram"));if("1"==urlParams.sketch)X.style.left=58>Q.offsetTop-
-Q.offsetHeight/2?"70px":"10px";else if(e=b?c("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,null!=e&&(k=e),g([k,f(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),n.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":
-null),f(mxResources.get("format"),n.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+n.actions.get("formatPanel").shortcut+")",n.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
-null)],b?60:null),e=c("insert",!0,b?W:null),g([e,f(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),b?ka:null)],b?60:null),411<=d&&(g([pa,la],60),520<=d&&(g([qa,640<=d?f("",R.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",R,na):null,640<=d?f("",U.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",U,ja):null],60),720<=d))){var l=f("",V.funct,null,mxResources.get("dark"),V,Editor.isDarkMode()?da:ba);l.style.opacity=
-"0.4";n.addListener("darkModeChanged",mxUtils.bind(this,function(){l.style.backgroundImage="url("+(Editor.isDarkMode()?da:ba)+")"}));null!=n.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(l,n.statusContainer):q.appendChild(l)}null!=k&&(mxEvent.disableContextMenu(k),mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&n.appIconClicked(b)}),null,null));e=n.menus.get("language");
+null!=c&&mxUtils.setOpacity(d,c);null!=m.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(d,m.statusContainer):q.appendChild(d);return d}function k(){for(var b=q.firstChild;null!=b;){var e=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=e}t=q.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>d||"1"==urlParams.sketch,k=null;b||(k=c("diagram"));if("1"==urlParams.sketch)X.style.left=58>Q.offsetTop-
+Q.offsetHeight/2?"70px":"10px";else if(e=b?c("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,null!=e&&(k=e),g([k,f(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),m.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":
+null),f(mxResources.get("format"),m.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+m.actions.get("formatPanel").shortcut+")",m.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+null)],b?60:null),e=c("insert",!0,b?W:null),g([e,f(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),b?ka:null)],b?60:null),411<=d&&(g([pa,la],60),520<=d&&(g([qa,640<=d?f("",R.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",R,na):null,640<=d?f("",U.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",U,ja):null],60),720<=d))){var l=f("",V.funct,null,mxResources.get("dark"),V,Editor.isDarkMode()?da:ba);l.style.opacity=
+"0.4";m.addListener("darkModeChanged",mxUtils.bind(this,function(){l.style.backgroundImage="url("+(Editor.isDarkMode()?da:ba)+")"}));null!=m.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(l,m.statusContainer):q.appendChild(l)}null!=k&&(mxEvent.disableContextMenu(k),mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&m.appIconClicked(b)}),null,null));e=m.menus.get("language");
null!=e&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==xa&&(e=u.addMenu("",e.funct),e.setAttribute("title",mxResources.get("language")),e.className="geToolbarButton",e.style.backgroundImage="url("+Editor.globeImage+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.position="absolute",e.style.height="24px",e.style.width="24px",e.style.zIndex="1",e.style.right="8px",e.style.cursor="pointer",
-e.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(e),xa=e),n.buttonContainer.style.paddingRight="34px"):(n.buttonContainer.style.paddingRight="4px",null!=xa&&(xa.parentNode.removeChild(xa),xa=null))}z.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark:mxSettings.settings.darkMode);var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?
+e.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(e),xa=e),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=xa&&(xa.parentNode.removeChild(xa),xa=null))}z.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark:mxSettings.settings.darkMode);var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?
"63px":"32px";this.sidebar=this.createSidebar(l);"1"==urlParams.sketch&&this.toggleScratchpad();if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])e(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==urlParams.sketch||1E3<=d)if(b(this,!0),"1"==
-urlParams.sketch){this.formatWindow.window.setClosable(!1);var m=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){m.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=parseInt(this.div.style.left)-150+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",
-mxUtils.bind(this,function(b){mxEvent.getSource(b)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var n=this,p=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));n.defaultLibraryName=mxResources.get("untitledLibrary");var q=document.createElement("div");q.className="geMenubarContainer";var t=null,u=new Menubar(n,q);n.statusContainer=n.createStatusContainer();n.statusContainer.style.position="relative";n.statusContainer.style.maxWidth=
-"";n.statusContainer.style.marginTop="7px";n.statusContainer.style.marginLeft="6px";n.statusContainer.style.color="gray";n.statusContainer.style.cursor="default";var v=n.hideCurrentMenu;n.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var x=n.descriptorChanged;n.descriptorChanged=function(){x.apply(this,arguments);var b=n.getCurrentFile();if(null!=b&&null!=b.getTitle()){var c=b.getMode();"google"==c?c="googleDrive":"github"==c?c="gitHub":"gitlab"==
-c?c="gitLab":"onedrive"==c&&(c="oneDrive");c=mxResources.get(c);q.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else q.removeAttribute("title")};n.setStatusText(n.editor.getStatus());q.appendChild(n.statusContainer);n.buttonContainer=document.createElement("div");n.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";q.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=
-document.createElement("div");n.tabContainer.className="geTabContainer";n.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=n.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";n.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var J=n.menus.get("viewZoom"),W="1"!=urlParams.sketch?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":
+urlParams.sketch){this.formatWindow.window.setClosable(!1);var n=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){n.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=parseInt(this.div.style.left)-150+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",
+mxUtils.bind(this,function(b){mxEvent.getSource(b)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var m=this,p=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));m.defaultLibraryName=mxResources.get("untitledLibrary");var q=document.createElement("div");q.className="geMenubarContainer";var t=null,u=new Menubar(m,q);m.statusContainer=m.createStatusContainer();m.statusContainer.style.position="relative";m.statusContainer.style.maxWidth=
+"";m.statusContainer.style.marginTop="7px";m.statusContainer.style.marginLeft="6px";m.statusContainer.style.color="gray";m.statusContainer.style.cursor="default";var v=m.hideCurrentMenu;m.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var y=m.descriptorChanged;m.descriptorChanged=function(){y.apply(this,arguments);var b=m.getCurrentFile();if(null!=b&&null!=b.getTitle()){var c=b.getMode();"google"==c?c="googleDrive":"github"==c?c="gitHub":"gitlab"==
+c?c="gitLab":"onedrive"==c&&(c="oneDrive");c=mxResources.get(c);q.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else q.removeAttribute("title")};m.setStatusText(m.editor.getStatus());q.appendChild(m.statusContainer);m.buttonContainer=document.createElement("div");m.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";q.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=
+document.createElement("div");m.tabContainer.className="geTabContainer";m.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=m.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var J=m.menus.get("viewZoom"),W="1"!=urlParams.sketch?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMywxMWg4VjNIM1YxMXogTTUsNWg0djRINVY1eiIvPjxwYXRoIGQ9Ik0xMywzdjhoOFYzSDEzeiBNMTksOWgtNFY1aDRWOXoiLz48cGF0aCBkPSJNMywyMWg4di04SDNWMjF6IE01LDE1aDR2NEg1VjE1eiIvPjxwb2x5Z29uIHBvaW50cz0iMTgsMTMgMTYsMTMgMTYsMTYgMTMsMTYgMTMsMTggMTYsMTggMTYsMjEgMTgsMjEgMTgsMTggMjEsMTggMjEsMTYgMTgsMTYiLz48L2c+PC9nPjwvc3ZnPg==",
-S="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null,X="1"==urlParams.sketch?document.createElement("div"):null;n.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.refreshBackgroundImage();
-p.view.validateBackground()}));Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=n.hoverIcons){var fa=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||fa.apply(this,arguments)}}if(null!=p.freehand){var ga=p.freehand.createStyle;p.freehand.createStyle=function(b){return ga.apply(this,
-arguments)+"sketch=0;"}}if("1"==urlParams.sketch){Q.className="geToolbarContainer";S.className="geToolbarContainer";X.className="geToolbarContainer";q.className="geToolbarContainer";n.picker=Q;var aa=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){aa||(n.statusContainer.style.display="none")});var Z=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",b):
-n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&null==n.statusContainer.firstChild.getAttribute("class")){null!=n.statusContainer.firstChild?Z(n.statusContainer.firstChild.getAttribute("title")):Z(n.editor.getStatus());var b=n.getCurrentFile(),b=null!=b?b.savingStatusKey:DrawioFile.prototype.savingStatusKey;
-null!=n.notificationBtn&&n.notificationBtn.getAttribute("title")==mxResources.get(b)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(b))+'..."src="'+IMAGE_PATH+'/spin.gif">',n.statusContainer.style.display="inline-block",aa=!0):(n.statusContainer.style.display="none",aa=!1)}else n.statusContainer.style.display="inline-block",Z(null),aa=!0}));T=c("diagram",null,IMAGE_PATH+"/drawlogo.svg");T.style.boxShadow="none";T.style.opacity="0.4";T.style.padding="6px";T.style.margin=
-"0px";X.appendChild(T);mxEvent.disableContextMenu(T);mxEvent.addGestureListeners(T,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position="";n.statusContainer.style.display="none";n.statusContainer.style.margin="0px";n.statusContainer.style.padding="6px 0px";n.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";n.statusContainer.style.display=
-"inline-block";n.statusContainer.style.textOverflow="ellipsis";n.buttonContainer.style.position="";n.buttonContainer.style.paddingRight="0px";n.buttonContainer.style.display="inline-block";var Y=document.createElement("a");Y.style.padding="0px";Y.style.boxShadow="none";Y.className="geMenuItem";Y.style.display="inline-block";Y.style.width="40px";Y.style.height="12px";Y.style.marginBottom="-2px";Y.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Y.style.backgroundPosition="top center";
-Y.style.backgroundRepeat="no-repeat";Y.setAttribute("title","Minimize");var ia=!1,ca=mxUtils.bind(this,function(){Q.innerHTML="";if(!ia){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default";b.style.margin="2px 0px";Q.appendChild(b);mxUtils.br(Q);return b};c(n.sidebar.createVertexTemplate("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",
-40,20,"Text",mxResources.get("text"),!0,!0,null,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(n.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;fontSize=24;pointerEvents=1;"+("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));
-c(n.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(n.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),"edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+
-("0"!=urlParams.rough?"sketch=1;":""));b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));b=b.clone();b.style+="shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,20),
-!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(n.actions.get("insertFreehand"),mxResources.get("freehand"),"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==");
-var d=n.actions.get("toggleShapes");b(d,mxResources.get("shapes")+" ("+d.shortcut+")",W);b(n.actions.get("insertTemplate"),mxResources.get("template"),"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEzIDExaC0ydjNIOHYyaDN2M2gydi0zaDN2LTJoLTN6bTEtOUg2Yy0xLjEgMC0yIC45LTIgMnYxNmMwIDEuMS44OSAyIDEuOTkgMkgxOGMxLjEgMCAyLS45IDItMlY4bC02LTZ6bTQgMThINlY0aDd2NWg1djExeiIvPjwvc3ZnPg==")}Q.appendChild(Y)});
+S="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null,X="1"==urlParams.sketch?document.createElement("div"):null;m.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.refreshBackgroundImage();
+p.view.validateBackground()}));Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=m.hoverIcons){var fa=m.hoverIcons.update;m.hoverIcons.update=function(){p.freehand.isDrawing()||fa.apply(this,arguments)}}if(null!=p.freehand){var ga=p.freehand.createStyle;p.freehand.createStyle=function(b){return ga.apply(this,
+arguments)+"sketch=0;"}}if("1"==urlParams.sketch){Q.className="geToolbarContainer";S.className="geToolbarContainer";X.className="geToolbarContainer";q.className="geToolbarContainer";m.picker=Q;var aa=!1;mxEvent.addListener(q,"mouseenter",function(){m.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){aa||(m.statusContainer.style.display="none")});var Z=mxUtils.bind(this,function(b){null!=m.notificationBtn&&(null!=b?m.notificationBtn.setAttribute("title",b):
+m.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus());if(0==m.statusContainer.children.length||1==m.statusContainer.children.length&&null==m.statusContainer.firstChild.getAttribute("class")){null!=m.statusContainer.firstChild?Z(m.statusContainer.firstChild.getAttribute("title")):Z(m.editor.getStatus());var b=m.getCurrentFile(),b=null!=b?b.savingStatusKey:DrawioFile.prototype.savingStatusKey;
+null!=m.notificationBtn&&m.notificationBtn.getAttribute("title")==mxResources.get(b)+"..."?(m.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(b))+'..."src="'+IMAGE_PATH+'/spin.gif">',m.statusContainer.style.display="inline-block",aa=!0):(m.statusContainer.style.display="none",aa=!1)}else m.statusContainer.style.display="inline-block",Z(null),aa=!0}));T=c("diagram",null,IMAGE_PATH+"/drawlogo.svg");T.style.boxShadow="none";T.style.opacity="0.4";T.style.padding="6px";T.style.margin=
+"0px";X.appendChild(T);mxEvent.disableContextMenu(T);mxEvent.addGestureListeners(T,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);m.statusContainer.style.position="";m.statusContainer.style.display="none";m.statusContainer.style.margin="0px";m.statusContainer.style.padding="6px 0px";m.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";m.statusContainer.style.display=
+"inline-block";m.statusContainer.style.textOverflow="ellipsis";m.buttonContainer.style.position="";m.buttonContainer.style.paddingRight="0px";m.buttonContainer.style.display="inline-block";var Y=document.createElement("a");Y.style.padding="0px";Y.style.boxShadow="none";Y.className="geMenuItem";Y.style.display="inline-block";Y.style.width="40px";Y.style.height="12px";Y.style.marginBottom="-2px";Y.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Y.style.backgroundPosition="top center";
+Y.style.backgroundRepeat="no-repeat";Y.setAttribute("title","Minimize");var ia=!1,ca=mxUtils.bind(this,function(){Q.innerHTML="";if(!ia){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default";b.style.margin="2px 0px";Q.appendChild(b);mxUtils.br(Q);return b};c(m.sidebar.createVertexTemplate("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",
+40,20,"Text",mxResources.get("text"),!0,!0,null,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(m.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;fontSize=24;pointerEvents=1;"+("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));
+c(m.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(m.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),"edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+
+("0"!=urlParams.rough?"sketch=1;":""));b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;c(m.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));b=b.clone();b.style+="shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,20),
+!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(m.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(m.actions.get("insertFreehand"),mxResources.get("freehand"),"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==");
+var d=m.actions.get("toggleShapes");b(d,mxResources.get("shapes")+" ("+d.shortcut+")",W);b(m.actions.get("insertTemplate"),mxResources.get("template"),"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEzIDExaC0ydjNIOHYyaDN2M2gydi0zaDN2LTJoLTN6bTEtOUg2Yy0xLjEgMC0yIC45LTIgMnYxNmMwIDEuMS44OSAyIDEuOTkgMkgxOGMxLjEgMCAyLS45IDItMlY4bC02LTZ6bTQgMThINlY0aDd2NWg1djExeiIvPjwvc3ZnPg==")}Q.appendChild(Y)});
mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){ia?(mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, -50%)"),Q.style.padding="8px 6px 4px",Q.style.top="50%",Q.style.bottom="",Q.style.height="",Y.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Y.style.width="40px",Y.style.height="12px",Y.setAttribute("title","Minimize"),ia=!1,ca()):(Q.innerHTML="",Q.appendChild(Y),mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, 0)"),Q.style.top="",Q.style.bottom="12px",
-Q.style.padding="0px",Q.style.height="24px",Y.style.height="24px",Y.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==)",Y.setAttribute("title",mxResources.get("insert")),Y.style.width="24px",ia=!0)}));ca();n.addListener("darkModeChanged",mxUtils.bind(this,function(){ca()}))}else n.editor.addListener("statusChanged",
-mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));if(null!=J){var N=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?n.actions.get("customZoom").funct():n.actions.get("smartFit").funct()},R=n.actions.get("zoomIn"),na="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4=",
-U=n.actions.get("zoomOut"),ja="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg==",
-ha=n.actions.get("resetView"),oa=n.actions.get("fullscreen"),V=n.actions.get("toggleDarkMode"),ba="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik05LjM3LDUuNTFDOS4xOSw2LjE1LDkuMSw2LjgyLDkuMSw3LjVjMCw0LjA4LDMuMzIsNy40LDcuNCw3LjRjMC42OCwwLDEuMzUtMC4wOSwxLjk5LTAuMjdDMTcuNDUsMTcuMTksMTQuOTMsMTksMTIsMTkgYy0zLjg2LDAtNy0zLjE0LTctN0M1LDkuMDcsNi44MSw2LjU1LDkuMzcsNS41MXogTTEyLDNjLTQuOTcsMC05LDQuMDMtOSw5czQuMDMsOSw5LDlzOS00LjAzLDktOWMwLTAuNDYtMC4wNC0wLjkyLTAuMS0xLjM2IGMtMC45OCwxLjM3LTIuNTgsMi4yNi00LjQsMi4yNmMtMi45OCwwLTUuNC0yLjQyLTUuNC01LjRjMC0xLjgxLDAuODktMy40MiwyLjI2LTQuNEMxMi45MiwzLjA0LDEyLjQ2LDMsMTIsM0wxMiwzeiIvPjwvc3ZnPg==",
+Q.style.padding="0px",Q.style.height="24px",Y.style.height="24px",Y.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==)",Y.setAttribute("title",mxResources.get("insert")),Y.style.width="24px",ia=!0)}));ca();m.addListener("darkModeChanged",mxUtils.bind(this,function(){ca()}))}else m.editor.addListener("statusChanged",
+mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus())}));if(null!=J){var N=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?m.actions.get("customZoom").funct():m.actions.get("smartFit").funct()},R=m.actions.get("zoomIn"),na="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4=",
+U=m.actions.get("zoomOut"),ja="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg==",
+ha=m.actions.get("resetView"),oa=m.actions.get("fullscreen"),V=m.actions.get("toggleDarkMode"),ba="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik05LjM3LDUuNTFDOS4xOSw2LjE1LDkuMSw2LjgyLDkuMSw3LjVjMCw0LjA4LDMuMzIsNy40LDcuNCw3LjRjMC42OCwwLDEuMzUtMC4wOSwxLjk5LTAuMjdDMTcuNDUsMTcuMTksMTQuOTMsMTksMTIsMTkgYy0zLjg2LDAtNy0zLjE0LTctN0M1LDkuMDcsNi44MSw2LjU1LDkuMzcsNS41MXogTTEyLDNjLTQuOTcsMC05LDQuMDMtOSw5czQuMDMsOSw5LDlzOS00LjAzLDktOWMwLTAuNDYtMC4wNC0wLjkyLTAuMS0xLjM2IGMtMC45OCwxLjM3LTIuNTgsMi4yNi00LjQsMi4yNmMtMi45OCwwLTUuNC0yLjQyLTUuNC01LjRjMC0xLjgxLDAuODktMy40MiwyLjI2LTQuNEMxMi45MiwzLjA0LDEyLjQ2LDMsMTIsM0wxMiwzeiIvPjwvc3ZnPg==",
da="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik0xMiw5YzEuNjUsMCwzLDEuMzUsMywzcy0xLjM1LDMtMywzcy0zLTEuMzUtMy0zUzEwLjM1LDksMTIsOSBNMTIsN2MtMi43NiwwLTUsMi4yNC01LDVzMi4yNCw1LDUsNXM1LTIuMjQsNS01IFMxNC43Niw3LDEyLDdMMTIsN3ogTTIsMTNsMiwwYzAuNTUsMCwxLTAuNDUsMS0xcy0wLjQ1LTEtMS0xbC0yLDBjLTAuNTUsMC0xLDAuNDUtMSwxUzEuNDUsMTMsMiwxM3ogTTIwLDEzbDIsMGMwLjU1LDAsMS0wLjQ1LDEtMSBzLTAuNDUtMS0xLTFsLTIsMGMtMC41NSwwLTEsMC40NS0xLDFTMTkuNDUsMTMsMjAsMTN6IE0xMSwydjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMVYyYzAtMC41NS0wLjQ1LTEtMS0xUzExLDEuNDUsMTEsMnogTTExLDIwdjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMXYtMmMwLTAuNTUtMC40NS0xLTEtMUMxMS40NSwxOSwxMSwxOS40NSwxMSwyMHogTTUuOTksNC41OGMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDAgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBzMC4zOS0xLjAzLDAtMS40MUw1Ljk5LDQuNTh6IE0xOC4zNiwxNi45NSBjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDEgTDE4LjM2LDE2Ljk1eiBNMTkuNDIsNS45OWMwLjM5LTAuMzksMC4zOS0xLjAzLDAtMS40MWMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDBsLTEuMDYsMS4wNmMtMC4zOSwwLjM5LTAuMzksMS4wMywwLDEuNDEgczEuMDMsMC4zOSwxLjQxLDBMMTkuNDIsNS45OXogTTcuMDUsMTguMzZjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDFjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwbC0xLjA2LDEuMDYgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MXMxLjAzLDAuMzksMS40MSwwTDcuMDUsMTguMzZ6Ii8+PC9zdmc+",
-ea=n.actions.get("undo"),ra=n.actions.get("redo"),pa=f("",ea.funct,null,mxResources.get("undo")+" ("+ea.shortcut+")",ea,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),la=f("",ra.funct,null,mxResources.get("redo")+
+ea=m.actions.get("undo"),ra=m.actions.get("redo"),pa=f("",ea.funct,null,mxResources.get("undo")+" ("+ea.shortcut+")",ea,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),la=f("",ra.funct,null,mxResources.get("redo")+
" ("+ra.shortcut+")",ra,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),qa=f("",N,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ha,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48cGF0aCBkPSJNNiwxNmgxMlY4SDZWMTZ6IE04LDEwaDh2NEg4VjEweiBNNCwxNUgydjNjMCwxLjEsMC45LDIsMiwyaDN2LTJINFYxNXogTTQsNmgzVjRINEMyLjksNCwyLDQuOSwyLDZ2M2gyVjZ6IE0yMCw0aC0zdjJoM3YzIGgyVjZDMjIsNC45LDIxLjEsNCwyMCw0eiBNMjAsMThoLTN2MmgzYzEuMSwwLDItMC45LDItMnYtM2gtMlYxOHoiLz48L2c+PC9zdmc+"),
ha=f("",oa.funct,null,mxResources.get("fullscreen"),oa,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),ka="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==";
-if(null!=S){var sa=n.actions.get("delete"),ta=f("",sa.funct,null,mxResources.get("delete"),sa,ka);ta.style.opacity="0.1";X.appendChild(ta);sa.addListener("stateChanged",function(){ta.style.opacity=sa.enabled?"0.4":"0.1"});J=function(){pa.style.display=0<n.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";la.style.display=pa.style.display;pa.style.opacity=ea.enabled?"0.4":"0.1";la.style.opacity=ra.enabled?"0.4":"0.1"};X.appendChild(pa);X.appendChild(la);ea.addListener("stateChanged",
-J);ra.addListener("stateChanged",J);J();null!=urlParams.layers&&(J=n.actions.get("layers"),J=f("",J.funct,null,mxResources.get("layers"),J,Editor.layersLargeImage),J.className+=" geInverted",J.style.opacity="0.4",S.appendChild(J));null!=urlParams.tags&&(J=n.actions.get("tags"),J=f("",J.funct,null,mxResources.get("tags"),J,Editor.tagsLargeImage),J.className+=" geInverted",J.style.opacity="0.4",S.appendChild(J));J=n.actions.get("outline");J=f("",J.funct,null,mxResources.get("outline"),J,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==");
+if(null!=S){var sa=m.actions.get("delete"),ta=f("",sa.funct,null,mxResources.get("delete"),sa,ka);ta.style.opacity="0.1";X.appendChild(ta);sa.addListener("stateChanged",function(){ta.style.opacity=sa.enabled?"0.4":"0.1"});J=function(){pa.style.display=0<m.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";la.style.display=pa.style.display;pa.style.opacity=ea.enabled?"0.4":"0.1";la.style.opacity=ra.enabled?"0.4":"0.1"};X.appendChild(pa);X.appendChild(la);ea.addListener("stateChanged",
+J);ra.addListener("stateChanged",J);J();null!=urlParams.layers&&(J=m.actions.get("layers"),J=f("",J.funct,null,mxResources.get("layers"),J,Editor.layersLargeImage),J.className+=" geInverted",J.style.opacity="0.4",S.appendChild(J));null!=urlParams.tags&&(J=m.actions.get("tags"),J=f("",J.funct,null,mxResources.get("tags"),J,Editor.tagsLargeImage),J.className+=" geInverted",J.style.opacity="0.4",S.appendChild(J));J=m.actions.get("outline");J=f("",J.funct,null,mxResources.get("outline"),J,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==");
J.style.opacity="0.4";S.appendChild(J);J=f("",U.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",U,ja);J.style.opacity="0.4";S.appendChild(J);var T=document.createElement("div");T.innerHTML="100%";T.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");T.style.display="inline-block";T.style.cursor="pointer";T.style.textAlign="center";T.style.whiteSpace="nowrap";T.style.paddingRight="10px";T.style.textDecoration="none";T.style.verticalAlign=
-"top";T.style.padding="6px 0";T.style.fontSize="14px";T.style.width="40px";T.style.opacity="0.4";S.appendChild(T);mxEvent.addListener(T,"click",N);N=f("",R.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",R,na);N.style.opacity="0.4";S.appendChild(N);var ua=f("",V.funct,null,mxResources.get("dark"),V,Editor.isDarkMode()?da:ba);ua.style.opacity="0.4";S.appendChild(ua);n.addListener("darkModeChanged",mxUtils.bind(this,function(){ua.style.backgroundImage="url("+(Editor.isDarkMode()?
+"top";T.style.padding="6px 0";T.style.fontSize="14px";T.style.width="40px";T.style.opacity="0.4";S.appendChild(T);mxEvent.addListener(T,"click",N);N=f("",R.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",R,na);N.style.opacity="0.4";S.appendChild(N);var ua=f("",V.funct,null,mxResources.get("dark"),V,Editor.isDarkMode()?da:ba);ua.style.opacity="0.4";S.appendChild(ua);m.addListener("darkModeChanged",mxUtils.bind(this,function(){ua.style.backgroundImage="url("+(Editor.isDarkMode()?
da:ba)+")"}));oa.visible&&(ha.style.opacity="0.4",S.appendChild(ha));var ma=this.createPageMenuTab(!1);ma.style.display="none";ma.style.position="";ma.style.marginLeft="";ma.style.top="";ma.style.left="";ma.style.height="100%";ma.style.lineHeight="";ma.style.borderStyle="none";ma.style.padding="3px 0";ma.style.margin="0px";ma.style.background="";ma.style.border="";ma.style.boxShadow="none";ma.style.verticalAlign="top";ma.firstChild.style.height="100%";ma.firstChild.style.opacity="0.6";ma.firstChild.style.margin=
-"0px";S.appendChild(ma);n.addListener("fileDescriptorChanged",function(){ma.style.display="1"==urlParams.pages||null!=n.pages&&1<n.pages.length?"inline-block":"none"});n.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";X.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+"0px";S.appendChild(ma);m.addListener("fileDescriptorChanged",function(){ma.style.display="1"==urlParams.pages||null!=m.pages&&1<m.pages.length?"inline-block":"none"});m.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";X.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
S.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";A.appendChild(X);A.appendChild(S);Q.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";A.appendChild(Q);window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,
"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(A)}else q.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;",this.tabContainer.style.right="70px",T=u.addMenu("100%",J.funct),T.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)"),T.style.whiteSpace="nowrap",T.style.paddingRight="10px",T.style.textDecoration="none",T.style.textDecoration="none",T.style.overflow="hidden",
-T.style.visibility="hidden",T.style.textAlign="center",T.style.cursor="pointer",T.style.height=parseInt(n.tabContainerHeight)-1+"px",T.style.lineHeight=parseInt(n.tabContainerHeight)+1+"px",T.style.position="absolute",T.style.display="block",T.style.fontSize="12px",T.style.width="59px",T.style.right="0px",T.style.bottom="0px",T.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",T.style.backgroundPosition="right 6px center",T.style.backgroundRepeat="no-repeat",A.appendChild(T);oa=mxUtils.bind(this,
-function(){T.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,oa);n.editor.addListener("resetGraphView",oa);n.editor.addListener("pageSelected",oa);var va=n.setGraphEnabled;n.setGraphEnabled=function(){va.apply(this,arguments);null!=this.tabContainer&&(T.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==S?this.tabContainerHeight+"px":"0px")}}A.appendChild(q);
-A.appendChild(n.diagramContainer);l.appendChild(A);n.updateTabContainer();null==S&&A.appendChild(n.tabContainer);var xa=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();
-null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,d,e,m){var f=d.y,g=d.x,k=!1,p=!1;if(null!=this.states&&null!=c&&null!=d){var q=this,t=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);t.x=c.x+g;t.y=c.y+f;t.width=c.width;t.height=c.height;for(var x=[],A=[],z=0;z<this.states.length;z++){var y=this.states[z];y instanceof mxCellState&&(m||!this.graph.isCellSelected(y.cell))&&((t.x>=y.x&&t.x<=y.x+y.width||y.x>=t.x&&y.x<=t.x+t.width)&&(t.y>
-y.y+y.height+4||t.y+t.height+4<y.y)?x.push(y):(t.y>=y.y&&t.y<=y.y+y.height||y.y>=t.y&&y.y<=t.y+t.height)&&(t.x>y.x+y.width+4||t.x+t.width+4<y.x)&&A.push(y))}var B=0,C=0,E=y=0,G=0,F=0,D=0,I=0,K=5*u;if(1<x.length){x.push(t);x.sort(function(b,c){return b.y-c.y});var L=!1,z=t==x[0],u=t==x[x.length-1];if(!z&&!u)for(z=1;z<x.length-1;z++)if(t==x[z]){u=x[z-1];z=x[z+1];y=C=E=(z.y-u.y-u.height-t.height)/2;break}for(z=0;z<x.length-1;z++){var u=x[z],M=x[z+1],P=t==u||t==M,M=M.y-u.y-u.height,L=L|t==u;if(0==C&&
-0==B)C=M,B=1;else if(Math.abs(C-M)<=(P||1==z&&L?v:0))B+=1;else if(1<B&&L){x=x.slice(0,z+1);break}else if(3<=x.length-z&&!L)B=0,y=C=0!=E?E:0,x.splice(0,0==z?1:z),z=-1;else break;0!=y||P||(C=y=M)}3==x.length&&x[1]==t&&(y=0)}if(1<A.length){A.push(t);A.sort(function(b,c){return b.x-c.x});L=!1;z=t==A[0];u=t==A[A.length-1];if(!z&&!u)for(z=1;z<A.length-1;z++)if(t==A[z]){u=A[z-1];z=A[z+1];D=F=I=(z.x-u.x-u.width-t.width)/2;break}for(z=0;z<A.length-1;z++){u=A[z];M=A[z+1];P=t==u||t==M;M=M.x-u.x-u.width;L|=t==
-u;if(0==F&&0==G)F=M,G=1;else if(Math.abs(F-M)<=(P||1==z&&L?v:0))G+=1;else if(1<G&&L){A=A.slice(0,z+1);break}else if(3<=A.length-z&&!L)G=0,D=F=0!=I?I:0,A.splice(0,0==z?1:z),z=-1;else break;0!=D||P||(F=D=M)}3==A.length&&A[1]==t&&(D=0)}v=function(b,c,d,e){var f=[],g;e?(e=K,g=0):(e=0,g=K);f.push(new mxPoint(b.x-e,b.y-g));f.push(new mxPoint(b.x+e,b.y+g));f.push(b);f.push(c);f.push(new mxPoint(c.x-e,c.y-g));f.push(new mxPoint(c.x+e,c.y+g));if(null!=d)return d.points=f,d;b=new mxPolyline(f,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);b.dialect=mxConstants.DIALECT_SVG;b.pointerEvents=!1;b.init(q.graph.getView().getOverlayPane());return b};F=function(b,c){if(b&&null!=q.guidesArrHor)for(var d=0;d<q.guidesArrHor.length;d++)q.guidesArrHor[d].node.style.visibility="hidden";if(c&&null!=q.guidesArrVer)for(d=0;d<q.guidesArrVer.length;d++)q.guidesArrVer[d].node.style.visibility="hidden"};if(1<G&&G==A.length-1){G=[];I=q.guidesArrHor;k=[];g=0;z=A[0]==t?1:0;L=A[z].y+A[z].height;if(0<D)for(z=0;z<A.length-1;z++)u=
+T.style.visibility="hidden",T.style.textAlign="center",T.style.cursor="pointer",T.style.height=parseInt(m.tabContainerHeight)-1+"px",T.style.lineHeight=parseInt(m.tabContainerHeight)+1+"px",T.style.position="absolute",T.style.display="block",T.style.fontSize="12px",T.style.width="59px",T.style.right="0px",T.style.bottom="0px",T.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",T.style.backgroundPosition="right 6px center",T.style.backgroundRepeat="no-repeat",A.appendChild(T);oa=mxUtils.bind(this,
+function(){T.innerHTML=Math.round(100*m.editor.graph.view.scale)+"%"});m.editor.graph.view.addListener(mxEvent.EVENT_SCALE,oa);m.editor.addListener("resetGraphView",oa);m.editor.addListener("pageSelected",oa);var va=m.setGraphEnabled;m.setGraphEnabled=function(){va.apply(this,arguments);null!=this.tabContainer&&(T.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==S?this.tabContainerHeight+"px":"0px")}}A.appendChild(q);
+A.appendChild(m.diagramContainer);l.appendChild(A);m.updateTabContainer();null==S&&A.appendChild(m.tabContainer);var xa=null;k();mxEvent.addListener(window,"resize",function(){k();null!=m.sidebarWindow&&m.sidebarWindow.window.fit();null!=m.formatWindow&&m.formatWindow.window.fit();null!=m.actions.outlineWindow&&m.actions.outlineWindow.window.fit();null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();
+null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,d,e,n){var f=d.y,g=d.x,k=!1,p=!1;if(null!=this.states&&null!=c&&null!=d){var q=this,t=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);t.x=c.x+g;t.y=c.y+f;t.width=c.width;t.height=c.height;for(var y=[],A=[],z=0;z<this.states.length;z++){var x=this.states[z];x instanceof mxCellState&&(n||!this.graph.isCellSelected(x.cell))&&((t.x>=x.x&&t.x<=x.x+x.width||x.x>=t.x&&x.x<=t.x+t.width)&&(t.y>
+x.y+x.height+4||t.y+t.height+4<x.y)?y.push(x):(t.y>=x.y&&t.y<=x.y+x.height||x.y>=t.y&&x.y<=t.y+t.height)&&(t.x>x.x+x.width+4||t.x+t.width+4<x.x)&&A.push(x))}var B=0,C=0,E=x=0,F=0,G=0,D=0,I=0,K=5*u;if(1<y.length){y.push(t);y.sort(function(b,c){return b.y-c.y});var L=!1,z=t==y[0],u=t==y[y.length-1];if(!z&&!u)for(z=1;z<y.length-1;z++)if(t==y[z]){u=y[z-1];z=y[z+1];x=C=E=(z.y-u.y-u.height-t.height)/2;break}for(z=0;z<y.length-1;z++){var u=y[z],M=y[z+1],P=t==u||t==M,M=M.y-u.y-u.height,L=L|t==u;if(0==C&&
+0==B)C=M,B=1;else if(Math.abs(C-M)<=(P||1==z&&L?v:0))B+=1;else if(1<B&&L){y=y.slice(0,z+1);break}else if(3<=y.length-z&&!L)B=0,x=C=0!=E?E:0,y.splice(0,0==z?1:z),z=-1;else break;0!=x||P||(C=x=M)}3==y.length&&y[1]==t&&(x=0)}if(1<A.length){A.push(t);A.sort(function(b,c){return b.x-c.x});L=!1;z=t==A[0];u=t==A[A.length-1];if(!z&&!u)for(z=1;z<A.length-1;z++)if(t==A[z]){u=A[z-1];z=A[z+1];D=G=I=(z.x-u.x-u.width-t.width)/2;break}for(z=0;z<A.length-1;z++){u=A[z];M=A[z+1];P=t==u||t==M;M=M.x-u.x-u.width;L|=t==
+u;if(0==G&&0==F)G=M,F=1;else if(Math.abs(G-M)<=(P||1==z&&L?v:0))F+=1;else if(1<F&&L){A=A.slice(0,z+1);break}else if(3<=A.length-z&&!L)F=0,D=G=0!=I?I:0,A.splice(0,0==z?1:z),z=-1;else break;0!=D||P||(G=D=M)}3==A.length&&A[1]==t&&(D=0)}v=function(b,c,d,e){var f=[],g;e?(e=K,g=0):(e=0,g=K);f.push(new mxPoint(b.x-e,b.y-g));f.push(new mxPoint(b.x+e,b.y+g));f.push(b);f.push(c);f.push(new mxPoint(c.x-e,c.y-g));f.push(new mxPoint(c.x+e,c.y+g));if(null!=d)return d.points=f,d;b=new mxPolyline(f,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);b.dialect=mxConstants.DIALECT_SVG;b.pointerEvents=!1;b.init(q.graph.getView().getOverlayPane());return b};G=function(b,c){if(b&&null!=q.guidesArrHor)for(var d=0;d<q.guidesArrHor.length;d++)q.guidesArrHor[d].node.style.visibility="hidden";if(c&&null!=q.guidesArrVer)for(d=0;d<q.guidesArrVer.length;d++)q.guidesArrVer[d].node.style.visibility="hidden"};if(1<F&&F==A.length-1){F=[];I=q.guidesArrHor;k=[];g=0;z=A[0]==t?1:0;L=A[z].y+A[z].height;if(0<D)for(z=0;z<A.length-1;z++)u=
A[z],M=A[z+1],t==u?(g=M.x-u.width-D,k.push(new mxPoint(g+u.width+K,L)),k.push(new mxPoint(M.x-K,L))):t==M?(k.push(new mxPoint(u.x+u.width+K,L)),g=u.x+u.width+D,k.push(new mxPoint(g-K,L))):(k.push(new mxPoint(u.x+u.width+K,L)),k.push(new mxPoint(M.x-K,L)));else u=A[0],z=A[2],g=u.x+u.width+(z.x-u.x-u.width-t.width)/2,k.push(new mxPoint(u.x+u.width+K,L)),k.push(new mxPoint(g-K,L)),k.push(new mxPoint(g+t.width+K,L)),k.push(new mxPoint(z.x-K,L));for(z=0;z<k.length;z+=2)A=k[z],D=k[z+1],A=v(A,D,null!=I?
-I[z/2]:null),A.node.style.visibility="visible",A.redraw(),G.push(A);for(z=k.length/2;null!=I&&z<I.length;z++)I[z].destroy();q.guidesArrHor=G;g-=c.x;k=!0}else F(!0);if(1<B&&B==x.length-1){G=[];I=q.guidesArrVer;p=[];f=0;z=x[0]==t?1:0;B=x[z].x+x[z].width;if(0<y)for(z=0;z<x.length-1;z++)u=x[z],M=x[z+1],t==u?(f=M.y-u.height-y,p.push(new mxPoint(B,f+u.height+K)),p.push(new mxPoint(B,M.y-K))):t==M?(p.push(new mxPoint(B,u.y+u.height+K)),f=u.y+u.height+y,p.push(new mxPoint(B,f-K))):(p.push(new mxPoint(B,u.y+
-u.height+K)),p.push(new mxPoint(B,M.y-K)));else u=x[0],z=x[2],f=u.y+u.height+(z.y-u.y-u.height-t.height)/2,p.push(new mxPoint(B,u.y+u.height+K)),p.push(new mxPoint(B,f-K)),p.push(new mxPoint(B,f+t.height+K)),p.push(new mxPoint(B,z.y-K));for(z=0;z<p.length;z+=2)A=p[z],D=p[z+1],A=v(A,D,null!=I?I[z/2]:null,!0),A.node.style.visibility="visible",A.redraw(),G.push(A);for(z=p.length/2;null!=I&&z<I.length;z++)I[z].destroy();q.guidesArrVer=G;f-=c.y;p=!0}else F(!1,!0)}if(k||p)return t=new mxPoint(g,f),x=b.call(this,
-c,t,e,m),k&&!p?t.y=x.y:p&&!k&&(t.x=x.x),x.y!=t.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),x.x!=t.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),t;F(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(b){e.call(this,b);var c=this.guidesArrVer,d=this.guidesArrHor;if(null!=c)for(var m=0;m<c.length;m++)c[m].node.style.visibility=b?"visible":"hidden";if(null!=
-d)for(m=0;m<d.length;m++)d[m].node.style.visibility=b?"visible":"hidden"};var d=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){d.call(this);var b=this.guidesArrVer,e=this.guidesArrHor;if(null!=b){for(var g=0;g<b.length;g++)b[g].destroy();this.guidesArrVer=null}if(null!=e){for(g=0;g<e.length;g++)e[g].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,d,c){function k(){var c=b.diagramContainer;q.style.top=c.offsetTop-l+"px";q.style.left=c.offsetLeft-l+"px";q.style.width=(d?0:c.offsetWidth)+l+"px";q.style.height=(d?c.offsetHeight:0)+l+"px"}function g(b,c,d){if(null!=m)return b;var e;return function(){var f=this,g=arguments,k=d&&!e;clearTimeout(e);e=setTimeout(function(){e=null;d||b.apply(f,g)},c);k&&b.apply(f,g)}}var m=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
-f=window.cancelAnimationFrame||window.mozCancelAnimationFrame,l=this.RULER_THICKNESS,n=this;this.unit=e;var p=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},q=document.createElement("div");q.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){p=Editor.isDarkMode()?{bkgClr:"#202020",
-outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};q.style.background=p.bkgClr;q.style[d?"borderRight":"borderBottom"]="0.5px solid "+p.strokeClr;q.style.borderLeft="0.5px solid "+p.strokeClr});this.updateStyle();document.body.appendChild(q);mxEvent.disableContextMenu(q);this.editorUiRefresh=b.refresh;b.refresh=function(c){n.editorUiRefresh.apply(b,
-arguments);k()};k();var t=document.createElement("canvas");t.width=q.offsetWidth;t.height=q.offsetHeight;q.style.overflow="hidden";t.style.position="relative";q.appendChild(t);var u=t.getContext("2d");this.ui=b;var v=b.editor.graph;this.graph=v;this.container=q;this.canvas=t;var x=function(b,c,e,f,g){b=Math.round(b);c=Math.round(c);e=Math.round(e);f=Math.round(f);u.beginPath();u.moveTo(b+.5,c+.5);u.lineTo(e+.5,f+.5);u.stroke();g&&(d?(u.save(),u.translate(b,c),u.rotate(-Math.PI/2),u.fillText(g,0,0),
-u.restore()):u.fillText(g,b,c))},A=function(){u.clearRect(0,0,t.width,t.height);u.beginPath();u.lineWidth=.7;u.strokeStyle=p.strokeClr;u.setLineDash([]);u.font="9px Arial";u.textAlign="center";var b=v.view.scale,c=v.view.getBackgroundPageBounds(),e=v.view.translate,f=v.pageVisible,e=f?l+(d?c.y-v.container.scrollTop:c.x-v.container.scrollLeft):l+(d?e.y*b-v.container.scrollTop:e.x*b-v.container.scrollLeft),g=0;f&&(g=v.getPageLayout(),g=d?g.y*v.pageFormat.height:g.x*v.pageFormat.width);var k,m,q;switch(n.unit){case mxConstants.POINTS:k=
-q=10;m=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:q=10;k=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:q=.5>=b||4<=b?8:16,k=mxConstants.PIXELS_PER_INCH/q,m=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=k;2<=b?y=k/(2*Math.floor(b/2)):.5>=b&&(y=k*Math.floor(1/b/2)*(n.unit==mxConstants.MILLIMETERS?2:1));k=null;c=f?Math.min(e+(d?c.height:c.width),d?t.height:t.width):d?t.height:t.width;if(f)if(u.fillStyle=p.outBkgClr,d){var z=e-l;0<z&&u.fillRect(0,l,l,z);c<t.height&&
-u.fillRect(0,c,l,t.height)}else z=e-l,0<z&&u.fillRect(l,0,z,l),c<t.width&&u.fillRect(c,0,t.width,l);u.fillStyle=p.fontClr;for(f=f?e:e%(y*b);f<=c;f+=y*b)if(z=Math.round((f-e)/b/y),!(f<l||z==k)){k=z;var A=null;0==z%q&&(A=n.formatText(g+z*y)+"");d?x(l-m[Math.abs(z)%q],f,l,f,A):x(f,l-m[Math.abs(z)%q],f,l,A)}u.lineWidth=1;x(d?0:l,d?l:0,l,l);u.fillStyle=p.cornerClr;u.fillRect(0,0,l,l)},z=-1,y=function(){null!=m?(null!=f&&f(z),z=m(A)):A()};this.drawRuler=y;this.sizeListener=e=g(function(){var b=v.container;
-d?(b=b.offsetHeight+l,t.height!=b&&(t.height=b,q.style.height=b+"px",y())):(b=b.offsetWidth+l,t.width!=b&&(t.width=b,q.style.width=b+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=c=g(function(){var b=d?v.container.scrollTop:v.container.scrollLeft;n.lastScroll!=b&&(n.lastScroll=b,y())},10);this.unitListener=function(b,c){n.setUnit(c.getProperty("unit"))};v.addListener(mxEvent.SIZE,e);v.container.addEventListener("scroll",c);v.view.addListener("unitChanged",this.unitListener);
-b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(b){p=b;q.style.background=p.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,f){var g;if(d&&4<b.height||!d&&4<b.width){if(null!=n.guidePart)try{u.putImageData(n.guidePart.imgData1,n.guidePart.x1,n.guidePart.y1),u.putImageData(n.guidePart.imgData2,n.guidePart.x2,n.guidePart.y2),u.putImageData(n.guidePart.imgData3,
-n.guidePart.x3,n.guidePart.y3)}catch(W){}g=n.origGuideMove.apply(this,arguments);try{var k,m,q,t,v,y,z,A,B;u.lineWidth=.5;u.strokeStyle=p.guideClr;u.setLineDash([2]);d?(m=b.y+g.y+l-this.graph.container.scrollTop,k=0,v=m+b.height/2,t=l/2,A=m+b.height,z=0,q=u.getImageData(k,m-1,l,3),x(k,m,l,m),m--,y=u.getImageData(t,v-1,l,3),x(t,v,l,v),v--,B=u.getImageData(z,A-1,l,3),x(z,A,l,A),A--):(m=0,k=b.x+g.x+l-this.graph.container.scrollLeft,v=l/2,t=k+b.width/2,A=0,z=k+b.width,q=u.getImageData(k-1,m,3,l),x(k,
-m,k,l),k--,y=u.getImageData(t-1,v,3,l),x(t,v,t,l),t--,B=u.getImageData(z-1,A,3,l),x(z,A,z,l),z--);if(null==n.guidePart||n.guidePart.x1!=k||n.guidePart.y1!=m)n.guidePart={imgData1:q,x1:k,y1:m,imgData2:y,x2:t,y2:v,imgData3:B,x3:z,y3:A}}catch(W){}}else g=n.origGuideMove.apply(this,arguments);return g};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var b=n.origGuideDestroy.apply(this,arguments);if(null!=n.guidePart)try{u.putImageData(n.guidePart.imgData1,n.guidePart.x1,
-n.guidePart.y1),u.putImageData(n.guidePart.imgData2,n.guidePart.x2,n.guidePart.y2),u.putImageData(n.guidePart.imgData3,n.guidePart.x3,n.guidePart.y3),n.guidePart=null}catch(C){}return b}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
+I[z/2]:null),A.node.style.visibility="visible",A.redraw(),F.push(A);for(z=k.length/2;null!=I&&z<I.length;z++)I[z].destroy();q.guidesArrHor=F;g-=c.x;k=!0}else G(!0);if(1<B&&B==y.length-1){F=[];I=q.guidesArrVer;p=[];f=0;z=y[0]==t?1:0;B=y[z].x+y[z].width;if(0<x)for(z=0;z<y.length-1;z++)u=y[z],M=y[z+1],t==u?(f=M.y-u.height-x,p.push(new mxPoint(B,f+u.height+K)),p.push(new mxPoint(B,M.y-K))):t==M?(p.push(new mxPoint(B,u.y+u.height+K)),f=u.y+u.height+x,p.push(new mxPoint(B,f-K))):(p.push(new mxPoint(B,u.y+
+u.height+K)),p.push(new mxPoint(B,M.y-K)));else u=y[0],z=y[2],f=u.y+u.height+(z.y-u.y-u.height-t.height)/2,p.push(new mxPoint(B,u.y+u.height+K)),p.push(new mxPoint(B,f-K)),p.push(new mxPoint(B,f+t.height+K)),p.push(new mxPoint(B,z.y-K));for(z=0;z<p.length;z+=2)A=p[z],D=p[z+1],A=v(A,D,null!=I?I[z/2]:null,!0),A.node.style.visibility="visible",A.redraw(),F.push(A);for(z=p.length/2;null!=I&&z<I.length;z++)I[z].destroy();q.guidesArrVer=F;f-=c.y;p=!0}else G(!1,!0)}if(k||p)return t=new mxPoint(g,f),y=b.call(this,
+c,t,e,n),k&&!p?t.y=y.y:p&&!k&&(t.x=y.x),y.y!=t.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),y.x!=t.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),t;G(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(b){e.call(this,b);var c=this.guidesArrVer,d=this.guidesArrHor;if(null!=c)for(var n=0;n<c.length;n++)c[n].node.style.visibility=b?"visible":"hidden";if(null!=
+d)for(n=0;n<d.length;n++)d[n].node.style.visibility=b?"visible":"hidden"};var d=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){d.call(this);var b=this.guidesArrVer,e=this.guidesArrHor;if(null!=b){for(var k=0;k<b.length;k++)b[k].destroy();this.guidesArrVer=null}if(null!=e){for(k=0;k<e.length;k++)e[k].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,d,c){function g(){var c=b.diagramContainer;q.style.top=c.offsetTop-l+"px";q.style.left=c.offsetLeft-l+"px";q.style.width=(d?0:c.offsetWidth)+l+"px";q.style.height=(d?c.offsetHeight:0)+l+"px"}function k(b,c,d){if(null!=n)return b;var e;return function(){var f=this,g=arguments,k=d&&!e;clearTimeout(e);e=setTimeout(function(){e=null;d||b.apply(f,g)},c);k&&b.apply(f,g)}}var n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+f=window.cancelAnimationFrame||window.mozCancelAnimationFrame,l=this.RULER_THICKNESS,m=this;this.unit=e;var p=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},q=document.createElement("div");q.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){p=Editor.isDarkMode()?{bkgClr:"#202020",
+outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};q.style.background=p.bkgClr;q.style[d?"borderRight":"borderBottom"]="0.5px solid "+p.strokeClr;q.style.borderLeft="0.5px solid "+p.strokeClr});this.updateStyle();document.body.appendChild(q);mxEvent.disableContextMenu(q);this.editorUiRefresh=b.refresh;b.refresh=function(c){m.editorUiRefresh.apply(b,
+arguments);g()};g();var t=document.createElement("canvas");t.width=q.offsetWidth;t.height=q.offsetHeight;q.style.overflow="hidden";t.style.position="relative";q.appendChild(t);var u=t.getContext("2d");this.ui=b;var v=b.editor.graph;this.graph=v;this.container=q;this.canvas=t;var y=function(b,c,e,f,g){b=Math.round(b);c=Math.round(c);e=Math.round(e);f=Math.round(f);u.beginPath();u.moveTo(b+.5,c+.5);u.lineTo(e+.5,f+.5);u.stroke();g&&(d?(u.save(),u.translate(b,c),u.rotate(-Math.PI/2),u.fillText(g,0,0),
+u.restore()):u.fillText(g,b,c))},A=function(){u.clearRect(0,0,t.width,t.height);u.beginPath();u.lineWidth=.7;u.strokeStyle=p.strokeClr;u.setLineDash([]);u.font="9px Arial";u.textAlign="center";var b=v.view.scale,c=v.view.getBackgroundPageBounds(),e=v.view.translate,f=v.pageVisible,e=f?l+(d?c.y-v.container.scrollTop:c.x-v.container.scrollLeft):l+(d?e.y*b-v.container.scrollTop:e.x*b-v.container.scrollLeft),g=0;f&&(g=v.getPageLayout(),g=d?g.y*v.pageFormat.height:g.x*v.pageFormat.width);var k,n,q;switch(m.unit){case mxConstants.POINTS:k=
+q=10;n=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:q=10;k=mxConstants.PIXELS_PER_MM;n=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:q=.5>=b||4<=b?8:16,k=mxConstants.PIXELS_PER_INCH/q,n=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var x=k;2<=b?x=k/(2*Math.floor(b/2)):.5>=b&&(x=k*Math.floor(1/b/2)*(m.unit==mxConstants.MILLIMETERS?2:1));k=null;c=f?Math.min(e+(d?c.height:c.width),d?t.height:t.width):d?t.height:t.width;if(f)if(u.fillStyle=p.outBkgClr,d){var z=e-l;0<z&&u.fillRect(0,l,l,z);c<t.height&&
+u.fillRect(0,c,l,t.height)}else z=e-l,0<z&&u.fillRect(l,0,z,l),c<t.width&&u.fillRect(c,0,t.width,l);u.fillStyle=p.fontClr;for(f=f?e:e%(x*b);f<=c;f+=x*b)if(z=Math.round((f-e)/b/x),!(f<l||z==k)){k=z;var A=null;0==z%q&&(A=m.formatText(g+z*x)+"");d?y(l-n[Math.abs(z)%q],f,l,f,A):y(f,l-n[Math.abs(z)%q],f,l,A)}u.lineWidth=1;y(d?0:l,d?l:0,l,l);u.fillStyle=p.cornerClr;u.fillRect(0,0,l,l)},z=-1,x=function(){null!=n?(null!=f&&f(z),z=n(A)):A()};this.drawRuler=x;this.sizeListener=e=k(function(){var b=v.container;
+d?(b=b.offsetHeight+l,t.height!=b&&(t.height=b,q.style.height=b+"px",x())):(b=b.offsetWidth+l,t.width!=b&&(t.width=b,q.style.width=b+"px",x()))},10);this.pageListener=function(){x()};this.scrollListener=c=k(function(){var b=d?v.container.scrollTop:v.container.scrollLeft;m.lastScroll!=b&&(m.lastScroll=b,x())},10);this.unitListener=function(b,c){m.setUnit(c.getProperty("unit"))};v.addListener(mxEvent.SIZE,e);v.container.addEventListener("scroll",c);v.view.addListener("unitChanged",this.unitListener);
+b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(b){p=b;q.style.background=p.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,f){var g;if(d&&4<b.height||!d&&4<b.width){if(null!=m.guidePart)try{u.putImageData(m.guidePart.imgData1,m.guidePart.x1,m.guidePart.y1),u.putImageData(m.guidePart.imgData2,m.guidePart.x2,m.guidePart.y2),u.putImageData(m.guidePart.imgData3,
+m.guidePart.x3,m.guidePart.y3)}catch(W){}g=m.origGuideMove.apply(this,arguments);try{var k,n,q,t,v,x,z,A,B;u.lineWidth=.5;u.strokeStyle=p.guideClr;u.setLineDash([2]);d?(n=b.y+g.y+l-this.graph.container.scrollTop,k=0,v=n+b.height/2,t=l/2,A=n+b.height,z=0,q=u.getImageData(k,n-1,l,3),y(k,n,l,n),n--,x=u.getImageData(t,v-1,l,3),y(t,v,l,v),v--,B=u.getImageData(z,A-1,l,3),y(z,A,l,A),A--):(n=0,k=b.x+g.x+l-this.graph.container.scrollLeft,v=l/2,t=k+b.width/2,A=0,z=k+b.width,q=u.getImageData(k-1,n,3,l),y(k,
+n,k,l),k--,x=u.getImageData(t-1,v,3,l),y(t,v,t,l),t--,B=u.getImageData(z-1,A,3,l),y(z,A,z,l),z--);if(null==m.guidePart||m.guidePart.x1!=k||m.guidePart.y1!=n)m.guidePart={imgData1:q,x1:k,y1:n,imgData2:x,x2:t,y2:v,imgData3:B,x3:z,y3:A}}catch(W){}}else g=m.origGuideMove.apply(this,arguments);return g};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var b=m.origGuideDestroy.apply(this,arguments);if(null!=m.guidePart)try{u.putImageData(m.guidePart.imgData1,m.guidePart.x1,
+m.guidePart.y1),u.putImageData(m.guidePart.imgData2,m.guidePart.x2,m.guidePart.y2),u.putImageData(m.guidePart.imgData3,m.guidePart.x3,m.guidePart.y3),m.guidePart=null}catch(C){}return b}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,e){var d=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return d};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,e,!0);this.hRuler=new mxRuler(b,e,!1,!0);var c=mxUtils.bind(this,function(c){var d=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
function(c){d=null!=b.currentMenu;mxEvent.consume(c)}),null,mxUtils.bind(this,function(e){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(e)||mxEvent.isPopupTrigger(e))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(e)||!d){var f=new mxPopupMenu(mxUtils.bind(this,function(c,d){b.menus.addMenuItems(c,["points","millimeters"],d)}));f.div.className+=" geMenubarMenu";f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=
mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);b.resetCurrentMenu();f.destroy()});var g=mxEvent.getClientX(e),k=mxEvent.getClientY(e);f.popup(g,k,null,e);b.setCurrentMenu(f,c)}mxEvent.consume(e)}}))});c(this.hRuler.container);c(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var d=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,k=[],g,m=[],f,l=!1,n=!0,p=!0,q=!0,t=!0,u=[],v=!1,x=!0;this.setClosedPath=function(b){l=b};this.setAutoClose=function(b){n=b};this.setAutoInsert=function(b){p=b};this.setAutoScroll=function(b){q=b};this.setOpenFill=function(b){t=b};this.setStopClickEnabled=
-function(b){x=b};this.setSmoothing=function(b){d=b};var A=function(c){v=c;b.getRubberband().setEnabled(!c);b.graphHandler.setSelectEnabled(!c);b.graphHandler.setMoveEnabled(!c);b.container.style.cursor=c?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){A(!0)};this.isDrawing=function(){return v};var z=mxUtils.bind(this,function(b){if(c){var d=f.length,e=x&&0<m.length&&null!=f&&2>f.length;e||m.push.apply(m,f);f=[];m.push(null);k.push(c);c=null;(e||
-p)&&this.stopDrawing();p&&2<=d&&this.startDrawing();mxEvent.consume(b)}});this.createStyle=function(b){return mxConstants.STYLE_SHAPE+"="+b+";fillColor=none;"};this.stopDrawing=function(){if(0<k.length){for(var d=m[0].x,e=m[0].x,f=m[0].y,g=m[0].y,p=1;p<m.length;p++)null!=m[p]&&(d=Math.max(d,m[p].x),e=Math.min(e,m[p].x),f=Math.max(f,m[p].y),g=Math.min(g,m[p].y));d-=e;f-=g;if(0<d&&0<f){var q=100/d,u=100/f;m.map(function(b){if(null==b)return b;b.x=(b.x-e)*q;b.y=(b.y-g)*u;return b});for(var v='<shape strokewidth="inherit"><foreground>',
-x=0,p=0;p<m.length;p++){var y=m[p];if(null==y){var y=!1,x=m[x],z=m[p-1];!l&&n&&(y=x.x-z.x,z=x.y-z.y,y=Math.sqrt(y*y+z*z)<=b.tolerance);if(l||y)v+='<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>';v+="</path>"+(t||l||y?"<fillstroke/>":"<stroke/>");x=p+1}else v=p==x?v+('<path><move x="'+y.x.toFixed(2)+'" y="'+y.y.toFixed(2)+'"/>'):v+('<line x="'+y.x.toFixed(2)+'" y="'+y.y.toFixed(2)+'"/>')}v+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){p=this.createStyle("stencil("+
-Graph.compress(v)+")");v=b.view.scale;x=b.view.translate;d=new mxCell("",new mxGeometry(e/v-x.x,g/v-x.y,d/v,f/v),p);d.vertex=1;b.model.beginUpdate();try{d=b.addCell(d),b.fireEvent(new mxEventObject("cellsInserted","cells",[d])),b.fireEvent(new mxEventObject("freehandInserted","cell",d))}finally{b.model.endUpdate()}b.setSelectionCells([d])}}for(p=0;p<k.length;p++)k[p].parentNode.removeChild(k[p]);c=null;k=[];m=[]}A(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){var d=c.getProperty("eventName"),
-e=c.getProperty("event");d==mxEvent.MOUSE_MOVE&&v&&(null!=e.sourceState&&e.sourceState.setCursor("crosshair"),e.consume())}));var y=new mxCell;y.edge=!0;b.addMouseListener({mouseDown:mxUtils.bind(this,function(d,k){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var l=k.getEvent();if(v&&!mxEvent.isPopupTrigger(l)&&!mxEvent.isMultiTouchEvent(l)){var n=b.getCurrentCellStyle(y),p=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),p=Math.max(1,p*b.view.scale);c=document.createElementNS("http://www.w3.org/2000/svg",
-"path");c.setAttribute("fill","none");c.setAttribute("stroke",mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,"#000")));c.setAttribute("stroke-width",p);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(n=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",n=n.split(" ").map(function(b){return parseFloat(b)*p}).join(" "),c.setAttribute("stroke-dasharray",n));u=[];l=B(l);C(l);g="M"+l.x+" "+l.y;m.push(l);f=[];c.setAttribute("d",
-g);e.appendChild(c);k.consume()}}}),mouseMove:mxUtils.bind(this,function(d,e){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var k=e.getEvent(),k=B(k);C(k);var l=E(0);if(l){g+=" L"+l.x+" "+l.y;m.push(l);var n="";f=[];for(var p=2;p<u.length;p+=2)l=E(p),n+=" L"+l.x+" "+l.y,f.push(l);c.setAttribute("d",g+n)}q&&(l=b.view.translate,b.scrollRectToVisible((new mxRectangle(k.x-l.x,k.y-l.y)).grow(20)));e.consume()}}),mouseUp:mxUtils.bind(this,function(d,e){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var d=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,g=[],k,n=[],f,l=!1,m=!0,p=!0,q=!0,t=!0,u=[],v=!1,y=!0;this.setClosedPath=function(b){l=b};this.setAutoClose=function(b){m=b};this.setAutoInsert=function(b){p=b};this.setAutoScroll=function(b){q=b};this.setOpenFill=function(b){t=b};this.setStopClickEnabled=
+function(b){y=b};this.setSmoothing=function(b){d=b};var A=function(c){v=c;b.getRubberband().setEnabled(!c);b.graphHandler.setSelectEnabled(!c);b.graphHandler.setMoveEnabled(!c);b.container.style.cursor=c?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){A(!0)};this.isDrawing=function(){return v};var z=mxUtils.bind(this,function(b){if(c){var d=f.length,e=y&&0<n.length&&null!=f&&2>f.length;e||n.push.apply(n,f);f=[];n.push(null);g.push(c);c=null;(e||
+p)&&this.stopDrawing();p&&2<=d&&this.startDrawing();mxEvent.consume(b)}});this.createStyle=function(b){return mxConstants.STYLE_SHAPE+"="+b+";fillColor=none;"};this.stopDrawing=function(){if(0<g.length){for(var d=n[0].x,e=n[0].x,f=n[0].y,k=n[0].y,p=1;p<n.length;p++)null!=n[p]&&(d=Math.max(d,n[p].x),e=Math.min(e,n[p].x),f=Math.max(f,n[p].y),k=Math.min(k,n[p].y));d-=e;f-=k;if(0<d&&0<f){var q=100/d,u=100/f;n.map(function(b){if(null==b)return b;b.x=(b.x-e)*q;b.y=(b.y-k)*u;return b});for(var v='<shape strokewidth="inherit"><foreground>',
+x=0,p=0;p<n.length;p++){var y=n[p];if(null==y){var y=!1,x=n[x],z=n[p-1];!l&&m&&(y=x.x-z.x,z=x.y-z.y,y=Math.sqrt(y*y+z*z)<=b.tolerance);if(l||y)v+='<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>';v+="</path>"+(t||l||y?"<fillstroke/>":"<stroke/>");x=p+1}else v=p==x?v+('<path><move x="'+y.x.toFixed(2)+'" y="'+y.y.toFixed(2)+'"/>'):v+('<line x="'+y.x.toFixed(2)+'" y="'+y.y.toFixed(2)+'"/>')}v+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){p=this.createStyle("stencil("+
+Graph.compress(v)+")");v=b.view.scale;x=b.view.translate;d=new mxCell("",new mxGeometry(e/v-x.x,k/v-x.y,d/v,f/v),p);d.vertex=1;b.model.beginUpdate();try{d=b.addCell(d),b.fireEvent(new mxEventObject("cellsInserted","cells",[d])),b.fireEvent(new mxEventObject("freehandInserted","cell",d))}finally{b.model.endUpdate()}b.setSelectionCells([d])}}for(p=0;p<g.length;p++)g[p].parentNode.removeChild(g[p]);c=null;g=[];n=[]}A(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){var d=c.getProperty("eventName"),
+e=c.getProperty("event");d==mxEvent.MOUSE_MOVE&&v&&(null!=e.sourceState&&e.sourceState.setCursor("crosshair"),e.consume())}));var x=new mxCell;x.edge=!0;b.addMouseListener({mouseDown:mxUtils.bind(this,function(d,g){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var l=g.getEvent();if(v&&!mxEvent.isPopupTrigger(l)&&!mxEvent.isMultiTouchEvent(l)){var m=b.getCurrentCellStyle(x),p=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),p=Math.max(1,p*b.view.scale);c=document.createElementNS("http://www.w3.org/2000/svg",
+"path");c.setAttribute("fill","none");c.setAttribute("stroke",mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(m,mxConstants.STYLE_STROKECOLOR,"#000")));c.setAttribute("stroke-width",p);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(m=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",m=m.split(" ").map(function(b){return parseFloat(b)*p}).join(" "),c.setAttribute("stroke-dasharray",m));u=[];l=B(l);C(l);k="M"+l.x+" "+l.y;n.push(l);f=[];c.setAttribute("d",
+k);e.appendChild(c);g.consume()}}}),mouseMove:mxUtils.bind(this,function(d,e){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var g=e.getEvent(),g=B(g);C(g);var l=E(0);if(l){k+=" L"+l.x+" "+l.y;n.push(l);var m="";f=[];for(var p=2;p<u.length;p+=2)l=E(p),m+=" L"+l.x+" "+l.y,f.push(l);c.setAttribute("d",k+m)}q&&(l=b.view.translate,b.scrollRectToVisible((new mxRectangle(g.x-l.x,g.y-l.y)).grow(20)));e.consume()}}),mouseUp:mxUtils.bind(this,function(d,e){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&
(z(e.getEvent()),e.consume())})});var B=function(c){return mxUtils.convertPoint(b.container,mxEvent.getClientX(c),mxEvent.getClientY(c))},C=function(b){for(u.push(b);u.length>d;)u.shift()},E=function(b){var c=u.length;if(1===c%2||c>=d){var e=0,f=0,g,k=0;for(g=b;g<c;g++)k++,b=u[g],e+=b.x,f+=b.y;return{x:e/k,y:f/k}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;
mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 2845d713..fd4c310d 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -7549,24 +7549,62 @@ var FreehandWindow = function(editorUi, x, y, w, h)
*/
var TagsWindow = function(editorUi, x, y, w, h)
{
- var tagsComponent = editorUi.createTagsDialog(mxUtils.bind(this, function()
+ var graph = editorUi.editor.graph;
+
+ var tagsComponent = editorUi.editor.graph.createTagsDialog(mxUtils.bind(this, function()
{
return this.window.isVisible();
- }));
+ }), null, function(allTags, updateFn)
+ {
+ if (graph.isEnabled())
+ {
+ var dlg = new FilenameDialog(editorUi, '', mxResources.get('add'), function(newValue)
+ {
+ editorUi.hideDialog();
+
+ if (newValue != null && newValue.length > 0)
+ {
+ var temp = newValue.split(' ');
+ var tags = [];
- var div = tagsComponent.div;
+ for (var i = 0; i < temp.length; i++)
+ {
+ var token = mxUtils.trim(temp[i]);
+
+ if (token != '' && mxUtils.indexOf(
+ allTags, token) < 0)
+ {
+ tags.push(token);
+ }
+ }
+ if (tags.length > 0)
+ {
+ if (graph.isSelectionEmpty())
+ {
+ updateFn(allTags.concat(tags));
+ }
+ else
+ {
+ graph.addTagsForCells(graph.getSelectionCells(), tags);
+ }
+ }
+ }
+ }, mxResources.get('enterValue') + ' (' + mxResources.get('tags') + ')');
+
+ editorUi.showDialog(dlg.container, 300, 80, true, true);
+ dlg.init();
+ }
+ });
+
+ var div = tagsComponent.div;
this.window = new mxWindow(mxResources.get('tags'), div, x, y, w, h, true, true);
+ this.window.minimumSize = new mxRectangle(0, 0, 212, 120);
this.window.destroyOnClose = false;
this.window.setMaximizable(false);
this.window.setResizable(true);
this.window.setClosable(true);
- this.window.contentWrapper.style.height = '100%';
- this.window.table.style.minWidth = '220px';
- this.window.div.style.minHeight = this.window.table.style.minHeight;
- this.window.div.style.minWidth = this.window.table.style.minWidth;
-
this.window.addListener('show', mxUtils.bind(this, function()
{
tagsComponent.refresh();
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index d2492abb..da85fb07 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -106,7 +106,7 @@
/**
* Used in the GraphViewer lightbox.
*/
- Editor.closeImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/delete.png' : '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';
+ Editor.closeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjZweCI+PGVsbGlwc2UgY3g9IjEyIiBjeT0iMTIiIHJ4PSI5IiByeT0iOSIgc3Ryb2tlPSJub25lIiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE0LjU5IDhMMTIgMTAuNTkgOS40MSA4IDggOS40MSAxMC41OSAxMiA4IDE0LjU5IDkuNDEgMTYgMTIgMTMuNDEgMTQuNTkgMTYgMTYgMTQuNTkgMTMuNDEgMTIgMTYgOS40MSAxNC41OSA4ek0xMiAyQzYuNDcgMiAyIDYuNDcgMiAxMnM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTBTMTcuNTMgMiAxMiAyem0wIDE4Yy00LjQxIDAtOC0zLjU5LTgtOHMzLjU5LTggOC04IDggMy41OSA4IDgtMy41OSA4LTggOHoiLz48L3N2Zz4=';
/**
*
@@ -169,44 +169,34 @@
Editor.facebookImage = IMAGE_PATH + '/facebook.png';
/**
- * Blank 1x1 pixel transparent PNG image.
+ *
*/
Editor.blankImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==';
/**
- * Blank 1x1 pixel transparent PNG image.
+ *
*/
Editor.hiResImage = (mxClient.IS_SVG) ? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=' : IMAGE_PATH + '/img-hi-res.png';
/**
- * Blank 1x1 pixel transparent PNG image.
+ *
*/
Editor.loResImage = (mxClient.IS_SVG) ? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==' : IMAGE_PATH + '/img-lo-res.png';
/**
- * Only needed in browsers with SVG support for export via lightbox toolbar.
+ *
*/
Editor.cameraLargeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE0LjEyIDRsMS44MyAySDIwdjEySDRWNmg0LjA1bDEuODMtMmg0LjI0TTE1IDJIOUw3LjE3IDRINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNmMxLjEgMCAyLS45IDItMlY2YzAtMS4xLS45LTItMi0yaC0zLjE3TDE1IDJ6bS0zIDdjMS42NSAwIDMgMS4zNSAzIDNzLTEuMzUgMy0zIDMtMy0xLjM1LTMtMyAxLjM1LTMgMy0zbTAtMmMtMi43NiAwLTUgMi4yNC01IDVzMi4yNCA1IDUgNSA1LTIuMjQgNS01LTIuMjQtNS01LTV6Ii8+PC9zdmc+';
/**
- * Only needed in browsers with SVG support for export via lightbox toolbar.
+ *
*/
Editor.tagsLargeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjM2cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjM2cHgiIGZpbGw9IiNGRkZGRkYiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+';
-
- /**
- *
- */
- Editor.visibleImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNUMxOS4xNyAxNC44NyAxNS43OSAxNyAxMiAxN3MtNy4xNy0yLjEzLTguODItNS41QzQuODMgOC4xMyA4LjIxIDYgMTIgNm0wLTJDNyA0IDIuNzMgNy4xMSAxIDExLjUgMi43MyAxNS44OSA3IDE5IDEyIDE5czkuMjctMy4xMSAxMS03LjVDMjEuMjcgNy4xMSAxNyA0IDEyIDR6bTAgNWMxLjM4IDAgMi41IDEuMTIgMi41IDIuNVMxMy4zOCAxNCAxMiAxNHMtMi41LTEuMTItMi41LTIuNVMxMC42MiA5IDEyIDltMC0yYy0yLjQ4IDAtNC41IDIuMDItNC41IDQuNVM5LjUyIDE2IDEyIDE2czQuNS0yLjAyIDQuNS00LjVTMTQuNDggNyAxMiA3eiIvPjwvc3ZnPg==';
-
- /**
- *
- */
- Editor.hiddenImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNS0uNTkgMS4yMi0xLjQyIDIuMjctMi40MSAzLjEybDEuNDEgMS40MWMxLjM5LTEuMjMgMi40OS0yLjc3IDMuMTgtNC41M0MyMS4yNyA3LjExIDE3IDQgMTIgNGMtMS4yNyAwLTIuNDkuMi0zLjY0LjU3bDEuNjUgMS42NUMxMC42NiA2LjA5IDExLjMyIDYgMTIgNnptLTEuMDcgMS4xNEwxMyA5LjIxYy41Ny4yNSAxLjAzLjcxIDEuMjggMS4yOGwyLjA3IDIuMDdjLjA4LS4zNC4xNC0uNy4xNC0xLjA3QzE2LjUgOS4wMSAxNC40OCA3IDEyIDdjLS4zNyAwLS43Mi4wNS0xLjA3LjE0ek0yLjAxIDMuODdsMi42OCAyLjY4QzMuMDYgNy44MyAxLjc3IDkuNTMgMSAxMS41IDIuNzMgMTUuODkgNyAxOSAxMiAxOWMxLjUyIDAgMi45OC0uMjkgNC4zMi0uODJsMy40MiAzLjQyIDEuNDEtMS40MUwzLjQyIDIuNDUgMi4wMSAzLjg3em03LjUgNy41bDIuNjEgMi42MWMtLjA0LjAxLS4wOC4wMi0uMTIuMDItMS4zOCAwLTIuNS0xLjEyLTIuNS0yLjUgMC0uMDUuMDEtLjA4LjAxLS4xM3ptLTMuNC0zLjRsMS43NSAxLjc1Yy0uMjMuNTUtLjM2IDEuMTUtLjM2IDEuNzggMCAyLjQ4IDIuMDIgNC41IDQuNSA0LjUuNjMgMCAxLjIzLS4xMyAxLjc3LS4zNmwuOTguOThjLS44OC4yNC0xLjguMzgtMi43NS4zOC0zLjc5IDAtNy4xNy0yLjEzLTguODItNS41LjctMS40MyAxLjcyLTIuNjEgMi45My0zLjUzeiIvPjwvc3ZnPg==';
-
+
/**
- *
+ *
*/
- Editor.clearImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDYuNDFMMTcuNTkgNSAxMiAxMC41OSA2LjQxIDUgNSA2LjQxIDEwLjU5IDEyIDUgMTcuNTkgNi40MSAxOSAxMiAxMy40MSAxNy41OSAxOSAxOSAxNy41OSAxMy40MSAxMiAxOSA2LjQxeiIvPjwvc3ZnPg==';
+ Editor.tagsImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE4cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+';
/**
* Broken image symbol for offline SVG.
@@ -5846,6 +5836,397 @@
}
};
+ Graph.prototype.createTagsDialog = function(isEnabled, invert, addFn)
+ {
+ var graph = this;
+ var allTags = graph.hiddenTags.slice();
+
+ var div = document.createElement('div');
+ div.style.userSelect = 'none';
+ div.style.overflow = 'hidden';
+ div.style.padding = '10px';
+ div.style.height = '100%';
+
+ var tagCloud = document.createElement('div');
+ tagCloud.style.boxSizing = 'border-box';
+ tagCloud.style.borderRadius = '4px';
+ tagCloud.style.userSelect = 'none';
+ tagCloud.style.overflow = 'auto';
+ tagCloud.style.position = 'absolute';
+ tagCloud.style.left = '10px';
+ tagCloud.style.right = '10px';
+ tagCloud.style.top = '10px';
+ tagCloud.style.border = (graph.isEnabled()) ? '1px solid #808080' : 'none';
+ tagCloud.style.bottom = (graph.isEnabled()) ? '48px' : '10px';
+
+ div.appendChild(tagCloud);
+
+ function removeInvisibleSelectionCells()
+ {
+ var cells = graph.getSelectionCells();
+ var visible = [];
+
+ for (var i = 0; i < cells.length; i++)
+ {
+ if (graph.isCellVisible(cells[i]))
+ {
+ visible.push(cells[i]);
+ }
+ }
+
+ graph.setSelectionCells(visible);
+ };
+
+ function setAllVisible(visible)
+ {
+ if (visible)
+ {
+ graph.hiddenTags = [];
+ }
+ else
+ {
+ graph.hiddenTags = allTags.slice();
+ }
+
+ removeInvisibleSelectionCells();
+ graph.refresh();
+ };
+
+ var resetBtn = mxUtils.button(mxResources.get('reset'), function(evt)
+ {
+ graph.hiddenTags = [];
+
+ if (!mxEvent.isShiftDown(evt))
+ {
+ allTags = graph.hiddenTags.slice();
+ }
+
+ removeInvisibleSelectionCells();
+ graph.refresh();
+ });
+
+ resetBtn.setAttribute('title', mxResources.get('reset'));
+ resetBtn.className = 'geBtn';
+ resetBtn.style.margin = '0 4px 0 0';
+
+ var addBtn = mxUtils.button(mxResources.get('add'), function()
+ {
+ if (addFn != null)
+ {
+ // Takes all tags and callback to update all tags
+ addFn(allTags, function(newAllTags)
+ {
+ allTags = newAllTags;
+ refreshUi();
+ });
+ }
+ });
+ addBtn.setAttribute('title', mxResources.get('add'));
+ addBtn.className = 'geBtn';
+ addBtn.style.margin = '0';
+
+ graph.addListener(mxEvent.ROOT, function()
+ {
+ allTags = graph.hiddenTags.slice();
+ });
+
+ function refreshTags(tags, selected)
+ {
+ tagCloud.innerHTML = '';
+
+ if (tags.length > 0)
+ {
+ var table = document.createElement('table');
+ table.setAttribute('cellpadding', '2');
+ table.style.boxSizing = 'border-box';
+ table.style.tableLayout = 'fixed';
+ table.style.width = '100%';
+
+ var tbody = document.createElement('tbody');
+
+ if (tags != null && tags.length > 0)
+ {
+ for (var i = 0; i < tags.length; i++)
+ {
+ (function(tag)
+ {
+ function setTagVisible()
+ {
+ var temp = allTags.slice();
+ var index = mxUtils.indexOf(temp, tag);
+ temp.splice(index, 1);
+ graph.hiddenTags = temp;
+ removeInvisibleSelectionCells();
+ graph.refresh();
+ };
+
+ function selectCells()
+ {
+ var cells = graph.getCellsForTags(
+ [tag], null, null, true);
+
+ if (graph.isEnabled())
+ {
+ graph.setSelectionCells(cells);
+ }
+ else
+ {
+ graph.highlightCells(cells);
+ }
+ };
+
+ var visible = mxUtils.indexOf(graph.hiddenTags, tag) < 0;
+ var row = document.createElement('tr');
+ var td = document.createElement('td');
+ td.style.align = 'center';
+ td.style.width = '16px';
+
+ var img = document.createElement('img');
+ img.setAttribute('src', visible ? Editor.visibleImage : Editor.hiddenImage);
+ img.setAttribute('title', mxResources.get(visible ? 'hideIt' : 'show', [tag]));
+ mxUtils.setOpacity(img, visible ? 75 : 25);
+ img.style.verticalAlign = 'middle';
+ img.style.cursor = 'pointer';
+ img.style.width = '16px';
+
+ if (invert || Editor.isDarkMode())
+ {
+ img.style.filter = 'invert(100%)';
+ }
+
+ td.appendChild(img);
+
+ mxEvent.addListener(img, 'click', function(evt)
+ {
+ var idx = mxUtils.indexOf(graph.hiddenTags, tag);
+
+ if (mxEvent.isShiftDown(evt))
+ {
+ setAllVisible(mxUtils.indexOf(graph.hiddenTags, tag) >= 0);
+ }
+ else
+ {
+ if (idx < 0)
+ {
+ graph.hiddenTags.push(tag);
+ }
+ else if (idx >= 0)
+ {
+ graph.hiddenTags.splice(idx, 1);
+ }
+
+ removeInvisibleSelectionCells();
+ graph.refresh();
+ }
+
+ mxEvent.consume(evt);
+ });
+
+ mxEvent.addListener(img, 'dblclick', function(evt)
+ {
+ if (!mxEvent.isShiftDown(evt))
+ {
+ if (!visible && graph.hiddenTags.length > 0)
+ {
+ setAllVisible(true);
+ }
+ else
+ {
+ setTagVisible();
+ }
+ }
+
+ mxEvent.consume(evt);
+ });
+
+ row.appendChild(td);
+
+ td = document.createElement('td');
+ td.style.overflow = 'hidden';
+ td.style.whiteSpace = 'nowrap';
+ td.style.textOverflow = 'ellipsis';
+ td.style.verticalAlign = 'middle';
+ td.style.cursor = 'pointer';
+ td.setAttribute('title', tag);
+
+ a = document.createElement('a');
+ mxUtils.write(a, tag);
+ a.style.textOverflow = 'ellipsis';
+ a.style.position = 'relative';
+ mxUtils.setOpacity(a, visible ? 100 : 40);
+ td.appendChild(a);
+
+ mxEvent.addListener(td, 'click', (function(evt)
+ {
+ if (mxEvent.isShiftDown(evt))
+ {
+ setAllVisible(true);
+ selectCells();
+ }
+ else
+ {
+ if (visible && graph.hiddenTags.length > 0)
+ {
+ setAllVisible(true);
+ }
+ else
+ {
+ setTagVisible();
+ }
+ }
+
+ mxEvent.consume(evt);
+ }));
+
+ mxEvent.addListener(td, 'dblclick', function(evt)
+ {
+ setAllVisible(true);
+ selectCells();
+ mxEvent.consume(evt);
+ });
+
+ row.appendChild(td);
+
+ if (graph.isEnabled())
+ {
+ td = document.createElement('td');
+ td.style.verticalAlign = 'middle';
+ td.style.textAlign = 'center';
+ td.style.width = '18px';
+
+ if (selected == null)
+ {
+ td.style.align = 'center';
+ td.style.width = '16px';
+
+ var img = document.createElement('img');
+ img.setAttribute('src', Editor.crossImage);
+ img.setAttribute('title', mxResources.get('removeIt', [tag]));
+ mxUtils.setOpacity(img, visible ? 75 : 25);
+ img.style.verticalAlign = 'middle';
+ img.style.cursor = 'pointer';
+ img.style.width = '16px';
+
+ if (invert || Editor.isDarkMode())
+ {
+ img.style.filter = 'invert(100%)';
+ }
+
+ mxEvent.addListener(img, 'click', function(evt)
+ {
+ var idx = mxUtils.indexOf(allTags, tag);
+
+ if (idx >= 0)
+ {
+ allTags.splice(idx, 1);
+ }
+
+ graph.removeTagsForCells(
+ graph.model.getDescendants(
+ graph.model.getRoot()), [tag]);
+ graph.refresh();
+
+ mxEvent.consume(evt);
+ });
+
+ td.appendChild(img);
+ }
+ else
+ {
+ var cb2 = document.createElement('input');
+ cb2.setAttribute('type', 'checkbox');
+ cb2.style.margin = '0px';
+
+ cb2.defaultChecked = (selected != null &&
+ mxUtils.indexOf(selected, tag) >= 0);
+ cb2.checked = cb2.defaultChecked;
+ cb2.style.background = 'transparent';
+ cb2.setAttribute('title', mxResources.get(
+ cb2.defaultChecked ?
+ 'removeIt' : 'add', [tag]));
+
+ mxEvent.addListener(cb2, 'change', function(evt)
+ {
+ if (cb2.checked)
+ {
+ graph.addTagsForCells(graph.getSelectionCells(), [tag]);
+ }
+ else
+ {
+ graph.removeTagsForCells(graph.getSelectionCells(), [tag]);
+ }
+
+ mxEvent.consume(evt);
+ });
+
+ td.appendChild(cb2);
+ }
+
+ row.appendChild(td);
+ }
+
+ tbody.appendChild(row);
+ })(tags[i]);
+ }
+ }
+
+ table.appendChild(tbody);
+ tagCloud.appendChild(table);
+ }
+ };
+
+ var refreshUi = mxUtils.bind(this, function(sender, evt)
+ {
+ if (isEnabled())
+ {
+ var tags = graph.getAllTags();
+
+ for (var i = 0; i < tags.length; i++)
+ {
+ if (mxUtils.indexOf(allTags, tags[i]) < 0)
+ {
+ allTags.push(tags[i]);
+ }
+ }
+
+ allTags.sort();
+
+ if (graph.isSelectionEmpty())
+ {
+ refreshTags(allTags);
+ }
+ else
+ {
+ refreshTags(allTags, graph.getCommonTagsForCells(
+ graph.getSelectionCells()));
+ }
+ }
+ });
+
+ graph.selectionModel.addListener(mxEvent.CHANGE, refreshUi);
+ graph.model.addListener(mxEvent.CHANGE, refreshUi);
+ graph.addListener(mxEvent.REFRESH, refreshUi);
+
+ var footer = document.createElement('div');
+ footer.style.boxSizing = 'border-box';
+ footer.style.whiteSpace = 'nowrap';
+ footer.style.position = 'absolute';
+ footer.style.overflow = 'hidden';
+ footer.style.bottom = '0px';
+ footer.style.height = '42px';
+ footer.style.right = '10px';
+ footer.style.left = '10px';
+
+ if (graph.isEnabled())
+ {
+ footer.appendChild(resetBtn);
+ footer.appendChild(addBtn);
+ div.appendChild(footer);
+ }
+
+ return {div: div, refresh: refreshUi};
+ };
+
/**
* Returns all custom fonts (old and new).
*/
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 8d2c72fc..b4c855bd 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -652,7 +652,7 @@
status.style.whiteSpace = 'nowrap';
status.style.background = '#4B4243';
status.style.color = 'white';
- status.style.fontFamily = 'Helvetica, Arial';
+ status.style.fontFamily = Editor.defaultHtmlFont;
status.style.fontSize = '9pt';
status.style.padding = '6px';
status.style.paddingLeft = '10px';
@@ -4664,451 +4664,6 @@
};
/**
- * Creates and returns a dialog for tags and a refresh function.
- */
- EditorUi.prototype.createTagsDialog = function(isEnabled, invert)
- {
- var graph = this.editor.graph;
- var editorUi = this;
- var allTags = graph.hiddenTags.slice();
-
- var div = document.createElement('div');
- div.style.userSelect = 'none';
- div.style.overflow = 'hidden';
- div.style.padding = '10px';
- div.style.height = '100%';
-
- var tagCloud = document.createElement('div');
- tagCloud.style.boxSizing = 'border-box';
- tagCloud.style.borderRadius = '4px';
- tagCloud.style.userSelect = 'none';
- tagCloud.style.overflow = 'auto';
- tagCloud.style.position = 'absolute';
- tagCloud.style.left = '10px';
- tagCloud.style.right = '10px';
- tagCloud.style.top = '10px';
- tagCloud.style.border = (graph.isEnabled()) ? '1px solid #808080' : 'none';
- tagCloud.style.bottom = (graph.isEnabled()) ? '48px' : '10px';
-
- div.appendChild(tagCloud);
-
- function removeInvisibleSelectionCells()
- {
- var cells = graph.getSelectionCells();
- var visible = [];
-
- for (var i = 0; i < cells.length; i++)
- {
- if (graph.isCellVisible(cells[i]))
- {
- visible.push(cells[i]);
- }
- }
-
- graph.setSelectionCells(visible);
- };
-
- function setAllVisible(visible)
- {
- if (visible)
- {
- graph.hiddenTags = [];
- }
- else
- {
- graph.hiddenTags = allTags.slice();
- }
-
- removeInvisibleSelectionCells();
- graph.refresh();
- };
-
- var resetBtn = mxUtils.button(mxResources.get('reset'), function(evt)
- {
- graph.hiddenTags = [];
-
- if (!mxEvent.isShiftDown(evt))
- {
- allTags = graph.hiddenTags.slice();
- }
-
- removeInvisibleSelectionCells();
- graph.refresh();
- });
-
- resetBtn.setAttribute('title', mxResources.get('reset'));
- resetBtn.className = 'geBtn';
- resetBtn.style.marginRight = '4px';
- resetBtn.marginTop = '8px';
-
- var addBtn = mxUtils.button(mxResources.get('add'), function()
- {
- if (graph.isEnabled())
- {
- var dlg = new FilenameDialog(editorUi, '', mxResources.get('add'), function(newValue)
- {
- editorUi.hideDialog();
-
- if (newValue != null && newValue.length > 0)
- {
- var temp = newValue.split(' ');
- var tags = [];
-
- for (var i = 0; i < temp.length; i++)
- {
- var token = mxUtils.trim(temp[i]);
-
- if (token != '' && mxUtils.indexOf(
- allTags, token) < 0)
- {
- tags.push(token);
- }
- }
-
- if (tags.length > 0)
- {
- if (graph.isSelectionEmpty())
- {
- allTags = allTags.concat(tags);
- refreshUi();
- }
- else
- {
- graph.addTagsForCells(graph.getSelectionCells(), tags);
- }
- }
- }
- }, mxResources.get('enterValue') + ' (' + mxResources.get('tags') + ')');
-
- editorUi.showDialog(dlg.container, 300, 80, true, true);
- dlg.init();
- }
- });
-
- addBtn.setAttribute('title', mxResources.get('add'));
- addBtn.className = 'geBtn';
- addBtn.marginTop = '4px';
-
- graph.addListener(mxEvent.ROOT, function()
- {
- allTags = graph.hiddenTags.slice();
- });
-
- function refreshTags(tags, selected)
- {
- tagCloud.innerHTML = '';
-
- if (tags.length > 0)
- {
- var table = document.createElement('table');
- table.setAttribute('cellpadding', '2');
- table.style.boxSizing = 'border-box';
- table.style.tableLayout = 'fixed';
- table.style.width = '100%';
-
- var tbody = document.createElement('tbody');
-
- if (tags != null && tags.length > 0)
- {
- for (var i = 0; i < tags.length; i++)
- {
- (function(tag)
- {
- function setTagVisible()
- {
- var temp = allTags.slice();
- var index = mxUtils.indexOf(temp, tag);
- temp.splice(index, 1);
- graph.hiddenTags = temp;
- removeInvisibleSelectionCells();
- graph.refresh();
- };
-
- function selectCells()
- {
- var cells = graph.getCellsForTags(
- [tag], null, null, true);
-
- if (graph.isEnabled())
- {
- graph.setSelectionCells(cells);
- }
- else
- {
- graph.highlightCells(cells);
- }
- };
-
- var visible = mxUtils.indexOf(graph.hiddenTags, tag) < 0;
- var row = document.createElement('tr');
- var td = document.createElement('td');
- td.style.align = 'center';
- td.style.width = '16px';
-
- var img = document.createElement('img');
- img.setAttribute('src', visible ? Editor.visibleImage : Editor.hiddenImage);
- img.setAttribute('title', mxResources.get(visible ? 'hideIt' : 'show', [tag]));
- mxUtils.setOpacity(img, visible ? 75 : 25);
- img.style.verticalAlign = 'middle';
- img.style.cursor = 'pointer';
- img.style.width = '16px';
-
- if (invert || Editor.isDarkMode())
- {
- img.style.filter = 'invert(100%)';
- }
-
- td.appendChild(img);
-
- mxEvent.addListener(img, 'click', function(evt)
- {
- var idx = mxUtils.indexOf(graph.hiddenTags, tag);
-
- if (mxEvent.isShiftDown(evt))
- {
- setAllVisible(mxUtils.indexOf(graph.hiddenTags, tag) >= 0);
- }
- else
- {
- if (idx < 0)
- {
- graph.hiddenTags.push(tag);
- }
- else if (idx >= 0)
- {
- graph.hiddenTags.splice(idx, 1);
- }
-
- removeInvisibleSelectionCells();
- graph.refresh();
- }
-
- mxEvent.consume(evt);
- });
-
- mxEvent.addListener(img, 'dblclick', function(evt)
- {
- if (!mxEvent.isShiftDown(evt))
- {
- if (!visible && graph.hiddenTags.length > 0)
- {
- setAllVisible(true);
- }
- else
- {
- setTagVisible();
- }
- }
-
- mxEvent.consume(evt);
- });
-
- row.appendChild(td);
-
- td = document.createElement('td');
- td.style.overflow = 'hidden';
- td.style.whiteSpace = 'nowrap';
- td.style.textOverflow = 'ellipsis';
- td.style.verticalAlign = 'middle';
- td.style.cursor = 'pointer';
- td.setAttribute('title', tag);
-
- a = document.createElement('a');
- mxUtils.write(a, tag);
- a.style.textOverflow = 'ellipsis';
- a.style.position = 'relative';
- mxUtils.setOpacity(a, visible ? 100 : 40);
- td.appendChild(a);
-
- mxEvent.addListener(td, 'click', (function(evt)
- {
- if (mxEvent.isShiftDown(evt))
- {
- setAllVisible(true);
- selectCells();
- }
- else
- {
- if (visible && graph.hiddenTags.length > 0)
- {
- setAllVisible(true);
- }
- else
- {
- setTagVisible();
- }
- }
-
- mxEvent.consume(evt);
- }));
-
- mxEvent.addListener(td, 'dblclick', function(evt)
- {
- setAllVisible(true);
- selectCells();
- mxEvent.consume(evt);
- });
-
- row.appendChild(td);
-
- if (graph.isEnabled())
- {
- td = document.createElement('td');
- td.style.verticalAlign = 'middle';
- td.style.textAlign = 'center';
- td.style.width = '18px';
-
- if (selected == null)
- {
- td.style.align = 'center';
- td.style.width = '16px';
-
- var img = document.createElement('img');
- img.setAttribute('src', Editor.clearImage);
- img.setAttribute('title', mxResources.get('removeIt', [tag]));
- mxUtils.setOpacity(img, visible ? 75 : 25);
- img.style.verticalAlign = 'middle';
- img.style.cursor = 'pointer';
- img.style.width = '16px';
-
- if (invert || Editor.isDarkMode())
- {
- img.style.filter = 'invert(100%)';
- }
-
- mxEvent.addListener(img, 'click', function(evt)
- {
- var idx = mxUtils.indexOf(allTags, tag);
-
- if (idx >= 0)
- {
- allTags.splice(idx, 1);
- }
-
- graph.removeTagsForCells(
- graph.model.getDescendants(
- graph.model.getRoot()), [tag]);
- graph.refresh();
-
- mxEvent.consume(evt);
- });
-
- td.appendChild(img);
- }
- else
- {
- var cb2 = document.createElement('input');
- cb2.setAttribute('type', 'checkbox');
- cb2.style.margin = '0px';
-
- cb2.defaultChecked = (selected != null &&
- mxUtils.indexOf(selected, tag) >= 0);
- cb2.checked = cb2.defaultChecked;
- cb2.style.background = 'transparent';
- cb2.setAttribute('title', mxResources.get(
- cb2.defaultChecked ?
- 'removeIt' : 'add', [tag]));
-
- mxEvent.addListener(cb2, 'change', function(evt)
- {
- if (cb2.checked)
- {
- graph.addTagsForCells(graph.getSelectionCells(), [tag]);
- }
- else
- {
- graph.removeTagsForCells(graph.getSelectionCells(), [tag]);
- }
-
- mxEvent.consume(evt);
- });
-
- td.appendChild(cb2);
- }
-
- row.appendChild(td);
- }
-
- tbody.appendChild(row);
- })(tags[i]);
- }
- }
-
- table.appendChild(tbody);
- tagCloud.appendChild(table);
- }
- };
-
- var refreshUi = mxUtils.bind(this, function(sender, evt)
- {
- if (isEnabled())
- {
- var tags = graph.getAllTags();
-
- for (var i = 0; i < tags.length; i++)
- {
- if (mxUtils.indexOf(allTags, tags[i]) < 0)
- {
- allTags.push(tags[i]);
- }
- }
-
- allTags.sort();
-
- if (graph.isSelectionEmpty())
- {
- refreshTags(allTags);
- }
- else
- {
- refreshTags(allTags, graph.getCommonTagsForCells(
- graph.getSelectionCells()));
- }
- }
- });
-
- graph.selectionModel.addListener(mxEvent.CHANGE, refreshUi);
- graph.model.addListener(mxEvent.CHANGE, refreshUi);
- graph.addListener(mxEvent.REFRESH, refreshUi);
-
- var footer = document.createElement('div');
- footer.style.boxSizing = 'border-box';
- footer.style.whiteSpace = 'nowrap';
- footer.style.position = 'absolute';
- footer.style.overflow = 'hidden';
- footer.style.bottom = '0px';
- footer.style.height = '42px';
- footer.style.right = '10px';
- footer.style.left = '10px';
-
- // TODO: Write help topic and add link
- /*
- var helpBtn = mxUtils.button(mxResources.get('help'), function()
- {
- editorUi.openLink('');
- });
-
- helpBtn.className = 'geBtn';
- helpBtn.style.marginRight = '4px';
-
- if (editorUi.isOffline() && !mxClient.IS_CHROMEAPP)
- {
- helpBtn.style.display = 'none';
- }
-
- footer.appendChild(helpBtn);*/
-
- if (graph.isEnabled())
- {
- footer.appendChild(resetBtn);
- footer.appendChild(addBtn);
- div.appendChild(footer);
- }
-
- return {div: div, refresh: refreshUi};
- };
-
- /**
* Creates a temporary graph instance for rendering off-screen content.
*/
EditorUi.prototype.addChromelessToolbarItems = function(addButton)
@@ -5122,18 +4677,24 @@
{
if (this.tagsComponent == null)
{
- this.tagsComponent = this.createTagsDialog(mxUtils.bind(this, function()
+ this.tagsComponent = this.editor.graph.createTagsDialog(mxUtils.bind(this, function()
{
return this.tagsDialog != null;
}), true);
this.tagsComponent.div.getElementsByTagName('div')[0].style.position = '';
+ mxUtils.setPrefixedStyle(this.tagsComponent.div.style, 'borderRadius', '5px');
this.tagsComponent.div.className = 'geScrollable';
this.tagsComponent.div.style.maxHeight = '160px';
this.tagsComponent.div.style.maxWidth = '120px';
this.tagsComponent.div.style.padding = '4px';
this.tagsComponent.div.style.overflow = 'auto';
this.tagsComponent.div.style.height = 'auto';
+ this.tagsComponent.div.style.position = 'fixed';
+ this.tagsComponent.div.style.fontFamily = Editor.defaultHtmlFont;
+ this.tagsComponent.div.style.backgroundColor = '#000000';
+ this.tagsComponent.div.style.color = '#ffffff';
+ mxUtils.setOpacity(this.tagsComponent.div, 70);
}
if (this.tagsDialog != null)
@@ -5155,13 +4716,6 @@
}));
var r = tagsButton.getBoundingClientRect();
-
- mxUtils.setPrefixedStyle(this.tagsDialog.style, 'borderRadius', '5px');
- this.tagsDialog.style.position = 'fixed';
- this.tagsDialog.style.fontFamily = 'Helvetica,Arial';
- this.tagsDialog.style.backgroundColor = '#000000';
- this.tagsDialog.style.color = '#ffffff';
- mxUtils.setOpacity(this.tagsDialog, 70);
this.tagsDialog.style.left = r.left + 'px';
this.tagsDialog.style.bottom = parseInt(this.chromelessToolbar.style.bottom) +
this.chromelessToolbar.offsetHeight + 4 + 'px';
@@ -5169,9 +4723,10 @@
// Puts the dialog on top of the container z-index
var style = mxUtils.getCurrentStyle(this.editor.graph.container);
this.tagsDialog.style.zIndex = style.zIndex;
-
document.body.appendChild(this.tagsDialog);
+
this.tagsComponent.refresh();
+ this.editor.fireEvent(new mxEventObject('tagsDialogShown'));
}
mxEvent.consume(evt);
@@ -5185,10 +4740,58 @@
var tags = this.editor.graph.getAllTags();
tagsButton.style.display = (tags.length > 0) ? '' : 'none';
}));
-
+
editoUiAddChromelessToolbarItems.apply(this, arguments);
}
+ this.editor.addListener('tagsDialogShown', mxUtils.bind(this, function()
+ {
+ if (this.layersDialog != null)
+ {
+ this.layersDialog.parentNode.removeChild(this.layersDialog);
+ this.layersDialog = null;
+ }
+ }));
+
+ this.editor.addListener('layersDialogShown', mxUtils.bind(this, function()
+ {
+ if (this.tagsDialog != null)
+ {
+ this.tagsDialog.parentNode.removeChild(this.tagsDialog);
+ this.tagsDialog = null;
+ }
+ }));
+
+ this.editor.addListener('pageSelected', mxUtils.bind(this, function()
+ {
+ if (this.tagsDialog != null)
+ {
+ this.tagsDialog.parentNode.removeChild(this.tagsDialog);
+ this.tagsDialog = null;
+ }
+
+ if (this.layersDialog != null)
+ {
+ this.layersDialog.parentNode.removeChild(this.layersDialog);
+ this.layersDialog = null;
+ }
+ }));
+
+ mxEvent.addListener(this.editor.graph.container, 'click', mxUtils.bind(this, function()
+ {
+ if (this.tagsDialog != null)
+ {
+ this.tagsDialog.parentNode.removeChild(this.tagsDialog);
+ this.tagsDialog = null;
+ }
+
+ if (this.layersDialog != null)
+ {
+ this.layersDialog.parentNode.removeChild(this.layersDialog);
+ this.layersDialog = null;
+ }
+ }));
+
if (this.isExportToCanvas() && this.isChromelessImageExportEnabled())
{
this.exportDialog = null;
@@ -5874,7 +5477,7 @@
*
*/
EditorUi.prototype.createHtml = function(publicUrl, zoomEnabled, initialZoom, linkTarget,
- linkColor, fit, allPages, layers, lightbox, editLink, fn)
+ linkColor, fit, allPages, layers, tags, lightbox, editLink, fn)
{
var s = this.getBasenames();
var data = {};
@@ -5925,6 +5528,11 @@
{
tb.push('layers');
}
+
+ if (tags)
+ {
+ tb.push('tags');
+ }
if (tb.length > 0)
{
@@ -6048,6 +5656,7 @@
var hasPages = this.pages != null && this.pages.length > 1;
var allPages = allPages = this.addCheckbox(div, mxResources.get('allPages'), hasPages, !hasPages);
var layers = this.addCheckbox(div, mxResources.get('layers'), true);
+ var tags = this.addCheckbox(div, mxResources.get('tags'), true);
var lightbox = this.addCheckbox(div, mxResources.get('lightbox'), true);
var editSection = this.addEditButton(div, lightbox);
@@ -6078,10 +5687,10 @@
var dlg = new CustomDialog(this, div, mxUtils.bind(this, function()
{
fn((publicUrlRadio.checked) ? publicUrl : null, zoom.checked, zoomInput.value, linkSection.getTarget(),
- linkSection.getColor(), fit.checked, allPages.checked, layers.checked, lightbox.checked,
- editSection.getLink());
+ linkSection.getColor(), fit.checked, allPages.checked, layers.checked, tags.checked,
+ lightbox.checked, editSection.getLink());
}), null, btnLabel, helpLink);
- this.showDialog(dlg.container, 340, 380, true, true);
+ this.showDialog(dlg.container, 340, 420, true, true);
copyRadio.focus();
};
diff --git a/src/main/webapp/js/diagramly/GraphViewer.js b/src/main/webapp/js/diagramly/GraphViewer.js
index 23bbfce1..9fb167df 100644
--- a/src/main/webapp/js/diagramly/GraphViewer.js
+++ b/src/main/webapp/js/diagramly/GraphViewer.js
@@ -26,7 +26,7 @@ GraphViewer.prototype.imageBaseUrl = 'https://viewer.diagrams.net/';
/**
* Redirects editing to absolue URLs.
*/
-GraphViewer.prototype.toolbarHeight = (document.compatMode == 'BackCompat') ? 28 : 30;
+GraphViewer.prototype.toolbarHeight = (document.compatMode == 'BackCompat') ? 24 : 26;
/**
* Redirects editing to absolue URLs.
@@ -138,6 +138,7 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
this.graphConfig.toolbar.split(' ') : [];
this.zoomEnabled = mxUtils.indexOf(this.toolbarItems, 'zoom') >= 0;
this.layersEnabled = mxUtils.indexOf(this.toolbarItems, 'layers') >= 0;
+ this.tagsEnabled = mxUtils.indexOf(this.toolbarItems, 'tags') >= 0;
this.lightboxEnabled = mxUtils.indexOf(this.toolbarItems, 'lightbox') >= 0;
this.lightboxClickEnabled = this.graphConfig.lightbox != false;
this.initialWidth = (container != null) ? container.style.width : null;
@@ -1340,7 +1341,8 @@ GraphViewer.prototype.addToolbar = function()
};
var layersDialog = null;
- var layersDialogEntered = false;
+ var tagsComponent = null;
+ var tagsDialog = null;
var pageInfo = null;
for (var i = 0; i < tokens.length; i++)
@@ -1350,8 +1352,8 @@ GraphViewer.prototype.addToolbar = function()
if (token == 'pages')
{
pageInfo = container.ownerDocument.createElement('div');
- pageInfo.style.cssText = 'display:inline-block;position:relative;padding:3px 4px 0 4px;' +
- 'vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;'
+ pageInfo.style.cssText = 'display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;' +
+ 'vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;'
mxUtils.setOpacity(pageInfo, 70);
var prevButton = addButton(mxUtils.bind(this, function()
@@ -1473,7 +1475,7 @@ GraphViewer.prototype.addToolbar = function()
layersDialog.style.padding = '2px 0px 2px 0px';
layersDialog.style.border = '1px solid #d0d0d0';
layersDialog.style.backgroundColor = '#eee';
- layersDialog.style.fontFamily = 'Helvetica Neue,Helvetica,Arial Unicode MS,Arial';
+ layersDialog.style.fontFamily = Editor.defaultHtmlFont;
layersDialog.style.fontSize = '11px';
layersDialog.style.zIndex = this.toolbarZIndex + 1;
mxUtils.setOpacity(layersDialog, 80);
@@ -1493,6 +1495,67 @@ GraphViewer.prototype.addToolbar = function()
layersButton.style.display = (model.getChildCount(model.root) > 1) ? 'inline-block' : 'none';
}
}
+ else if (token == 'tags')
+ {
+ if (this.tagsEnabled)
+ {
+ var tagsButton = addButton(mxUtils.bind(this, function(evt)
+ {
+ if (tagsComponent == null)
+ {
+ tagsComponent = this.graph.createTagsDialog(mxUtils.bind(this, function()
+ {
+ return true;
+ }));
+
+ tagsComponent.div.getElementsByTagName('div')[0].style.position = '';
+ tagsComponent.div.style.maxHeight = '160px';
+ tagsComponent.div.style.maxWidth = '120px';
+ tagsComponent.div.style.padding = '2px';
+ tagsComponent.div.style.overflow = 'auto';
+ tagsComponent.div.style.height = 'auto';
+ tagsComponent.div.style.position = 'fixed';
+ tagsComponent.div.style.fontFamily = Editor.defaultHtmlFont;
+ tagsComponent.div.style.fontSize = '11px';
+ tagsComponent.div.style.backgroundColor = '#eee';
+ tagsComponent.div.style.color = '#000';
+ tagsComponent.div.style.border = '1px solid #d0d0d0';
+ tagsComponent.div.style.zIndex = this.toolbarZIndex + 1;
+ mxUtils.setOpacity(tagsComponent.div, 80);
+ }
+
+ if (tagsDialog != null)
+ {
+ tagsDialog.parentNode.removeChild(tagsDialog);
+ tagsDialog = null;
+ }
+ else
+ {
+ tagsDialog = tagsComponent.div;
+
+ mxEvent.addListener(tagsDialog, 'mouseleave', function()
+ {
+ tagsDialog.parentNode.removeChild(tagsDialog);
+ tagsDialog = null;
+ });
+
+ var r = tagsButton.getBoundingClientRect();
+ var origin = mxUtils.getDocumentScrollOrigin(document);
+ tagsDialog.style.left = origin.x + r.left - 1 + 'px';
+ tagsDialog.style.top = origin.y + r.bottom - 2 + 'px';
+ document.body.appendChild(tagsDialog);
+ tagsComponent.refresh();
+ }
+ }), Editor.tagsImage, mxResources.get('tags') || 'Tags');
+
+ model.addListener(mxEvent.CHANGE, function()
+ {
+ tagsButton.style.display = (this.graph.getAllTags().length > 0) ? 'inline-block' : 'none';
+ });
+
+ tagsButton.style.display = (this.graph.getAllTags().length > 0) ? 'inline-block' : 'none';
+ }
+ }
else if (token == 'lightbox')
{
if (this.lightboxEnabled)
@@ -1748,14 +1811,19 @@ GraphViewer.prototype.showLightbox = function(editable, closable, target)
if (closable)
{
- param.close = 1;
+ param.close = 1;
}
if (this.layersEnabled)
{
- param.layers = 1;
+ param.layers = 1;
}
+ if (this.tagsEnabled)
+ {
+ param.tags = {};
+ }
+
if (this.graphConfig != null && this.graphConfig.nav != false)
{
param.nav = 1;
@@ -1841,6 +1909,11 @@ GraphViewer.prototype.showLocalLightbox = function()
urlParams['nav'] = (this.graphConfig.nav != false) ? '1' : '0';
urlParams['layers'] = (this.layersEnabled) ? '1' : '0';
+ if (this.tagsEnabled)
+ {
+ urlParams['tags'] = '{}';
+ }
+
// PostMessage not working and Permission denied for opened access in IE9-
if (document.documentMode == null || document.documentMode >= 10)
{
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index 83f8c712..28eeab50 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -361,10 +361,10 @@
editorUi.spinner.stop();
editorUi.showHtmlDialog(mxResources.get('export'), null, url, function(publicUrl, zoomEnabled,
- initialZoom, linkTarget, linkColor, fit, allPages, layers, lightbox, editLink)
+ initialZoom, linkTarget, linkColor, fit, allPages, layers, tags, lightbox, editLink)
{
- editorUi.createHtml(publicUrl, zoomEnabled, initialZoom, linkTarget, linkColor,
- fit, allPages, layers, lightbox, editLink, mxUtils.bind(this, function(html, scriptTag)
+ editorUi.createHtml(publicUrl, zoomEnabled, initialZoom, linkTarget, linkColor, fit, allPages,
+ layers, tags, lightbox, editLink, mxUtils.bind(this, function(html, scriptTag)
{
var basename = editorUi.getBaseFilename(allPages);
var result = '<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]-->\n' +
@@ -908,7 +908,7 @@
{
if (this.tagsWindow == null)
{
- this.tagsWindow = new TagsWindow(editorUi, document.body.offsetWidth - 400, 60, 220, 220);
+ this.tagsWindow = new TagsWindow(editorUi, document.body.offsetWidth - 400, 60, 212, 220);
this.tagsWindow.window.addListener('show', function()
{
editorUi.fireEvent(new mxEventObject('tags'));
@@ -1917,10 +1917,10 @@
editorUi.spinner.stop();
editorUi.showHtmlDialog(mxResources.get('create'), 'https://www.diagrams.net/doc/faq/embed-html-options',
- url, function(publicUrl, zoomEnabled, initialZoom, linkTarget, linkColor, fit, allPages, layers, lightbox, editLink)
+ url, function(publicUrl, zoomEnabled, initialZoom, linkTarget, linkColor, fit, allPages, layers, tags, lightbox, editLink)
{
- editorUi.createHtml(publicUrl, zoomEnabled, initialZoom, linkTarget, linkColor,
- fit, allPages, layers, lightbox, editLink, mxUtils.bind(this, function(html, scriptTag)
+ editorUi.createHtml(publicUrl, zoomEnabled, initialZoom, linkTarget, linkColor, fit, allPages,
+ layers, tags, lightbox, editLink, mxUtils.bind(this, function(html, scriptTag)
{
var dlg = new EmbedDialog(editorUi, html + '\n' + scriptTag, null, null, function()
{
diff --git a/src/main/webapp/js/diagramly/vsdx/importer.js b/src/main/webapp/js/diagramly/vsdx/importer.js
index 3354c5d6..1abb1c9d 100644
--- a/src/main/webapp/js/diagramly/vsdx/importer.js
+++ b/src/main/webapp/js/diagramly/vsdx/importer.js
@@ -275,7 +275,7 @@ var com;
if (onerror != null)
{
- onerror();
+ onerror(e);
}
else
{
@@ -910,7 +910,14 @@ var com;
for (var i = 0; i < props.length; i++)
{
- graph.setAttributeForCell(v1, props[i].key, props[i].val);
+ try
+ {
+ graph.setAttributeForCell(v1, props[i].key, props[i].val);
+ }
+ catch(e)
+ {
+ console.log('Attribute: "', props[i].key, '" with value "', props[i].val, '" not allowed in HTML');
+ }
}
return v1;
diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.js
index a71d24d5..1abf8ccd 100644
--- a/src/main/webapp/js/extensions.min.js
+++ b/src/main/webapp/js/extensions.min.js
@@ -1101,7 +1101,7 @@ atob("dmlzaW8="):Base64.decode("dmlzaW8=",!0));return k.vsdxPlaceholder};k.parse
function(d){for(var b="",a=0;a<d.length;a+=2)b+=String.fromCharCode(d.charCodeAt(a)|d.charCodeAt(a+1)<<8);return b};k.prototype.scaleGraph=function(d,b){if(1!==b){var a=d.getModel(),c;for(c in a.cells){var g=a.cells[c],n=a.getGeometry(g);if(null!=n&&(this.scaleRect(n,b),this.scaleRect(n.alternateBounds,b),a.isEdge(g)&&(this.scalePoint(n.sourcePoint,b),this.scalePoint(n.targetPoint,b),this.scalePoint(n.offset,b),g=n.points,null!=g)))for(n=0;n<g.length;n++)this.scalePoint(g[n],b)}}};k.incorrectXMLReqExp=
[{regExp:/\&(?!amp;|lt;|gt;|quot;|#)/g,repl:"&amp;"}];k.prototype.decodeVsdx=function(d,b,a,c){var g=this,n={},w={},e=function(){var a;function c(){a=a.concat(g.RESPONSE_END);b&&b(a)}for(var d=k.vsdxPlaceholder+"/document.xml",e=n[d]?n[d]:null,x=e.firstChild;null!=x&&1!=x.nodeType;)x=x.nextSibling;if(null!=x&&1==x.nodeType)g.importNodes(e,x,d,n);else return null;g.vsdxModel=new f.mxgraph.io.vsdx.mxVsdxModel(e,n,w);d=g.vsdxModel.getPages();a=g.RESPONSE_HEADER;var A=function(a){null==a.entries&&(a.entries=
[]);return a.entries}(d),y=function(b,c){var n=A[b].getValue(),d=m.createMxGraph();d.getModel().beginUpdate();m.importPage(n,d,d.getDefaultParent(),!0);m.scaleGraph(d,n.getPageScale()/n.getDrawingScale());d.getModel().endUpdate();m.postImportPage(n,d,function(){m.sanitiseGraph(d);a=a.concat(g.RESPONSE_DIAGRAM_START);a=a.concat(g.processPage(d,n));a=a.concat(g.RESPONSE_DIAGRAM_END);b<A.length-1?y(b+1,c):c()})},m=g;0<A.length?y(0,c):c()},A=0,y=0,m=function(){if(y==A)try{e()}catch(C){console.log(C),
-null!=c?c():b("")}};JSZip.loadAsync(d).then(function(a){0==Object.keys(a.files).length?null!=c&&c():a.forEach(function(a,b){var c=b.name,d=c.toLowerCase(),f=d.length;d.indexOf(".xml")==f-4||d.indexOf(".rels")==f-5?(A++,b.async("string").then(function(a){if(0!==a.length){65279==a.charCodeAt(0)&&(a=a.substring(1));var b=k.parseXml(a);if(null==b)if(0===a.charCodeAt(1)&&0===a.charCodeAt(3)&&0===a.charCodeAt(5))b=k.parseXml(k.decodeUTF16LE(a));else{for(b=0;b<k.incorrectXMLReqExp.length;b++)k.incorrectXMLReqExp[b].regExp.test(a)&&
+null!=c?c(C):b("")}};JSZip.loadAsync(d).then(function(a){0==Object.keys(a.files).length?null!=c&&c():a.forEach(function(a,b){var c=b.name,d=c.toLowerCase(),f=d.length;d.indexOf(".xml")==f-4||d.indexOf(".rels")==f-5?(A++,b.async("string").then(function(a){if(0!==a.length){65279==a.charCodeAt(0)&&(a=a.substring(1));var b=k.parseXml(a);if(null==b)if(0===a.charCodeAt(1)&&0===a.charCodeAt(3)&&0===a.charCodeAt(5))b=k.parseXml(k.decodeUTF16LE(a));else{for(b=0;b<k.incorrectXMLReqExp.length;b++)k.incorrectXMLReqExp[b].regExp.test(a)&&
(a=a.replace(k.incorrectXMLReqExp[b].regExp,k.incorrectXMLReqExp[b].repl));b=k.parseXml(a)}null!=b&&(b.vsdxFileName=c,n[c]=b)}y++;m()})):0===d.indexOf(k.vsdxPlaceholder+"/media")&&(A++,function(a,b){var c=a.length-b.length,g=a.indexOf(b,c);return-1!==g&&g===c}(d,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?b.async("blob").then(function(a){var b=new FormData;b.append("img",a,d);b.append("inputformat","emf");b.append("outputformat","png");var n=new XMLHttpRequest;n.open("POST",EMF_CONVERT_URL);
n.responseType="blob";g.editorUi.addRemoteServiceSecurityCheck(n);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var a=new FileReader;a.readAsDataURL(n.response);a.onloadend=function(){var b=a.result.indexOf(",")+1;w[c]=a.result.substr(b);y++;m()}}catch(R){console.log(R),y++,m()}else y++,m()});n.send(b)}):(y++,m()):function(a,b){var c=a.length-b.length,g=a.indexOf(b,c);return-1!==g&&g===c}(d,".bmp")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){a=
new BmpDecoder(a);var b=document.createElement("canvas");b.width=a.width;b.height=a.height;b.getContext("2d").putImageData(a.imageData,0,0);a=b.toDataURL("image/jpeg");w[c]=a.substr(23);y++;m()}):b.async("base64").then(function(a){w[c]=a;y++;m()}))})},function(a){null!=c&&c(a)})};k.prototype.createMxGraph=function(){var d=new Graph;d.setExtendParents(!1);d.setExtendParentsOnAdd(!1);d.setConstrainChildren(!1);d.setHtmlLabels(!0);d.getModel().maintainEdgeParent=!1;return d};k.prototype.processPage=
@@ -1116,31 +1116,31 @@ a.entries&&(a.entries=[]);return a.entries}(d.getConnects()));d.hasNext();)e=d.n
A.width/e.imgWidth,g=A.height/e.imgHeight,d=-e.imgOffsetX*c,f=(e.imgHeight-e.height+e.imgOffsetY)*g,w=document.createElement("canvas");w.width=e.width*c;w.height=e.height*g;var k=w.getContext("2d");k.fillStyle="#FFFFFF";k.fillRect(0,0,w.width,w.height);k.drawImage(A,d,f,w.width,w.height,0,0,w.width,w.height);a=w.toDataURL("image/jpeg").substr(23);b="jpg"}catch(fa){console.log(fa)}x.style+=";image=data:image/"+b+","+a;n()};A.src="data:image/"+e.iType+";base64,"+e.iData;A.onerror=function(){x.style+=
";image=data:image/"+e.iType+","+e.iData;n()}};k(0,a)}else a()}catch(A){console.log(A),a()}};k.prototype.addShape=function(d,b,a,c,g){b.parentHeight=g;var n=f.mxgraph.io.vsdx.VsdxShape.getType(b.getShape());if(null!=n&&(function(a,b){return a&&a.equals?a.equals(b):a===b}(n,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(a,b){return a&&a.equals?a.equals(b):a===b}(n,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a===b}(n,f.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var w=
b.getId();if(b.isVertex()){n=null;n=b.isGroup()?this.addGroup(d,b,a,c,g):this.addVertex(d,b,a,c,g);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new f.mxgraph.io.vsdx.ShapePageId(c,w),b);a=b.getHyperlink();a.extLink?d.setLinkForCell(n,
-a.extLink):a.pageLink&&d.setLinkForCell(n,"data:page/id,"+a.pageLink);b=b.getProperties();for(a=0;a<b.length;a++)d.setAttributeForCell(n,b[a].key,b[a].val);return n}b.setShapeIndex(d.getModel().getChildCount(a));(function(a,b,c){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,
-new f.mxgraph.io.vsdx.ShapePageId(c,w),b);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(c,w),a)}return null};k.prototype.addGroup=function(d,b,a,c,g){var n=b.getDimensions(),w=b.getMaster(),k=b.getStyleFromShape(),
-e=b.getGeomList();e.isNoFill()&&(k[mxConstants.STYLE_FILLCOLOR]="none",k[mxConstants.STYLE_GRADIENTCOLOR]="none");e.isNoLine()&&(k[mxConstants.STYLE_STROKECOLOR]="none");k.html="1";k[mxConstants.STYLE_WHITE_SPACE]="wrap";var y=f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(k,"="),k=null,m=b.getChildShapes(),k=null!=m&&0<function(a){null==a.entries&&(a.entries=[]);return a.entries.length}(m),e=b.isDisplacedLabel()||b.isRotatedLabel()||k,k=b.getOriginPoint(g,!0);if(e)k=d.insertVertex(a,null,null,Math.floor(Math.round(100*
-k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),y);else var q=b.getTextLabel(),k=d.insertVertex(a,null,q,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),y);for(a=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(m));a.hasNext();)y=
-a.next().getValue(),m=y.getId(),y.isVertex()?(q=f.mxgraph.io.vsdx.VsdxShape.getType(y.getShape()),null!=q&&(function(a,b){return a&&a.equals?a.equals(b):a===b}(q,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(a,b){return a&&a.equals?a.equals(b):a===b}(q,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a===b}(q,f.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&y.isVertex()&&(y.propagateRotation(b.getRotation()),y.isGroup()?this.addGroup(d,y,k,c,n.y):this.addVertex(d,
-y,k,c,n.y)),null==w&&function(a,b,c){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new f.mxgraph.io.vsdx.ShapePageId(c,m),y)):null==w?(function(a,b,c){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&
-a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new f.mxgraph.io.vsdx.ShapePageId(c,m),y),function(a,b,c){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},
-getValue:function(){return this.value}})}(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(c,m),k)):this.addUnconnectedEdge(d,k,y,g);e&&b.createLabelSubShape(d,k);d=b.getRotation();if(0!==d)for(n=k.getGeometry(),g=n.width/2,n=n.height/2,w=0;w<k.getChildCount();w++)e=k.getChildAt(w),f.mxgraph.online.Utils.rotatedGeometry(e.getGeometry(),d,g,n);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===
-b){a.entries[g].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(c,b.getId()),k);return k};k.rotatedEdgePoint=function(d,b,a,c){b=b*Math.PI/180;var g=Math.cos(b);b=Math.sin(b);var n=d.x-a,f=d.y-c;d.x=Math.round(n*g-f*b+a);d.y=Math.round(f*g+n*b+c)};k.prototype.addVertex=function(d,b,a,c,g){var n="",w=b.isDisplacedLabel()||b.isRotatedLabel();w||(n=b.getTextLabel());var k=b.getDimensions(),
-e=b.getStyleFromShape();e.html="1";var y=e.hasOwnProperty(mxConstants.STYLE_SHAPE)||e.hasOwnProperty("stencil");e.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&y||(e[mxConstants.STYLE_FILLCOLOR]="none");y||(e[mxConstants.STYLE_STROKECOLOR]="none");e.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&y||(e[mxConstants.STYLE_GRADIENTCOLOR]="none");e[mxConstants.STYLE_WHITE_SPACE]="wrap";g=b.getOriginPoint(g,!0);return y||null!=n?(e=f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(e,"="),y=null,y=w?d.insertVertex(a,
-null,null,Math.floor(Math.round(100*g.x)/100),Math.floor(Math.round(100*g.y)/100),Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),e):d.insertVertex(a,null,n,Math.floor(Math.round(100*g.x)/100),Math.floor(Math.round(100*g.y)/100),Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),e),function(a,b,c){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=
-c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(c,b.getId()),y),b.setLabelOffset(y,e),w&&b.createLabelSubShape(d,y),y):null};k.calculateAbsolutePoint=function(d){for(var b=0,a=0;null!=d;){var c=d.geometry;null!=c&&(b+=c.x,a+=c.y);d=d.parent}return new mxPoint(b,a)};k.prototype.processEdgeGeo=function(d,b){try{for(var a=d.geomList.geomList[0].rows,c=0;c<a.length;c++)if(a[c]instanceof
-f.mxgraph.io.vsdx.geometry.ArcTo){b.style+="jumpStyle=arc;";break}for(c=0;c<a.length;c++);}catch(g){}};k.prototype.addConnectedEdge=function(d,b,a,c){var g=b.getFromSheet(),g=new f.mxgraph.io.vsdx.ShapePageId(a,g),n=function(a,b){null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)if(null!=a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key===b)return a.entries[c].value;return null}(this.edgeShapeMap,g);if(null==n)return null;var w=function(a,b){null==a.entries&&(a.entries=
-[]);for(var c=0;c<a.entries.length;c++)if(null!=a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key===b)return a.entries[c].value;return null}(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(a,n.getId()));if(null!=w){var e=d.getModel().getGeometry(w);null!=e&&(c=e.height)}var A=n.getStartXY(c),y=n.getEndXY(c),e=n.getRoutingPoints(c,A,n.getRotation());this.rotateChildEdge(d.getModel(),w,A,y,e);var m=null,q=b.getSourceToSheet(),q=null!=q?function(a,b){null==a.entries&&(a.entries=
-[]);for(var c=0;c<a.entries.length;c++)if(null!=a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key===b)return a.entries[c].value;return null}(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(a,q)):null,B=!0;if(null==q||0==q.geometry.width||0==q.geometry.height)q=d.insertVertex(w,null,null,Math.floor(Math.round(100*A.x)/100),Math.floor(Math.round(100*A.y)/100),0,0);else if(q.style&&-1==q.style.indexOf(";rotation="))var m=k.calculateAbsolutePoint(q),E=k.calculateAbsolutePoint(w),
-F=q.geometry,m=new mxPoint((E.x+A.x-m.x)/F.width,(E.y+A.y-m.y)/F.height);else B=!1;A=null;b=b.getTargetToSheet();b=null!=b?function(a,b){null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)if(null!=a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key===b)return a.entries[c].value;return null}(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(a,b)):null;E=!0;null==b||0==b.geometry.width||0==b.geometry.height?b=d.insertVertex(w,null,null,Math.floor(Math.round(100*y.x)/
-100),Math.floor(Math.round(100*y.y)/100),0,0):b.style&&-1==b.style.indexOf(";rotation=")?(a=k.calculateAbsolutePoint(b),A=k.calculateAbsolutePoint(w),F=b.geometry,A=new mxPoint((A.x+y.x-a.x)/F.width,(A.y+y.y-a.y)/F.height)):E=!1;a=n.getStyleFromEdgeShape(c);F=n.getRotation();0!==F?(y=d.insertEdge(w,null,null,q,b,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(a,"=")),B=n.createLabelSubShape(d,y),null!=B&&(B.setStyle(B.getStyle()+";rotation="+(60<F&&240>F?(F+180)%360:F)),B=B.getGeometry(),B.x=0,B.y=0,
-B.relative=!0,B.offset=new mxPoint(-B.width/2,-B.height/2))):(y=d.insertEdge(w,null,n.getTextLabel(),q,b,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(a,"=")),F=n.getLblEdgeOffset(d.getView(),e),y.getGeometry().offset=F,null!=m&&d.setConnectionConstraint(y,q,!0,new mxConnectionConstraint(m,!1)),B&&e.shift(),null!=A&&d.setConnectionConstraint(y,b,!1,new mxConnectionConstraint(A,!1)),E&&e.pop());B=d.getModel().getGeometry(y);if(q.parent!=b.parent&&null!=w&&1!=w.id&&1==q.parent.id){b=m=0;do A=w.geometry,
-null!=A&&(m+=A.x,b+=A.y),w=w.parent;while(null!=w);y.parent=q.parent;for(w=0;w<e.length;w++)e[w].x+=m,e[w].y+=b}B.points=e;a.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(a,"curved"),"1")&&(B=d.getModel().getGeometry(y),d=n.getControlPoints(c),B.points=d);this.processEdgeGeo(n,y);return g};k.prototype.addUnconnectedEdge=function(d,b,a,c){if(null!=b){var g=d.getModel().getGeometry(b);null!=g&&(c=g.height)}var n=a.getStartXY(c),w=
-a.getEndXY(c),k=a.getStyleFromEdgeShape(c),e=a.getRoutingPoints(c,n,a.getRotation()),y=a.getRotation();if(0!==y){0===a.getShapeIndex()?g=d.insertEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(k,"=")):(g=d.createEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(k,"=")),g=d.addEdge(g,b,null,null,a.getShapeIndex()+this.shapeIndexShift++));var m=a.createLabelSubShape(d,g);null!=m&&(m.setStyle(m.getStyle()+";rotation="+(60<y&&240>y?(y+180)%360:y)),y=m.getGeometry(),
-y.x=0,y.y=0,y.relative=!0,y.offset=new mxPoint(-y.width/2,-y.height/2))}else 0===a.getShapeIndex()?g=d.insertEdge(b,null,a.getTextLabel(),null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(k,"=")):(g=d.createEdge(b,null,a.getTextLabel(),null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(k,"=")),g=d.addEdge(g,b,null,null,a.getShapeIndex()+this.shapeIndexShift++)),y=a.getLblEdgeOffset(d.getView(),e),g.getGeometry().offset=y;this.rotateChildEdge(d.getModel(),b,n,w,e);b=d.getModel().getGeometry(g);
-e.pop();e.shift();b.points=e;b.setTerminalPoint(n,!0);b.setTerminalPoint(w,!1);k.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(k,"curved"),"1")&&(b=d.getModel().getGeometry(g),d=a.getControlPoints(c),b.points=d);this.processEdgeGeo(a,g);return g};k.prototype.rotateChildEdge=function(d,b,a,c,g){if(null!=b){var n=d.getGeometry(b);d=d.getStyle(b);if(null!=n&&null!=d&&(b=d.indexOf("rotation="),-1<b))for(d=parseFloat(d.substring(b+9,
-d.indexOf(";",b))),b=n.width/2,n=n.height/2,k.rotatedEdgePoint(a,d,b,n),k.rotatedEdgePoint(c,d,b,n),a=0;a<g.length;a++)k.rotatedEdgePoint(g[a],d,b,n)}};k.prototype.sanitiseGraph=function(d){var b=d.getModel().getRoot();this.sanitiseCell(d,b)};k.prototype.sanitiseCell=function(d,b){for(var a=d.getModel(),c=a.getChildCount(b),g=[],n=0;n<c;n++){var f=a.getChildAt(b,n);this.sanitiseCell(d,f)&&g.push(f)}for(n=0;n<g.length;n++)a.remove(g[n]);g=b.geometry;null!=g&&(0>g.height&&(g.height=Math.abs(g.height),
-g.y-=g.height,b.style+=";flipV=1;"),0>g.width&&(g.width=Math.abs(g.width),g.x-=g.width,b.style+=";flipH=1;"));0<c&&(c=a.getChildCount(b));g=(new String(a.getValue(b))).toString();n=a.getStyle(b);return 0!==c||!a.isVertex(b)||null!=a.getValue(b)&&0!==g.length||null==n||-1==n.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==n.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=n.indexOf("image=")?!1:!0};return k}();e.mxVsdxCodec=m;m.__class="com.mxgraph.io.mxVsdxCodec"})(m.io||(m.io={}))})(f.mxgraph||
-(f.mxgraph={}))})(com||(com={}));
+a.extLink):a.pageLink&&d.setLinkForCell(n,"data:page/id,"+a.pageLink);b=b.getProperties();for(a=0;a<b.length;a++)try{d.setAttributeForCell(n,b[a].key,b[a].val)}catch(x){console.log('Attribute: "',b[a].key,'" with value "',b[a].val,'" not allowed in HTML')}return n}b.setShapeIndex(d.getModel().getChildCount(a));(function(a,b,c){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=c;
+return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,new f.mxgraph.io.vsdx.ShapePageId(c,w),b);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(c,
+w),a)}return null};k.prototype.addGroup=function(d,b,a,c,g){var n=b.getDimensions(),w=b.getMaster(),k=b.getStyleFromShape(),e=b.getGeomList();e.isNoFill()&&(k[mxConstants.STYLE_FILLCOLOR]="none",k[mxConstants.STYLE_GRADIENTCOLOR]="none");e.isNoLine()&&(k[mxConstants.STYLE_STROKECOLOR]="none");k.html="1";k[mxConstants.STYLE_WHITE_SPACE]="wrap";var y=f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(k,"="),k=null,m=b.getChildShapes(),k=null!=m&&0<function(a){null==a.entries&&(a.entries=[]);return a.entries.length}(m),
+e=b.isDisplacedLabel()||b.isRotatedLabel()||k,k=b.getOriginPoint(g,!0);if(e)k=d.insertVertex(a,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),y);else var q=b.getTextLabel(),k=d.insertVertex(a,null,q,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),y);for(a=function(a){var b=0;return{next:function(){return b<
+a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(m));a.hasNext();)y=a.next().getValue(),m=y.getId(),y.isVertex()?(q=f.mxgraph.io.vsdx.VsdxShape.getType(y.getShape()),null!=q&&(function(a,b){return a&&a.equals?a.equals(b):a===b}(q,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(a,b){return a&&a.equals?a.equals(b):a===b}(q,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a===
+b}(q,f.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&y.isVertex()&&(y.propagateRotation(b.getRotation()),y.isGroup()?this.addGroup(d,y,k,c,n.y):this.addVertex(d,y,k,c,n.y)),null==w&&function(a,b,c){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,
+new f.mxgraph.io.vsdx.ShapePageId(c,m),y)):null==w?(function(a,b,c){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new f.mxgraph.io.vsdx.ShapePageId(c,m),y),function(a,b,c){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=
+a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(c,m),k)):this.addUnconnectedEdge(d,k,y,g);e&&b.createLabelSubShape(d,k);d=b.getRotation();if(0!==d)for(n=k.getGeometry(),g=n.width/2,n=n.height/2,w=0;w<k.getChildCount();w++)e=k.getChildAt(w),f.mxgraph.online.Utils.rotatedGeometry(e.getGeometry(),
+d,g,n);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(c,b.getId()),k);return k};k.rotatedEdgePoint=function(d,b,a,c){b=b*Math.PI/180;var g=Math.cos(b);b=Math.sin(b);var n=d.x-a,f=d.y-c;d.x=Math.round(n*
+g-f*b+a);d.y=Math.round(f*g+n*b+c)};k.prototype.addVertex=function(d,b,a,c,g){var n="",w=b.isDisplacedLabel()||b.isRotatedLabel();w||(n=b.getTextLabel());var k=b.getDimensions(),e=b.getStyleFromShape();e.html="1";var y=e.hasOwnProperty(mxConstants.STYLE_SHAPE)||e.hasOwnProperty("stencil");e.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&y||(e[mxConstants.STYLE_FILLCOLOR]="none");y||(e[mxConstants.STYLE_STROKECOLOR]="none");e.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&y||(e[mxConstants.STYLE_GRADIENTCOLOR]=
+"none");e[mxConstants.STYLE_WHITE_SPACE]="wrap";g=b.getOriginPoint(g,!0);return y||null!=n?(e=f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(e,"="),y=null,y=w?d.insertVertex(a,null,null,Math.floor(Math.round(100*g.x)/100),Math.floor(Math.round(100*g.y)/100),Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),e):d.insertVertex(a,null,n,Math.floor(Math.round(100*g.x)/100),Math.floor(Math.round(100*g.y)/100),Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),e),
+function(a,b,c){null==a.entries&&(a.entries=[]);for(var g=0;g<a.entries.length;g++)if(null!=a.entries[g].key.equals&&a.entries[g].key.equals(b)||a.entries[g].key===b){a.entries[g].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(c,b.getId()),y),b.setLabelOffset(y,e),w&&b.createLabelSubShape(d,y),y):null};k.calculateAbsolutePoint=function(d){for(var b=0,a=0;null!=d;){var c=d.geometry;
+null!=c&&(b+=c.x,a+=c.y);d=d.parent}return new mxPoint(b,a)};k.prototype.processEdgeGeo=function(d,b){try{for(var a=d.geomList.geomList[0].rows,c=0;c<a.length;c++)if(a[c]instanceof f.mxgraph.io.vsdx.geometry.ArcTo){b.style+="jumpStyle=arc;";break}for(c=0;c<a.length;c++);}catch(g){}};k.prototype.addConnectedEdge=function(d,b,a,c){var g=b.getFromSheet(),g=new f.mxgraph.io.vsdx.ShapePageId(a,g),n=function(a,b){null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)if(null!=a.entries[c].key.equals&&
+a.entries[c].key.equals(b)||a.entries[c].key===b)return a.entries[c].value;return null}(this.edgeShapeMap,g);if(null==n)return null;var w=function(a,b){null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)if(null!=a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key===b)return a.entries[c].value;return null}(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(a,n.getId()));if(null!=w){var e=d.getModel().getGeometry(w);null!=e&&(c=e.height)}var A=n.getStartXY(c),y=n.getEndXY(c),
+e=n.getRoutingPoints(c,A,n.getRotation());this.rotateChildEdge(d.getModel(),w,A,y,e);var m=null,q=b.getSourceToSheet(),q=null!=q?function(a,b){null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)if(null!=a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key===b)return a.entries[c].value;return null}(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(a,q)):null,B=!0;if(null==q||0==q.geometry.width||0==q.geometry.height)q=d.insertVertex(w,null,null,Math.floor(Math.round(100*
+A.x)/100),Math.floor(Math.round(100*A.y)/100),0,0);else if(q.style&&-1==q.style.indexOf(";rotation="))var m=k.calculateAbsolutePoint(q),E=k.calculateAbsolutePoint(w),F=q.geometry,m=new mxPoint((E.x+A.x-m.x)/F.width,(E.y+A.y-m.y)/F.height);else B=!1;A=null;b=b.getTargetToSheet();b=null!=b?function(a,b){null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)if(null!=a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key===b)return a.entries[c].value;return null}(this.vertexMap,
+new f.mxgraph.io.vsdx.ShapePageId(a,b)):null;E=!0;null==b||0==b.geometry.width||0==b.geometry.height?b=d.insertVertex(w,null,null,Math.floor(Math.round(100*y.x)/100),Math.floor(Math.round(100*y.y)/100),0,0):b.style&&-1==b.style.indexOf(";rotation=")?(a=k.calculateAbsolutePoint(b),A=k.calculateAbsolutePoint(w),F=b.geometry,A=new mxPoint((A.x+y.x-a.x)/F.width,(A.y+y.y-a.y)/F.height)):E=!1;a=n.getStyleFromEdgeShape(c);F=n.getRotation();0!==F?(y=d.insertEdge(w,null,null,q,b,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(a,
+"=")),B=n.createLabelSubShape(d,y),null!=B&&(B.setStyle(B.getStyle()+";rotation="+(60<F&&240>F?(F+180)%360:F)),B=B.getGeometry(),B.x=0,B.y=0,B.relative=!0,B.offset=new mxPoint(-B.width/2,-B.height/2))):(y=d.insertEdge(w,null,n.getTextLabel(),q,b,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(a,"=")),F=n.getLblEdgeOffset(d.getView(),e),y.getGeometry().offset=F,null!=m&&d.setConnectionConstraint(y,q,!0,new mxConnectionConstraint(m,!1)),B&&e.shift(),null!=A&&d.setConnectionConstraint(y,b,!1,new mxConnectionConstraint(A,
+!1)),E&&e.pop());B=d.getModel().getGeometry(y);if(q.parent!=b.parent&&null!=w&&1!=w.id&&1==q.parent.id){b=m=0;do A=w.geometry,null!=A&&(m+=A.x,b+=A.y),w=w.parent;while(null!=w);y.parent=q.parent;for(w=0;w<e.length;w++)e[w].x+=m,e[w].y+=b}B.points=e;a.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(a,"curved"),"1")&&(B=d.getModel().getGeometry(y),d=n.getControlPoints(c),B.points=d);this.processEdgeGeo(n,y);return g};k.prototype.addUnconnectedEdge=
+function(d,b,a,c){if(null!=b){var g=d.getModel().getGeometry(b);null!=g&&(c=g.height)}var n=a.getStartXY(c),w=a.getEndXY(c),k=a.getStyleFromEdgeShape(c),e=a.getRoutingPoints(c,n,a.getRotation()),y=a.getRotation();if(0!==y){0===a.getShapeIndex()?g=d.insertEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(k,"=")):(g=d.createEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(k,"=")),g=d.addEdge(g,b,null,null,a.getShapeIndex()+this.shapeIndexShift++));var m=
+a.createLabelSubShape(d,g);null!=m&&(m.setStyle(m.getStyle()+";rotation="+(60<y&&240>y?(y+180)%360:y)),y=m.getGeometry(),y.x=0,y.y=0,y.relative=!0,y.offset=new mxPoint(-y.width/2,-y.height/2))}else 0===a.getShapeIndex()?g=d.insertEdge(b,null,a.getTextLabel(),null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(k,"=")):(g=d.createEdge(b,null,a.getTextLabel(),null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(k,"=")),g=d.addEdge(g,b,null,null,a.getShapeIndex()+this.shapeIndexShift++)),y=a.getLblEdgeOffset(d.getView(),
+e),g.getGeometry().offset=y;this.rotateChildEdge(d.getModel(),b,n,w,e);b=d.getModel().getGeometry(g);e.pop();e.shift();b.points=e;b.setTerminalPoint(n,!0);b.setTerminalPoint(w,!1);k.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(k,"curved"),"1")&&(b=d.getModel().getGeometry(g),d=a.getControlPoints(c),b.points=d);this.processEdgeGeo(a,g);return g};k.prototype.rotateChildEdge=function(d,b,a,c,g){if(null!=b){var n=d.getGeometry(b);d=
+d.getStyle(b);if(null!=n&&null!=d&&(b=d.indexOf("rotation="),-1<b))for(d=parseFloat(d.substring(b+9,d.indexOf(";",b))),b=n.width/2,n=n.height/2,k.rotatedEdgePoint(a,d,b,n),k.rotatedEdgePoint(c,d,b,n),a=0;a<g.length;a++)k.rotatedEdgePoint(g[a],d,b,n)}};k.prototype.sanitiseGraph=function(d){var b=d.getModel().getRoot();this.sanitiseCell(d,b)};k.prototype.sanitiseCell=function(d,b){for(var a=d.getModel(),c=a.getChildCount(b),g=[],n=0;n<c;n++){var f=a.getChildAt(b,n);this.sanitiseCell(d,f)&&g.push(f)}for(n=
+0;n<g.length;n++)a.remove(g[n]);g=b.geometry;null!=g&&(0>g.height&&(g.height=Math.abs(g.height),g.y-=g.height,b.style+=";flipV=1;"),0>g.width&&(g.width=Math.abs(g.width),g.x-=g.width,b.style+=";flipH=1;"));0<c&&(c=a.getChildCount(b));g=(new String(a.getValue(b))).toString();n=a.getStyle(b);return 0!==c||!a.isVertex(b)||null!=a.getValue(b)&&0!==g.length||null==n||-1==n.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==n.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=n.indexOf("image=")?!1:!0};
+return k}();e.mxVsdxCodec=m;m.__class="com.mxgraph.io.mxVsdxCodec"})(m.io||(m.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(m){(function(e){var m=function(k){function d(b){var a=k.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=b;return a}__extends(d,k);d.prototype.decodeVssx=function(b,a,c,g){var n=this,d="<mxlibrary>[";this.decodeVsdx(b,function(b){d=d.concat(b);var c=n.vsdxModel.getMasterShapes(),w=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){var b=
[];null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)b.push(a.entries[c].value);return b}(n.vsdxModel.getPages())).next();if(null!=c){var e={str:"",toString:function(){return this.str}},x=0===b.length?"":",",m=function(a){return Object.keys(a).map(function(b){return a[b]})}(c);b=function(a){a=m[a];var b=q.createMxGraph(),g=1;if(null!=a.pageSheet){var n=g=1,d=a.pageSheet.DrawingScale;null!=d&&(g=parseFloat(d.getAttribute("V"))||1);d=a.pageSheet.PageScale;null!=d&&(n=parseFloat(d.getAttribute("V"))||
1);g=n/g}n=!1;for(d=0;null!=a.firstLevelShapes&&d<a.firstLevelShapes.length;d++){var A=a.firstLevelShapes[d].getShape(),y=new f.mxgraph.io.vsdx.VsdxShape(w,A,!w.isEdge(A),c,null,q.vsdxModel),A=null;if(y.isVertex()){q.edgeShapeMap.entries=[];q.parentsMap.entries=[];for(var A=q.addShape(b,y,b.getDefaultParent(),0,1169),y=function(a){null==a.entries&&(a.entries=[]);return a.entries}(q.edgeShapeMap),C=0;C<y.length;C++){var D=y[C],B=function(a,b){null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)if(null!=
diff --git a/src/main/webapp/js/grapheditor/Dialogs.js b/src/main/webapp/js/grapheditor/Dialogs.js
index d939ec64..801ddf65 100644
--- a/src/main/webapp/js/grapheditor/Dialogs.js
+++ b/src/main/webapp/js/grapheditor/Dialogs.js
@@ -2069,7 +2069,8 @@ var LayersWindow = function(editorUi, x, y, w, h)
link.className = 'geButton';
var removeLink = link.cloneNode();
- removeLink.innerHTML = '<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';
+ removeLink.innerHTML = '<img width="22" border="0" src="' + Editor.trashImage +
+ '" style="opacity:0.9;' + (Editor.isDarkMode() ? 'filter:invert(100%);' : '') + '"/>';
mxEvent.addListener(removeLink, 'click', function(evt)
{
@@ -2114,7 +2115,8 @@ var LayersWindow = function(editorUi, x, y, w, h)
var insertLink = link.cloneNode();
insertLink.setAttribute('title', mxUtils.trim(mxResources.get('moveSelectionTo', ['...'])));
- insertLink.innerHTML = '<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';
+ insertLink.innerHTML = '<img width="22" border="0" src="' + Editor.verticalDotsImage +
+ '" style="opacity:0.9;' + (Editor.isDarkMode() ? 'filter:invert(100%);' : '') + '"/>';
mxEvent.addListener(insertLink, 'click', function(evt)
{
@@ -2149,7 +2151,9 @@ var LayersWindow = function(editorUi, x, y, w, h)
var dataLink = link.cloneNode();
dataLink.innerHTML = '<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';
- dataLink.setAttribute('title', mxResources.get('rename'));
+ dataLink.innerHTML = '<img width="22" border="0" src="' + Editor.editImage +
+ '" style="opacity:0.9;' + (Editor.isDarkMode() ? 'filter:invert(100%);' : '') + '"/>';
+ dataLink.setAttribute('title', mxResources.get('editData'));
mxEvent.addListener(dataLink, 'click', function(evt)
{
@@ -2186,8 +2190,9 @@ var LayersWindow = function(editorUi, x, y, w, h)
};
var duplicateLink = link.cloneNode();
- duplicateLink.innerHTML = '<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';
-
+ duplicateLink.innerHTML = '<img width="22" border="0" src="' + Editor.duplicateImage +
+ '" style="opacity:0.9;' + (Editor.isDarkMode() ? 'filter:invert(100%);' : '') + '"/>';
+
mxEvent.addListener(duplicateLink, 'click', function(evt)
{
if (graph.isEnabled())
@@ -2222,7 +2227,8 @@ var LayersWindow = function(editorUi, x, y, w, h)
ldiv.appendChild(duplicateLink);
var addLink = link.cloneNode();
- addLink.innerHTML = '<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
+ addLink.innerHTML = '<img width="22" border="0" src="' + Editor.addImage +
+ '" style="opacity:0.9;' + (Editor.isDarkMode() ? 'filter:invert(100%);' : '') + '"/>';
addLink.setAttribute('title', mxResources.get('addLayer'));
mxEvent.addListener(addLink, 'click', function(evt)
@@ -2261,8 +2267,8 @@ var LayersWindow = function(editorUi, x, y, w, h)
dot.style.position = 'absolute';
dot.style.fontWeight = 'bold';
dot.style.fontSize = '16pt';
- dot.style.right = '6px';
- dot.style.top = '5px';
+ dot.style.right = '2px';
+ dot.style.top = '2px';
function updateLayerDot()
{
@@ -2341,22 +2347,67 @@ var LayersWindow = function(editorUi, x, y, w, h)
evt.preventDefault();
});
+ var inp = document.createElement('img');
+ inp.setAttribute('draggable', 'false');
+ inp.setAttribute('align', 'top');
+ inp.setAttribute('border', '0');
+ inp.style.width = '16px';
+ inp.style.padding = '0px 6px 0 4px';
+ inp.style.marginTop = '2px';
+ inp.style.cursor = 'pointer';
+ inp.setAttribute('title', mxResources.get(
+ graph.model.isVisible(child) ?
+ 'hide' : 'show'));
+
+ if (graph.model.isVisible(child))
+ {
+ inp.setAttribute('src', Editor.visibleImage);
+ mxUtils.setOpacity(ldiv, 75);
+ }
+ else
+ {
+ inp.setAttribute('src', Editor.hiddenImage);
+ mxUtils.setOpacity(ldiv, 25);
+ }
+
+ if (Editor.isDarkMode())
+ {
+ inp.style.filter = 'invert(100%)';
+ }
+
+ left.appendChild(inp);
+
+ mxEvent.addListener(inp, 'click', function(evt)
+ {
+ graph.model.setVisible(child, !graph.model.isVisible(child));
+ mxEvent.consume(evt);
+ });
+
var btn = document.createElement('img');
btn.setAttribute('draggable', 'false');
btn.setAttribute('align', 'top');
btn.setAttribute('border', '0');
- btn.style.padding = '4px';
+ btn.style.width = '16px';
+ btn.style.padding = '0px 6px 0 0';
+ btn.style.marginTop = '2px';
btn.setAttribute('title', mxResources.get('lockUnlock'));
var style = graph.getCurrentCellStyle(child);
if (mxUtils.getValue(style, 'locked', '0') == '1')
{
- btn.setAttribute('src', Dialog.prototype.lockedImage);
+ btn.setAttribute('src', Editor.lockedImage);
+ mxUtils.setOpacity(btn, 75);
}
else
{
- btn.setAttribute('src', Dialog.prototype.unlockedImage);
+ btn.setAttribute('src', Editor.unlockedImage);
+ mxUtils.setOpacity(btn, 25);
+ }
+
+ if (Editor.isDarkMode())
+ {
+ btn.style.filter = 'invert(100%)';
}
if (graph.isEnabled())
@@ -2392,28 +2443,18 @@ var LayersWindow = function(editorUi, x, y, w, h)
left.appendChild(btn);
- var inp = document.createElement('input');
- inp.setAttribute('type', 'checkbox');
- inp.setAttribute('title', mxResources.get(graph.model.isVisible(child) ?
- 'hide' : 'show'));
- inp.style.marginLeft = '4px';
- inp.style.marginRight = '6px';
- inp.style.marginTop = '4px';
- left.appendChild(inp);
-
- if (graph.model.isVisible(child))
- {
- inp.setAttribute('checked', 'checked');
- inp.defaultChecked = true;
- }
-
- mxEvent.addListener(inp, 'click', function(evt)
- {
- graph.model.setVisible(child, !graph.model.isVisible(child));
- mxEvent.consume(evt);
- });
-
- mxUtils.write(left, label);
+ var span = document.createElement('span');
+ mxUtils.write(span, label);
+ span.style.display = 'block';
+ span.style.whiteSpace = 'nowrap';
+ span.style.overflow = 'hidden';
+ span.style.textOverflow = 'ellipsis';
+ span.style.position = 'absolute';
+ span.style.left = '52px';
+ span.style.right = '8px';
+ span.style.top = '8px';
+
+ left.appendChild(span);
ldiv.appendChild(left);
if (graph.isEnabled())
@@ -2545,7 +2586,6 @@ var LayersWindow = function(editorUi, x, y, w, h)
var label = graph.convertValueToString(selectionLayer) || mxResources.get('background');
removeLink.setAttribute('title', mxResources.get('removeIt', [label]));
duplicateLink.setAttribute('title', mxResources.get('duplicateIt', [label]));
- dataLink.setAttribute('title', mxResources.get('editData'));
if (graph.isSelectionEmpty())
{
@@ -2574,7 +2614,7 @@ var LayersWindow = function(editorUi, x, y, w, h)
});
this.window = new mxWindow(mxResources.get('layers'), div, x, y, w, h, true, true);
- this.window.minimumSize = new mxRectangle(0, 0, 120, 120);
+ this.window.minimumSize = new mxRectangle(0, 0, 150, 120);
this.window.destroyOnClose = false;
this.window.setMaximizable(false);
this.window.setResizable(true);
diff --git a/src/main/webapp/js/grapheditor/Editor.js b/src/main/webapp/js/grapheditor/Editor.js
index 668f196b..ebd630f0 100644
--- a/src/main/webapp/js/grapheditor/Editor.js
+++ b/src/main/webapp/js/grapheditor/Editor.js
@@ -93,15 +93,14 @@ Editor.pageCounter = 0;
})();
/**
- * Specifies if local storage should be used (eg. on the iPad which has no filesystem)
+ *
*/
-Editor.useLocalStorage = typeof(Storage) != 'undefined' && mxClient.IS_IOS;
+Editor.defaultHtmlFont = 'Helvetica Neue,Helvetica,Arial Unicode MS,Arial';
/**
- *
+ * Specifies if local storage should be used (eg. on the iPad which has no filesystem)
*/
-Editor.moveImage = (mxClient.IS_SVG) ? 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=' :
- IMAGE_PATH + '/move.png';
+Editor.useLocalStorage = typeof(Storage) != 'undefined' && mxClient.IS_IOS;
/**
*
@@ -110,12 +109,6 @@ Editor.rowMoveImage = (mxClient.IS_SVG) ? 'data:image/png;base64,iVBORw0KGgoAAAA
IMAGE_PATH + '/thumb_horz.png';
/**
- * Images below are for lightbox and embedding toolbars.
- */
-Editor.lightHelpImage = (mxClient.IS_SVG) ? 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+' :
- IMAGE_PATH + '/help.png';
-
-/**
* Sets the default font size.
*/
Editor.lightCheckmarkImage = (mxClient.IS_SVG) ? 'data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=' :
@@ -132,103 +125,38 @@ Editor.darkHelpImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCA
Editor.darkCheckmarkImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==';
/**
- * Images below are for lightbox and embedding toolbars.
- */
-Editor.maximizeImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAADgKxmiAAAABXRSTlMA758vX1Pw3BoAAABJSURBVAjXY8AJQkODGBhUQ0MhbAUGBiYY24CBgRnGFmZgMISwgwwDGRhEhVVBbAVmEQYGRwMmBjIAQi/CTIRd6G5AuA3dzYQBAHj0EFdHkvV4AAAAAElFTkSuQmCC';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
-Editor.zoomOutImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCxxcXEhISFgYGChjTUxAAAAAXRSTlMAQObYZgAAAEdJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITgLJZXFxgbIQ4Qj3CHIT5ggoIe5kgNkM1KSDYKBKqxPkDAPo5BAZBE54hAAAAAElFTkSuQmCC';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
-Editor.zoomInImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCwhISFxcXFgYGBavKaoAAAAAXRSTlMAQObYZgAAAElJREFUCNdjIAMwCQrB2YKCggJQJqMIA4sglK3owMzgqABVwsDMwCgAZTMbG8PYCHGEeoQ5CPMFFRD2MkFshmpSQLBRJFSJ8wcAEqcEM2uhl2MAAAAASUVORK5CYII=';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
-Editor.zoomFitImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAD1BMVEUAAAAAAAAwMDBwcHBgYGC1xl09AAAAAXRSTlMAQObYZgAAAEFJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITwMdGqEeYgzBfUAFhLxPEZqgmBQQbRUKFOH8AAK5OA3lA+FFOAAAAAElFTkSuQmCC';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
-Editor.layersImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAAaVBMVEUAAAAgICAICAgdHR0PDw8WFhYICAgLCwsXFxcvLy8ODg4uLi4iIiIqKiokJCQYGBgKCgonJycFBQUCAgIqKiocHBwcHBwODg4eHh4cHBwnJycJCQkUFBQqKiojIyMuLi4ZGRkgICAEBATOWYXAAAAAGnRSTlMAD7+fnz8/H7/ff18/77+vr5+fn39/b28fH2xSoKsAAACQSURBVBjTrYxJEsMgDARZZMAY73sgCcn/HxnhKtnk7j6oRq0psfuoyndZ/SuODkHPLzfVT6KeyPePnJ7KrnkRjWMXTn4SMnN8mXe2SSM3ts8L/ZUxxrbAULSYJJULE0Iw9pjpenoICcgcX61mGgTgtCv9Be99pzCoDhNQWQnchD1mup5++CYGcoQexajZbfwAj/0MD8ZOaUgAAAAASUVORK5CYII=';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
-Editor.previousImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAAh0lEQVQ4je3UsQnCUBCA4U8hpa1NsoEjpHQJS0dxADdwEMuMIJkgA1hYChbGQgMi+JC8q4L/AB/vDu7x74cWWEZhJU44RmA1zujR5GIbXF9YNrjD/Q0bDRY4fEBZ4P4LlgTnCbAf84pUM8/9hY08tMUtEoQ1LpEgrNBFglChFXR6Q6GfwwR6AGKJMF74Vtt3AAAAAElFTkSuQmCC';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
-Editor.nextImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAAi0lEQVQ4jeXUIQ7CUAwA0MeGxWI2yylwnALJUdBcgYvM7QYLmjOQIAkIPmJZghiIvypoUtX0tfnJL38X5ZfaEgUeUcManFBHgS0SLlhHggk3bCPBhCf2keCQR8wjwYTDp6YiZxJmOU1jGw7vGALescuBxsArNlOwd/CM1VSM/ut1qCIw+uOwiMJ+OF4CQzBCXm3hyAAAAABJRU5ErkJggg==';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
-Editor.editImage = (mxClient.IS_SVG) ? 'data:image/gif;base64,R0lGODlhCwALAIABAFdXV////yH5BAEAAAEALAAAAAALAAsAAAIZjB8AiKuc4jvLOGqzrjX6zmkWyChXaUJBAQA7' : IMAGE_PATH + '/edit.gif';
-
-/**
- * Specifies the image URL to be used for the transparent background.
+ *
*/
+Editor.lightHelpImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+';
+Editor.moveImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=';
+Editor.maximizeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1IDNsMi4zIDIuMy0yLjg5IDIuODcgMS40MiAxLjQyTDE4LjcgNi43IDIxIDlWM2gtNnpNMyA5bDIuMy0yLjMgMi44NyAyLjg5IDEuNDItMS40Mkw2LjcgNS4zIDkgM0gzdjZ6bTYgMTJsLTIuMy0yLjMgMi44OS0yLjg3LTEuNDItMS40Mkw1LjMgMTcuMyAzIDE1djZoNnptMTItNmwtMi4zIDIuMy0yLjg3LTIuODktMS40MiAxLjQyIDIuODkgMi44N0wxNSAyMWg2di02eiIvPjwvc3ZnPg==';
+Editor.zoomOutImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6TTcgOWg1djFIN3oiLz48L3N2Zz4=';
+Editor.zoomInImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6bS41LTdIOXYySDd2MWgydjJoMXYtMmgyVjloLTJ6Ii8+PC9zdmc+';
+Editor.zoomFitImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTUgMTVIM3Y0YzAgMS4xLjkgMiAyIDJoNHYtMkg1di00ek01IDVoNFYzSDVjLTEuMSAwLTIgLjktMiAydjRoMlY1em03IDNjLTIuMjEgMC00IDEuNzktNCA0czEuNzkgNCA0IDQgNC0xLjc5IDQtNC0xLjc5LTQtNC00em0wIDZjLTEuMSAwLTItLjktMi0ycy45LTIgMi0yIDIgLjkgMiAyLS45IDItMiAyem03LTExaC00djJoNHY0aDJWNWMwLTEuMS0uOS0yLTItMnptMCAxNmgtNHYyaDRjMS4xIDAgMi0uOSAyLTJ2LTRoLTJ2NHoiLz48L3N2Zz4=';
+Editor.layersImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTExLjk5IDE4LjU0bC03LjM3LTUuNzNMMyAxNC4wN2w5IDcgOS03LTEuNjMtMS4yN3pNMTIgMTZsNy4zNi01LjczTDIxIDlsLTktNy05IDcgMS42MyAxLjI3TDEyIDE2em0wLTExLjQ3TDE3Ljc0IDkgMTIgMTMuNDcgNi4yNiA5IDEyIDQuNTN6Ii8+PC9zdmc+';
+Editor.previousImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjQxIDcuNDFMMTQgNmwtNiA2IDYgNiAxLjQxLTEuNDFMMTAuODMgMTJsNC41OC00LjU5eiIvPjwvc3ZnPg==';
+Editor.nextImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEwIDZMOC41OSA3LjQxIDEzLjE3IDEybC00LjU4IDQuNTlMMTAgMThsNi02LTYtNnoiLz48L3N2Zz4=';
+Editor.editImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE0LjA2IDkuMDJsLjkyLjkyTDUuOTIgMTlINXYtLjkybDkuMDYtOS4wNk0xNy42NiAzYy0uMjUgMC0uNTEuMS0uNy4yOWwtMS44MyAxLjgzIDMuNzUgMy43NSAxLjgzLTEuODNjLjM5LS4zOS4zOS0xLjAyIDAtMS40MWwtMi4zNC0yLjM0Yy0uMi0uMi0uNDUtLjI5LS43MS0uMjl6bS0zLjYgMy4xOUwzIDE3LjI1VjIxaDMuNzVMMTcuODEgOS45NGwtMy43NS0zLjc1eiIvPjwvc3ZnPg==';
+Editor.duplicateImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE2IDFINGMtMS4xIDAtMiAuOS0yIDJ2MTRoMlYzaDEyVjF6bTMgNEg4Yy0xLjEgMC0yIC45LTIgMnYxNGMwIDEuMS45IDIgMiAyaDExYzEuMSAwIDItLjkgMi0yVjdjMC0xLjEtLjktMi0yLTJ6bTAgMTZIOFY3aDExdjE0eiIvPjwvc3ZnPg==';
+Editor.addImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEzaC02djZoLTJ2LTZINXYtMmg2VjVoMnY2aDZ2MnoiLz48L3N2Zz4=';
+Editor.crossImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDYuNDFMMTcuNTkgNSAxMiAxMC41OSA2LjQxIDUgNSA2LjQxIDEwLjU5IDEyIDUgMTcuNTkgNi40MSAxOSAxMiAxMy40MSAxNy41OSAxOSAxOSAxNy41OSAxMy40MSAxMiAxOSA2LjQxeiIvPjwvc3ZnPg==';
+Editor.verticalDotsImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDhjMS4xIDAgMi0uOSAyLTJzLS45LTItMi0yLTIgLjktMiAyIC45IDIgMiAyem0wIDJjLTEuMSAwLTIgLjktMiAycy45IDIgMiAyIDItLjkgMi0yLS45LTItMi0yem0wIDZjLTEuMSAwLTIgLjktMiAycy45IDIgMiAyIDItLjkgMi0yLS45LTItMi0yeiIvPjwvc3ZnPg==';
+Editor.trashImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE2IDl2MTBIOFY5aDhtLTEuNS02aC01bC0xIDFINXYyaDE0VjRoLTMuNWwtMS0xek0xOCA3SDZ2MTJjMCAxLjEuOSAyIDIgMmg4YzEuMSAwIDItLjkgMi0yVjd6Ii8+PC9zdmc+';
+Editor.hiddenImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNS0uNTkgMS4yMi0xLjQyIDIuMjctMi40MSAzLjEybDEuNDEgMS40MWMxLjM5LTEuMjMgMi40OS0yLjc3IDMuMTgtNC41M0MyMS4yNyA3LjExIDE3IDQgMTIgNGMtMS4yNyAwLTIuNDkuMi0zLjY0LjU3bDEuNjUgMS42NUMxMC42NiA2LjA5IDExLjMyIDYgMTIgNnptLTEuMDcgMS4xNEwxMyA5LjIxYy41Ny4yNSAxLjAzLjcxIDEuMjggMS4yOGwyLjA3IDIuMDdjLjA4LS4zNC4xNC0uNy4xNC0xLjA3QzE2LjUgOS4wMSAxNC40OCA3IDEyIDdjLS4zNyAwLS43Mi4wNS0xLjA3LjE0ek0yLjAxIDMuODdsMi42OCAyLjY4QzMuMDYgNy44MyAxLjc3IDkuNTMgMSAxMS41IDIuNzMgMTUuODkgNyAxOSAxMiAxOWMxLjUyIDAgMi45OC0uMjkgNC4zMi0uODJsMy40MiAzLjQyIDEuNDEtMS40MUwzLjQyIDIuNDUgMi4wMSAzLjg3em03LjUgNy41bDIuNjEgMi42MWMtLjA0LjAxLS4wOC4wMi0uMTIuMDItMS4zOCAwLTIuNS0xLjEyLTIuNS0yLjUgMC0uMDUuMDEtLjA4LjAxLS4xM3ptLTMuNC0zLjRsMS43NSAxLjc1Yy0uMjMuNTUtLjM2IDEuMTUtLjM2IDEuNzggMCAyLjQ4IDIuMDIgNC41IDQuNSA0LjUuNjMgMCAxLjIzLS4xMyAxLjc3LS4zNmwuOTguOThjLS44OC4yNC0xLjguMzgtMi43NS4zOC0zLjc5IDAtNy4xNy0yLjEzLTguODItNS41LjctMS40MyAxLjcyLTIuNjEgMi45My0zLjUzeiIvPjwvc3ZnPg==';
+Editor.visibleImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNUMxOS4xNyAxNC44NyAxNS43OSAxNyAxMiAxN3MtNy4xNy0yLjEzLTguODItNS41QzQuODMgOC4xMyA4LjIxIDYgMTIgNm0wLTJDNyA0IDIuNzMgNy4xMSAxIDExLjUgMi43MyAxNS44OSA3IDE5IDEyIDE5czkuMjctMy4xMSAxMS03LjVDMjEuMjcgNy4xMSAxNyA0IDEyIDR6bTAgNWMxLjM4IDAgMi41IDEuMTIgMi41IDIuNVMxMy4zOCAxNCAxMiAxNHMtMi41LTEuMTItMi41LTIuNVMxMC42MiA5IDEyIDltMC0yYy0yLjQ4IDAtNC41IDIuMDItNC41IDQuNVM5LjUyIDE2IDEyIDE2czQuNS0yLjAyIDQuNS00LjVTMTQuNDggNyAxMiA3eiIvPjwvc3ZnPg==';
+Editor.lockedImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PGcgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6Ii8+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBvcGFjaXR5PSIuODciLz48L2c+PHBhdGggZD0iTTE4IDhoLTFWNmMwLTIuNzYtMi4yNC01LTUtNVM3IDMuMjQgNyA2djJINmMtMS4xIDAtMiAuOS0yIDJ2MTBjMCAxLjEuOSAyIDIgMmgxMmMxLjEgMCAyLS45IDItMlYxMGMwLTEuMS0uOS0yLTItMnpNOSA2YzAtMS42NiAxLjM0LTMgMy0zczMgMS4zNCAzIDN2Mkg5VjZ6bTkgMTRINlYxMGgxMnYxMHptLTYtM2MxLjEgMCAyLS45IDItMnMtLjktMi0yLTItMiAuOS0yIDIgLjkgMiAyIDJ6Ii8+PC9zdmc+';
+Editor.unlockedImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE4IDhoLTFWNmMwLTIuNzYtMi4yNC01LTUtNVM3IDMuMjQgNyA2aDJjMC0xLjY2IDEuMzQtMyAzLTNzMyAxLjM0IDMgM3YySDZjLTEuMSAwLTIgLjktMiAydjEwYzAgMS4xLjkgMiAyIDJoMTJjMS4xIDAgMi0uOSAyLTJWMTBjMC0xLjEtLjktMi0yLTJ6bTAgMTJINlYxMGgxMnYxMHptLTYtM2MxLjEgMCAyLS45IDItMnMtLjktMi0yLTItMiAuOS0yIDIgLjkgMiAyIDJ6Ii8+PC9zdmc+';
Editor.zoomOutLargeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6TTcgOWg1djFIN3oiLz48L3N2Zz4=';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
Editor.zoomInLargeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6bS41LTdIOXYySDd2MWgydjJoMXYtMmgyVjloLTJ6Ii8+PC9zdmc+';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
Editor.actualSizeLargeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTUgMTVIM3Y0YzAgMS4xLjkgMiAyIDJoNHYtMkg1di00ek01IDVoNFYzSDVjLTEuMSAwLTIgLjktMiAydjRoMlY1em03IDNjLTIuMjEgMC00IDEuNzktNCA0czEuNzkgNCA0IDQgNC0xLjc5IDQtNC0xLjc5LTQtNC00em0wIDZjLTEuMSAwLTItLjktMi0ycy45LTIgMi0yIDIgLjkgMiAyLS45IDItMiAyem03LTExaC00djJoNHY0aDJWNWMwLTEuMS0uOS0yLTItMnptMCAxNmgtNHYyaDRjMS4xIDAgMi0uOSAyLTJ2LTRoLTJ2NHoiLz48L3N2Zz4=';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
Editor.printLargeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDhoLTFWM0g2djVINWMtMS42NiAwLTMgMS4zNC0zIDN2Nmg0djRoMTJ2LTRoNHYtNmMwLTEuNjYtMS4zNC0zLTMtM3pNOCA1aDh2M0g4VjV6bTggMTJ2Mkg4di00aDh2MnptMi0ydi0ySDZ2Mkg0di00YzAtLjU1LjQ1LTEgMS0xaDE0Yy41NSAwIDEgLjQ1IDEgMXY0aC0yeiIvPjxjaXJjbGUgY3g9IjE4IiBjeT0iMTEuNSIgcj0iMSIvPjwvc3ZnPg==';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
Editor.layersLargeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTExLjk5IDE4LjU0bC03LjM3LTUuNzNMMyAxNC4wN2w5IDcgOS03LTEuNjMtMS4yN3pNMTIgMTZsNy4zNi01LjczTDIxIDlsLTktNy05IDcgMS42MyAxLjI3TDEyIDE2em0wLTExLjQ3TDE3Ljc0IDkgMTIgMTMuNDcgNi4yNiA5IDEyIDQuNTN6Ii8+PC9zdmc+';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
Editor.closeLargeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIiBvcGFjaXR5PSIuODciLz48cGF0aCBkPSJNMTIgMkM2LjQ3IDIgMiA2LjQ3IDIgMTJzNC40NyAxMCAxMCAxMCAxMC00LjQ3IDEwLTEwUzE3LjUzIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTMuNTktMTNMMTIgMTAuNTkgOC40MSA3IDcgOC40MSAxMC41OSAxMiA3IDE1LjU5IDguNDEgMTcgMTIgMTMuNDEgMTUuNTkgMTcgMTcgMTUuNTkgMTMuNDEgMTIgMTcgOC40MXoiLz48L3N2Zz4=';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
Editor.editLargeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE0LjA2IDkuMDJsLjkyLjkyTDUuOTIgMTlINXYtLjkybDkuMDYtOS4wNk0xNy42NiAzYy0uMjUgMC0uNTEuMS0uNy4yOWwtMS44MyAxLjgzIDMuNzUgMy43NSAxLjgzLTEuODNjLjM5LS4zOS4zOS0xLjAyIDAtMS40MWwtMi4zNC0yLjM0Yy0uMi0uMi0uNDUtLjI5LS43MS0uMjl6bS0zLjYgMy4xOUwzIDE3LjI1VjIxaDMuNzVMMTcuODEgOS45NGwtMy43NS0zLjc1eiIvPjwvc3ZnPg==';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
Editor.previousLargeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjYxIDcuNDFMMTQuMiA2bC02IDYgNiA2IDEuNDEtMS40MUwxMS4wMyAxMmw0LjU4LTQuNTl6Ii8+PC9zdmc+';
-
-/**
- * Specifies the image URL to be used for the transparent background.
- */
Editor.nextLargeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEwLjAyIDZMOC42MSA3LjQxIDEzLjE5IDEybC00LjU4IDQuNTlMMTAuMDIgMThsNi02LTYtNnoiLz48L3N2Zz4=';
-
-/**
- * Specifies the image to be used for the refresh button.
- */
Editor.refreshLargeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE3LjY1IDYuMzVDMTYuMiA0LjkgMTQuMjEgNCAxMiA0Yy00LjQyIDAtNy45OSAzLjU4LTcuOTkgOHMzLjU3IDggNy45OSA4YzMuNzMgMCA2Ljg0LTIuNTUgNy43My02aC0yLjA4Yy0uODIgMi4zMy0zLjA0IDQtNS42NSA0LTMuMzEgMC02LTIuNjktNi02czIuNjktNiA2LTZjMS42NiAwIDMuMTQuNjkgNC4yMiAxLjc4TDEzIDExaDdWNGwtMi4zNSAyLjM1eiIvPjwvc3ZnPg==';
-
-/**
- * Specifies the image to be used for the back button.
- */
Editor.backLargeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIiBvcGFjaXR5PSIuODciLz48cGF0aCBkPSJNMTcuNTEgMy44N0wxNS43MyAyLjEgNS44NCAxMmw5LjkgOS45IDEuNzctMS43N0w5LjM4IDEybDguMTMtOC4xM3oiLz48L3N2Zz4=';
-
-/**
- * Specifies the image to be used for the back button.
- */
Editor.fullscreenLargeImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTcgMTRINXY1aDV2LTJIN3YtM3ptLTItNGgyVjdoM1Y1SDV2NXptMTIgN2gtM3YyaDV2LTVoLTJ2M3pNMTQgNXYyaDN2M2gyVjVoLTV6Ii8+PC9zdmc+';
/**
@@ -1024,16 +952,6 @@ Dialog.prototype.closeImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/close.png' : '
Dialog.prototype.clearImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/clear.gif' : 'data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==';
/**
- *
- */
-Dialog.prototype.lockedImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/locked.png' : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCODExNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCODIxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3RjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI4MDE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvqMCFYAAAAVUExURZmZmb+/v7KysqysrMzMzLGxsf///4g8N1cAAAAHdFJOU////////wAaSwNGAAAAPElEQVR42lTMQQ4AIQgEwUa0//9kTQirOweYOgDqAMbZUr10AGlAwx4/BJ2QJ4U0L5brYjovvpv32xZgAHZaATFtMbu4AAAAAElFTkSuQmCC';
-
-/**
- *
- */
-Dialog.prototype.unlockedImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/unlocked.png' : 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==';
-
-/**
* Removes the dialog from the DOM.
*/
Dialog.prototype.bgOpacity = 80;
diff --git a/src/main/webapp/js/grapheditor/EditorUi.js b/src/main/webapp/js/grapheditor/EditorUi.js
index 1a538435..f5b78c60 100644
--- a/src/main/webapp/js/grapheditor/EditorUi.js
+++ b/src/main/webapp/js/grapheditor/EditorUi.js
@@ -2193,7 +2193,7 @@ EditorUi.prototype.initCanvas = function()
var pageInfo = document.createElement('div');
pageInfo.style.display = 'inline-block';
pageInfo.style.verticalAlign = 'top';
- pageInfo.style.fontFamily = 'Helvetica,Arial';
+ pageInfo.style.fontFamily = Editor.defaultHtmlFont;
pageInfo.style.marginTop = '10px';
pageInfo.style.fontSize = '14px';
pageInfo.style.color = '#ffffff';
@@ -2350,7 +2350,7 @@ EditorUi.prototype.initCanvas = function()
mxUtils.setPrefixedStyle(this.layersDialog.style, 'borderRadius', '5px');
this.layersDialog.style.position = 'fixed';
- this.layersDialog.style.fontFamily = 'Helvetica,Arial';
+ this.layersDialog.style.fontFamily = Editor.defaultHtmlFont;
this.layersDialog.style.backgroundColor = '#000000';
this.layersDialog.style.width = '160px';
this.layersDialog.style.padding = '4px 2px 4px 2px';
@@ -2365,6 +2365,7 @@ EditorUi.prototype.initCanvas = function()
this.layersDialog.style.zIndex = style.zIndex;
document.body.appendChild(this.layersDialog);
+ this.editor.fireEvent(new mxEventObject('layersDialogShown'));
}
mxEvent.consume(evt);
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index edcf072b..d4208502 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -200,7 +200,7 @@ null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.1.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+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||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.1.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||
0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),
@@ -2002,20 +2002,27 @@ d);this.exportColor(e)};this.fromRGB=function(a,b,c,d){0>a&&(a=0);1<a&&(a=1);0>b
function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6===c[1].length?this.fromRGB(parseInt(c[1].substr(0,2),16)/255,parseInt(c[1].substr(2,2),16)/255,parseInt(c[1].substr(4,2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),y=!1,B=!1,A=1,z=2,C=4,v=8;u&&(q=function(){r.fromString(u.value,A);p()},mxJSColor.addEvent(u,"keyup",q),mxJSColor.addEvent(u,"input",q),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
-Editor=function(b,c,e,k,f){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=k||this.createGraph(c,e);this.editable=null!=f?f:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(b){this.status=b;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+Editor=function(b,c,e,k,g){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=k||this.createGraph(c,e);this.editable=null!=g?g:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(b){this.status=b;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
function(){return this.status};this.graphChangeListener=function(b,c){var d=null!=c?c.getProperty("edit"):null;null!=d&&d.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
-(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(c){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
-Editor.moveImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=":IMAGE_PATH+
-"/move.png";Editor.rowMoveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/thumb_horz.png";
-Editor.lightHelpImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+":IMAGE_PATH+
-"/help.png";
+(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(c){}})();Editor.defaultHtmlFont="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
+Editor.rowMoveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/thumb_horz.png";
Editor.lightCheckmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+
"/checkmark.gif";Editor.darkHelpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=";Editor.darkCheckmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==";
-Editor.maximizeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAADgKxmiAAAABXRSTlMA758vX1Pw3BoAAABJSURBVAjXY8AJQkODGBhUQ0MhbAUGBiYY24CBgRnGFmZgMISwgwwDGRhEhVVBbAVmEQYGRwMmBjIAQi/CTIRd6G5AuA3dzYQBAHj0EFdHkvV4AAAAAElFTkSuQmCC";Editor.zoomOutImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCxxcXEhISFgYGChjTUxAAAAAXRSTlMAQObYZgAAAEdJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITgLJZXFxgbIQ4Qj3CHIT5ggoIe5kgNkM1KSDYKBKqxPkDAPo5BAZBE54hAAAAAElFTkSuQmCC";
-Editor.zoomInImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCwhISFxcXFgYGBavKaoAAAAAXRSTlMAQObYZgAAAElJREFUCNdjIAMwCQrB2YKCggJQJqMIA4sglK3owMzgqABVwsDMwCgAZTMbG8PYCHGEeoQ5CPMFFRD2MkFshmpSQLBRJFSJ8wcAEqcEM2uhl2MAAAAASUVORK5CYII=";Editor.zoomFitImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAD1BMVEUAAAAAAAAwMDBwcHBgYGC1xl09AAAAAXRSTlMAQObYZgAAAEFJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITwMdGqEeYgzBfUAFhLxPEZqgmBQQbRUKFOH8AAK5OA3lA+FFOAAAAAElFTkSuQmCC";
-Editor.layersImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAAaVBMVEUAAAAgICAICAgdHR0PDw8WFhYICAgLCwsXFxcvLy8ODg4uLi4iIiIqKiokJCQYGBgKCgonJycFBQUCAgIqKiocHBwcHBwODg4eHh4cHBwnJycJCQkUFBQqKiojIyMuLi4ZGRkgICAEBATOWYXAAAAAGnRSTlMAD7+fnz8/H7/ff18/77+vr5+fn39/b28fH2xSoKsAAACQSURBVBjTrYxJEsMgDARZZMAY73sgCcn/HxnhKtnk7j6oRq0psfuoyndZ/SuODkHPLzfVT6KeyPePnJ7KrnkRjWMXTn4SMnN8mXe2SSM3ts8L/ZUxxrbAULSYJJULE0Iw9pjpenoICcgcX61mGgTgtCv9Be99pzCoDhNQWQnchD1mup5++CYGcoQexajZbfwAj/0MD8ZOaUgAAAAASUVORK5CYII=";
-Editor.previousImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAAh0lEQVQ4je3UsQnCUBCA4U8hpa1NsoEjpHQJS0dxADdwEMuMIJkgA1hYChbGQgMi+JC8q4L/AB/vDu7x74cWWEZhJU44RmA1zujR5GIbXF9YNrjD/Q0bDRY4fEBZ4P4LlgTnCbAf84pUM8/9hY08tMUtEoQ1LpEgrNBFglChFXR6Q6GfwwR6AGKJMF74Vtt3AAAAAElFTkSuQmCC";Editor.nextImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAAi0lEQVQ4jeXUIQ7CUAwA0MeGxWI2yylwnALJUdBcgYvM7QYLmjOQIAkIPmJZghiIvypoUtX0tfnJL38X5ZfaEgUeUcManFBHgS0SLlhHggk3bCPBhCf2keCQR8wjwYTDp6YiZxJmOU1jGw7vGALescuBxsArNlOwd/CM1VSM/ut1qCIw+uOwiMJ+OF4CQzBCXm3hyAAAAABJRU5ErkJggg==";
-Editor.editImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCwALAIABAFdXV////yH5BAEAAAEALAAAAAALAAsAAAIZjB8AiKuc4jvLOGqzrjX6zmkWyChXaUJBAQA7":IMAGE_PATH+"/edit.gif";Editor.zoomOutLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6TTcgOWg1djFIN3oiLz48L3N2Zz4=";
+Editor.lightHelpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+";
+Editor.moveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=";
+Editor.maximizeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1IDNsMi4zIDIuMy0yLjg5IDIuODcgMS40MiAxLjQyTDE4LjcgNi43IDIxIDlWM2gtNnpNMyA5bDIuMy0yLjMgMi44NyAyLjg5IDEuNDItMS40Mkw2LjcgNS4zIDkgM0gzdjZ6bTYgMTJsLTIuMy0yLjMgMi44OS0yLjg3LTEuNDItMS40Mkw1LjMgMTcuMyAzIDE1djZoNnptMTItNmwtMi4zIDIuMy0yLjg3LTIuODktMS40MiAxLjQyIDIuODkgMi44N0wxNSAyMWg2di02eiIvPjwvc3ZnPg==";
+Editor.zoomOutImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6TTcgOWg1djFIN3oiLz48L3N2Zz4=";
+Editor.zoomInImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6bS41LTdIOXYySDd2MWgydjJoMXYtMmgyVjloLTJ6Ii8+PC9zdmc+";
+Editor.zoomFitImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTUgMTVIM3Y0YzAgMS4xLjkgMiAyIDJoNHYtMkg1di00ek01IDVoNFYzSDVjLTEuMSAwLTIgLjktMiAydjRoMlY1em03IDNjLTIuMjEgMC00IDEuNzktNCA0czEuNzkgNCA0IDQgNC0xLjc5IDQtNC0xLjc5LTQtNC00em0wIDZjLTEuMSAwLTItLjktMi0ycy45LTIgMi0yIDIgLjkgMiAyLS45IDItMiAyem03LTExaC00djJoNHY0aDJWNWMwLTEuMS0uOS0yLTItMnptMCAxNmgtNHYyaDRjMS4xIDAgMi0uOSAyLTJ2LTRoLTJ2NHoiLz48L3N2Zz4=";
+Editor.layersImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTExLjk5IDE4LjU0bC03LjM3LTUuNzNMMyAxNC4wN2w5IDcgOS03LTEuNjMtMS4yN3pNMTIgMTZsNy4zNi01LjczTDIxIDlsLTktNy05IDcgMS42MyAxLjI3TDEyIDE2em0wLTExLjQ3TDE3Ljc0IDkgMTIgMTMuNDcgNi4yNiA5IDEyIDQuNTN6Ii8+PC9zdmc+";Editor.previousImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjQxIDcuNDFMMTQgNmwtNiA2IDYgNiAxLjQxLTEuNDFMMTAuODMgMTJsNC41OC00LjU5eiIvPjwvc3ZnPg==";
+Editor.nextImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEwIDZMOC41OSA3LjQxIDEzLjE3IDEybC00LjU4IDQuNTlMMTAgMThsNi02LTYtNnoiLz48L3N2Zz4=";Editor.editImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE0LjA2IDkuMDJsLjkyLjkyTDUuOTIgMTlINXYtLjkybDkuMDYtOS4wNk0xNy42NiAzYy0uMjUgMC0uNTEuMS0uNy4yOWwtMS44MyAxLjgzIDMuNzUgMy43NSAxLjgzLTEuODNjLjM5LS4zOS4zOS0xLjAyIDAtMS40MWwtMi4zNC0yLjM0Yy0uMi0uMi0uNDUtLjI5LS43MS0uMjl6bS0zLjYgMy4xOUwzIDE3LjI1VjIxaDMuNzVMMTcuODEgOS45NGwtMy43NS0zLjc1eiIvPjwvc3ZnPg==";
+Editor.duplicateImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE2IDFINGMtMS4xIDAtMiAuOS0yIDJ2MTRoMlYzaDEyVjF6bTMgNEg4Yy0xLjEgMC0yIC45LTIgMnYxNGMwIDEuMS45IDIgMiAyaDExYzEuMSAwIDItLjkgMi0yVjdjMC0xLjEtLjktMi0yLTJ6bTAgMTZIOFY3aDExdjE0eiIvPjwvc3ZnPg==";Editor.addImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEzaC02djZoLTJ2LTZINXYtMmg2VjVoMnY2aDZ2MnoiLz48L3N2Zz4=";
+Editor.crossImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDYuNDFMMTcuNTkgNSAxMiAxMC41OSA2LjQxIDUgNSA2LjQxIDEwLjU5IDEyIDUgMTcuNTkgNi40MSAxOSAxMiAxMy40MSAxNy41OSAxOSAxOSAxNy41OSAxMy40MSAxMiAxOSA2LjQxeiIvPjwvc3ZnPg==";Editor.verticalDotsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDhjMS4xIDAgMi0uOSAyLTJzLS45LTItMi0yLTIgLjktMiAyIC45IDIgMiAyem0wIDJjLTEuMSAwLTIgLjktMiAycy45IDIgMiAyIDItLjkgMi0yLS45LTItMi0yem0wIDZjLTEuMSAwLTIgLjktMiAycy45IDIgMiAyIDItLjkgMi0yLS45LTItMi0yeiIvPjwvc3ZnPg==";
+Editor.trashImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE2IDl2MTBIOFY5aDhtLTEuNS02aC01bC0xIDFINXYyaDE0VjRoLTMuNWwtMS0xek0xOCA3SDZ2MTJjMCAxLjEuOSAyIDIgMmg4YzEuMSAwIDItLjkgMi0yVjd6Ii8+PC9zdmc+";Editor.hiddenImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNS0uNTkgMS4yMi0xLjQyIDIuMjctMi40MSAzLjEybDEuNDEgMS40MWMxLjM5LTEuMjMgMi40OS0yLjc3IDMuMTgtNC41M0MyMS4yNyA3LjExIDE3IDQgMTIgNGMtMS4yNyAwLTIuNDkuMi0zLjY0LjU3bDEuNjUgMS42NUMxMC42NiA2LjA5IDExLjMyIDYgMTIgNnptLTEuMDcgMS4xNEwxMyA5LjIxYy41Ny4yNSAxLjAzLjcxIDEuMjggMS4yOGwyLjA3IDIuMDdjLjA4LS4zNC4xNC0uNy4xNC0xLjA3QzE2LjUgOS4wMSAxNC40OCA3IDEyIDdjLS4zNyAwLS43Mi4wNS0xLjA3LjE0ek0yLjAxIDMuODdsMi42OCAyLjY4QzMuMDYgNy44MyAxLjc3IDkuNTMgMSAxMS41IDIuNzMgMTUuODkgNyAxOSAxMiAxOWMxLjUyIDAgMi45OC0uMjkgNC4zMi0uODJsMy40MiAzLjQyIDEuNDEtMS40MUwzLjQyIDIuNDUgMi4wMSAzLjg3em03LjUgNy41bDIuNjEgMi42MWMtLjA0LjAxLS4wOC4wMi0uMTIuMDItMS4zOCAwLTIuNS0xLjEyLTIuNS0yLjUgMC0uMDUuMDEtLjA4LjAxLS4xM3ptLTMuNC0zLjRsMS43NSAxLjc1Yy0uMjMuNTUtLjM2IDEuMTUtLjM2IDEuNzggMCAyLjQ4IDIuMDIgNC41IDQuNSA0LjUuNjMgMCAxLjIzLS4xMyAxLjc3LS4zNmwuOTguOThjLS44OC4yNC0xLjguMzgtMi43NS4zOC0zLjc5IDAtNy4xNy0yLjEzLTguODItNS41LjctMS40MyAxLjcyLTIuNjEgMi45My0zLjUzeiIvPjwvc3ZnPg==";
+Editor.visibleImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNUMxOS4xNyAxNC44NyAxNS43OSAxNyAxMiAxN3MtNy4xNy0yLjEzLTguODItNS41QzQuODMgOC4xMyA4LjIxIDYgMTIgNm0wLTJDNyA0IDIuNzMgNy4xMSAxIDExLjUgMi43MyAxNS44OSA3IDE5IDEyIDE5czkuMjctMy4xMSAxMS03LjVDMjEuMjcgNy4xMSAxNyA0IDEyIDR6bTAgNWMxLjM4IDAgMi41IDEuMTIgMi41IDIuNVMxMy4zOCAxNCAxMiAxNHMtMi41LTEuMTItMi41LTIuNVMxMC42MiA5IDEyIDltMC0yYy0yLjQ4IDAtNC41IDIuMDItNC41IDQuNVM5LjUyIDE2IDEyIDE2czQuNS0yLjAyIDQuNS00LjVTMTQuNDggNyAxMiA3eiIvPjwvc3ZnPg==";
+Editor.lockedImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PGcgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6Ii8+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBvcGFjaXR5PSIuODciLz48L2c+PHBhdGggZD0iTTE4IDhoLTFWNmMwLTIuNzYtMi4yNC01LTUtNVM3IDMuMjQgNyA2djJINmMtMS4xIDAtMiAuOS0yIDJ2MTBjMCAxLjEuOSAyIDIgMmgxMmMxLjEgMCAyLS45IDItMlYxMGMwLTEuMS0uOS0yLTItMnpNOSA2YzAtMS42NiAxLjM0LTMgMy0zczMgMS4zNCAzIDN2Mkg5VjZ6bTkgMTRINlYxMGgxMnYxMHptLTYtM2MxLjEgMCAyLS45IDItMnMtLjktMi0yLTItMiAuOS0yIDIgLjkgMiAyIDJ6Ii8+PC9zdmc+";
+Editor.unlockedImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE4IDhoLTFWNmMwLTIuNzYtMi4yNC01LTUtNVM3IDMuMjQgNyA2aDJjMC0xLjY2IDEuMzQtMyAzLTNzMyAxLjM0IDMgM3YySDZjLTEuMSAwLTIgLjktMiAydjEwYzAgMS4xLjkgMiAyIDJoMTJjMS4xIDAgMi0uOSAyLTJWMTBjMC0xLjEtLjktMi0yLTJ6bTAgMTJINlYxMGgxMnYxMHptLTYtM2MxLjEgMCAyLS45IDItMnMtLjktMi0yLTItMiAuOS0yIDIgLjkgMiAyIDJ6Ii8+PC9zdmc+";
+Editor.zoomOutLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6TTcgOWg1djFIN3oiLz48L3N2Zz4=";
Editor.zoomInLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6bS41LTdIOXYySDd2MWgydjJoMXYtMmgyVjloLTJ6Ii8+PC9zdmc+";
Editor.actualSizeLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTUgMTVIM3Y0YzAgMS4xLjkgMiAyIDJoNHYtMkg1di00ek01IDVoNFYzSDVjLTEuMSAwLTIgLjktMiAydjRoMlY1em03IDNjLTIuMjEgMC00IDEuNzktNCA0czEuNzkgNCA0IDQgNC0xLjc5IDQtNC0xLjc5LTQtNC00em0wIDZjLTEuMSAwLTItLjktMi0ycy45LTIgMi0yIDIgLjkgMiAyLS45IDItMiAyem03LTExaC00djJoNHY0aDJWNWMwLTEuMS0uOS0yLTItMnptMCAxNmgtNHYyaDRjMS4xIDAgMi0uOSAyLTJ2LTRoLTJ2NHoiLz48L3N2Zz4=";
Editor.printLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDhoLTFWM0g2djVINWMtMS42NiAwLTMgMS4zNC0zIDN2Nmg0djRoMTJ2LTRoNHYtNmMwLTEuNjYtMS4zNC0zLTMtM3pNOCA1aDh2M0g4VjV6bTggMTJ2Mkg4di00aDh2MnptMi0ydi0ySDZ2Mkg0di00YzAtLjU1LjQ1LTEgMS0xaDE0Yy41NSAwIDEgLjQ1IDEgMXY0aC0yeiIvPjxjaXJjbGUgY3g9IjE4IiBjeT0iMTEuNSIgcj0iMSIvPjwvc3ZnPg==";
@@ -2028,7 +2035,7 @@ Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Ha
Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.darkMode=!1;Editor.isDarkMode=function(b){return Editor.darkMode||"dark"==uiTheme};Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;
Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
-Editor.prototype.editAsNew=function(b,c){var e=null!=c?"?title="+encodeURIComponent(c):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,f=mxUtils.bind(this,function(c){"ready"==c.data&&c.source==k&&(mxEvent.removeListener(window,"message",f),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",f);k=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+
+Editor.prototype.editAsNew=function(b,c){var e=null!=c?"?title="+encodeURIComponent(c):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,g=mxUtils.bind(this,function(c){"ready"==c.data&&c.source==k&&(mxEvent.removeListener(window,"message",g),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",g);k=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+
"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,c){var e=new Graph(null,c,null,null,b);e.transparentBackground=!1;this.chromeless||(e.isBlankLink=function(b){return!this.isExternalProtocol(b)});return e};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
@@ -2041,105 +2048,101 @@ Editor.prototype.getGraphXml=function(b){b=(null!=b?b:1)?(new mxCodec(mxUtils.cr
this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width);
b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(b){this.modified=b};
Editor.prototype.setFilename=function(b){this.filename=b};
-Editor.prototype.createUndoManager=function(){var b=this.graph,c=new mxUndoManager;this.undoListener=function(b,e){c.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(b,c){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,e);b.getView().addListener(mxEvent.UNDO,e);e=function(c,e){var f=b.getSelectionCellsForChanges(e.getProperty("edit").changes,function(b){return!(b instanceof mxChildChange)});if(0<f.length){b.getModel();for(var k=[],d=0;d<
-f.length;d++)null!=b.view.getState(f[d])&&k.push(f[d]);b.setSelectionCells(k)}};c.addListener(mxEvent.UNDO,e);c.addListener(mxEvent.REDO,e);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};
+Editor.prototype.createUndoManager=function(){var b=this.graph,c=new mxUndoManager;this.undoListener=function(b,e){c.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(b,c){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,e);b.getView().addListener(mxEvent.UNDO,e);e=function(c,e){var g=b.getSelectionCellsForChanges(e.getProperty("edit").changes,function(b){return!(b instanceof mxChildChange)});if(0<g.length){b.getModel();for(var k=[],d=0;d<
+g.length;d++)null!=b.view.getState(g[d])&&k.push(g[d]);b.setSelectionCells(k)}};c.addListener(mxEvent.UNDO,e);c.addListener(mxEvent.REDO,e);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,c,e,k,f,n,t,d,g,l,q){var p=g?57:0,m=e,v=k,u=g?0:64,B=mxUtils.getDocumentSize();null!=window.innerHeight&&(B.height=window.innerHeight);var x=B.height,E=Math.max(1,Math.round((B.width-e-u)/2)),A=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-u):e;k=Math.min(k,x-u);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",
-this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));B=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=B.x+"px";this.bg.style.top=B.y+"px";E+=B.x;A+=B.y;f&&document.body.appendChild(this.bg);var F=b.createDiv(g?"geTransDialog":"geDialog");f=this.getPosition(E,A,e,k);E=f.x;A=f.y;F.style.width=e+"px";F.style.height=k+"px";F.style.left=E+"px";F.style.top=A+"px";F.style.zIndex=
-this.zIndex;F.appendChild(c);document.body.appendChild(F);!d&&c.clientHeight>F.clientHeight-u&&(c.style.overflowY="auto");if(n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",n.style.top=A+14+"px",n.style.left=E+e+38-p+"px",n.style.zIndex=this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=n,!q)){var I=!1;
-mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){I=!0}),null,mxUtils.bind(this,function(d){I&&(b.hideDialog(!0),I=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var g=l();null!=g&&(m=e=g.w,v=k=g.h)}g=mxUtils.getDocumentSize();x=g.height;this.bg.style.height=x+"px";E=Math.max(1,Math.round((g.width-e-u)/2));A=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(m,document.body.scrollWidth-u):m;k=Math.min(v,x-u);g=this.getPosition(E,A,e,
-k);E=g.x;A=g.y;F.style.left=E+"px";F.style.top=A+"px";F.style.width=e+"px";F.style.height=k+"px";!d&&c.clientHeight>F.clientHeight-u&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=A+14+"px",this.dialogImg.style.left=E+e+38-p+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=F;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,c,e,k,g,p,t,d,f,l,m){var q=f?57:0,n=e,v=k,u=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,H=Math.max(1,Math.round((y.width-e-u)/2)),D=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-u):e;k=Math.min(k,x-u);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",
+this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));y=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=y.x+"px";this.bg.style.top=y.y+"px";H+=y.x;D+=y.y;g&&document.body.appendChild(this.bg);var E=b.createDiv(f?"geTransDialog":"geDialog");g=this.getPosition(H,D,e,k);H=g.x;D=g.y;E.style.width=e+"px";E.style.height=k+"px";E.style.left=H+"px";E.style.top=D+"px";E.style.zIndex=
+this.zIndex;E.appendChild(c);document.body.appendChild(E);!d&&c.clientHeight>E.clientHeight-u&&(c.style.overflowY="auto");if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=D+14+"px",p.style.left=H+e+38-q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!m)){var J=!1;
+mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){J=!0}),null,mxUtils.bind(this,function(d){J&&(b.hideDialog(!0),J=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(n=e=f.w,v=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";H=Math.max(1,Math.round((f.width-e-u)/2));D=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(n,document.body.scrollWidth-u):n;k=Math.min(v,x-u);f=this.getPosition(H,D,e,
+k);H=f.x;D=f.y;E.style.left=H+"px";E.style.top=D+"px";E.style.width=e+"px";E.style.height=k+"px";!d&&c.clientHeight>E.clientHeight-u&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=D+14+"px",this.dialogImg.style.left=H+e+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=E;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":
IMAGE_PATH+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
-"/clear.gif";
-Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCODExNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCODIxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3RjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI4MDE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvqMCFYAAAAVUExURZmZmb+/v7KysqysrMzMzLGxsf///4g8N1cAAAAHdFJOU////////wAaSwNGAAAAPElEQVR42lTMQQ4AIQgEwUa0//9kTQirOweYOgDqAMbZUr10AGlAwx4/BJ2QJ4U0L5brYjovvpv32xZgAHZaATFtMbu4AAAAAElFTkSuQmCC":IMAGE_PATH+
-"/locked.png";
-Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
-"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,c){return new mxPoint(b,c)};Dialog.prototype.close=function(b,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,c,e,k,f,n,t,d,g,l,q){g=null!=g?g:!0;var p=document.createElement("div");p.style.textAlign="center";if(null!=c){var m=document.createElement("div");m.style.padding="0px";m.style.margin="0px";m.style.fontSize="18px";m.style.paddingBottom="16px";m.style.marginBottom="10px";m.style.borderBottom="1px solid #c0c0c0";m.style.color="gray";m.style.whiteSpace="nowrap";m.style.textOverflow="ellipsis";m.style.overflow="hidden";mxUtils.write(m,c);m.setAttribute("title",c);p.appendChild(m)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;p.appendChild(c);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=n&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();n()}),c.className="geBtn",e.appendChild(c),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=q&&q()}),l.className="geBtn",e.appendChild(l));var v=mxUtils.button(k,function(){g&&b.hideDialog();null!=f&&f()});
-v.className="geBtn";e.appendChild(v);null!=t&&(k=mxUtils.button(t,function(){g&&b.hideDialog();null!=d&&d()}),k.className="geBtn gePrimaryBtn",e.appendChild(k));this.init=function(){v.focus()};p.appendChild(e);this.container=p},PrintDialog=function(b,c){this.create(b,c)};
-PrintDialog.prototype.create=function(b){function c(b){var g=d.checked||l.checked,c=parseInt(p.value)/100;isNaN(c)&&(c=1,p.value="100%");var c=.75*c,f=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/e.pageScale;if(g){var m=d.checked?1:parseInt(q.value);isNaN(m)||(k=mxUtils.getScaleForPageCount(m,e,f))}e.getGraphBounds();var n=m=0,f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width*c);f.height=Math.ceil(f.height*c);k*=c;!g&&e.pageVisible?(c=e.getPageLayout(),m-=c.x*f.width,n-=c.y*f.height):
-g=!0;g=PrintDialog.createPrintPreview(e,k,f,0,m,n,g);g.open();b&&PrintDialog.printPreview(g)}var e=b.editor.graph,k,f,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var t=document.createElement("tbody");k=document.createElement("tr");var d=document.createElement("input");d.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(d);var g=document.createElement("span");mxUtils.write(g," "+mxResources.get("fitPage"));
-f.appendChild(g);mxEvent.addListener(g,"click",function(b){d.checked=!d.checked;l.checked=!d.checked;mxEvent.consume(b)});mxEvent.addListener(d,"change",function(){l.checked=!d.checked});k.appendChild(f);t.appendChild(k);k=k.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(l);g=document.createElement("span");mxUtils.write(g," "+mxResources.get("posterPrint")+":");f.appendChild(g);mxEvent.addListener(g,
-"click",function(b){l.checked=!l.checked;d.checked=!l.checked;mxEvent.consume(b)});k.appendChild(f);var q=document.createElement("input");q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.setAttribute("size","4");q.setAttribute("disabled","disabled");q.style.width="50px";f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(q);mxUtils.write(f," "+mxResources.get("pages")+" (max)");k.appendChild(f);t.appendChild(k);mxEvent.addListener(l,"change",
-function(){l.checked?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled");d.checked=!l.checked});k=k.cloneNode(!1);f=document.createElement("td");mxUtils.write(f,mxResources.get("pageScale")+":");k.appendChild(f);f=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";f.appendChild(p);k.appendChild(f);t.appendChild(k);k=document.createElement("tr");f=document.createElement("td");f.colSpan=2;
-f.style.paddingTop="20px";f.setAttribute("align","right");g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";b.editor.cancelFirst&&f.appendChild(g);if(PrintDialog.previewEnabled){var m=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)});m.className="geBtn";f.appendChild(m)}m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});m.className="geBtn gePrimaryBtn";f.appendChild(m);b.editor.cancelFirst||
-f.appendChild(g);k.appendChild(f);t.appendChild(k);n.appendChild(t);this.container=n};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var c=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(e){}};
-PrintDialog.createPrintPreview=function(b,c,e,k,f,n,t){c=new mxPrintPreview(b,c,e,k,f,n);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=t;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";c.backgroundColor=b;var d=c.writeHead;c.writeHead=function(b){d.apply(this,arguments);b.writeln('<style type="text/css">');b.writeln("@media screen {");b.writeln(" body > div { padding:30px;box-sizing:content-box; }");b.writeln("}");b.writeln("</style>")};return c};
+"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,c){return new mxPoint(b,c)};Dialog.prototype.close=function(b,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
+var ErrorDialog=function(b,c,e,k,g,p,t,d,f,l,m){f=null!=f?f:!0;var q=document.createElement("div");q.style.textAlign="center";if(null!=c){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="10px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";n.style.whiteSpace="nowrap";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxUtils.write(n,c);n.setAttribute("title",c);q.appendChild(n)}c=
+document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;q.appendChild(c);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=p&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),c.className="geBtn",e.appendChild(c),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",e.appendChild(l));var v=mxUtils.button(k,function(){f&&b.hideDialog();null!=g&&g()});
+v.className="geBtn";e.appendChild(v);null!=t&&(k=mxUtils.button(t,function(){f&&b.hideDialog();null!=d&&d()}),k.className="geBtn gePrimaryBtn",e.appendChild(k));this.init=function(){v.focus()};q.appendChild(e);this.container=q},PrintDialog=function(b,c){this.create(b,c)};
+PrintDialog.prototype.create=function(b){function c(b){var f=d.checked||l.checked,c=parseInt(q.value)/100;isNaN(c)&&(c=1,q.value="100%");var c=.75*c,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/e.pageScale;if(f){var n=d.checked?1:parseInt(m.value);isNaN(n)||(k=mxUtils.getScaleForPageCount(n,e,g))}e.getGraphBounds();var p=n=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*c);g.height=Math.ceil(g.height*c);k*=c;!f&&e.pageVisible?(c=e.getPageLayout(),n-=c.x*g.width,p-=c.y*g.height):
+f=!0;f=PrintDialog.createPrintPreview(e,k,g,0,n,p,f);f.open();b&&PrintDialog.printPreview(f)}var e=b.editor.graph,k,g,p=document.createElement("table");p.style.width="100%";p.style.height="100%";var t=document.createElement("tbody");k=document.createElement("tr");var d=document.createElement("input");d.setAttribute("type","checkbox");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";g.appendChild(d);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage"));
+g.appendChild(f);mxEvent.addListener(f,"click",function(b){d.checked=!d.checked;l.checked=!d.checked;mxEvent.consume(b)});mxEvent.addListener(d,"change",function(){l.checked=!d.checked});k.appendChild(g);t.appendChild(k);k=k.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(l);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");g.appendChild(f);mxEvent.addListener(f,
+"click",function(b){l.checked=!l.checked;d.checked=!l.checked;mxEvent.consume(b)});k.appendChild(g);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(m);mxUtils.write(g," "+mxResources.get("pages")+" (max)");k.appendChild(g);t.appendChild(k);mxEvent.addListener(l,"change",
+function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");d.checked=!l.checked});k=k.cloneNode(!1);g=document.createElement("td");mxUtils.write(g,mxResources.get("pageScale")+":");k.appendChild(g);g=document.createElement("td");var q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";g.appendChild(q);k.appendChild(g);t.appendChild(k);k=document.createElement("tr");g=document.createElement("td");g.colSpan=2;
+g.style.paddingTop="20px";g.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&g.appendChild(f);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)});n.className="geBtn";g.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});n.className="geBtn gePrimaryBtn";g.appendChild(n);b.editor.cancelFirst||
+g.appendChild(f);k.appendChild(g);t.appendChild(k);p.appendChild(t);this.container=p};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var c=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(e){}};
+PrintDialog.createPrintPreview=function(b,c,e,k,g,p,t){c=new mxPrintPreview(b,c,e,k,g,p);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=t;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";c.backgroundColor=b;var d=c.writeHead;c.writeHead=function(b){d.apply(this,arguments);b.writeln('<style type="text/css">');b.writeln("@media screen {");b.writeln(" body > div { padding:30px;box-sizing:content-box; }");b.writeln("}");b.writeln("</style>")};return c};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function c(){null==q||q==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=q,l.style.backgroundImage="")}function e(){var d=u;null!=d&&Graph.isPageLink(d.src)&&(d=b.createImageForPageLink(d.src,null));null!=d&&null!=d.src?(v.setAttribute("src",d.src),v.style.display=""):(v.removeAttribute("src"),v.style.display="none")}var k=b.editor.graph,f,n,t=document.createElement("table");t.style.width=
-"100%";t.style.height="100%";var d=document.createElement("tbody");f=document.createElement("tr");n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");f.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var g=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",k.pageFormat);f.appendChild(n);d.appendChild(f);f=document.createElement("tr");n=document.createElement("td");
-mxUtils.write(n,mxResources.get("background")+":");f.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="22px";l.style.height="22px";l.style.cursor="pointer";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(l.style.position="relative",l.style.top="-6px");var q=k.background;c();mxEvent.addListener(l,
-"click",function(d){b.pickColor(q||"none",function(b){q=b;c()});mxEvent.consume(d)});n.appendChild(l);mxUtils.write(n,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=k.getGridSize();n.appendChild(p);mxEvent.addListener(p,"change",function(){var b=parseInt(p.value);p.value=Math.max(1,isNaN(b)?k.getGridSize():b)});f.appendChild(n);d.appendChild(f);f=document.createElement("tr");
-n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");f.appendChild(n);n=document.createElement("td");var m=document.createElement("button");m.className="geBtn";m.style.margin="0px";mxUtils.write(m,mxResources.get("change")+"...");var v=document.createElement("img");v.setAttribute("valign","middle");v.style.verticalAlign="middle";v.style.border="1px solid lightGray";v.style.borderRadius="4px";v.style.marginRight="14px";v.style.maxWidth="100px";v.style.cursor="pointer";v.style.height=
-"60px";v.style.padding="4px";var u=k.backgroundImage,B=function(d){b.showBackgroundImageDialog(function(b,d){d||(u=b,e())},u);mxEvent.consume(d)};mxEvent.addListener(m,"click",B);mxEvent.addListener(v,"click",B);e();n.appendChild(v);n.appendChild(m);f.appendChild(n);d.appendChild(f);f=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";
-b.editor.cancelFirst&&n.appendChild(m);B=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var d=parseInt(p.value);isNaN(d)||k.gridSize===d||k.setGridSize(d);d=new ChangePageSetup(b,q,u,g.get());d.ignoreColor=k.background==q;d.ignoreImage=(null!=k.backgroundImage?k.backgroundImage.src:null)===(null!=u?u.src:null);k.pageFormat.width==d.previousFormat.width&&k.pageFormat.height==d.previousFormat.height&&d.ignoreColor&&d.ignoreImage||k.model.execute(d)});B.className="geBtn gePrimaryBtn";
-n.appendChild(B);b.editor.cancelFirst||n.appendChild(m);f.appendChild(n);d.appendChild(f);t.appendChild(d);this.container=t};
-PageSetupDialog.addPageFormatPanel=function(b,c,e,k){function f(b,c,l){if(l||p!=document.activeElement&&m!=document.activeElement){b=!1;for(c=0;c<u.length;c++)l=u[c],A?"custom"==l.key&&(d.value=l.key,A=!1):null!=l.format&&("a4"==l.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==l.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==l.format.width&&
-e.height==l.format.height?(d.value=l.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,b=!0):e.width==l.format.height&&e.height==l.format.width&&(d.value=l.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,b=t.checked=!0));b?(g.style.display="",q.style.display="none"):(p.value=e.width/100,m.value=e.height/100,n.setAttribute("checked","checked"),
-d.value="custom",g.style.display="none",q.style.display="")}}c="format-"+c;var n=document.createElement("input");n.setAttribute("name",c);n.setAttribute("type","radio");n.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",c);t.setAttribute("type","radio");t.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.width="202px";var g=document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";
-g.style.height="24px";n.style.marginRight="6px";g.appendChild(n);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));g.appendChild(c);t.style.marginLeft="10px";t.style.marginRight="6px";g.appendChild(t);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));g.appendChild(l);var q=document.createElement("div");q.style.marginLeft="4px";q.style.width="210px";q.style.height="24px";var p=document.createElement("input");
-p.setAttribute("size","7");p.style.textAlign="right";q.appendChild(p);mxUtils.write(q," in x ");var m=document.createElement("input");m.setAttribute("size","7");m.style.textAlign="right";q.appendChild(m);mxUtils.write(q," in");g.style.display="none";q.style.display="none";for(var v={},u=PageSetupDialog.getFormats(),B=0;B<u.length;B++){var x=u[B];v[x.key]=x;var E=document.createElement("option");E.setAttribute("value",x.key);mxUtils.write(E,x.title);d.appendChild(E)}var A=!1;f();b.appendChild(d);mxUtils.br(b);
-b.appendChild(g);b.appendChild(q);var F=e,I=function(b,c){var l=v[d.value];null!=l.format?(p.value=l.format.width/100,m.value=l.format.height/100,q.style.display="none",g.style.display=""):(g.style.display="none",q.style.display="");l=parseFloat(p.value);if(isNaN(l)||0>=l)p.value=e.width/100;l=parseFloat(m.value);if(isNaN(l)||0>=l)m.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),Math.floor(100*parseFloat(m.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,
-l.height,l.width));c&&A||l.width==F.width&&l.height==F.height||(F=l,null!=k&&k(F))};mxEvent.addListener(c,"click",function(b){n.checked=!0;I(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;I(b);mxEvent.consume(b)});mxEvent.addListener(p,"blur",I);mxEvent.addListener(p,"click",I);mxEvent.addListener(m,"blur",I);mxEvent.addListener(m,"click",I);mxEvent.addListener(t,"change",I);mxEvent.addListener(n,"change",I);mxEvent.addListener(d,"change",function(b){A="custom"==d.value;
-I(b,!0)});I();return{set:function(b){e=b;f(null,null,!0)},get:function(){return F},widthInput:p,heightInput:m}};
+var PageSetupDialog=function(b){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function e(){var d=u;null!=d&&Graph.isPageLink(d.src)&&(d=b.createImageForPageLink(d.src,null));null!=d&&null!=d.src?(v.setAttribute("src",d.src),v.style.display=""):(v.removeAttribute("src"),v.style.display="none")}var k=b.editor.graph,g,p,t=document.createElement("table");t.style.width=
+"100%";t.style.height="100%";var d=document.createElement("tbody");g=document.createElement("tr");p=document.createElement("td");p.style.verticalAlign="top";p.style.fontSize="10pt";mxUtils.write(p,mxResources.get("paperSize")+":");g.appendChild(p);p=document.createElement("td");p.style.verticalAlign="top";p.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(p,"pagesetupdialog",k.pageFormat);g.appendChild(p);d.appendChild(g);g=document.createElement("tr");p=document.createElement("td");
+mxUtils.write(p,mxResources.get("background")+":");g.appendChild(p);p=document.createElement("td");p.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="22px";l.style.height="22px";l.style.cursor="pointer";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(l.style.position="relative",l.style.top="-6px");var m=k.background;c();mxEvent.addListener(l,
+"click",function(d){b.pickColor(m||"none",function(b){m=b;c()});mxEvent.consume(d)});p.appendChild(l);mxUtils.write(p,mxResources.get("gridSize")+":");var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.style.width="40px";q.style.marginLeft="6px";q.value=k.getGridSize();p.appendChild(q);mxEvent.addListener(q,"change",function(){var b=parseInt(q.value);q.value=Math.max(1,isNaN(b)?k.getGridSize():b)});g.appendChild(p);d.appendChild(g);g=document.createElement("tr");
+p=document.createElement("td");mxUtils.write(p,mxResources.get("image")+":");g.appendChild(p);p=document.createElement("td");var n=document.createElement("button");n.className="geBtn";n.style.margin="0px";mxUtils.write(n,mxResources.get("change")+"...");var v=document.createElement("img");v.setAttribute("valign","middle");v.style.verticalAlign="middle";v.style.border="1px solid lightGray";v.style.borderRadius="4px";v.style.marginRight="14px";v.style.maxWidth="100px";v.style.cursor="pointer";v.style.height=
+"60px";v.style.padding="4px";var u=k.backgroundImage,y=function(d){b.showBackgroundImageDialog(function(b,d){d||(u=b,e())},u);mxEvent.consume(d)};mxEvent.addListener(n,"click",y);mxEvent.addListener(v,"click",y);e();p.appendChild(v);p.appendChild(n);g.appendChild(p);d.appendChild(g);g=document.createElement("tr");p=document.createElement("td");p.colSpan=2;p.style.paddingTop="16px";p.setAttribute("align","right");n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";
+b.editor.cancelFirst&&p.appendChild(n);y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var d=parseInt(q.value);isNaN(d)||k.gridSize===d||k.setGridSize(d);d=new ChangePageSetup(b,m,u,f.get());d.ignoreColor=k.background==m;d.ignoreImage=(null!=k.backgroundImage?k.backgroundImage.src:null)===(null!=u?u.src:null);k.pageFormat.width==d.previousFormat.width&&k.pageFormat.height==d.previousFormat.height&&d.ignoreColor&&d.ignoreImage||k.model.execute(d)});y.className="geBtn gePrimaryBtn";
+p.appendChild(y);b.editor.cancelFirst||p.appendChild(n);g.appendChild(p);d.appendChild(g);t.appendChild(d);this.container=t};
+PageSetupDialog.addPageFormatPanel=function(b,c,e,k){function g(b,c,l){if(l||q!=document.activeElement&&n!=document.activeElement){b=!1;for(c=0;c<u.length;c++)l=u[c],D?"custom"==l.key&&(d.value=l.key,D=!1):null!=l.format&&("a4"==l.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==l.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==l.format.width&&
+e.height==l.format.height?(d.value=l.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,b=!0):e.width==l.format.height&&e.height==l.format.width&&(d.value=l.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,b=t.checked=!0));b?(f.style.display="",m.style.display="none"):(q.value=e.width/100,n.value=e.height/100,p.setAttribute("checked","checked"),
+d.value="custom",f.style.display="none",m.style.display="")}}c="format-"+c;var p=document.createElement("input");p.setAttribute("name",c);p.setAttribute("type","radio");p.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",c);t.setAttribute("type","radio");t.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.width="202px";var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";
+f.style.height="24px";p.style.marginRight="6px";f.appendChild(p);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));f.appendChild(c);t.style.marginLeft="10px";t.style.marginRight="6px";f.appendChild(t);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));f.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var q=document.createElement("input");
+q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var v={},u=PageSetupDialog.getFormats(),y=0;y<u.length;y++){var x=u[y];v[x.key]=x;var H=document.createElement("option");H.setAttribute("value",x.key);mxUtils.write(H,x.title);d.appendChild(H)}var D=!1;g();b.appendChild(d);mxUtils.br(b);
+b.appendChild(f);b.appendChild(m);var E=e,J=function(b,c){var l=v[d.value];null!=l.format?(q.value=l.format.width/100,n.value=l.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");l=parseFloat(q.value);if(isNaN(l)||0>=l)q.value=e.width/100;l=parseFloat(n.value);if(isNaN(l)||0>=l)n.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),Math.floor(100*parseFloat(n.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,
+l.height,l.width));c&&D||l.width==E.width&&l.height==E.height||(E=l,null!=k&&k(E))};mxEvent.addListener(c,"click",function(b){p.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(q,"blur",J);mxEvent.addListener(q,"click",J);mxEvent.addListener(n,"blur",J);mxEvent.addListener(n,"click",J);mxEvent.addListener(t,"change",J);mxEvent.addListener(p,"change",J);mxEvent.addListener(d,"change",function(b){D="custom"==d.value;
+J(b,!0)});J();return{set:function(b){e=b;g(null,null,!0)},get:function(){return E},widthInput:q,heightInput:n}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,c,e,k,f,n,t,d,g,l,q,p){g=null!=g?g:!0;var m,v,u=document.createElement("table"),B=document.createElement("tbody");u.style.position="absolute";u.style.top="30px";u.style.left="20px";m=document.createElement("tr");v=document.createElement("td");v.style.textOverflow="ellipsis";v.style.textAlign="right";v.style.maxWidth="100px";v.style.fontSize="10pt";v.style.width="84px";mxUtils.write(v,(f||mxResources.get("filename"))+":");m.appendChild(v);var x=document.createElement("input");
-x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=p?p+"px":"180px";var E=mxUtils.button(e,function(){if(null==n||n(x.value))g&&b.hideDialog(),k(x.value)});E.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=u.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
-"",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),E.click());b.stopPropagation();
-b.preventDefault()}))}}};v=document.createElement("td");v.style.whiteSpace="nowrap";v.appendChild(x);m.appendChild(v);if(null!=f||null==t)B.appendChild(m),null!=q&&(v.appendChild(FilenameDialog.createTypeHint(b,x,q)),null!=b.editor.diagramFileTypes&&(m=document.createElement("tr"),v=document.createElement("td"),v.style.textOverflow="ellipsis",v.style.textAlign="right",v.style.maxWidth="100px",v.style.fontSize="10pt",v.style.width="84px",mxUtils.write(v,mxResources.get("type")+":"),m.appendChild(v),
-v=document.createElement("td"),v.style.whiteSpace="nowrap",m.appendChild(v),c=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",v.appendChild(c),x.style.width=null!=p?p-40+"px":"190px",m.appendChild(v),B.appendChild(m)));null!=t&&(m=document.createElement("tr"),v=document.createElement("td"),v.colSpan=2,v.appendChild(t),m.appendChild(v),B.appendChild(m));m=document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop=
-null!=q?"12px":"20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});q.className="geBtn";b.editor.cancelFirst&&v.appendChild(q);null!=d&&(p=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),p.className="geBtn",v.appendChild(p));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&E.click()});v.appendChild(E);b.editor.cancelFirst||v.appendChild(q);m.appendChild(v);B.appendChild(m);
-u.appendChild(B);this.container=u};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(b,c,e){var k=document.createElement("img");k.style.backgroundPosition="center bottom";k.style.backgroundRepeat="no-repeat";k.style.margin="2px 0 0 4px";k.style.verticalAlign="top";k.style.cursor="pointer";k.style.height="16px";k.style.width="16px";mxUtils.setOpacity(k,70);var f=function(){k.setAttribute("src",Editor.helpImage);k.setAttribute("title",mxResources.get("help"));for(var b=0;b<e.length;b++)if(0<e[b].ext.length&&c.value.toLowerCase().substring(c.value.length-
-e[b].ext.length-1)=="."+e[b].ext){k.setAttribute("title",mxResources.get(e[b].title));break}};mxEvent.addListener(c,"keyup",f);mxEvent.addListener(c,"change",f);mxEvent.addListener(k,"click",function(c){var e=k.getAttribute("title");k.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=e&&b.showError(null,e,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(c)});
-f();return k};
-FilenameDialog.createFileTypes=function(b,c,e){var k=document.createElement("select");for(b=0;b<e.length;b++){var f=document.createElement("option");f.setAttribute("value",b);mxUtils.write(f,mxResources.get(e[b].description)+" (."+e[b].extension+")");k.appendChild(f)}mxEvent.addListener(k,"change",function(b){b=e[k.value].extension;var f=c.value.lastIndexOf(".drawio."),f=0<f?f:c.value.lastIndexOf(".");"drawio"!=b&&(b="drawio."+b);c.value=0<f?c.value.substring(0,f+1)+b:c.value+"."+b;"createEvent"in
-document?(b=document.createEvent("HTMLEvents"),b.initEvent("change",!1,!0),c.dispatchEvent(b)):c.fireEvent("onchange")});b=function(b){b=c.value.toLowerCase();for(var f=0,d=0;d<e.length;d++){var g=e[d].extension,l=null;"drawio"!=g&&(l=g,g=".drawio."+g);if(b.substring(b.length-g.length-1)=="."+g||null!=l&&b.substring(b.length-l.length-1)=="."+l){f=d;break}}k.value=f};mxEvent.addListener(c,"change",b);mxEvent.addListener(c,"keyup",b);b();return k};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var b=this.graph;if(null!=b.container&&!b.transparentBackground){if(b.pageVisible){var d=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var g=b.container.firstChild;null!=g&&g.nodeType!=mxConstants.NODETYPE_ELEMENT;)g=g.nextSibling;null!=g&&(this.backgroundPageShape=this.createBackgroundPageShape(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
-this.backgroundPageShape.init(b.container),g.style.position="absolute",b.container.insertBefore(this.backgroundPageShape.node,g),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){b.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!=
+var FilenameDialog=function(b,c,e,k,g,p,t,d,f,l,m,q){f=null!=f?f:!0;var n,v,u=document.createElement("table"),y=document.createElement("tbody");u.style.position="absolute";u.style.top="30px";u.style.left="20px";n=document.createElement("tr");v=document.createElement("td");v.style.textOverflow="ellipsis";v.style.textAlign="right";v.style.maxWidth="100px";v.style.fontSize="10pt";v.style.width="84px";mxUtils.write(v,(g||mxResources.get("filename"))+":");n.appendChild(v);var x=document.createElement("input");
+x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=q?q+"px":"180px";var H=mxUtils.button(e,function(){if(null==p||p(x.value))f&&b.hideDialog(),k(x.value)});H.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=u.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
+"",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),H.click());b.stopPropagation();
+b.preventDefault()}))}}};v=document.createElement("td");v.style.whiteSpace="nowrap";v.appendChild(x);n.appendChild(v);if(null!=g||null==t)y.appendChild(n),null!=m&&(v.appendChild(FilenameDialog.createTypeHint(b,x,m)),null!=b.editor.diagramFileTypes&&(n=document.createElement("tr"),v=document.createElement("td"),v.style.textOverflow="ellipsis",v.style.textAlign="right",v.style.maxWidth="100px",v.style.fontSize="10pt",v.style.width="84px",mxUtils.write(v,mxResources.get("type")+":"),n.appendChild(v),
+v=document.createElement("td"),v.style.whiteSpace="nowrap",n.appendChild(v),c=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",v.appendChild(c),x.style.width=null!=q?q-40+"px":"190px",n.appendChild(v),y.appendChild(n)));null!=t&&(n=document.createElement("tr"),v=document.createElement("td"),v.colSpan=2,v.appendChild(t),n.appendChild(v),y.appendChild(n));n=document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop=
+null!=m?"12px":"20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&v.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",v.appendChild(q));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&H.click()});v.appendChild(H);b.editor.cancelFirst||v.appendChild(m);n.appendChild(v);y.appendChild(n);
+u.appendChild(y);this.container=u};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createTypeHint=function(b,c,e){var k=document.createElement("img");k.style.backgroundPosition="center bottom";k.style.backgroundRepeat="no-repeat";k.style.margin="2px 0 0 4px";k.style.verticalAlign="top";k.style.cursor="pointer";k.style.height="16px";k.style.width="16px";mxUtils.setOpacity(k,70);var g=function(){k.setAttribute("src",Editor.helpImage);k.setAttribute("title",mxResources.get("help"));for(var b=0;b<e.length;b++)if(0<e[b].ext.length&&c.value.toLowerCase().substring(c.value.length-
+e[b].ext.length-1)=="."+e[b].ext){k.setAttribute("title",mxResources.get(e[b].title));break}};mxEvent.addListener(c,"keyup",g);mxEvent.addListener(c,"change",g);mxEvent.addListener(k,"click",function(c){var e=k.getAttribute("title");k.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=e&&b.showError(null,e,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(c)});
+g();return k};
+FilenameDialog.createFileTypes=function(b,c,e){var k=document.createElement("select");for(b=0;b<e.length;b++){var g=document.createElement("option");g.setAttribute("value",b);mxUtils.write(g,mxResources.get(e[b].description)+" (."+e[b].extension+")");k.appendChild(g)}mxEvent.addListener(k,"change",function(b){b=e[k.value].extension;var g=c.value.lastIndexOf(".drawio."),g=0<g?g:c.value.lastIndexOf(".");"drawio"!=b&&(b="drawio."+b);c.value=0<g?c.value.substring(0,g+1)+b:c.value+"."+b;"createEvent"in
+document?(b=document.createEvent("HTMLEvents"),b.initEvent("change",!1,!0),c.dispatchEvent(b)):c.fireEvent("onchange")});b=function(b){b=c.value.toLowerCase();for(var g=0,d=0;d<e.length;d++){var f=e[d].extension,l=null;"drawio"!=f&&(l=f,f=".drawio."+f);if(b.substring(b.length-f.length-1)=="."+f||null!=l&&b.substring(b.length-l.length-1)=="."+l){g=d;break}}k.value=g};mxEvent.addListener(c,"change",b);mxEvent.addListener(c,"keyup",b);b();return k};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var b=this.graph;if(null!=b.container&&!b.transparentBackground){if(b.pageVisible){var d=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var f=b.container.firstChild;null!=f&&f.nodeType!=mxConstants.NODETYPE_ELEMENT;)f=f.nextSibling;null!=f&&(this.backgroundPageShape=this.createBackgroundPageShape(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+this.backgroundPageShape.init(b.container),f.style.position="absolute",b.container.insertBefore(this.backgroundPageShape.node,f),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){b.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!=
b.tooltipHandler&&b.tooltipHandler.isHideOnHover()&&b.tooltipHandler.hide();b.isMouseDown&&!mxEvent.isConsumed(d)&&b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=d,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var b=this.graph,d=null==b.background||b.background==mxConstants.NONE?b.defaultPageBackgroundColor:b.background,g=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",c="none",e="";if(b.isGridEnabled()||b.gridVisible){e=10;mxClient.IS_SVG?(c=unescape(encodeURIComponent(this.createSvgGrid(g))),c=window.btoa?btoa(c):Base64.encode(c,!0),c="url(data:image/svg+xml;base64,"+c+")",e=b.gridSize*this.scale*this.gridSteps):c="url("+this.gridImage+
-")";var f=g=0;null!=b.view.backgroundPageShape&&(f=this.getBackgroundPageBounds(),g=1+f.x,f=1+f.y);e=-Math.round(e-mxUtils.mod(this.translate.x*this.scale-g,e))+"px "+-Math.round(e-mxUtils.mod(this.translate.y*this.scale-f,e))+"px"}g=b.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);null!=b.view.backgroundPageShape?(b.view.backgroundPageShape.node.style.backgroundPosition=e,b.view.backgroundPageShape.node.style.backgroundImage=c,b.view.backgroundPageShape.node.style.backgroundColor=d,b.view.backgroundPageShape.node.style.borderColor=
-b.defaultPageBorderColor,b.container.className="geDiagramContainer geDiagramBackdrop",g.style.backgroundImage="none",g.style.backgroundColor=""):(b.container.className="geDiagramContainer",g.style.backgroundPosition=e,g.style.backgroundColor=d,g.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(b){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var g=this.gridSteps*d,c=[],e=1;e<this.gridSteps;e++){var f=e*d;c.push("M 0 "+f+" L "+g+" "+f+" M "+f+" 0 L "+f+
-" "+g)}return'<svg width="'+g+'" height="'+g+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+g+'" height="'+g+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+b+'" opacity="0.2" stroke-width="1"/><path d="M '+g+" 0 L 0 0 0 "+g+'" fill="none" stroke="'+b+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,d){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var g=this.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+c,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+d,e))+"px";g.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(b,d,g){var c=this.view.scale,e=this.view.translate,f=this.pageFormat,k=c*this.pageScale,n=this.view.getBackgroundPageBounds();
-d=n.width;g=n.height;var u=new mxRectangle(c*e.x,c*e.y,f.width*k,f.height*k),t=(b=b&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(g/u.height)-1:0,x=b?Math.ceil(d/u.width)-1:0,E=n.x+d,A=n.y+g;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,g=0;g<=d;g++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),
-Math.round(n.y+(g+1)*u.height)),new mxPoint(Math.round(E),Math.round(n.y+(g+1)*u.height))]:[new mxPoint(Math.round(n.x+(g+1)*u.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(g+1)*u.width),Math.round(A))];null!=b[g]?(b[g].points=c,b[g].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[g]=c)}for(g=d;g<b.length;g++)b[g].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
-b(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(b,d,g){for(var e=0;e<d.length;e++){if(this.graph.isTableCell(d[e])||this.graph.isTableRow(d[e]))return!1;if(this.graph.getModel().isVertex(d[e])){var f=this.graph.getCellGeometry(d[e]);if(null!=f&&f.relative)return!1}}return c.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var b=
-e.apply(this,arguments);b.intersects=mxUtils.bind(this,function(d,g){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(b,arguments)});return b};mxGraphView.prototype.createBackgroundPageShape=function(b){return new mxRectangleShape(b,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var b=this.getGraphBounds(),d=0<b.width?b.x/this.scale-this.translate.x:0,g=0<b.height?b.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,
-e=this.graph.pageScale,f=c.width*e,c=c.height*e,e=Math.floor(Math.min(0,d)/f),k=Math.floor(Math.min(0,g)/c);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+k*c),this.scale*(Math.ceil(Math.max(1,d+b.width/this.scale)/f)-e)*f,this.scale*(Math.ceil(Math.max(1,g+b.height/this.scale)/c)-k)*c)};var k=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){k.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=b+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var f=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(b,d,g,c,e,k){var l=f.apply(this,arguments);null==k||k||mxEvent.addListener(l,"mousedown",function(b){mxEvent.consume(b)});return l};var n=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(b,d,g){var c,e=this.graph.model.getParent(b);if(d)c=this.graph.model.isEdge(b)?null:this.graph.getCellGeometry(b),c=!this.graph.model.isEdge(e)&&!this.graph.isSiblingSelected(b)&&(null!=c&&c.relative||!this.graph.isContainer(e)||this.graph.isPart(b));else if(c=n.apply(this,arguments),this.graph.isTableCell(b)||this.graph.isTableRow(b))c=e,this.graph.isTable(c)||(c=this.graph.model.getParent(c)),c=!this.graph.selectionCellsHandler.isHandled(c)||this.graph.isCellSelected(c)&&this.graph.isToggleEvent(g.getEvent())||
-this.graph.isCellSelected(b)&&!this.graph.isToggleEvent(g.getEvent())||this.graph.isTableCell(b)&&this.graph.isCellSelected(e);return c};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(b){b=b.getCell();for(var d=this.graph.getModel(),g=d.getParent(b),c=this.graph.view.getState(g),e=this.graph.isCellSelected(b);null!=c&&(d.isVertex(g)||d.isEdge(g));){var f=this.graph.isCellSelected(g),e=e||f;if(f||!e&&(this.graph.isTableCell(b)||this.graph.isTableRow(b)))b=g;g=d.getParent(g)}return b}})();EditorUi=function(b,c,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=c||document.body;var k=this.editor.graph;k.lightbox=e;this.initialDefaultVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);if(e){var f=k.getGraphBounds;k.getGraphBounds=function(b){var d=f.apply(this,arguments);b=this.backgroundImage;if(null!=b){var g=this.view.translate,c=this.view.scale;d.add(new mxRectangle((g.x+b.x)*c,
-(g.y+b.y)*c,b.width*c,b.height*c))}return d}}k.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,k.isEnabled=
-function(){return!1},k.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!k.standalone){var n="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),t="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");
-this.setDefaultStyle=function(b){try{var d=k.view.getState(b);if(null!=d){var g=b.clone();g.style="";var c=k.getCellStyle(g);b=[];var g=[],e;for(e in d.style)c[e]!=d.style[e]&&(b.push(d.style[e]),g.push(e));for(var l=k.getModel().getStyle(d.cell),f=null!=l?l.split(";"):[],l=0;l<f.length;l++){var q=f[l],m=q.indexOf("=");if(0<=m){e=q.substring(0,m);var p=q.substring(m+1);null!=c[e]&&"none"==p&&(b.push(p),g.push(e))}}k.getModel().isEdge(d.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
-"keys",g,"values",b,"cells",[d.cell]))}}catch(ma){this.handleError(ma)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var d=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<d.length;c++)0>mxUtils.indexOf(n,d[c])&&n.push(d[c]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
-l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(e=0;e<l[c].length;e++)n.push(l[c][e]);for(c=0;c<t.length;c++)0>mxUtils.indexOf(n,t[c])&&n.push(t[c]);var q=function(b,d,g,c,e,f,q){c=null!=c?c:k.currentVertexStyle;e=null!=e?e:k.currentEdgeStyle;g=null!=g?g:k.getModel();
-if(q){q=[];for(var m=0;m<b.length;m++)q=q.concat(g.getDescendants(b[m]));b=q}g.beginUpdate();try{for(m=0;m<b.length;m++){var G=b[m],p;if(d)p=["fontSize","fontFamily","fontColor"];else{var D=g.getStyle(G),y=null!=D?D.split(";"):[];p=n.slice();for(var u=0;u<y.length;u++){var v=y[u],x=v.indexOf("=");if(0<=x){var B=v.substring(0,x),A=mxUtils.indexOf(p,B);0<=A&&p.splice(A,1);for(q=0;q<l.length;q++){var M=l[q];if(0<=mxUtils.indexOf(M,B))for(var W=0;W<M.length;W++){var C=mxUtils.indexOf(p,M[W]);0<=C&&p.splice(C,
-1)}}}}}var F=g.isEdge(G);q=F?e:c;for(var I=g.getStyle(G),u=0;u<p.length;u++){var B=p[u],E=q[B];null!=E&&("shape"!=B||F)&&(!F||f||0>mxUtils.indexOf(t,B))&&(I=mxUtils.setStyle(I,B,E))}Editor.simpleLabels&&(I=mxUtils.setStyle(mxUtils.setStyle(I,"html",null),"whiteSpace",null));g.setStyle(G,I)}}finally{g.endUpdate()}};k.addListener("cellsInserted",function(b,d){q(d.getProperty("cells"))});k.addListener("textInserted",function(b,d){q(d.getProperty("cells"),!0)});this.insertHandler=q;this.createDivs();
-this.createUi();this.refresh();var p=mxUtils.bind(this,function(b){null==b&&(b=window.event);return k.isEditing()||null!=b&&this.isSelectionAllowed(b)});this.container==document.body&&(this.menubarContainer.onselectstart=p,this.menubarContainer.onmousedown=p,this.toolbarContainer.onselectstart=p,this.toolbarContainer.onmousedown=p,this.diagramContainer.onselectstart=p,this.diagramContainer.onmousedown=p,this.sidebarContainer.onselectstart=p,this.sidebarContainer.onmousedown=p,this.formatContainer.onselectstart=
-p,this.formatContainer.onmousedown=p,this.footerContainer.onselectstart=p,this.footerContainer.onmousedown=p,null!=this.tabContainer&&(this.tabContainer.onselectstart=p));!this.editor.chromeless||this.editor.editable?(c=function(b){if(null!=b){var d=mxEvent.getSource(b);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return p(b)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
-c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var m=k.graphHandler.start;k.graphHandler.start=function(){null!=K.hoverIcons&&K.hoverIcons.reset();m.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(b){var d=
+mxGraphView.prototype.validateBackgroundStyles=function(){var b=this.graph,d=null==b.background||b.background==mxConstants.NONE?b.defaultPageBackgroundColor:b.background,f=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",c="none",e="";if(b.isGridEnabled()||b.gridVisible){e=10;mxClient.IS_SVG?(c=unescape(encodeURIComponent(this.createSvgGrid(f))),c=window.btoa?btoa(c):Base64.encode(c,!0),c="url(data:image/svg+xml;base64,"+c+")",e=b.gridSize*this.scale*this.gridSteps):c="url("+this.gridImage+
+")";var g=f=0;null!=b.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),f=1+g.x,g=1+g.y);e=-Math.round(e-mxUtils.mod(this.translate.x*this.scale-f,e))+"px "+-Math.round(e-mxUtils.mod(this.translate.y*this.scale-g,e))+"px"}f=b.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=b.view.backgroundPageShape?(b.view.backgroundPageShape.node.style.backgroundPosition=e,b.view.backgroundPageShape.node.style.backgroundImage=c,b.view.backgroundPageShape.node.style.backgroundColor=d,b.view.backgroundPageShape.node.style.borderColor=
+b.defaultPageBorderColor,b.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(b.container.className="geDiagramContainer",f.style.backgroundPosition=e,f.style.backgroundColor=d,f.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(b){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,c=[],e=1;e<this.gridSteps;e++){var g=e*d;c.push("M 0 "+g+" L "+f+" "+g+" M "+g+" 0 L "+g+
+" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+b+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+b+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,d){b.apply(this,arguments);
+if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+c,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+d,e))+"px";f.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(b,d,f){var c=this.view.scale,e=this.view.translate,g=this.pageFormat,k=c*this.pageScale,p=this.view.getBackgroundPageBounds();
+d=p.width;f=p.height;var u=new mxRectangle(c*e.x,c*e.y,g.width*k,g.height*k),t=(b=b&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(f/u.height)-1:0,x=b?Math.ceil(d/u.width)-1:0,H=p.x+d,D=p.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,f=0;f<=d;f++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(p.x),
+Math.round(p.y+(f+1)*u.height)),new mxPoint(Math.round(H),Math.round(p.y+(f+1)*u.height))]:[new mxPoint(Math.round(p.x+(f+1)*u.width),Math.round(p.y)),new mxPoint(Math.round(p.x+(f+1)*u.width),Math.round(D))];null!=b[f]?(b[f].points=c,b[f].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[f]=c)}for(f=d;f<b.length;f++)b[f].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
+b(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(b,d,f){for(var e=0;e<d.length;e++){if(this.graph.isTableCell(d[e])||this.graph.isTableRow(d[e]))return!1;if(this.graph.getModel().isVertex(d[e])){var g=this.graph.getCellGeometry(d[e]);if(null!=g&&g.relative)return!1}}return c.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var b=
+e.apply(this,arguments);b.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(b,arguments)});return b};mxGraphView.prototype.createBackgroundPageShape=function(b){return new mxRectangleShape(b,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var b=this.getGraphBounds(),d=0<b.width?b.x/this.scale-this.translate.x:0,f=0<b.height?b.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,
+e=this.graph.pageScale,g=c.width*e,c=c.height*e,e=Math.floor(Math.min(0,d)/g),k=Math.floor(Math.min(0,f)/c);return new mxRectangle(this.scale*(this.translate.x+e*g),this.scale*(this.translate.y+k*c),this.scale*(Math.ceil(Math.max(1,d+b.width/this.scale)/g)-e)*g,this.scale*(Math.ceil(Math.max(1,f+b.height/this.scale)/c)-k)*c)};var k=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){k.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=b+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(b,d,f,c,e,k){var l=g.apply(this,arguments);null==k||k||mxEvent.addListener(l,"mousedown",function(b){mxEvent.consume(b)});return l};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(b,d,f){var c,e=this.graph.model.getParent(b);if(d)c=this.graph.model.isEdge(b)?null:this.graph.getCellGeometry(b),c=!this.graph.model.isEdge(e)&&!this.graph.isSiblingSelected(b)&&(null!=c&&c.relative||!this.graph.isContainer(e)||this.graph.isPart(b));else if(c=p.apply(this,arguments),this.graph.isTableCell(b)||this.graph.isTableRow(b))c=e,this.graph.isTable(c)||(c=this.graph.model.getParent(c)),c=!this.graph.selectionCellsHandler.isHandled(c)||this.graph.isCellSelected(c)&&this.graph.isToggleEvent(f.getEvent())||
+this.graph.isCellSelected(b)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(b)&&this.graph.isCellSelected(e);return c};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(b){b=b.getCell();for(var d=this.graph.getModel(),f=d.getParent(b),c=this.graph.view.getState(f),e=this.graph.isCellSelected(b);null!=c&&(d.isVertex(f)||d.isEdge(f));){var g=this.graph.isCellSelected(f),e=e||g;if(g||!e&&(this.graph.isTableCell(b)||this.graph.isTableRow(b)))b=f;f=d.getParent(f)}return b}})();EditorUi=function(b,c,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=c||document.body;var k=this.editor.graph;k.lightbox=e;this.initialDefaultVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);if(e){var g=k.getGraphBounds;k.getGraphBounds=function(b){var d=g.apply(this,arguments);b=this.backgroundImage;if(null!=b){var f=this.view.translate,c=this.view.scale;d.add(new mxRectangle((f.x+b.x)*c,
+(f.y+b.y)*c,b.width*c,b.height*c))}return d}}k.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,k.isEnabled=
+function(){return!1},k.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!k.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),t="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");
+this.setDefaultStyle=function(b){try{var d=k.view.getState(b);if(null!=d){var f=b.clone();f.style="";var c=k.getCellStyle(f);b=[];var f=[],e;for(e in d.style)c[e]!=d.style[e]&&(b.push(d.style[e]),f.push(e));for(var l=k.getModel().getStyle(d.cell),g=null!=l?l.split(";"):[],l=0;l<g.length;l++){var m=g[l],q=m.indexOf("=");if(0<=q){e=m.substring(0,q);var n=m.substring(q+1);null!=c[e]&&"none"==n&&(b.push(n),f.push(e))}}k.getModel().isEdge(d.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
+"keys",f,"values",b,"cells",[d.cell]))}}catch(na){this.handleError(na)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var d=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<d.length;c++)0>mxUtils.indexOf(p,d[c])&&p.push(d[c]);var f="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
+l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(e=0;e<l[c].length;e++)p.push(l[c][e]);for(c=0;c<t.length;c++)0>mxUtils.indexOf(p,t[c])&&p.push(t[c]);var m=function(b,d,f,c,e,g,m){c=null!=c?c:k.currentVertexStyle;e=null!=e?e:k.currentEdgeStyle;f=null!=f?f:k.getModel();
+if(m){m=[];for(var F=0;F<b.length;F++)m=m.concat(f.getDescendants(b[F]));b=m}f.beginUpdate();try{for(F=0;F<b.length;F++){var q=b[F],n;if(d)n=["fontSize","fontFamily","fontColor"];else{var B=f.getStyle(q),A=null!=B?B.split(";"):[];n=p.slice();for(var u=0;u<A.length;u++){var v=A[u],x=v.indexOf("=");if(0<=x){var y=v.substring(0,x),N=mxUtils.indexOf(n,y);0<=N&&n.splice(N,1);for(m=0;m<l.length;m++){var D=l[m];if(0<=mxUtils.indexOf(D,y))for(var W=0;W<D.length;W++){var C=mxUtils.indexOf(n,D[W]);0<=C&&n.splice(C,
+1)}}}}}var E=f.isEdge(q);m=E?e:c;for(var J=f.getStyle(q),u=0;u<n.length;u++){var y=n[u],H=m[y];null!=H&&("shape"!=y||E)&&(!E||g||0>mxUtils.indexOf(t,y))&&(J=mxUtils.setStyle(J,y,H))}Editor.simpleLabels&&(J=mxUtils.setStyle(mxUtils.setStyle(J,"html",null),"whiteSpace",null));f.setStyle(q,J)}}finally{f.endUpdate()}};k.addListener("cellsInserted",function(b,d){m(d.getProperty("cells"))});k.addListener("textInserted",function(b,d){m(d.getProperty("cells"),!0)});this.insertHandler=m;this.createDivs();
+this.createUi();this.refresh();var q=mxUtils.bind(this,function(b){null==b&&(b=window.event);return k.isEditing()||null!=b&&this.isSelectionAllowed(b)});this.container==document.body&&(this.menubarContainer.onselectstart=q,this.menubarContainer.onmousedown=q,this.toolbarContainer.onselectstart=q,this.toolbarContainer.onmousedown=q,this.diagramContainer.onselectstart=q,this.diagramContainer.onmousedown=q,this.sidebarContainer.onselectstart=q,this.sidebarContainer.onmousedown=q,this.formatContainer.onselectstart=
+q,this.formatContainer.onmousedown=q,this.footerContainer.onselectstart=q,this.footerContainer.onmousedown=q,null!=this.tabContainer&&(this.tabContainer.onselectstart=q));!this.editor.chromeless||this.editor.editable?(c=function(b){if(null!=b){var d=mxEvent.getSource(b);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return q(b)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
+c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var n=k.graphHandler.start;k.graphHandler.start=function(){null!=K.hoverIcons&&K.hoverIcons.reset();n.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(b){var d=
mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(b)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(b)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var v=!1,u=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(b,d){return v||u.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(b){32!=b.which||k.isEditing()?mxEvent.isConsumed(b)||
-27!=b.keyCode||this.hideDialog(null,!0):(v=!0,this.hoverIcons.reset(),k.container.style.cursor="move",k.isEditing()||mxEvent.getSource(b)!=k.container||mxEvent.consume(b))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(b){k.container.style.cursor="";v=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var B=k.panningHandler.isForcePanningEvent;k.panningHandler.isForcePanningEvent=function(b){return B.apply(this,arguments)||v||mxEvent.isMouseEvent(b.getEvent())&&
-(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var E=k.isZoomWheelEvent;k.isZoomWheelEvent=function(){return v||
-E.apply(this,arguments)};var A=!1,F=null,I=null,L=null,H=mxUtils.bind(this,function(){if(null!=this.toolbar&&A!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var g=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=g}b=this.toolbar.fontMenu;g=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);this.toolbar.fontMenu=
-F;this.toolbar.sizeMenu=I}A=k.cellEditor.isContentEditing();F=b;I=g;L=d}}),K=this,C=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){C.apply(this,arguments);H();if(k.cellEditor.isContentEditing()){var b=!1,d=function(){b||(b=!0,window.setTimeout(function(){var d=k.getSelectedEditingElement();null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=K.toolbar&&(K.toolbar.setFontName(Graph.stripQuotes(d.fontFamily)),K.toolbar.setFontSize(parseInt(d.fontSize))));b=!1},0))};mxEvent.addListener(k.cellEditor.textarea,
-"input",d);mxEvent.addListener(k.cellEditor.textarea,"touchend",d);mxEvent.addListener(k.cellEditor.textarea,"mouseup",d);mxEvent.addListener(k.cellEditor.textarea,"keyup",d);d()}};var N=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{N.apply(this,arguments),H()}catch(P){K.handleError(P)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(R){}var S=k.fireMouseEvent;
-k.fireMouseEvent=function(b,d,g){b==mxEvent.MOUSE_DOWN&&this.container.focus();S.apply(this,arguments)};k.popupMenuHandler.autoExpand=!0;null!=this.menus&&(k.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,d,g){this.menus.createPopupMenu(b,d,g)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){k.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};k.connectionHandler.addListener(mxEvent.CONNECT,function(b,
-d){var g=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(g.push(d.getProperty("terminal")),window.setTimeout(function(){null!=K.hoverIcons&&K.hoverIcons.update(k.view.getState(g[g.length-1]))},0));q(g)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,f=!1;if(0<e.length)for(var q=0;q<e.length&&(l=k.getModel().isVertex(e[q])||l,!(f=k.getModel().isEdge(e[q])||f)||!l);q++);else f=l=!0;for(var e=c.getProperty("keys"),m=c.getProperty("values"),
-q=0;q<e.length;q++){var p=0<=mxUtils.indexOf(d,e[q]);if("strokeColor"!=e[q]||null!=m[q]&&"none"!=m[q])if(0<=mxUtils.indexOf(t,e[q]))f||0<=mxUtils.indexOf(g,e[q])?null==m[q]?delete k.currentEdgeStyle[e[q]]:k.currentEdgeStyle[e[q]]=m[q]:l&&0<=mxUtils.indexOf(n,e[q])&&(null==m[q]?delete k.currentVertexStyle[e[q]]:k.currentVertexStyle[e[q]]=m[q]);else if(0<=mxUtils.indexOf(n,e[q])){if(l||p)null==m[q]?delete k.currentVertexStyle[e[q]]:k.currentVertexStyle[e[q]]=m[q];if(f||p||0<=mxUtils.indexOf(g,e[q]))null==
-m[q]?delete k.currentEdgeStyle[e[q]]:k.currentEdgeStyle[e[q]]=m[q]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||
+27!=b.keyCode||this.hideDialog(null,!0):(v=!0,this.hoverIcons.reset(),k.container.style.cursor="move",k.isEditing()||mxEvent.getSource(b)!=k.container||mxEvent.consume(b))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(b){k.container.style.cursor="";v=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=k.panningHandler.isForcePanningEvent;k.panningHandler.isForcePanningEvent=function(b){return y.apply(this,arguments)||v||mxEvent.isMouseEvent(b.getEvent())&&
+(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var H=k.isZoomWheelEvent;k.isZoomWheelEvent=function(){return v||
+H.apply(this,arguments)};var D=!1,E=null,J=null,L=null,G=mxUtils.bind(this,function(){if(null!=this.toolbar&&D!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var f=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=f}b=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);this.toolbar.fontMenu=
+E;this.toolbar.sizeMenu=J}D=k.cellEditor.isContentEditing();E=b;J=f;L=d}}),K=this,C=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){C.apply(this,arguments);G();if(k.cellEditor.isContentEditing()){var b=!1,d=function(){b||(b=!0,window.setTimeout(function(){var d=k.getSelectedEditingElement();null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=K.toolbar&&(K.toolbar.setFontName(Graph.stripQuotes(d.fontFamily)),K.toolbar.setFontSize(parseInt(d.fontSize))));b=!1},0))};mxEvent.addListener(k.cellEditor.textarea,
+"input",d);mxEvent.addListener(k.cellEditor.textarea,"touchend",d);mxEvent.addListener(k.cellEditor.textarea,"mouseup",d);mxEvent.addListener(k.cellEditor.textarea,"keyup",d);d()}};var M=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{M.apply(this,arguments),G()}catch(R){K.handleError(R)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(S){}var P=k.fireMouseEvent;
+k.fireMouseEvent=function(b,d,f){b==mxEvent.MOUSE_DOWN&&this.container.focus();P.apply(this,arguments)};k.popupMenuHandler.autoExpand=!0;null!=this.menus&&(k.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,d,f){this.menus.createPopupMenu(b,d,f)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){k.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};k.connectionHandler.addListener(mxEvent.CONNECT,function(b,
+d){var f=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(f.push(d.getProperty("terminal")),window.setTimeout(function(){null!=K.hoverIcons&&K.hoverIcons.update(k.view.getState(f[f.length-1]))},0));m(f)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,g=!1;if(0<e.length)for(var m=0;m<e.length&&(l=k.getModel().isVertex(e[m])||l,!(g=k.getModel().isEdge(e[m])||g)||!l);m++);else g=l=!0;for(var e=c.getProperty("keys"),q=c.getProperty("values"),
+m=0;m<e.length;m++){var n=0<=mxUtils.indexOf(d,e[m]);if("strokeColor"!=e[m]||null!=q[m]&&"none"!=q[m])if(0<=mxUtils.indexOf(t,e[m]))g||0<=mxUtils.indexOf(f,e[m])?null==q[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=q[m]:l&&0<=mxUtils.indexOf(p,e[m])&&(null==q[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=q[m]);else if(0<=mxUtils.indexOf(p,e[m])){if(l||n)null==q[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=q[m];if(g||n||0<=mxUtils.indexOf(f,e[m]))null==
+q[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=q[m]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||
"none"==k.currentEdgeStyle.edgeStyle||null==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==k.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==k.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==k.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
-mxUtils.getValue(k.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(k.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var b=k.currentVertexStyle.fontFamily||"Helvetica",d=String(k.currentVertexStyle.fontSize||"12"),g=k.getView().getState(k.getSelectionCell());
-null!=g&&(b=g.style[mxConstants.STYLE_FONTFAMILY]||b,d=g.style[mxConstants.STYLE_FONTSIZE]||d,10<b.length&&(b=b.substring(0,8)+"..."));this.toolbar.setFontName(b);this.toolbar.setFontSize(d)}),k.getSelectionModel().addListener(mxEvent.CHANGE,b),k.getModel().addListener(mxEvent.CHANGE,b));k.addListener(mxEvent.CELLS_ADDED,function(b,d){var g=d.getProperty("cells"),c=d.getProperty("parent");k.getModel().isLayer(c)&&!k.isCellVisible(c)&&null!=g&&0<g.length&&k.getModel().setVisible(c,!0)});this.gestureHandler=
+mxUtils.getValue(k.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(k.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var b=k.currentVertexStyle.fontFamily||"Helvetica",d=String(k.currentVertexStyle.fontSize||"12"),f=k.getView().getState(k.getSelectionCell());
+null!=f&&(b=f.style[mxConstants.STYLE_FONTFAMILY]||b,d=f.style[mxConstants.STYLE_FONTSIZE]||d,10<b.length&&(b=b.substring(0,8)+"..."));this.toolbar.setFontName(b);this.toolbar.setFontSize(d)}),k.getSelectionModel().addListener(mxEvent.CHANGE,b),k.getModel().addListener(mxEvent.CHANGE,b));k.addListener(mxEvent.CELLS_ADDED,function(b,d){var f=d.getProperty("cells"),c=d.getProperty("parent");k.getModel().isLayer(c)&&!k.isCellVisible(c)&&null!=f&&0<f.length&&k.getModel().setVisible(c,!0)});this.gestureHandler=
mxUtils.bind(this,function(b){null!=this.currentMenu&&mxEvent.getSource(b)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",
this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){k.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){k.view.validateBackground()}));
k.addListener("gridSizeChanged",mxUtils.bind(this,function(){k.isGridEnabled()&&k.view.validateBackground()}));this.editor.resetGraph()}this.init();k.standalone||this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;
@@ -2148,17 +2151,17 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
"keydown",mxUtils.bind(this,function(b){this.onKeyDown(b)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(b){this.onKeyPress(b)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var c=b.setDefaultParent,e=this;this.editor.graph.setDefaultParent=function(){c.apply(this,
arguments);e.updateActionStates()};b.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,c=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,d){"mouseDown"==d.getProperty("eventName")&&c.hideShapePicker()}));var e=mxUtils.bind(this,function(){c.hideShapePicker(!0)});b.addListener("wheel",e);b.addListener(mxEvent.ESCAPE,e);b.view.addListener(mxEvent.SCALE,e);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,e);b.getSelectionModel().addListener(mxEvent.CHANGE,e);b.getModel().addListener(mxEvent.CHANGE,
-e);var k=b.popupMenuHandler.isMenuShowing;b.popupMenuHandler.isMenuShowing=function(){return k.apply(this,arguments)||null!=c.shapePicker};var f=b.dblClick;b.dblClick=function(d,e){if(this.isEnabled())if(null!=e||null==c.sidebar||mxEvent.isShiftDown(d)||b.isCellLocked(b.getDefaultParent()))f.apply(this,arguments);else{var g=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d));mxEvent.consume(d);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(g.x,g.y)}),
-30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",e);var n=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();n.apply(this,arguments)};var t=this.hoverIcons.execute;this.hoverIcons.execute=function(d,e,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?t.apply(this,arguments):this.graph.connectVertex(d.cell,e,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(g,l,q){var k=b.getCompositeParent(d.cell);g=b.getCellGeometry(k);
-for(f.consume();null!=k&&b.model.isVertex(k)&&null!=g&&g.relative;)cell=k,k=b.model.getParent(cell),g=b.getCellGeometry(k);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(f.getGraphX(),f.getGraphY(),k,mxUtils.bind(this,function(d){q(d);null!=c.hoverIcons&&c.hoverIcons.update(b.view.getState(d))}),e)}),30)}),mxUtils.bind(this,function(b){this.graph.selectCellsForConnectVertex(b,g,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(g,e){null!=d&&window.clearTimeout(d);
-d=window.setTimeout(mxUtils.bind(this,function(){var d=e.getProperty("arrow"),g=e.getProperty("direction"),l=e.getProperty("event"),d=d.getBoundingClientRect(),f=mxUtils.getOffset(b.container),k=b.container.scrollLeft+d.x-f.x,f=b.container.scrollTop+d.y-f.y,n=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),x=c.showShapePicker(k,f,n,mxUtils.bind(this,function(d){null!=d&&b.connectVertex(n,g,b.defaultEdgeLength,l,!0,!0,function(g,e,l){l(d);null!=c.hoverIcons&&
-c.hoverIcons.update(b.view.getState(d))},function(d){b.selectCellsForConnectVertex(d)},l,this.hoverIcons)}),g,!0);this.centerShapePicker(x,d,k,f,g);mxUtils.setOpacity(x,30);mxEvent.addListener(x,"mouseenter",function(){mxUtils.setOpacity(x,100)});mxEvent.addListener(x,"mouseleave",function(){c.hideShapePicker()})}),500)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(b,c){null!=d&&window.clearTimeout(d)}))}};
-EditorUi.prototype.centerShapePicker=function(b,c,e,k,f){if(f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST)b.style.width="40px";var n=b.getBoundingClientRect();f==mxConstants.DIRECTION_NORTH?(e-=n.width/2-10,k-=n.height+6):f==mxConstants.DIRECTION_SOUTH?(e-=n.width/2-10,k+=c.height+6):f==mxConstants.DIRECTION_WEST?(e-=n.width+6,k-=n.height/2-10):f==mxConstants.DIRECTION_EAST&&(e+=c.width+6,k-=n.height/2-10);b.style.left=e+"px";b.style.top=k+"px"};
-EditorUi.prototype.showShapePicker=function(b,c,e,k,f,n){b=this.createShapePicker(b,c,e,k,f,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,n),n);null!=b&&(null==this.hoverIcons||n||this.hoverIcons.reset(),n=this.editor.graph,n.popupMenuHandler.hideMenu(),n.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=k,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,c,e,k,f,n,t,d){var g=null;if(null!=t&&0<t.length){var l=this,q=this.editor.graph,g=document.createElement("div");f=q.view.getState(e);var p=null==e||null!=f&&q.isTransparentState(f)?null:q.copyStyle(e);e=6>t.length?35*t.length:140;g.className="geToolbarContainer geSidebarContainer";g.style.cssText="position:absolute;left:"+b+"px;top:"+c+"px;width:"+e+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(g.style,"transform","translate(-22px,-22px)");null!=q.background&&q.background!=mxConstants.NONE&&(g.style.backgroundColor=q.background);q.container.appendChild(g);e=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";g.appendChild(e);null!=p&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(p,[d]):l.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(e,"click",function(){var g=q.cloneCell(d);if(null!=k)k(g);else{g.geometry.x=q.snap(Math.round(b/q.view.scale)-q.view.translate.x-d.geometry.width/2);g.geometry.y=q.snap(Math.round(c/q.view.scale)-q.view.translate.y-d.geometry.height/2);q.model.beginUpdate();try{q.addCell(g)}finally{q.model.endUpdate()}q.setSelectionCell(g);
-q.scrollCellToVisible(g);q.startEditingAtCell(g);null!=l.hoverIcons&&l.hoverIcons.update(q.view.getState(g))}null!=n&&n()})});for(f=0;f<(d?Math.min(t.length,4):t.length);f++)e(t[f]);t=g.offsetTop+g.clientHeight-(q.container.scrollTop+q.container.offsetHeight);0<t&&(g.style.top=Math.max(q.container.scrollTop+22,c-t)+"px");t=g.offsetLeft+g.clientWidth-(q.container.scrollLeft+q.container.offsetWidth);0<t&&(g.style.left=Math.max(q.container.scrollLeft+22,b-t)+"px")}return g};
+e);var k=b.popupMenuHandler.isMenuShowing;b.popupMenuHandler.isMenuShowing=function(){return k.apply(this,arguments)||null!=c.shapePicker};var g=b.dblClick;b.dblClick=function(d,e){if(this.isEnabled())if(null!=e||null==c.sidebar||mxEvent.isShiftDown(d)||b.isCellLocked(b.getDefaultParent()))g.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d));mxEvent.consume(d);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(f.x,f.y)}),
+30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",e);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();p.apply(this,arguments)};var t=this.hoverIcons.execute;this.hoverIcons.execute=function(d,e,g){var f=g.getEvent();this.graph.isCloneEvent(f)||mxEvent.isShiftDown(f)?t.apply(this,arguments):this.graph.connectVertex(d.cell,e,this.graph.defaultEdgeLength,f,null,null,mxUtils.bind(this,function(f,l,m){var k=b.getCompositeParent(d.cell);f=b.getCellGeometry(k);
+for(g.consume();null!=k&&b.model.isVertex(k)&&null!=f&&f.relative;)cell=k,k=b.model.getParent(cell),f=b.getCellGeometry(k);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(g.getGraphX(),g.getGraphY(),k,mxUtils.bind(this,function(d){m(d);null!=c.hoverIcons&&c.hoverIcons.update(b.view.getState(d))}),e)}),30)}),mxUtils.bind(this,function(b){this.graph.selectCellsForConnectVertex(b,f,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,e){null!=d&&window.clearTimeout(d);
+d=window.setTimeout(mxUtils.bind(this,function(){var d=e.getProperty("arrow"),f=e.getProperty("direction"),l=e.getProperty("event"),d=d.getBoundingClientRect(),g=mxUtils.getOffset(b.container),k=b.container.scrollLeft+d.x-g.x,g=b.container.scrollTop+d.y-g.y,p=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),x=c.showShapePicker(k,g,p,mxUtils.bind(this,function(d){null!=d&&b.connectVertex(p,f,b.defaultEdgeLength,l,!0,!0,function(f,e,l){l(d);null!=c.hoverIcons&&
+c.hoverIcons.update(b.view.getState(d))},function(d){b.selectCellsForConnectVertex(d)},l,this.hoverIcons)}),f,!0);this.centerShapePicker(x,d,k,g,f);mxUtils.setOpacity(x,30);mxEvent.addListener(x,"mouseenter",function(){mxUtils.setOpacity(x,100)});mxEvent.addListener(x,"mouseleave",function(){c.hideShapePicker()})}),500)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(b,c){null!=d&&window.clearTimeout(d)}))}};
+EditorUi.prototype.centerShapePicker=function(b,c,e,k,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(e-=p.width/2-10,k-=p.height+6):g==mxConstants.DIRECTION_SOUTH?(e-=p.width/2-10,k+=c.height+6):g==mxConstants.DIRECTION_WEST?(e-=p.width+6,k-=p.height/2-10):g==mxConstants.DIRECTION_EAST&&(e+=c.width+6,k-=p.height/2-10);b.style.left=e+"px";b.style.top=k+"px"};
+EditorUi.prototype.showShapePicker=function(b,c,e,k,g,p){b=this.createShapePicker(b,c,e,k,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=k,this.shapePicker=b);return b};
+EditorUi.prototype.createShapePicker=function(b,c,e,k,g,p,t,d){var f=null;if(null!=t&&0<t.length){var l=this,m=this.editor.graph,f=document.createElement("div");g=m.view.getState(e);var q=null==e||null!=g&&m.isTransparentState(g)?null:m.copyStyle(e);e=6>t.length?35*t.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+c+"px;width:"+e+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(f.style.backgroundColor=m.background);m.container.appendChild(f);e=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(e);null!=q&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(q,[d]):l.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(e,"click",function(){var f=m.cloneCell(d);if(null!=k)k(f);else{f.geometry.x=m.snap(Math.round(b/m.view.scale)-m.view.translate.x-d.geometry.width/2);f.geometry.y=m.snap(Math.round(c/m.view.scale)-m.view.translate.y-d.geometry.height/2);m.model.beginUpdate();try{m.addCell(f)}finally{m.model.endUpdate()}m.setSelectionCell(f);
+m.scrollCellToVisible(f);m.startEditingAtCell(f);null!=l.hoverIcons&&l.hoverIcons.update(m.view.getState(f))}null!=p&&p()})});for(g=0;g<(d?Math.min(t.length,4):t.length);g++)e(t[g]);t=f.offsetTop+f.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0<t&&(f.style.top=Math.max(m.container.scrollTop+22,c-t)+"px");t=f.offsetLeft+f.clientWidth-(m.container.scrollLeft+m.container.offsetWidth);0<t&&(f.style.left=Math.max(m.container.scrollLeft+22,b-t)+"px")}return f};
EditorUi.prototype.getCellsForShapePicker=function(b,c){var e=mxUtils.bind(this,function(b,c,e,t){return this.editor.graph.createVertex(null,null,t||"",0,0,c||120,e||60,b,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),
e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",
120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};
@@ -2172,48 +2175,48 @@ EditorUi.prototype.getCssClassForMarker=function(b,c,e,k){return"flexArrow"==c?n
e==mxConstants.ARROW_DIAMOND_THIN?"1"==k?"geSprite geSprite-"+b+"thindiamond":"geSprite geSprite-"+b+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+b+"openasync":"dash"==e?"geSprite geSprite-"+b+"dash":"cross"==e?"geSprite geSprite-"+b+"cross":"async"==e?"1"==k?"geSprite geSprite-"+b+"async":"geSprite geSprite-"+b+"asynctrans":"circle"==e||"circlePlus"==e?"1"==k||"circle"==e?"geSprite geSprite-"+b+"circle":"geSprite geSprite-"+b+"circleplus":"ERone"==e?"geSprite geSprite-"+b+"erone":"ERmandOne"==
e?"geSprite geSprite-"+b+"eronetoone":"ERmany"==e?"geSprite geSprite-"+b+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+b+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+b+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+b+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,c=this.actions.get("paste"),e=this.actions.get("pasteHere");c.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));e.setEnabled(c.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,c=mxClipboard.cut;mxClipboard.cut=function(e){e.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(c){var e=null;if(c.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var e=e||c.getSelectionCells(),e=c.getExportableCells(c.model.getTopmostCells(e)),d={},g=c.createCellLookup(e),l=c.cloneCells(e,null,d),f=new mxGraphModel,k=f.getChildAt(f.getRoot(),
-0),m=0;m<l.length;m++){f.add(k,l[m]);var n=c.view.getState(e[m]);if(null!=n){var u=c.getCellGeometry(l[m]);null!=u&&u.relative&&!f.isEdge(e[m])&&null==g[mxObjectIdentity.get(f.getParent(e[m]))]&&(u.offset=null,u.relative=!1,u.x=n.x/n.view.scale-n.view.translate.x,u.y=n.y/n.view.scale-n.view.translate.y)}}c.updateCustomLinks(c.createCellMapping(d,g),l);mxClipboard.insertCount=1;mxClipboard.setCells(l)}b.updatePasteActionStates();return e};var e=mxClipboard.paste;mxClipboard.paste=function(c){var f=
-null;c.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):f=e.apply(this,arguments);b.updatePasteActionStates();return f};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);b.updatePasteActionStates()};var f=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(c,e){f.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.initClipboard=function(){var b=this,c=mxClipboard.cut;mxClipboard.cut=function(e){e.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(c){var e=null;if(c.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var e=e||c.getSelectionCells(),e=c.getExportableCells(c.model.getTopmostCells(e)),d={},f=c.createCellLookup(e),l=c.cloneCells(e,null,d),g=new mxGraphModel,k=g.getChildAt(g.getRoot(),
+0),n=0;n<l.length;n++){g.add(k,l[n]);var p=c.view.getState(e[n]);if(null!=p){var u=c.getCellGeometry(l[n]);null!=u&&u.relative&&!g.isEdge(e[n])&&null==f[mxObjectIdentity.get(g.getParent(e[n]))]&&(u.offset=null,u.relative=!1,u.x=p.x/p.view.scale-p.view.translate.x,u.y=p.y/p.view.scale-p.view.translate.y)}}c.updateCustomLinks(c.createCellMapping(d,f),l);mxClipboard.insertCount=1;mxClipboard.setCells(l)}b.updatePasteActionStates();return e};var e=mxClipboard.paste;mxClipboard.paste=function(c){var g=
+null;c.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):g=e.apply(this,arguments);b.updatePasteActionStates();return g};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);b.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(c,e){g.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var b=this.graph.getPageLayout(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+b.x*d.width),this.scale*(this.translate.y+b.y*d.height),this.scale*b.width*d.width,
-this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,g){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,g,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),f=mxUtils.hasScrollbars(b.container),k=b.view.translate,q=b.view.scale,m=mxRectangle.fromRectangle(l);
-m.x=m.x/q-k.x;m.y=m.y/q-k.y;m.width/=q;m.height/=q;var k=b.container.scrollTop,p=b.container.scrollLeft,G=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)G+=3;var D=b.container.offsetWidth-G,G=b.container.offsetHeight-G;d=d?Math.max(.3,Math.min(g||1,D/m.width)):q;g=(D-d*m.width)/2/d;var u=0==this.lightboxVerticalDivider?0:(G-d*m.height)/this.lightboxVerticalDivider/d;f&&(g=Math.max(g,0),u=Math.max(u,0));if(f||l.width<D||l.height<G)b.view.scaleAndTranslate(d,Math.floor(g-
-m.x),Math.floor(u-m.y)),b.container.scrollTop=k*d/q,b.container.scrollLeft=p*d/q;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/q),Math.floor(l.y+e/q))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
-function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var f=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing=
-"border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var n=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top=
-"0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",n);n();var t=0,n=mxUtils.bind(this,function(b,d,g){t++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",b);null!=g&&c.setAttribute("title",g);b=document.createElement("img");b.setAttribute("border","0");
-b.setAttribute("src",d);c.appendChild(b);this.chromelessToolbar.appendChild(c);return c});null!=f.backBtn&&n(mxUtils.bind(this,function(b){window.location.href=f.backBtn.url;mxEvent.consume(b)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=n(mxUtils.bind(this,function(b){this.actions.get("previousPage").funct();mxEvent.consume(b)}),Editor.previousLargeImage,mxResources.get("previousPage")),g=document.createElement("div");g.style.display="inline-block";
-g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="10px";g.style.fontSize="14px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var l=n(mxUtils.bind(this,function(b){this.actions.get("nextPage").funct();mxEvent.consume(b)}),Editor.nextLargeImage,mxResources.get("nextPage")),q=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+
-this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",d.style.display="",g.style.display="inline-block"):(l.style.display="none",d.style.display="none",g.style.display="none");q()});this.editor.addListener("resetGraphView",p);this.editor.addListener("pageSelected",q)}n(mxUtils.bind(this,function(b){this.actions.get("zoomOut").funct();
-mxEvent.consume(b)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(b){this.actions.get("zoomIn").funct();mxEvent.consume(b)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(d){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var m=null,v=null,u=mxUtils.bind(this,
-function(b){null!=m&&(window.clearTimeout(m),m=null);null!=v&&(window.clearTimeout(v),v=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);m=null;v=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";v=null}),600)}),b||200)}),B=mxUtils.bind(this,function(b){null!=m&&(window.clearTimeout(m),m=null);null!=v&&(window.clearTimeout(v),v=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,
-b||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=n(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var g=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius",
-"5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=g.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";g=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=g.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),E=b.getModel();E.addListener(mxEvent.CHANGE,function(){x.style.display=1<E.getChildCount(E.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():
-"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(p=0;p<this.lightboxToolbarActions.length;p++){var A=this.lightboxToolbarActions[p];A.elem=n(A.fn,A.icon,A.tooltip)}null!=f.refreshBtn&&n(mxUtils.bind(this,function(b){f.refreshBtn.url?window.location.href=f.refreshBtn.url:window.location.reload();mxEvent.consume(b)}),
-Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=f.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,function(d){f.fullscreenBtn.url?b.openLink(f.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(f.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&n(mxUtils.bind(this,function(b){"1"==urlParams.close||
-f.closeBtn?window.close():(this.destroy(),mxEvent.consume(b))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(mxEvent.isShiftDown(b)||B(30),u())}));mxEvent.addListener(this.chromelessToolbar,
-mxClient.IS_POINTER?"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?u():B(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?u():B(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||B(30)}));var F=b.getTolerance();b.addMouseListener({startX:0,
-startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,g){this.startX=g.getGraphX();this.startY=g.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(b,d){},mouseUp:function(d,g){mxEvent.isTouchEvent(g.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<F&&Math.abs(this.scrollTop-b.container.scrollTop)<F&&Math.abs(this.startX-g.getGraphX())<F&&Math.abs(this.startY-g.getGraphY())<F&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?
-u():B(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var I=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*d.width;this.translate.y=b.y-(this.y0||0)*d.height}I.apply(this,arguments)};if(!b.isViewer()){var L=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=
-this.getPageLayout(),g=this.getPagePadding(),c=this.getPageSize(),e=Math.ceil(2*g.x+d.width*c.width),l=Math.ceil(2*g.y+d.height*c.height),f=b.minimumGraphSize;if(null==f||f.width!=e||f.height!=l)b.minimumGraphSize=new mxRectangle(0,0,e,l);e=g.x-d.x*c.width;g=g.y-d.y*c.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==g?L.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=b.view.translate.x,c=b.view.translate.y,b.view.setTranslate(e,g),b.container.scrollLeft+=
-Math.round((e-d)*b.view.scale),b.container.scrollTop+=Math.round((g-c)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var H=b.view.getBackgroundPane(),K=b.view.getDrawPane();b.cumulativeZoomFactor=1;var C=null,N=null,S=null,R=null,M=null,P=function(d){null!=C&&window.clearTimeout(C);window.setTimeout(function(){if(!b.isMouseDown||R)C=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&
-null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),K.style.transformOrigin="",H.style.transformOrigin="",mxClient.IS_SF?(K.style.transform="scale(1)",H.style.transform="scale(1)",window.setTimeout(function(){K.style.transform="";H.style.transform=""},0)):(K.style.transform="",H.style.transform=""),b.view.getDecoratorPane().style.opacity="",
-b.view.getOverlayPane().style.opacity="");var d=new mxPoint(b.container.scrollLeft,b.container.scrollTop),g=mxUtils.getOffset(b.container),l=b.view.scale,f=0,q=0;null!=N&&(f=b.container.offsetWidth/2-N.x+g.x,q=b.container.offsetHeight/2-N.y+g.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=S&&(f+=d.x-S.x,q+=d.y-S.y),null!=c&&e.chromelessResize(!1,null,f*(b.cumulativeZoomFactor-1),q*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==f&&0==q||(b.container.scrollLeft-=f*(b.cumulativeZoomFactor-
-1),b.container.scrollTop-=q*(b.cumulativeZoomFactor-1)));null!=M&&K.setAttribute("filter",M);b.cumulativeZoomFactor=1;M=R=N=S=C=null}),null!=d?d:b.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)},G=Date.now();b.lazyZoom=function(d,g,c){(g=g||!b.scrollbars)&&(N=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-G)){G=Date.now();d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
-(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==M&&""!=K.getAttribute("filter")&&(M=K.getAttribute("filter"),K.removeAttribute("filter"));S=new mxPoint(b.container.scrollLeft,b.container.scrollTop);d=g?b.container.scrollLeft+b.container.clientWidth/2:N.x+b.container.scrollLeft-b.container.offsetLeft;var l=g?b.container.scrollTop+b.container.clientHeight/2:N.y+b.container.scrollTop-b.container.offsetTop;K.style.transformOrigin=d+"px "+l+"px";K.style.transform="scale("+
-this.cumulativeZoomFactor+")";H.style.transformOrigin=d+"px "+l+"px";H.style.transform="scale("+this.cumulativeZoomFactor+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(d=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(d.style,"transform-origin",(g?b.container.clientWidth/2+b.container.scrollLeft-d.offsetLeft+"px":N.x+b.container.scrollLeft-d.offsetLeft-b.container.offsetLeft+"px")+" "+(g?b.container.clientHeight/2+b.container.scrollTop-d.offsetTop+"px":N.y+
-b.container.scrollTop-d.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(d.style,"transform","scale("+this.cumulativeZoomFactor+")"));b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}P(c)}};mxEvent.addGestureListeners(b.container,function(b){null!=C&&window.clearTimeout(C)},null,function(d){1!=b.cumulativeZoomFactor&&P(0)});mxEvent.addListener(b.container,"scroll",function(d){null==C||b.isMouseDown||1==b.cumulativeZoomFactor||
-P(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,g,c,e,l){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!c&&b.isScrollWheelEvent(d))c=b.view.getTranslate(),e=40/b.view.scale,mxEvent.isShiftDown(d)?b.view.setTranslate(c.x+(g?-e:e),c.y):b.view.setTranslate(c.x,c.y+(g?e:-e));else if(c||b.isZoomWheelEvent(d))for(var f=mxEvent.getSource(d);null!=f;){if(f==b.container)return b.tooltipHandler.hideTooltip(),N=null!=e&&null!=l?new mxPoint(e,
-l):new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),R=c,b.lazyZoom(g),mxEvent.consume(d),!1;f=f.parentNode}}),b.container);b.panningHandler.zoomGraph=function(d){b.cumulativeZoomFactor=d.scale;b.lazyZoom(0<d.scale,!0);mxEvent.consume(d)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printLargeImage,mxResources.get("print"))};
-EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
-EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
+this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,f){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,f,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),g=mxUtils.hasScrollbars(b.container),k=b.view.translate,m=b.view.scale,q=mxRectangle.fromRectangle(l);
+q.x=q.x/m-k.x;q.y=q.y/m-k.y;q.width/=m;q.height/=m;var k=b.container.scrollTop,F=b.container.scrollLeft,n=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var B=b.container.offsetWidth-n,n=b.container.offsetHeight-n;d=d?Math.max(.3,Math.min(f||1,B/q.width)):m;f=(B-d*q.width)/2/d;var p=0==this.lightboxVerticalDivider?0:(n-d*q.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),p=Math.max(p,0));if(g||l.width<B||l.height<n)b.view.scaleAndTranslate(d,Math.floor(f-
+q.x),Math.floor(p-q.y)),b.container.scrollTop=k*d/m,b.container.scrollLeft=F*d/m;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/m),Math.floor(l.y+e/m))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
+function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing=
+"border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top=
+"0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var t=0,p=mxUtils.bind(this,function(b,d,f){t++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",b);null!=f&&c.setAttribute("title",f);b=document.createElement("img");b.setAttribute("border","0");
+b.setAttribute("src",d);c.appendChild(b);this.chromelessToolbar.appendChild(c);return c});null!=g.backBtn&&p(mxUtils.bind(this,function(b){window.location.href=g.backBtn.url;mxEvent.consume(b)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=p(mxUtils.bind(this,function(b){this.actions.get("previousPage").funct();mxEvent.consume(b)}),Editor.previousLargeImage,mxResources.get("previousPage")),f=document.createElement("div");f.style.display="inline-block";
+f.style.verticalAlign="top";f.style.fontFamily=Editor.defaultHtmlFont;f.style.marginTop="10px";f.style.fontSize="14px";f.style.color="#ffffff";this.chromelessToolbar.appendChild(f);var l=p(mxUtils.bind(this,function(b){this.actions.get("nextPage").funct();mxEvent.consume(b)}),Editor.nextLargeImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+
+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var q=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",d.style.display="",f.style.display="inline-block"):(l.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",m)}p(mxUtils.bind(this,function(b){this.actions.get("zoomOut").funct();
+mxEvent.consume(b)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(b){this.actions.get("zoomIn").funct();mxEvent.consume(b)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(d){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var n=null,v=null,u=mxUtils.bind(this,
+function(b){null!=n&&(window.clearTimeout(n),n=null);null!=v&&(window.clearTimeout(v),v=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;v=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";v=null}),600)}),b||200)}),y=mxUtils.bind(this,function(b){null!=n&&(window.clearTimeout(n),n=null);null!=v&&(window.clearTimeout(v),v=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,
+b||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=p(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius",
+"5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),H=b.getModel();H.addListener(mxEvent.CHANGE,function(){x.style.display=1<H.getChildCount(H.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,
+function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var D=this.lightboxToolbarActions[q];D.elem=p(D.fn,D.icon,D.tooltip)}null!=g.refreshBtn&&p(mxUtils.bind(this,function(b){g.refreshBtn.url?
+window.location.href=g.refreshBtn.url:window.location.reload();mxEvent.consume(b)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(d){g.fullscreenBtn.url?b.openLink(g.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||
+this.container!=document.body))&&p(mxUtils.bind(this,function(b){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(b))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
+function(b){mxEvent.isTouchEvent(b)||(mxEvent.isShiftDown(b)||y(30),u())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?u():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?u():y(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||y(30)}));var E=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,f){this.startX=f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(b,d){},mouseUp:function(d,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<E&&Math.abs(this.scrollTop-b.container.scrollTop)<E&&
+Math.abs(this.startX-f.getGraphX())<E&&Math.abs(this.startY-f.getGraphY())<E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?u():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var J=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*d.width;this.translate.y=b.y-(this.y0||0)*d.height}J.apply(this,
+arguments)};if(!b.isViewer()){var L=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),f=this.getPagePadding(),c=this.getPageSize(),e=Math.ceil(2*f.x+d.width*c.width),l=Math.ceil(2*f.y+d.height*c.height),g=b.minimumGraphSize;if(null==g||g.width!=e||g.height!=l)b.minimumGraphSize=new mxRectangle(0,0,e,l);e=f.x-d.x*c.width;f=f.y-d.y*c.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==f?L.apply(this,
+arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=b.view.translate.x,c=b.view.translate.y,b.view.setTranslate(e,f),b.container.scrollLeft+=Math.round((e-d)*b.view.scale),b.container.scrollTop+=Math.round((f-c)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var G=b.view.getBackgroundPane(),K=b.view.getDrawPane();b.cumulativeZoomFactor=1;var C=null,M=null,P=null,S=null,N=null,R=function(d){null!=C&&window.clearTimeout(C);
+window.setTimeout(function(){if(!b.isMouseDown||S)C=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),K.style.transformOrigin="",G.style.transformOrigin="",mxClient.IS_SF?(K.style.transform="scale(1)",G.style.transform="scale(1)",window.setTimeout(function(){K.style.transform=
+"";G.style.transform=""},0)):(K.style.transform="",G.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var d=new mxPoint(b.container.scrollLeft,b.container.scrollTop),f=mxUtils.getOffset(b.container),l=b.view.scale,g=0,k=0;null!=M&&(g=b.container.offsetWidth/2-M.x+f.x,k=b.container.offsetHeight/2-M.y+f.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=P&&(g+=d.x-P.x,k+=d.y-P.y),null!=c&&e.chromelessResize(!1,null,g*(b.cumulativeZoomFactor-
+1),k*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==g&&0==k||(b.container.scrollLeft-=g*(b.cumulativeZoomFactor-1),b.container.scrollTop-=k*(b.cumulativeZoomFactor-1)));null!=N&&K.setAttribute("filter",N);b.cumulativeZoomFactor=1;N=S=M=P=C=null}),null!=d?d:b.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)},F=Date.now();b.lazyZoom=function(d,f,c){(f=f||!b.scrollbars)&&(M=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/
+2));if(mxClient.IS_IOS||!(15>Date.now()-F)){F=Date.now();d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*
+this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==N&&""!=K.getAttribute("filter")&&(N=K.getAttribute("filter"),K.removeAttribute("filter"));P=new mxPoint(b.container.scrollLeft,b.container.scrollTop);d=f?b.container.scrollLeft+b.container.clientWidth/2:M.x+b.container.scrollLeft-b.container.offsetLeft;var l=f?b.container.scrollTop+b.container.clientHeight/
+2:M.y+b.container.scrollTop-b.container.offsetTop;K.style.transformOrigin=d+"px "+l+"px";K.style.transform="scale("+this.cumulativeZoomFactor+")";G.style.transformOrigin=d+"px "+l+"px";G.style.transform="scale("+this.cumulativeZoomFactor+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(d=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(d.style,"transform-origin",(f?b.container.clientWidth/2+b.container.scrollLeft-d.offsetLeft+"px":M.x+b.container.scrollLeft-d.offsetLeft-
+b.container.offsetLeft+"px")+" "+(f?b.container.clientHeight/2+b.container.scrollTop-d.offsetTop+"px":M.y+b.container.scrollTop-d.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(d.style,"transform","scale("+this.cumulativeZoomFactor+")"));b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}R(c)}};mxEvent.addGestureListeners(b.container,function(b){null!=C&&window.clearTimeout(C)},null,function(d){1!=b.cumulativeZoomFactor&&
+R(0)});mxEvent.addListener(b.container,"scroll",function(d){null==C||b.isMouseDown||1==b.cumulativeZoomFactor||R(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,f,c,e,l){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!c&&b.isScrollWheelEvent(d))c=b.view.getTranslate(),e=40/b.view.scale,mxEvent.isShiftDown(d)?b.view.setTranslate(c.x+(f?-e:e),c.y):b.view.setTranslate(c.x,c.y+(f?e:-e));else if(c||b.isZoomWheelEvent(d))for(var g=
+mxEvent.getSource(d);null!=g;){if(g==b.container)return b.tooltipHandler.hideTooltip(),M=null!=e&&null!=l?new mxPoint(e,l):new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),S=c,b.lazyZoom(f),mxEvent.consume(d),!1;g=g.parentNode}}),b.container);b.panningHandler.zoomGraph=function(d){b.cumulativeZoomFactor=d.scale;b.lazyZoom(0<d.scale,!0);mxEvent.consume(d)}};
+EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printLargeImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};
+EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var c=urlParams.border,e=60;null!=c&&(e=parseInt(c));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,c){try{var e=mxUtils.parseXml(b);this.editor.setGraphXml(e.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=c&&(this.editor.setFilename(c),this.updateDocumentTitle())}catch(k){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+k.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,c,e,k){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(b);f.div.className+=" geMenubarMenu";f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});f.popup(c,e,null,k);this.setCurrentMenu(f)};
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,c,e,k){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(b);g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});g.popup(c,e,null,k);this.setCurrentMenu(g)};
EditorUi.prototype.setCurrentMenu=function(b,c){this.currentMenuElt=c;this.currentMenu=b};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};
EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var c=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);c==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(e){}};
EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var c=0<b.indexOf("?")?1:0,e;for(e in urlParams)b=0==c?b+"?":b+"&",b+=e+"="+urlParams[e],c++;return b};
@@ -2221,28 +2224,28 @@ EditorUi.prototype.setScrollbars=function(b){var c=this.editor.graph,e=c.contain
EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var c=b.getPagePadding();b.container.scrollTop=Math.floor(c.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(c.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
1;c=b.getGraphBounds();0<c.width&&0<c.height&&(c.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(c.x+c.width-b.container.clientWidth,c.x-10)),c.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(c.y+c.height-b.container.clientHeight,c.y-10)))}else{var c=b.getGraphBounds(),e=Math.max(c.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,c.y-Math.max(20,(b.container.clientHeight-Math.max(c.height,
b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,c.x-Math.max(0,(b.container.clientWidth-e)/2)))}else{var c=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds()),e=b.view.translate,k=b.view.scale;c.x=c.x/k-e.x;c.y=c.y/k-e.y;c.width/=k;c.height/=k;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-c.width)/2)-c.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-c.height)/4))-c.y+1))}};
-EditorUi.prototype.setPageVisible=function(b){var c=this.editor.graph,e=mxUtils.hasScrollbars(c.container),k=0,f=0;e&&(k=c.view.translate.x*c.view.scale-c.container.scrollLeft,f=c.view.translate.y*c.view.scale-c.container.scrollTop);c.pageVisible=b;c.pageBreaksVisible=b;c.preferPageSize=b;c.view.validateBackground();e&&(b=c.getSelectionCells(),c.clearSelection(),c.setSelectionCells(b));c.sizeDidChange();e&&(c.container.scrollLeft=c.view.translate.x*c.view.scale-k,c.container.scrollTop=c.view.translate.y*
-c.view.scale-f);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(b,c){this.ui=b;this.color=c}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
-function ChangePageSetup(b,c,e,k,f){this.ui=b;this.previousColor=this.color=c;this.previousImage=this.image=e;this.previousFormat=this.format=k;this.previousPageScale=this.pageScale=f;this.ignoreImage=this.ignoreColor=!1}
+EditorUi.prototype.setPageVisible=function(b){var c=this.editor.graph,e=mxUtils.hasScrollbars(c.container),k=0,g=0;e&&(k=c.view.translate.x*c.view.scale-c.container.scrollLeft,g=c.view.translate.y*c.view.scale-c.container.scrollTop);c.pageVisible=b;c.pageBreaksVisible=b;c.preferPageSize=b;c.view.validateBackground();e&&(b=c.getSelectionCells(),c.clearSelection(),c.setSelectionCells(b));c.sizeDidChange();e&&(c.container.scrollLeft=c.view.translate.x*c.view.scale-k,c.container.scrollTop=c.view.translate.y*
+c.view.scale-g);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(b,c){this.ui=b;this.color=c}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
+function ChangePageSetup(b,c,e,k,g){this.ui=b;this.previousColor=this.color=c;this.previousImage=this.image=e;this.previousFormat=this.format=k;this.previousPageScale=this.pageScale=g;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var c=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=c}if(!this.ignoreImage){this.image=this.previousImage;var c=b.backgroundImage,e=this.previousImage;null!=e&&null!=e.src&&"data:page/id,"==e.src.substring(0,13)&&(e=this.ui.createImageForPageLink(e.src,this.ui.currentPage));this.ui.setBackgroundImage(e);this.previousImage=c}null!=this.previousFormat&&
(this.format=this.previousFormat,c=b.pageFormat,this.previousFormat.width!=c.width||this.previousFormat.height!=c.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=c);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(b,e,k){k.previousColor=k.color;k.previousImage=k.image;k.previousFormat=k.format;k.previousPageScale=k.pageScale;null!=k.foldingEnabled&&(k.foldingEnabled=!k.foldingEnabled);return k};mxCodecRegistry.register(b)})();
EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(b){this.editor.graph.foldingEnabled=b;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
EditorUi.prototype.setPageFormat=function(b,c){c=null!=c?c:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;c||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),c=this.actions.get("redo"),e=this.editor.undoManager,k=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,k);e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);e.addListener(mxEvent.CLEAR,k);var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);k()};var n=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(b,d){n.apply(this,arguments);k()};k()};
-EditorUi.prototype.updateActionStates=function(){var b=this.editor.graph,c=!1,e=!1,k=!1,f=!1,n=[],t=b.getSelectionCells();if(null!=t)for(var d=0;d<t.length;d++){var g=t[d];b.isCellEditable(g)&&(n.push(g),f=!0,b.getModel().isEdge(g)&&(k=!0),b.getModel().isVertex(g)&&(c=!0,0<b.getModel().getChildCount(g)||b.isContainer(g)))&&(e=!0)}t="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(d=
-0;d<t.length;d++)this.actions.get(t[d]).setEnabled(f);this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(f);this.actions.get("copySize").setEnabled(1==b.getSelectionCount());this.actions.get("bringForward").setEnabled(1==n.length);this.actions.get("sendBackward").setEnabled(1==n.length);this.actions.get("turn").setEnabled(0<b.getResizableCells(b.getSelectionCells()).length);
-this.actions.get("curved").setEnabled(k);this.actions.get("rotation").setEnabled(c);this.actions.get("wordWrap").setEnabled(c);this.actions.get("autosize").setEnabled(c);k=c&&1==b.getSelectionCount();this.actions.get("group").setEnabled(1<b.getSelectionCount()||k&&!b.isContainer(b.getSelectionCell()));this.actions.get("ungroup").setEnabled(e);this.actions.get("removeFromGroup").setEnabled(k&&b.getModel().isVertex(b.getModel().getParent(n[0])));b.view.getState(b.getSelectionCell());this.menus.get("navigation").setEnabled(f||
+EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),c=this.actions.get("redo"),e=this.editor.undoManager,k=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,k);e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);e.addListener(mxEvent.CLEAR,k);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);k()};var p=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(b,d){p.apply(this,arguments);k()};k()};
+EditorUi.prototype.updateActionStates=function(){var b=this.editor.graph,c=!1,e=!1,k=!1,g=!1,p=[],t=b.getSelectionCells();if(null!=t)for(var d=0;d<t.length;d++){var f=t[d];b.isCellEditable(f)&&(p.push(f),g=!0,b.getModel().isEdge(f)&&(k=!0),b.getModel().isVertex(f)&&(c=!0,0<b.getModel().getChildCount(f)||b.isContainer(f)))&&(e=!0)}t="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(d=
+0;d<t.length;d++)this.actions.get(t[d]).setEnabled(g);this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(g);this.actions.get("copySize").setEnabled(1==b.getSelectionCount());this.actions.get("bringForward").setEnabled(1==p.length);this.actions.get("sendBackward").setEnabled(1==p.length);this.actions.get("turn").setEnabled(0<b.getResizableCells(b.getSelectionCells()).length);
+this.actions.get("curved").setEnabled(k);this.actions.get("rotation").setEnabled(c);this.actions.get("wordWrap").setEnabled(c);this.actions.get("autosize").setEnabled(c);k=c&&1==b.getSelectionCount();this.actions.get("group").setEnabled(1<b.getSelectionCount()||k&&!b.isContainer(b.getSelectionCell()));this.actions.get("ungroup").setEnabled(e);this.actions.get("removeFromGroup").setEnabled(k&&b.getModel().isVertex(b.getModel().getParent(p[0])));b.view.getState(b.getSelectionCell());this.menus.get("navigation").setEnabled(g||
null!=b.view.currentRoot);this.actions.get("collapsible").setEnabled(c&&(b.isContainer(b.getSelectionCell())||0<b.model.getChildCount(b.getSelectionCell())));this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.getSelectionCount()&&b.isValidRoot(b.getSelectionCell()));e=1==b.getSelectionCount()&&b.isCellFoldable(b.getSelectionCell());this.actions.get("expand").setEnabled(e);this.actions.get("collapse").setEnabled(e);
-this.actions.get("editLink").setEnabled(1==n.length);this.actions.get("openLink").setEnabled(1==b.getSelectionCount()&&null!=b.getLinkForCell(b.getSelectionCell()));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);n=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent());this.menus.get("layout").setEnabled(n);this.menus.get("insert").setEnabled(n);this.menus.get("direction").setEnabled(n&&c);this.menus.get("align").setEnabled(n&&
-c&&1<b.getSelectionCount());this.menus.get("distribute").setEnabled(n&&c&&1<b.getSelectionCount());this.actions.get("selectVertices").setEnabled(n);this.actions.get("selectEdges").setEnabled(n);this.actions.get("selectAll").setEnabled(n);this.actions.get("selectNone").setEnabled(n);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var c=this.container.clientWidth,e=this.container.clientHeight;this.container==document.body&&(c=document.body.clientWidth||document.documentElement.clientWidth,e=document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var f=Math.max(0,Math.min(this.hsplitPosition,c-this.splitSize-
-20)),n=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",n+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",n+=this.toolbarHeight);0<n&&(n+=1);c=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,c=Math.max(0,Math.min(e-n-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=f+"px";this.sidebarFooterContainer.style.height=c+"px";
-this.sidebarFooterContainer.style.bottom=t+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=n+"px";this.sidebarContainer.style.width=f+"px";this.formatContainer.style.top=n+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var t=this.getDiagramContainerOffset(),d=null!=this.hsplit.parentNode?f+this.splitSize:0;this.diagramContainer.style.left=d+t.x+"px";this.diagramContainer.style.top=n+t.y+"px";this.footerContainer.style.height=
-this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=f+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=d+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px");this.diagramContainer.style.right=e+"px";f=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=
-this.diagramContainer.style.right,f=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+c+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";this.diagramContainer.style.bottom=this.footerHeight+k+f+"px";b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+this.actions.get("editLink").setEnabled(1==p.length);this.actions.get("openLink").setEnabled(1==b.getSelectionCount()&&null!=b.getLinkForCell(b.getSelectionCell()));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);p=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent());this.menus.get("layout").setEnabled(p);this.menus.get("insert").setEnabled(p);this.menus.get("direction").setEnabled(p&&c);this.menus.get("align").setEnabled(p&&
+c&&1<b.getSelectionCount());this.menus.get("distribute").setEnabled(p&&c&&1<b.getSelectionCount());this.actions.get("selectVertices").setEnabled(p);this.actions.get("selectEdges").setEnabled(p);this.actions.get("selectAll").setEnabled(p);this.actions.get("selectNone").setEnabled(p);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
+EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var c=this.container.clientWidth,e=this.container.clientHeight;this.container==document.body&&(c=document.body.clientWidth||document.documentElement.clientWidth,e=document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,c-this.splitSize-
+20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&(p+=1);c=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,c=Math.max(0,Math.min(e-p-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=c+"px";
+this.sidebarFooterContainer.style.bottom=t+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var t=this.getDiagramContainerOffset(),d=null!=this.hsplit.parentNode?g+this.splitSize:0;this.diagramContainer.style.left=d+t.x+"px";this.diagramContainer.style.top=p+t.y+"px";this.footerContainer.style.height=
+this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=d+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px");this.diagramContainer.style.right=e+"px";g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=
+this.diagramContainer.style.right,g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+c+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";this.diagramContainer.style.bottom=this.footerHeight+k+g+"px";b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2251,18 +2254,18 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(b){this.hsplitPosition=b;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};
EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(b){var c=document.createElement("div");c.className=b;return c};
-EditorUi.prototype.addSplitHandler=function(b,c,e,k){function f(b){if(null!=t){var f=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));k(Math.max(0,d+(c?f.x-t.x:t.y-f.y)-e));mxEvent.consume(b);d!=q()&&(g=!0,l=null)}}function n(b){f(b);t=d=null}var t=null,d=null,g=!0,l=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var q=mxUtils.bind(this,function(){var d=parseInt(c?b.style.left:b.style.bottom);c||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(b,function(b){t=new mxPoint(mxEvent.getClientX(b),
-mxEvent.getClientY(b));d=q();g=!1;mxEvent.consume(b)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){if(!g&&this.hsplitClickEnabled){var d=null!=l?l-e:0;l=q();k(d);mxEvent.consume(b)}}));mxEvent.addGestureListeners(document,null,f,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,f,n)})};
-EditorUi.prototype.handleError=function(b,c,e,k,f){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=c){f=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=b&&null!=b.message&&(f=mxUtils.htmlEntities(b.message));this.showError(c,f,n,e,null,null,null,null,null,null,null,null,k?e:null)}else null!=e&&e()};
-EditorUi.prototype.showError=function(b,c,e,k,f,n,t,d,g,l,q,p,m){b=new ErrorDialog(this,b,c,e||mxResources.get("ok"),k,f,n,t,p,d,g);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(b.container,l||340,q||100+20*c,!0,!1,m);b.init()};EditorUi.prototype.showDialog=function(b,c,e,k,f,n,t,d,g,l){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,c,e,k,f,n,t,d,g,l);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(b,c,e,k){function g(b){if(null!=t){var g=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));k(Math.max(0,d+(c?g.x-t.x:t.y-g.y)-e));mxEvent.consume(b);d!=m()&&(f=!0,l=null)}}function p(b){g(b);t=d=null}var t=null,d=null,f=!0,l=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var m=mxUtils.bind(this,function(){var d=parseInt(c?b.style.left:b.style.bottom);c||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(b,function(b){t=new mxPoint(mxEvent.getClientX(b),
+mxEvent.getClientY(b));d=m();f=!1;mxEvent.consume(b)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){if(!f&&this.hsplitClickEnabled){var d=null!=l?l-e:0;l=m();k(d);mxEvent.consume(b)}}));mxEvent.addGestureListeners(document,null,g,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,p)})};
+EditorUi.prototype.handleError=function(b,c,e,k,g){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=c){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=b&&null!=b.message&&(g=mxUtils.htmlEntities(b.message));this.showError(c,g,p,e,null,null,null,null,null,null,null,null,k?e:null)}else null!=e&&e()};
+EditorUi.prototype.showError=function(b,c,e,k,g,p,t,d,f,l,m,q,n){b=new ErrorDialog(this,b,c,e||mxResources.get("ok"),k,g,p,t,q,d,f);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(b.container,l||340,m||100+20*c,!0,!1,n);b.init()};EditorUi.prototype.showDialog=function(b,c,e,k,g,p,t,d,f,l){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,c,e,k,g,p,t,d,f,l);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,c,e){null!=this.dialogs&&0<this.dialogs.length&&(null==e||e==this.dialog.container.firstChild)&&(e=this.dialogs.pop(),0==e.close(b,c)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var c=b.getSelectionCells(),e=new mxDictionary,k=[],f=0;f<c.length;f++){var n=b.isTableCell(c[f])?b.model.getParent(c[f]):c[f];null==n||e.get(n)||(e.put(n,!0),k.push(n))}b.setSelectionCells(b.duplicateCells(k,!1))}catch(t){this.handleError(t)}};
-EditorUi.prototype.pickColor=function(b,c){var e=this.editor.graph,k=e.cellEditor.saveSelection(),f=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),n=new ColorDialog(this,b||"none",function(b){e.cellEditor.restoreSelection(k);c(b)},function(){e.cellEditor.restoreSelection(k)});this.showDialog(n.container,230,f,!0,!1);n.init()};
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var c=b.getSelectionCells(),e=new mxDictionary,k=[],g=0;g<c.length;g++){var p=b.isTableCell(c[g])?b.model.getParent(c[g]):c[g];null==p||e.get(p)||(e.put(p,!0),k.push(p))}b.setSelectionCells(b.duplicateCells(k,!1))}catch(t){this.handleError(t)}};
+EditorUi.prototype.pickColor=function(b,c){var e=this.editor.graph,k=e.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),p=new ColorDialog(this,b||"none",function(b){e.cellEditor.restoreSelection(k);c(b)},function(){e.cellEditor.restoreSelection(k)});this.showDialog(p.container,230,g,!0,!1);p.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=null;try{var e=b.indexOf("&lt;mxGraphModel ");if(0<=e){var k=b.lastIndexOf("&lt;/mxGraphModel&gt;");k>e&&(c=b.substring(e,k+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(f){}return c};
+EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=null;try{var e=b.indexOf("&lt;mxGraphModel ");if(0<=e){var k=b.lastIndexOf("&lt;/mxGraphModel&gt;");k>e&&(c=b.substring(e,k+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return c};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(c){null!=c?b(c):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(c){if(null!=c){var e=decodeURIComponent(c);this.isCompatibleString(e)&&(c=e)}b(c)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,c){navigator.clipboard.read().then(mxUtils.bind(this,function(e){if(null!=e&&0<e.length&&"html"==c&&0<=mxUtils.indexOf(e[0].types,"text/html"))e[0].getType("text/html").then(mxUtils.bind(this,function(c){c.text().then(mxUtils.bind(this,function(c){try{var e=this.parseHtmlData(c),f="text/plain"!=e.getAttribute("data-type")?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);try{var d=f.lastIndexOf("%3E");
-0<=d&&d<f.length-3&&(f=f.substring(0,d+3))}catch(q){}try{var g=e.getElementsByTagName("span"),l=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(f);this.isCompatibleString(l)&&(f=l)}catch(q){}}catch(q){}b(this.isCompatibleString(f)?f:null)}))["catch"](function(c){b(null)})}))["catch"](function(c){b(null)});else if(null!=e&&0<e.length&&"text"==c&&0<=mxUtils.indexOf(e[0].types,"text/plain"))e[0].getType("text/plain").then(function(c){c.text().then(function(c){b(c)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,c){navigator.clipboard.read().then(mxUtils.bind(this,function(e){if(null!=e&&0<e.length&&"html"==c&&0<=mxUtils.indexOf(e[0].types,"text/html"))e[0].getType("text/html").then(mxUtils.bind(this,function(c){c.text().then(mxUtils.bind(this,function(c){try{var e=this.parseHtmlData(c),g="text/plain"!=e.getAttribute("data-type")?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);try{var d=g.lastIndexOf("%3E");
+0<=d&&d<g.length-3&&(g=g.substring(0,d+3))}catch(m){}try{var f=e.getElementsByTagName("span"),l=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(g);this.isCompatibleString(l)&&(g=l)}catch(m){}}catch(m){}b(this.isCompatibleString(g)?g:null)}))["catch"](function(c){b(null)})}))["catch"](function(c){b(null)});else if(null!=e&&0<e.length&&"text"==c&&0<=mxUtils.indexOf(e[0].types,"text/plain"))e[0].getType("text/plain").then(function(c){c.text().then(function(c){b(c)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(c){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var c=null;if(null!=b&&0<b.length){var e="<meta "==b.substring(0,6),c=document.createElement("div");c.innerHTML=(e?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=c.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=c.firstChild.nextSibling&&c.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
c.firstChild.nodeName&&"A"==c.firstChild.nextSibling.nodeName&&null==c.firstChild.nextSibling.nextSibling&&(b=null==c.firstChild.nextSibling.innerText?mxUtils.getTextContent(c.firstChild.nextSibling):c.firstChild.nextSibling.innerText,b==c.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(c,b),asHtml=!1));e=e&&null!=c.firstChild?c.firstChild.nextSibling:c.firstChild;null!=e&&null==e.nextSibling&&e.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==e.nodeName?(b=e.getAttribute("src"),
@@ -2272,111 +2275,111 @@ EditorUi.prototype.extractGraphModelFromEvent=function(b){var c=null,e=null;null
(c=e);return c};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(b){this.save(b)}),null,mxUtils.bind(this,function(b){if(null!=b&&0<b.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,c);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(c.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(c))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(c);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayout=function(b,c,e){var k=this.editor.graph;if(k.isEnabled()){k.getModel().beginUpdate();try{b()}catch(f){throw f;}finally{this.allowAnimation&&c&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(b=new mxMorphing(k),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=e&&e()})),b.startAnimation()):(k.getModel().endUpdate(),null!=e&&e())}}};
-EditorUi.prototype.showImageDialog=function(b,c,e,k){k=this.editor.graph.cellEditor;var f=k.saveSelection(),n=mxUtils.prompt(b,c);k.restoreSelection(f);if(null!=n&&0<n.length){var t=new Image;t.onload=function(){e(n,t.width,t.height)};t.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};t.src=n}else e(null)};EditorUi.prototype.showLinkDialog=function(b,c,e){b=new LinkDialog(this,b,c,e);this.showDialog(b.container,420,90,!0,!0);b.init()};
+EditorUi.prototype.executeLayout=function(b,c,e){var k=this.editor.graph;if(k.isEnabled()){k.getModel().beginUpdate();try{b()}catch(g){throw g;}finally{this.allowAnimation&&c&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(b=new mxMorphing(k),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=e&&e()})),b.startAnimation()):(k.getModel().endUpdate(),null!=e&&e())}}};
+EditorUi.prototype.showImageDialog=function(b,c,e,k){k=this.editor.graph.cellEditor;var g=k.saveSelection(),p=mxUtils.prompt(b,c);k.restoreSelection(g);if(null!=p&&0<p.length){var t=new Image;t.onload=function(){e(p,t.width,t.height)};t.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};t.src=p}else e(null)};EditorUi.prototype.showLinkDialog=function(b,c,e){b=new LinkDialog(this,b,c,e);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};
EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b){b=new ChangePageSetup(this,null,b);b.ignoreColor=!0;this.editor.graph.model.execute(b)});var e=mxUtils.prompt(mxResources.get("backgroundImage"),null!=c?c.src:"");null!=e&&0<e.length?(c=new Image,c.onload=function(){b(new mxImage(e,c.width,c.height),!1)},c.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},c.src=e):b(null)};
EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,c,e){mxUtils.confirm(b)?null!=c&&c():null!=e&&e()};EditorUi.prototype.createOutline=function(b){var c=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){c.update(!1)});return c};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(b){function c(b,g,c){t.push(function(){if(!k.isSelectionEmpty()&&k.isEnabled())if(g=null!=g?g:1,c){k.getModel().beginUpdate();try{for(var d=k.getSelectionCells(),e=0;e<d.length;e++)if(k.getModel().isVertex(d[e])&&k.isCellResizable(d[e])){var l=k.getCellGeometry(d[e]);null!=l&&(l=l.clone(),37==b?l.width=Math.max(0,l.width-g):38==b?l.height=Math.max(0,l.height-g):39==b?l.width+=g:40==b&&(l.height+=g),k.getModel().setGeometry(d[e],l))}}finally{k.getModel().endUpdate()}}else{var f=
-k.getSelectionCell(),l=k.model.getParent(f),d=null;1==k.getSelectionCount()&&k.model.isVertex(f)&&null!=k.layoutManager&&!k.isCellLocked(f)&&(d=k.layoutManager.getLayout(l));if(null!=d&&d.constructor==mxStackLayout)d=l.getIndex(f),37==b||38==b?k.model.add(l,f,Math.max(0,d-1)):39!=b&&40!=b||k.model.add(l,f,Math.min(k.model.getChildCount(l),d+1));else{d=k.getMovableCells(k.getSelectionCells());f=[];for(e=0;e<d.length;e++)l=k.getCurrentCellStyle(d[e]),"1"==mxUtils.getValue(l,"part","0")?(l=k.model.getParent(d[e]),
-k.model.isVertex(l)&&0>mxUtils.indexOf(d,l)&&f.push(l)):f.push(d[e]);0<f.length&&(d=l=0,37==b?l=-g:38==b?d=-g:39==b?l=g:40==b&&(d=g),k.moveCells(f,l,d))}}});null!=d&&window.clearTimeout(d);d=window.setTimeout(function(){if(0<t.length){k.getModel().beginUpdate();try{for(var b=0;b<t.length;b++)t[b]();t=[]}finally{k.getModel().endUpdate()}}},200)}var e=this,k=this.editor.graph,f=new mxKeyHandler(k),n=f.isEventIgnored;f.isEventIgnored=function(b){return!(mxEvent.isShiftDown(b)&&9==b.keyCode)&&(!this.isControlDown(b)||
-mxEvent.isShiftDown(b)||90!=b.keyCode&&89!=b.keyCode&&188!=b.keyCode&&190!=b.keyCode&&85!=b.keyCode)&&(66!=b.keyCode&&73!=b.keyCode||!this.isControlDown(b)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&n.apply(this,arguments)};f.isEnabledForEvent=function(b){return!mxEvent.isConsumed(b)&&this.isGraphEvent(b)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};f.isControlDown=function(b){return mxEvent.isControlDown(b)||mxClient.IS_MAC&&b.metaKey};var t=[],d=
-null,g={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=f.getFunction;mxKeyHandler.prototype.getFunction=function(b){if(k.isEnabled()){if(mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){var d=e.actions.get(e.altShiftActions[b.keyCode]);if(null!=d)return d.funct}if(null!=g[b.keyCode]&&!k.isSelectionEmpty())if(!this.isControlDown(b)&&mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){if(k.model.isVertex(k.getSelectionCell()))return function(){var d=
-k.connectVertex(k.getSelectionCell(),g[b.keyCode],k.defaultEdgeLength,b,!0);null!=d&&0<d.length&&(1==d.length&&k.model.isEdge(d[0])?k.setSelectionCell(k.model.getTerminal(d[0],!1)):k.setSelectionCell(d[d.length-1]),k.scrollCellToVisible(k.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(k.view.getState(k.getSelectionCell())))}}else return this.isControlDown(b)?function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null,!0)}:function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null)}}return l.apply(this,
-arguments)};f.bindAction=mxUtils.bind(this,function(b,d,g,c){var e=this.actions.get(g);null!=e&&(g=function(){e.isEnabled()&&e.funct()},d?c?f.bindControlShiftKey(b,g):f.bindControlKey(b,g):c?f.bindShiftKey(b,g):f.bindKey(b,g))});var q=this,p=f.escape;f.escape=function(b){p.apply(this,arguments)};f.enter=function(){};f.bindControlShiftKey(36,function(){k.exitGroup()});f.bindControlShiftKey(35,function(){k.enterGroup()});f.bindShiftKey(36,function(){k.home()});f.bindKey(35,function(){k.refresh()});
-f.bindAction(107,!0,"zoomIn");f.bindAction(109,!0,"zoomOut");f.bindAction(80,!0,"print");f.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)f.bindControlKey(36,function(){k.isEnabled()&&k.foldCells(!0)}),f.bindControlKey(35,function(){k.isEnabled()&&k.foldCells(!1)}),f.bindControlKey(13,function(){q.ctrlEnter()}),f.bindAction(8,!1,"delete"),f.bindAction(8,!0,"deleteAll"),f.bindAction(8,!1,"deleteLabels",!0),f.bindAction(46,!1,"delete"),f.bindAction(46,!0,"deleteAll"),
-f.bindAction(46,!1,"deleteLabels",!0),f.bindAction(36,!1,"resetView"),f.bindAction(72,!0,"fitWindow",!0),f.bindAction(74,!0,"fitPage"),f.bindAction(74,!0,"fitTwoPages",!0),f.bindAction(48,!0,"customZoom"),f.bindAction(82,!0,"turn"),f.bindAction(82,!0,"clearDefaultStyle",!0),f.bindAction(83,!0,"save"),f.bindAction(83,!0,"saveAs",!0),f.bindAction(65,!0,"selectAll"),f.bindAction(65,!0,"selectNone",!0),f.bindAction(73,!0,"selectVertices",!0),f.bindAction(69,!0,"selectEdges",!0),f.bindAction(69,!0,"editStyle"),
-f.bindAction(66,!0,"bold"),f.bindAction(66,!0,"toBack",!0),f.bindAction(70,!0,"toFront",!0),f.bindAction(68,!0,"duplicate"),f.bindAction(68,!0,"setAsDefaultStyle",!0),f.bindAction(90,!0,"undo"),f.bindAction(89,!0,"autosize",!0),f.bindAction(88,!0,"cut"),f.bindAction(67,!0,"copy"),f.bindAction(86,!0,"paste"),f.bindAction(71,!0,"group"),f.bindAction(77,!0,"editData"),f.bindAction(71,!0,"grid",!0),f.bindAction(73,!0,"italic"),f.bindAction(76,!0,"lockUnlock"),f.bindAction(76,!0,"layers",!0),f.bindAction(80,
-!0,"formatPanel",!0),f.bindAction(85,!0,"underline"),f.bindAction(85,!0,"ungroup",!0),f.bindAction(190,!0,"superscript"),f.bindAction(188,!0,"subscript"),f.bindAction(13,!1,"keyPressEnter"),f.bindKey(113,function(){k.isEnabled()&&k.startEditingAtCell()});mxClient.IS_WIN?f.bindAction(89,!0,"redo"):f.bindAction(90,!0,"redo",!0);return f};
+EditorUi.prototype.createKeyHandler=function(b){function c(b,f,c){t.push(function(){if(!k.isSelectionEmpty()&&k.isEnabled())if(f=null!=f?f:1,c){k.getModel().beginUpdate();try{for(var d=k.getSelectionCells(),e=0;e<d.length;e++)if(k.getModel().isVertex(d[e])&&k.isCellResizable(d[e])){var l=k.getCellGeometry(d[e]);null!=l&&(l=l.clone(),37==b?l.width=Math.max(0,l.width-f):38==b?l.height=Math.max(0,l.height-f):39==b?l.width+=f:40==b&&(l.height+=f),k.getModel().setGeometry(d[e],l))}}finally{k.getModel().endUpdate()}}else{var g=
+k.getSelectionCell(),l=k.model.getParent(g),d=null;1==k.getSelectionCount()&&k.model.isVertex(g)&&null!=k.layoutManager&&!k.isCellLocked(g)&&(d=k.layoutManager.getLayout(l));if(null!=d&&d.constructor==mxStackLayout)d=l.getIndex(g),37==b||38==b?k.model.add(l,g,Math.max(0,d-1)):39!=b&&40!=b||k.model.add(l,g,Math.min(k.model.getChildCount(l),d+1));else{d=k.getMovableCells(k.getSelectionCells());g=[];for(e=0;e<d.length;e++)l=k.getCurrentCellStyle(d[e]),"1"==mxUtils.getValue(l,"part","0")?(l=k.model.getParent(d[e]),
+k.model.isVertex(l)&&0>mxUtils.indexOf(d,l)&&g.push(l)):g.push(d[e]);0<g.length&&(d=l=0,37==b?l=-f:38==b?d=-f:39==b?l=f:40==b&&(d=f),k.moveCells(g,l,d))}}});null!=d&&window.clearTimeout(d);d=window.setTimeout(function(){if(0<t.length){k.getModel().beginUpdate();try{for(var b=0;b<t.length;b++)t[b]();t=[]}finally{k.getModel().endUpdate()}}},200)}var e=this,k=this.editor.graph,g=new mxKeyHandler(k),p=g.isEventIgnored;g.isEventIgnored=function(b){return!(mxEvent.isShiftDown(b)&&9==b.keyCode)&&(!this.isControlDown(b)||
+mxEvent.isShiftDown(b)||90!=b.keyCode&&89!=b.keyCode&&188!=b.keyCode&&190!=b.keyCode&&85!=b.keyCode)&&(66!=b.keyCode&&73!=b.keyCode||!this.isControlDown(b)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};g.isEnabledForEvent=function(b){return!mxEvent.isConsumed(b)&&this.isGraphEvent(b)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};g.isControlDown=function(b){return mxEvent.isControlDown(b)||mxClient.IS_MAC&&b.metaKey};var t=[],d=
+null,f={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=g.getFunction;mxKeyHandler.prototype.getFunction=function(b){if(k.isEnabled()){if(mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){var d=e.actions.get(e.altShiftActions[b.keyCode]);if(null!=d)return d.funct}if(null!=f[b.keyCode]&&!k.isSelectionEmpty())if(!this.isControlDown(b)&&mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){if(k.model.isVertex(k.getSelectionCell()))return function(){var d=
+k.connectVertex(k.getSelectionCell(),f[b.keyCode],k.defaultEdgeLength,b,!0);null!=d&&0<d.length&&(1==d.length&&k.model.isEdge(d[0])?k.setSelectionCell(k.model.getTerminal(d[0],!1)):k.setSelectionCell(d[d.length-1]),k.scrollCellToVisible(k.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(k.view.getState(k.getSelectionCell())))}}else return this.isControlDown(b)?function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null,!0)}:function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null)}}return l.apply(this,
+arguments)};g.bindAction=mxUtils.bind(this,function(b,d,f,c){var e=this.actions.get(f);null!=e&&(f=function(){e.isEnabled()&&e.funct()},d?c?g.bindControlShiftKey(b,f):g.bindControlKey(b,f):c?g.bindShiftKey(b,f):g.bindKey(b,f))});var m=this,q=g.escape;g.escape=function(b){q.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){k.exitGroup()});g.bindControlShiftKey(35,function(){k.enterGroup()});g.bindShiftKey(36,function(){k.home()});g.bindKey(35,function(){k.refresh()});
+g.bindAction(107,!0,"zoomIn");g.bindAction(109,!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){k.isEnabled()&&k.foldCells(!0)}),g.bindControlKey(35,function(){k.isEnabled()&&k.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),
+g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),
+g.bindAction(66,!0,"bold"),g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,
+!0,"formatPanel",!0),g.bindAction(85,!0,"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){k.isEnabled()&&k.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&
(mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,
"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}for(var c=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],b=0;b<c.length;b++)null!=c[b]&&null!=c[b].parentNode&&c[b].parentNode.removeChild(c[b])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var b=[["nbsp","160"],["shy","173"]],c=mxUtils.parseXml;mxUtils.parseXml=function(e){for(var k=0;k<b.length;k++)e=e.replace(new RegExp("&"+b[k][0]+";","g"),"&#"+b[k][1]+";");return c(e)}})();
Date.prototype.toISOString||function(){function b(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,c=function(c){return"function"===typeof c||"[object Function]"===b.call(c)},e=Math.pow(2,53)-1;return function(b){var f=Object(b);if(null==b)throw new TypeError("Array.from requires an array-like object - not null or undefined");var k=1<arguments.length?arguments[1]:void 0,t;if("undefined"!==typeof k){if(!c(k))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(t=
-arguments[2])}var d;d=Number(f.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),e);for(var g=c(this)?Object(new this(d)):Array(d),l=0,q;l<d;)q=f[l],g[l]=k?"undefined"===typeof t?k(q,l):k.call(t,q,l):q,l+=1;g.length=d;return g}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,c=function(c){return"function"===typeof c||"[object Function]"===b.call(c)},e=Math.pow(2,53)-1;return function(b){var g=Object(b);if(null==b)throw new TypeError("Array.from requires an array-like object - not null or undefined");var k=1<arguments.length?arguments[1]:void 0,t;if("undefined"!==typeof k){if(!c(k))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(t=
+arguments[2])}var d;d=Number(g.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),e);for(var f=c(this)?Object(new this(d)):Array(d),l=0,m;l<d;)m=g[l],f[l]=k?"undefined"===typeof t?k(m,l):k.call(t,m,l):m,l+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(c){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,c,e){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,c,e,k,f,n){mxGraph.call(this,b,c,e,k);this.themes=f||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=n?n:!1;b=this.baseUrl;c=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=b.indexOf("/",c+2),0<c&&(this.domainUrl=b.substring(0,c)),c=b.lastIndexOf("/"),0<c&&(this.domainPathUrl=b.substring(0,c+1)));this.isHtmlLabel=function(b){b=this.getCurrentCellStyle(b);
-return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,g=null,l=null,q=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),f=e.getState();if(!mxEvent.isAltDown(e.getEvent())&&null!=f)if(this.model.isEdge(f.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),q=this.isCellSelected(f.cell),g=f,d=e,null!=f.text&&null!=f.text.boundingBox&&
-mxUtils.contains(f.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var k=this.selectionCellsHandler.getHandler(f.cell);null!=k&&null!=k.bends&&0<k.bends.length&&(l=k.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(k=this.selectionCellsHandler.getHandler(f.cell),null==k||null==k.getHandleForEvent(e))){var p=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);p.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(f.cell)&&!this.isCellSelected(f.cell)){var m=this.model.getParent(f.cell),k=this.model.getParent(m);if(!this.isCellSelected(k)&&(mxUtils.intersects(p,new mxRectangle(f.x,f.y-2,f.width,3))&&this.model.getChildAt(k,0)!=m||mxUtils.intersects(p,new mxRectangle(f.x,f.y+f.height-2,f.width,3))||mxUtils.intersects(p,new mxRectangle(f.x-2,f.y,2,f.height))&&this.model.getChildAt(m,0)!=f.cell||mxUtils.intersects(p,new mxRectangle(f.x+f.width-
-2,f.y,2,f.height)))&&(m=this.selectionCellsHandler.isHandled(k),this.selectCellForEvent(k,e.getEvent()),k=this.selectionCellsHandler.getHandler(k),null!=k)){var u=k.getHandleForEvent(e);null!=u&&(k.start(e.getGraphX(),e.getGraphY(),u),k.blockDelayedSelection=!m,e.consume())}}for(;!e.isConsumed()&&null!=f&&(this.isTableCell(f.cell)||this.isTableRow(f.cell)||this.isTable(f.cell));)this.isSwimlane(f.cell)&&(k=this.getActualStartSize(f.cell),m=this.view.scale,(0<k.x||0<k.width)&&mxUtils.intersects(p,
-new mxRectangle(f.x+(k.x-k.width-1)*m+(0==k.x?f.width:0),f.y,1,f.height))||(0<k.y||0<k.height)&&mxUtils.intersects(p,new mxRectangle(f.x,f.y+(k.y-k.height-1)*m+(0==k.y?f.height:0),f.width,1)))&&(this.selectCellForEvent(f.cell,e.getEvent()),k=this.selectionCellsHandler.getHandler(f.cell),null!=k&&(u=mxEvent.CUSTOM_HANDLE-k.customHandles.length+1,k.start(e.getGraphX(),e.getGraphY(),u),e.consume())),f=this.view.getState(this.model.getParent(f.cell))}}}));this.addMouseListener({mouseDown:function(b,d){},
-mouseMove:mxUtils.bind(this,function(b,c){var e=this.selectionCellsHandler.handlers.map,f;for(f in e)if(null!=e[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(c.getEvent()))if(f=this.tolerance,null!=t&&null!=g&&null!=d){if(e=g,Math.abs(t.x-c.getGraphX())>f||Math.abs(t.y-c.getGraphY())>f){var k=this.selectionCellsHandler.getHandler(e.cell);null==k&&this.model.isEdge(e.cell)&&(k=this.createHandler(e));if(null!=k&&null!=k.bends&&0<k.bends.length){f=k.getHandleForEvent(d);
-var p=this.view.getEdgeStyle(e),m=p==mxEdgeStyle.EntityRelation;q||l!=mxEvent.LABEL_HANDLE||(f=l);if(m&&0!=f&&f!=k.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!m||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=e.visibleSourceState||f==k.bends.length-1||null!=e.visibleTargetState)m||f==mxEvent.LABEL_HANDLE||(m=e.absolutePoints,null!=m&&(null==p&&null==f||p==mxEdgeStyle.OrthConnector)&&(f=l,null==f&&(f=new mxRectangle(t.x,
-t.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,m[0].x,m[0].y)?f=0:mxUtils.contains(f,m[m.length-1].x,m[m.length-1].y)?f=k.bends.length-1:null!=p&&(2==m.length||3==m.length&&(0==Math.round(m[0].x-m[1].x)&&0==Math.round(m[1].x-m[2].x)||0==Math.round(m[0].y-m[1].y)&&0==Math.round(m[1].y-m[2].y)))?f=2:(f=mxUtils.findNearestSegment(e,t.x,t.y),f=null==p?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),k.start(c.getGraphX(),c.getGraphX(),f),c.consume(),this.graphHandler.reset()}null!=
-k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(e.cell)||(this.selectionCellsHandler.handlers.put(e.cell,k),this.selectCellForEvent(e.cell,c.getEvent())):this.isCellSelected(e.cell)||k.destroy());q=!1;t=d=g=l=null}}else if(e=c.getState(),null!=e&&this.isCellEditable(e.cell)){k=null;if(this.model.isEdge(e.cell)){if(f=new mxRectangle(c.getGraphX(),c.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),m=e.absolutePoints,null!=m)if(null!=e.text&&null!=e.text.boundingBox&&
-mxUtils.contains(e.text.boundingBox,c.getGraphX(),c.getGraphY()))k="move";else if(mxUtils.contains(f,m[0].x,m[0].y)||mxUtils.contains(f,m[m.length-1].x,m[m.length-1].y))k="pointer";else if(null!=e.visibleSourceState||null!=e.visibleTargetState)f=this.view.getEdgeStyle(e),k="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(e)&&(f=mxUtils.findNearestSegment(e,c.getGraphX(),c.getGraphY()),f<m.length-1&&0<=f&&(k=0==Math.round(m[f].x-m[f+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(c.getEvent())){f=
-new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);f.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(e.cell)&&(m=this.model.getParent(e.cell),p=this.model.getParent(m),!this.isCellSelected(p)))if(mxUtils.intersects(f,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(m,0)!=e.cell||mxUtils.intersects(f,new mxRectangle(e.x+e.width-2,e.y,2,e.height)))k="col-resize";else if(mxUtils.intersects(f,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(p,0)!=m||mxUtils.intersects(f,
-new mxRectangle(e.x,e.y+e.height-2,e.width,3)))k="row-resize";for(m=e;null==k&&null!=m&&(this.isTableCell(m.cell)||this.isTableRow(m.cell)||this.isTable(m.cell));){if(this.isSwimlane(m.cell)){var p=this.getActualStartSize(m.cell),u=this.view.scale;(0<p.x||0<p.width)&&mxUtils.intersects(f,new mxRectangle(m.x+(p.x-p.width-1)*u+(0==p.x?m.width*u:0),m.y,1,m.height))?k="col-resize":(0<p.y||0<p.height)&&mxUtils.intersects(f,new mxRectangle(m.x,m.y+(p.y-p.height-1)*u+(0==p.y?m.height:0),m.width,1))&&(k=
-"row-resize")}m=this.view.getState(this.model.getParent(m.cell))}}null!=k&&e.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(b,c){l=t=d=g=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(b){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);b.view.graph.isHtmlLabel(b.cell)&&(d=1!=b.style.html?mxUtils.htmlEntities(d,!1):b.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);
-this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(b,d){return!1};this.alternateEdgeStyle="vertical";null==k&&this.loadStylesheet();var p=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var b=p.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],g=this.graph.pageFormat,c=this.graph.pageScale,e=g.width*c,g=g.height*c,c=this.graph.view.translate,l=this.graph.view.scale,f=this.graph.getPageLayout(),k=0;k<f.width;k++)d.push(new mxRectangle(((f.x+k)*e+c.x)*l,(f.y*g+c.y)*l,e*l,g*l));for(k=1;k<f.height;k++)d.push(new mxRectangle((f.x*e+c.x)*l,((f.y+k)*g+c.y)*l,e*l,g*l));b=d.concat(b)}return b};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
-function(b,d){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var m=this.graphHandler.getCells;this.graphHandler.getCells=function(b){for(var d=m.apply(this,arguments),g=new mxDictionary,c=[],e=0;e<d.length;e++){var l=this.graph.isTableCell(b)&&this.graph.isTableCell(d[e])&&
-this.graph.isCellSelected(d[e])?this.graph.model.getParent(d[e]):this.graph.isTableRow(b)&&this.graph.isTableRow(d[e])&&this.graph.isCellSelected(d[e])?d[e]:this.graph.getCompositeParent(d[e]);null==l||g.get(l)||(g.put(l,!0),c.push(l))}return c};var v=this.graphHandler.start;this.graphHandler.start=function(b,d,g,c){var e=!1;this.graph.isTableCell(b)&&(this.graph.isCellSelected(b)?e=!0:b=this.graph.model.getParent(b));e||this.graph.isTableRow(b)&&this.graph.isCellSelected(b)||(b=this.graph.getCompositeParent(b));
-v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var B=(new Date).getTime(),x=0,E=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;E.apply(this,arguments);b!=this.currentState?(B=(new Date).getTime(),x=0):x=(new Date).getTime()-B};var A=
-this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&A.apply(this,arguments)};var F=this.isToggleEvent;this.isToggleEvent=function(b){return F.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var I=u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(b){return I.apply(this,
+Graph=function(b,c,e,k,g,p){mxGraph.call(this,b,c,e,k);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;c=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=b.indexOf("/",c+2),0<c&&(this.domainUrl=b.substring(0,c)),c=b.lastIndexOf("/"),0<c&&(this.domainPathUrl=b.substring(0,c+1)));this.isHtmlLabel=function(b){b=this.getCurrentCellStyle(b);
+return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,f=null,l=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),g=e.getState();if(!mxEvent.isAltDown(e.getEvent())&&null!=g)if(this.model.isEdge(g.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),m=this.isCellSelected(g.cell),f=g,d=e,null!=g.text&&null!=g.text.boundingBox&&
+mxUtils.contains(g.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var k=this.selectionCellsHandler.getHandler(g.cell);null!=k&&null!=k.bends&&0<k.bends.length&&(l=k.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(k=this.selectionCellsHandler.getHandler(g.cell),null==k||null==k.getHandleForEvent(e))){var q=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);q.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(g.cell)&&!this.isCellSelected(g.cell)){var n=this.model.getParent(g.cell),k=this.model.getParent(n);if(!this.isCellSelected(k)&&(mxUtils.intersects(q,new mxRectangle(g.x,g.y-2,g.width,3))&&this.model.getChildAt(k,0)!=n||mxUtils.intersects(q,new mxRectangle(g.x,g.y+g.height-2,g.width,3))||mxUtils.intersects(q,new mxRectangle(g.x-2,g.y,2,g.height))&&this.model.getChildAt(n,0)!=g.cell||mxUtils.intersects(q,new mxRectangle(g.x+g.width-
+2,g.y,2,g.height)))&&(n=this.selectionCellsHandler.isHandled(k),this.selectCellForEvent(k,e.getEvent()),k=this.selectionCellsHandler.getHandler(k),null!=k)){var p=k.getHandleForEvent(e);null!=p&&(k.start(e.getGraphX(),e.getGraphY(),p),k.blockDelayedSelection=!n,e.consume())}}for(;!e.isConsumed()&&null!=g&&(this.isTableCell(g.cell)||this.isTableRow(g.cell)||this.isTable(g.cell));)this.isSwimlane(g.cell)&&(k=this.getActualStartSize(g.cell),n=this.view.scale,(0<k.x||0<k.width)&&mxUtils.intersects(q,
+new mxRectangle(g.x+(k.x-k.width-1)*n+(0==k.x?g.width:0),g.y,1,g.height))||(0<k.y||0<k.height)&&mxUtils.intersects(q,new mxRectangle(g.x,g.y+(k.y-k.height-1)*n+(0==k.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),k=this.selectionCellsHandler.getHandler(g.cell),null!=k&&(p=mxEvent.CUSTOM_HANDLE-k.customHandles.length+1,k.start(e.getGraphX(),e.getGraphY(),p),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,d){},
+mouseMove:mxUtils.bind(this,function(b,c){var e=this.selectionCellsHandler.handlers.map,g;for(g in e)if(null!=e[g].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(c.getEvent()))if(g=this.tolerance,null!=t&&null!=f&&null!=d){if(e=f,Math.abs(t.x-c.getGraphX())>g||Math.abs(t.y-c.getGraphY())>g){var k=this.selectionCellsHandler.getHandler(e.cell);null==k&&this.model.isEdge(e.cell)&&(k=this.createHandler(e));if(null!=k&&null!=k.bends&&0<k.bends.length){g=k.getHandleForEvent(d);
+var q=this.view.getEdgeStyle(e),n=q==mxEdgeStyle.EntityRelation;m||l!=mxEvent.LABEL_HANDLE||(g=l);if(n&&0!=g&&g!=k.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!n||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=e.visibleSourceState||g==k.bends.length-1||null!=e.visibleTargetState)n||g==mxEvent.LABEL_HANDLE||(n=e.absolutePoints,null!=n&&(null==q&&null==g||q==mxEdgeStyle.OrthConnector)&&(g=l,null==g&&(g=new mxRectangle(t.x,
+t.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,n[0].x,n[0].y)?g=0:mxUtils.contains(g,n[n.length-1].x,n[n.length-1].y)?g=k.bends.length-1:null!=q&&(2==n.length||3==n.length&&(0==Math.round(n[0].x-n[1].x)&&0==Math.round(n[1].x-n[2].x)||0==Math.round(n[0].y-n[1].y)&&0==Math.round(n[1].y-n[2].y)))?g=2:(g=mxUtils.findNearestSegment(e,t.x,t.y),g=null==q?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),k.start(c.getGraphX(),c.getGraphX(),g),c.consume(),this.graphHandler.reset()}null!=
+k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(e.cell)||(this.selectionCellsHandler.handlers.put(e.cell,k),this.selectCellForEvent(e.cell,c.getEvent())):this.isCellSelected(e.cell)||k.destroy());m=!1;t=d=f=l=null}}else if(e=c.getState(),null!=e&&this.isCellEditable(e.cell)){k=null;if(this.model.isEdge(e.cell)){if(g=new mxRectangle(c.getGraphX(),c.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),n=e.absolutePoints,null!=n)if(null!=e.text&&null!=e.text.boundingBox&&
+mxUtils.contains(e.text.boundingBox,c.getGraphX(),c.getGraphY()))k="move";else if(mxUtils.contains(g,n[0].x,n[0].y)||mxUtils.contains(g,n[n.length-1].x,n[n.length-1].y))k="pointer";else if(null!=e.visibleSourceState||null!=e.visibleTargetState)g=this.view.getEdgeStyle(e),k="crosshair",g!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(e)&&(g=mxUtils.findNearestSegment(e,c.getGraphX(),c.getGraphY()),g<n.length-1&&0<=g&&(k=0==Math.round(n[g].x-n[g+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(c.getEvent())){g=
+new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);g.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(e.cell)&&(n=this.model.getParent(e.cell),q=this.model.getParent(n),!this.isCellSelected(q)))if(mxUtils.intersects(g,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(n,0)!=e.cell||mxUtils.intersects(g,new mxRectangle(e.x+e.width-2,e.y,2,e.height)))k="col-resize";else if(mxUtils.intersects(g,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(q,0)!=n||mxUtils.intersects(g,
+new mxRectangle(e.x,e.y+e.height-2,e.width,3)))k="row-resize";for(n=e;null==k&&null!=n&&(this.isTableCell(n.cell)||this.isTableRow(n.cell)||this.isTable(n.cell));){if(this.isSwimlane(n.cell)){var q=this.getActualStartSize(n.cell),p=this.view.scale;(0<q.x||0<q.width)&&mxUtils.intersects(g,new mxRectangle(n.x+(q.x-q.width-1)*p+(0==q.x?n.width*p:0),n.y,1,n.height))?k="col-resize":(0<q.y||0<q.height)&&mxUtils.intersects(g,new mxRectangle(n.x,n.y+(q.y-q.height-1)*p+(0==q.y?n.height:0),n.width,1))&&(k=
+"row-resize")}n=this.view.getState(this.model.getParent(n.cell))}}null!=k&&e.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(b,c){l=t=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(b){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);b.view.graph.isHtmlLabel(b.cell)&&(d=1!=b.style.html?mxUtils.htmlEntities(d,!1):b.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);
+this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(b,d){return!1};this.alternateEdgeStyle="vertical";null==k&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
+function(){var b=q.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],f=this.graph.pageFormat,c=this.graph.pageScale,e=f.width*c,f=f.height*c,c=this.graph.view.translate,l=this.graph.view.scale,g=this.graph.getPageLayout(),k=0;k<g.width;k++)d.push(new mxRectangle(((g.x+k)*e+c.x)*l,(g.y*f+c.y)*l,e*l,f*l));for(k=1;k<g.height;k++)d.push(new mxRectangle((g.x*e+c.x)*l,((g.y+k)*f+c.y)*l,e*l,f*l));b=d.concat(b)}return b};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+function(b,d){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(b){for(var d=n.apply(this,arguments),f=new mxDictionary,c=[],e=0;e<d.length;e++){var l=this.graph.isTableCell(b)&&this.graph.isTableCell(d[e])&&
+this.graph.isCellSelected(d[e])?this.graph.model.getParent(d[e]):this.graph.isTableRow(b)&&this.graph.isTableRow(d[e])&&this.graph.isCellSelected(d[e])?d[e]:this.graph.getCompositeParent(d[e]);null==l||f.get(l)||(f.put(l,!0),c.push(l))}return c};var v=this.graphHandler.start;this.graphHandler.start=function(b,d,f,c){var e=!1;this.graph.isTableCell(b)&&(this.graph.isCellSelected(b)?e=!0:b=this.graph.model.getParent(b));e||this.graph.isTableRow(b)&&this.graph.isCellSelected(b)||(b=this.graph.getCompositeParent(b));
+v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var y=(new Date).getTime(),x=0,H=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;H.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var D=
+this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&D.apply(this,arguments)};var E=this.isToggleEvent;this.isToggleEvent=function(b){return E.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var J=u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(b){return J.apply(this,
arguments)&&!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isControlDown(b.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==b.getState()&&mxEvent.isTouchEvent(b.getEvent())};var L=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(L=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,
-mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=L)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var H=this.click;this.click=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);if(this.isEnabled()&&!d||b.isConsumed())return H.apply(this,arguments);var g=d?b.sourceState.cell:b.getCell();null!=g&&(g=this.getClickableLinkForCell(g),null!=g&&(this.isCustomLink(g)?
-this.customLinkClicked(g):this.openLink(g)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};var K=this.tooltipHandler.show;this.tooltipHandler.show=function(){K.apply(this,arguments);if(null!=this.div)for(var b=this.div.getElementsByTagName("a"),d=0;d<b.length;d++)null!=b[d].getAttribute("href")&&null==b[d].getAttribute("target")&&b[d].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};
-this.getCursorForMouseEvent=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);return this.getCursorForCell(d?b.sourceState.cell:b.getCell())};var C=this.getCursorForCell;this.getCursorForCell=function(b){if(!this.isEnabled()||this.isCellLocked(b)){if(null!=this.getClickableLinkForCell(b))return"pointer";if(this.isCellLocked(b))return"default"}return C.apply(this,arguments)};this.selectRegion=function(b,d){var g=this.getCells(b.x,b.y,b.width,b.height,null,
-null,null,function(b){return"1"==mxUtils.getValue(b.style,"locked","0")},!0);this.selectCellsForEvent(g,d);return g};var N=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,d,g){return this.graph.isCellSelected(b)?!1:N.apply(this,arguments)};this.isCellLocked=function(b){for(;null!=b;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(b),"locked","0"))return!0;b=this.model.getParent(b)}return!1};var S=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,
-mxUtils.bind(this,function(b,d){if("mouseDown"==d.getProperty("eventName")){var g=d.getProperty("event").getState();S=null==g||this.isSelectionEmpty()||this.isCellSelected(g.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,d){if(!mxEvent.isMultiTouchEvent(d)){var g=d.getProperty("event"),e=d.getProperty("cell");null==e?(g=mxUtils.convertPoint(this.container,mxEvent.getClientX(g),mxEvent.getClientY(g)),u.start(g.x,g.y)):null!=S?this.addSelectionCells(S):
-1<this.getSelectionCount()&&this.isCellSelected(e)&&this.removeSelectionCell(e);S=null;d.consume()}}));this.connectionHandler.selectCells=function(b,d){this.graph.setSelectionCell(d||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,d){var g=b.view.graph;return d&&(g.isCellSelected(b.cell)||g.isTableRow(b.cell)&&g.selectionCellsHandler.isHandled(g.model.getParent(b.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.connectionHandler.constraintHandler;
-null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var R=this.updateMouseEvent;this.updateMouseEvent=function(b){b=R.apply(this,arguments);null!=b.state&&this.isCellLocked(b.getCell())&&(b.state=null);return b}}this.currentTranslate=new mxPoint(0,0)};
+mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=L)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var G=this.click;this.click=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);if(this.isEnabled()&&!d||b.isConsumed())return G.apply(this,arguments);var f=d?b.sourceState.cell:b.getCell();null!=f&&(f=this.getClickableLinkForCell(f),null!=f&&(this.isCustomLink(f)?
+this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};var K=this.tooltipHandler.show;this.tooltipHandler.show=function(){K.apply(this,arguments);if(null!=this.div)for(var b=this.div.getElementsByTagName("a"),d=0;d<b.length;d++)null!=b[d].getAttribute("href")&&null==b[d].getAttribute("target")&&b[d].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};
+this.getCursorForMouseEvent=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);return this.getCursorForCell(d?b.sourceState.cell:b.getCell())};var C=this.getCursorForCell;this.getCursorForCell=function(b){if(!this.isEnabled()||this.isCellLocked(b)){if(null!=this.getClickableLinkForCell(b))return"pointer";if(this.isCellLocked(b))return"default"}return C.apply(this,arguments)};this.selectRegion=function(b,d){var f=this.getCells(b.x,b.y,b.width,b.height,null,
+null,null,function(b){return"1"==mxUtils.getValue(b.style,"locked","0")},!0);this.selectCellsForEvent(f,d);return f};var M=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,d,f){return this.graph.isCellSelected(b)?!1:M.apply(this,arguments)};this.isCellLocked=function(b){for(;null!=b;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(b),"locked","0"))return!0;b=this.model.getParent(b)}return!1};var P=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,
+mxUtils.bind(this,function(b,d){if("mouseDown"==d.getProperty("eventName")){var f=d.getProperty("event").getState();P=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,d){if(!mxEvent.isMultiTouchEvent(d)){var f=d.getProperty("event"),e=d.getProperty("cell");null==e?(f=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f)),u.start(f.x,f.y)):null!=P?this.addSelectionCells(P):
+1<this.getSelectionCount()&&this.isCellSelected(e)&&this.removeSelectionCell(e);P=null;d.consume()}}));this.connectionHandler.selectCells=function(b,d){this.graph.setSelectionCell(d||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,d){var f=b.view.graph;return d&&(f.isCellSelected(b.cell)||f.isTableRow(b.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(b.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.connectionHandler.constraintHandler;
+null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var S=this.updateMouseEvent;this.updateMouseEvent=function(b){b=S.apply(this,arguments);null!=b.state&&this.isCellLocked(b.getCell())&&(b.state=null);return b}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.createOffscreenGraph=function(b){var c=new Graph(document.createElement("div"));c.stylesheet.styles=mxUtils.clone(b.styles);c.resetViewOnRootChange=!1;c.setConnectable(!1);c.gridEnabled=!1;c.autoScroll=!1;c.setTooltips(!1);c.setEnabled(!1);c.container.style.visibility="hidden";c.container.style.position="absolute";c.container.style.overflow="hidden";c.container.style.height="1px";c.container.style.width="1px";return c};
-Graph.createSvgImage=function(b,c,e,k,f){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+c+'px" '+(null!=k&&null!=f?'viewBox="0 0 '+k+" "+f+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),b,c)};
-Graph.zapGremlins=function(b){for(var c=0,e=[],k=0;k<b.length;k++){var f=b.charCodeAt(k);(32<=f||9==f||10==f||13==f)&&65535!=f&&65534!=f||(e.push(b.substring(c,k)),c=k+1)}0<c&&c<b.length&&e.push(b.substring(c));return 0==e.length?b:e.join("")};Graph.stringToBytes=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=b.charCodeAt(e);return c};Graph.bytesToString=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=String.fromCharCode(b[e]);return c.join("")};
+Graph.createSvgImage=function(b,c,e,k,g){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+c+'px" '+(null!=k&&null!=g?'viewBox="0 0 '+k+" "+g+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),b,c)};
+Graph.zapGremlins=function(b){for(var c=0,e=[],k=0;k<b.length;k++){var g=b.charCodeAt(k);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(e.push(b.substring(c,k)),c=k+1)}0<c&&c<b.length&&e.push(b.substring(c));return 0==e.length?b:e.join("")};Graph.stringToBytes=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=b.charCodeAt(e);return c};Graph.bytesToString=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=String.fromCharCode(b[e]);return c.join("")};
Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(b,e){return String.fromCharCode(parseInt(e,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(b){return"%"+("00"+b.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,c){var e=mxUtils.getXml(b);return Graph.compress(c?e:Graph.zapGremlins(e))};
Graph.arrayBufferToString=function(b){var c="";b=new Uint8Array(b);for(var e=b.byteLength,k=0;k<e;k++)c+=String.fromCharCode(b[k]);return c};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(b){return b.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(b,c,e){var k=c.charCodeAt(0),f=1,n=-1;for(e=e||0;e<b.byteLength;e++)if(b[e]==k){n=e;break}for(e=n+1;-1<n&&e<b.byteLength&&e<n+c.length-1;e++){if(b[e]!=c.charCodeAt(f))return Graph.arrayBufferIndexOfString(b,c,n+1);f++}return f==c.length-1?n:-1};Graph.compress=function(b,c){if(null==b||0==b.length||"undefined"===typeof pako)return b;var e=c?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(e)))};
+Graph.arrayBufferIndexOfString=function(b,c,e){var k=c.charCodeAt(0),g=1,p=-1;for(e=e||0;e<b.byteLength;e++)if(b[e]==k){p=e;break}for(e=p+1;-1<p&&e<b.byteLength&&e<p+c.length-1;e++){if(b[e]!=c.charCodeAt(g))return Graph.arrayBufferIndexOfString(b,c,p+1);g++}return g==c.length-1?p:-1};Graph.compress=function(b,c){if(null==b||0==b.length||"undefined"===typeof pako)return b;var e=c?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(e)))};
Graph.decompress=function(b,c,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));c=decodeURIComponent(c?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return e?c:Graph.zapGremlins(c)};
-Graph.fadeNodes=function(b,c,e,k,f){f=null!=f?f:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,c);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+f+"ms ease-in-out");Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=k&&k()},f)},0)};Graph.setTransitionForNodes=function(b,c){for(var e=0;e<b.length;e++)mxUtils.setPrefixedStyle(b[e].style,"transition",c)};
+Graph.fadeNodes=function(b,c,e,k,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,c);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=k&&k()},g)},0)};Graph.setTransitionForNodes=function(b,c){for(var e=0;e<b.length;e++)mxUtils.setPrefixedStyle(b[e].style,"transition",c)};
Graph.setOpacityForNodes=function(b,c){for(var e=0;e<b.length;e++)b[e].style.opacity=c};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};Graph.sanitizeHtml=function(b,c){return html_sanitize(b,function(b){return null!=b&&"javascript:"!==b.toString().toLowerCase().substring(0,11)?b:null},function(b){return b})};
-Graph.sanitizeSvg=function(b){for(var c=b.getElementsByTagName("*"),e=0;e<c.length;e++)for(var k=0;k<c[e].attributes.length;k++){var f=c[e].attributes[k];2<f.name.length&&"on"==f.name.toLowerCase().substring(0,2)&&c[e].removeAttribute(f.name)}for(b=b.getElementsByTagName("script");0<b.length;)b[0].parentNode.removeChild(b[0])};
-Graph.clipSvgDataUri=function(b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var c=document.createElement("div");c.style.position="absolute";c.style.visibility="hidden";var e=decodeURIComponent(escape(atob(b.substring(26)))),k=e.indexOf("<svg");if(0<=k){c.innerHTML=e.substring(k);Graph.sanitizeSvg(c);var f=c.getElementsByTagName("svg");if(0<f.length){document.body.appendChild(c);try{var n=f[0].getBBox();0<n.width&&0<n.height&&(c.getElementsByTagName("svg")[0].setAttribute("viewBox",
-n.x+" "+n.y+" "+n.width+" "+n.height),c.getElementsByTagName("svg")[0].setAttribute("width",n.width),c.getElementsByTagName("svg")[0].setAttribute("height",n.height))}catch(t){}finally{document.body.removeChild(c)}b=Editor.createSvgDataUri(mxUtils.getXml(f[0]))}}}catch(t){}return b};
+Graph.sanitizeSvg=function(b){for(var c=b.getElementsByTagName("*"),e=0;e<c.length;e++)for(var k=0;k<c[e].attributes.length;k++){var g=c[e].attributes[k];2<g.name.length&&"on"==g.name.toLowerCase().substring(0,2)&&c[e].removeAttribute(g.name)}for(b=b.getElementsByTagName("script");0<b.length;)b[0].parentNode.removeChild(b[0])};
+Graph.clipSvgDataUri=function(b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var c=document.createElement("div");c.style.position="absolute";c.style.visibility="hidden";var e=decodeURIComponent(escape(atob(b.substring(26)))),k=e.indexOf("<svg");if(0<=k){c.innerHTML=e.substring(k);Graph.sanitizeSvg(c);var g=c.getElementsByTagName("svg");if(0<g.length){document.body.appendChild(c);try{var p=g[0].getBBox();0<p.width&&0<p.height&&(c.getElementsByTagName("svg")[0].setAttribute("viewBox",
+p.x+" "+p.y+" "+p.width+" "+p.height),c.getElementsByTagName("svg")[0].setAttribute("width",p.width),c.getElementsByTagName("svg")[0].setAttribute("height",p.height))}catch(t){}finally{document.body.removeChild(c)}b=Editor.createSvgDataUri(mxUtils.getXml(g[0]))}}}catch(t){}return b};
Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.createRemoveIcon=function(b,c){var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);e.setAttribute("title",b);e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px";e.style.cursor="pointer";mxEvent.addListener(e,"click",c);return e};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i;
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled=!0;Graph.prototype.lightbox=!1;
Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;
Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(b,c){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var e=b.view.graph.tolerance,k=!0,t=null,d=mxUtils.bind(this,function(b){k=!0;t=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b))}),g=mxUtils.bind(this,function(b){k=k&&null!=t&&Math.abs(t.x-mxEvent.getClientX(b))<e&&Math.abs(t.y-mxEvent.getClientY(b))<e}),l=mxUtils.bind(this,function(d){if(k)for(var g=mxEvent.getSource(d);null!=
-g&&g!=c.node;){if("a"==g.nodeName.toLowerCase()){b.view.graph.labelLinkClicked(b,g,d);break}g=g.parentNode}});mxEvent.addGestureListeners(c.node,d,g,l);mxEvent.addListener(c.node,"click",function(b){mxEvent.consume(b)})};if(null!=this.tooltipHandler){var c=this.tooltipHandler.init;this.tooltipHandler.init=function(){c.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);"A"==c.nodeName&&(c=c.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(b,c){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var e=b.view.graph.tolerance,k=!0,t=null,d=mxUtils.bind(this,function(b){k=!0;t=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b))}),f=mxUtils.bind(this,function(b){k=k&&null!=t&&Math.abs(t.x-mxEvent.getClientX(b))<e&&Math.abs(t.y-mxEvent.getClientY(b))<e}),l=mxUtils.bind(this,function(d){if(k)for(var f=mxEvent.getSource(d);null!=
+f&&f!=c.node;){if("a"==f.nodeName.toLowerCase()){b.view.graph.labelLinkClicked(b,f,d);break}f=f.parentNode}});mxEvent.addGestureListeners(c.node,d,f,l);mxEvent.addListener(c.node,"click",function(b){mxEvent.consume(b)})};if(null!=this.tooltipHandler){var c=this.tooltipHandler.init;this.tooltipHandler.init=function(){c.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);"A"==c.nodeName&&(c=c.getAttribute("href"),null!=
c&&this.graph.isCustomLink(c)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&this.graph.customLinkClicked(c)&&mxEvent.consume(b))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){if(null!=this.container&&this.flowAnimationStyle){var e=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(e)}}));this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.getVerticesAndEdges=function(b,c){b=null!=b?b:!0;c=null!=c?c:!0;var d=this.model;return d.filterDescendants(function(g){return b&&d.isVertex(g)||c&&d.isEdge(g)},d.getRoot())};Graph.prototype.getCommonStyle=function(b){for(var c={},d=0;d<b.length;d++){var g=this.view.getState(b[d]);this.mergeStyle(g.style,c,0==d)}return c};Graph.prototype.mergeStyle=function(b,
-c,d){if(null!=b){var g={},e;for(e in b){var f=b[e];null!=f&&(g[e]=!0,null==c[e]&&d?c[e]=f:c[e]!=f&&delete c[e])}for(e in c)g[e]||delete c[e]}};Graph.prototype.getStartEditingCell=function(b,c){var d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(b)&&(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b)&&(b=this.model.getChildAt(b,0),d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(b)&&
-(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b))for(d=0;d<this.model.getChildCount(b);d++){var g=this.model.getChildAt(b,d);if(this.isCellEditable(g)){b=g;break}}return b};Graph.prototype.copyStyle=function(b){var c=null;if(null!=b){c=mxUtils.clone(this.getCurrentCellStyle(b));b=this.model.getStyle(b);b=null!=b?b.split(";"):[];for(var d=0;d<b.length;d++){var g=b[d],e=g.indexOf("=");if(0<=e){var f=g.substring(0,e),g=g.substring(e+1);null==c[f]&&g==mxConstants.NONE&&
-(c[f]=mxConstants.NONE)}}}return c};Graph.prototype.pasteStyle=function(b,c,d){d=null!=d?d:Graph.pasteStyles;this.model.beginUpdate();try{for(var g=0;g<c.length;g++)for(var e=this.getCurrentCellStyle(c[g]),f=0;f<d.length;f++){var k=e[d[f]],m=b[d[f]];k==m||null==k&&m==mxConstants.NONE||this.setCellStyles(d[f],m,[c[g]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||
-mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(b,c,d,g,e,f){this.useCssTransforms&&(b=b/this.currentScale-this.currentTranslate.x,c=c/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(b,c,d,g,e,f){g=null!=g?g:!0;e=null!=e?e:!0;null==d&&(d=this.getCurrentRoot(),
-null==d&&(d=this.getModel().getRoot()));if(null!=d)for(var l=this.model.getChildCount(d)-1;0<=l;l--){var k=this.model.getChildAt(d,l),q=this.getScaledCellAt(b,c,k,g,e,f);if(null!=q)return q;if(this.isCellVisible(k)&&(e&&this.model.isEdge(k)||g&&this.model.isVertex(k))&&(q=this.view.getState(k),null!=q&&(null==f||!f(q,b,c))&&this.intersects(q,b,c)))return k}return null};Graph.prototype.isRecursiveVertexResize=function(b){return!this.isSwimlane(b.cell)&&0<this.model.getChildCount(b.cell)&&!this.isCellCollapsed(b.cell)&&
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.getVerticesAndEdges=function(b,c){b=null!=b?b:!0;c=null!=c?c:!0;var d=this.model;return d.filterDescendants(function(f){return b&&d.isVertex(f)||c&&d.isEdge(f)},d.getRoot())};Graph.prototype.getCommonStyle=function(b){for(var c={},d=0;d<b.length;d++){var f=this.view.getState(b[d]);this.mergeStyle(f.style,c,0==d)}return c};Graph.prototype.mergeStyle=function(b,
+c,d){if(null!=b){var f={},e;for(e in b){var g=b[e];null!=g&&(f[e]=!0,null==c[e]&&d?c[e]=g:c[e]!=g&&delete c[e])}for(e in c)f[e]||delete c[e]}};Graph.prototype.getStartEditingCell=function(b,c){var d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(b)&&(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b)&&(b=this.model.getChildAt(b,0),d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(b)&&
+(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b))for(d=0;d<this.model.getChildCount(b);d++){var f=this.model.getChildAt(b,d);if(this.isCellEditable(f)){b=f;break}}return b};Graph.prototype.copyStyle=function(b){var c=null;if(null!=b){c=mxUtils.clone(this.getCurrentCellStyle(b));b=this.model.getStyle(b);b=null!=b?b.split(";"):[];for(var d=0;d<b.length;d++){var f=b[d],e=f.indexOf("=");if(0<=e){var g=f.substring(0,e),f=f.substring(e+1);null==c[g]&&f==mxConstants.NONE&&
+(c[g]=mxConstants.NONE)}}}return c};Graph.prototype.pasteStyle=function(b,c,d){d=null!=d?d:Graph.pasteStyles;this.model.beginUpdate();try{for(var f=0;f<c.length;f++)for(var e=this.getCurrentCellStyle(c[f]),g=0;g<d.length;g++){var k=e[d[g]],n=b[d[g]];k==n||null==k&&n==mxConstants.NONE||this.setCellStyles(d[g],n,[c[f]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||
+mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(b,c,d,f,e,g){this.useCssTransforms&&(b=b/this.currentScale-this.currentTranslate.x,c=c/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(b,c,d,f,e,g){f=null!=f?f:!0;e=null!=e?e:!0;null==d&&(d=this.getCurrentRoot(),
+null==d&&(d=this.getModel().getRoot()));if(null!=d)for(var l=this.model.getChildCount(d)-1;0<=l;l--){var k=this.model.getChildAt(d,l),m=this.getScaledCellAt(b,c,k,f,e,g);if(null!=m)return m;if(this.isCellVisible(k)&&(e&&this.model.isEdge(k)||f&&this.model.isVertex(k))&&(m=this.view.getState(k),null!=m&&(null==g||!g(m,b,c))&&this.intersects(m,b,c)))return k}return null};Graph.prototype.isRecursiveVertexResize=function(b){return!this.isSwimlane(b.cell)&&0<this.model.getChildCount(b.cell)&&!this.isCellCollapsed(b.cell)&&
"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(b){for(var c=this.getCellGeometry(b);null!=c&&c.relative;)b=this.getModel().getParent(b),c=this.getCellGeometry(cellToClone);return b};Graph.prototype.isPart=function(b){return"1"==mxUtils.getValue(this.getCurrentCellStyle(b),"part","0")||this.isTableCell(b)||this.isTableRow(b)};Graph.prototype.getCompositeParent=function(b){for(;this.isPart(b);){var c=
-this.model.getParent(b);if(!this.model.isVertex(c))break;b=c}return b};Graph.prototype.filterSelectionCells=function(b){var c=this.getSelectionCells();if(null!=b){for(var d=[],g=0;g<c.length;g++)b(c[g])||d.push(c[g]);c=d}return c};mxCellHighlight.prototype.getStrokeWidth=function(b){b=this.strokeWidth;this.graph.useCssTransforms&&(b/=this.graph.currentScale);return b};mxGraphView.prototype.getGraphBounds=function(){var b=this.graphBounds;if(this.graph.useCssTransforms)var c=this.graph.currentTranslate,
+this.model.getParent(b);if(!this.model.isVertex(c))break;b=c}return b};Graph.prototype.filterSelectionCells=function(b){var c=this.getSelectionCells();if(null!=b){for(var d=[],f=0;f<c.length;f++)b(c[f])||d.push(c[f]);c=d}return c};mxCellHighlight.prototype.getStrokeWidth=function(b){b=this.strokeWidth;this.graph.useCssTransforms&&(b/=this.graph.currentScale);return b};mxGraphView.prototype.getGraphBounds=function(){var b=this.graphBounds;if(this.graph.useCssTransforms)var c=this.graph.currentTranslate,
d=this.graph.currentScale,b=new mxRectangle((b.x+c.x)*d,(b.y+c.y)*d,b.width*d,b.height*d);return b};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var b=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(c){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=
0,this.translate.y=0);b.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var c=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(b){b=c.apply(this,arguments);for(var e=[],d=0;d<b.length;d++)this.isTableRow(b[d])||this.isTableCell(b[d])||e.push(b[d]);return e};var e=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=
function(b){b=e.apply(this,arguments);for(var c=[],d=0;d<b.length;d++)this.isTable(b[d])||this.isTableRow(b[d])||this.isTableCell(b[d])||c.push(b[d]);return c};Graph.prototype.updateCssTransform=function(){var b=this.view.getDrawPane();if(null!=b)if(b=b.parentNode,this.useCssTransforms){var c=b.getAttribute("transform");b.setAttribute("transformOrigin","0 0");var d=Math.round(100*this.currentScale)/100;b.setAttribute("transform","scale("+d+","+d+")translate("+Math.round(100*this.currentTranslate.x)/
100+","+Math.round(100*this.currentTranslate.y)/100+")");c!=b.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",b.getAttribute("transform"))}else b.removeAttribute("transformOrigin"),b.removeAttribute("transform")};var k=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var b=this.graph.useCssTransforms,c=this.scale,d=this.translate;b&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);
-k.apply(this,arguments);b&&(this.scale=c,this.translate=d)};var f=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(b,c,d){var g=this.useCssTransforms,e=this.view.scale,k=this.view.translate;g&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);f.apply(this,arguments);g&&(this.view.scale=e,this.view.translate=k,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+k.apply(this,arguments);b&&(this.scale=c,this.translate=d)};var g=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(b,c,d){var f=this.useCssTransforms,e=this.view.scale,k=this.view.translate;f&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);g.apply(this,arguments);f&&(this.view.scale=e,this.view.translate=k,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(b,c,e){c=c.getAttribute("href");if(null!=c&&!this.isCustomLink(c)&&(mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(c)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(c),b);mxEvent.consume(e)}};
-Graph.prototype.openLink=function(b,c,e){var k=window;try{if("_self"==c&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var f=b.split("#")[1];window.location.hash=="#"+f&&(window.location.hash="");window.location.hash=f}else k=window.open(b,null!=c?c:"_blank"),null==k||e||(k.opener=null)}catch(n){}return k};
+Graph.prototype.openLink=function(b,c,e){var k=window;try{if("_self"==c&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var g=b.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else k=window.open(b,null!=c?c:"_blank"),null==k||e||(k.opener=null)}catch(p){}return k};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(b){return null!=b&&!this.absoluteUrlPattern.test(b)&&"data:"!==b.substring(0,5)&&!this.isExternalProtocol(b)};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="#"==b.charAt(0)?this.baseUrl+b:"/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b,c){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,c){var e=this.graph.model.getParent(b);if(c!=mxEvent.BEGIN_UPDATE||this.hasLayout(e,c)){e=this.graph.getCellStyle(b);if("stackLayout"==e.childLayout){var k=new mxStackLayout(this.graph,!0);k.resizeParentMax="1"==mxUtils.getValue(e,"resizeParentMax","1");k.horizontal="1"==mxUtils.getValue(e,
"horizontalStack","1");k.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1");k.resizeLast="1"==mxUtils.getValue(e,"resizeLast","0");k.spacing=e.stackSpacing||k.spacing;k.border=e.stackBorder||k.border;k.marginLeft=e.marginLeft||0;k.marginRight=e.marginRight||0;k.marginTop=e.marginTop||0;k.marginBottom=e.marginBottom||0;k.allowGaps=e.allowGaps||0;k.fill=!0;k.allowGaps&&(k.gridSize=parseFloat(mxUtils.getValue(e,"stackUnitSize",20)));return k}if("treeLayout"==e.childLayout)return k=new mxCompactTreeLayout(this.graph),
k.horizontal="1"==mxUtils.getValue(e,"horizontalTree","1"),k.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1"),k.groupPadding=mxUtils.getValue(e,"parentPadding",20),k.levelDistance=mxUtils.getValue(e,"treeLevelDistance",30),k.maintainParentLocation=!0,k.edgeRouting=!1,k.resetEdges=!1,k;if("flowLayout"==e.childLayout)return k=new mxHierarchicalLayout(this.graph,mxUtils.getValue(e,"flowOrientation",mxConstants.DIRECTION_EAST)),k.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1"),k.parentBorder=
mxUtils.getValue(e,"parentPadding",20),k.maintainParentLocation=!0,k.intraCellSpacing=mxUtils.getValue(e,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),k.interRankCellSpacing=mxUtils.getValue(e,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),k.interHierarchySpacing=mxUtils.getValue(e,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),k.parallelEdgeSpacing=mxUtils.getValue(e,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),
-k;if("circleLayout"==e.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==e.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==e.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=null!=b[e].value?b[e].value.attributes:null,f={};f.id=b[e].id;if(null!=k)for(var n=0;n<k.length;n++)f[k[n].nodeName]=k[n].nodeValue;else f.label=this.convertValueToString(b[e]);c.push(f)}return c};
-Graph.prototype.getNodesForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=this.view.getState(b[e]);if(null!=k){for(var f=this.cellRenderer.getShapesForState(k),n=0;n<f.length;n++)null!=f[n]&&null!=f[n].node&&c.push(f[n].node);null!=k.control&&null!=k.control.node&&c.push(k.control.node)}}return c};
-Graph.prototype.createWipeAnimations=function(b,c){for(var e=[],k=0;k<b.length;k++){var f=this.view.getState(b[k]);null!=f&&null!=f.shape&&(this.model.isEdge(f.cell)&&null!=f.absolutePoints&&1<f.absolutePoints.length?e.push(this.createEdgeWipeAnimation(f,c)):this.model.isVertex(f.cell)&&null!=f.shape.bounds&&e.push(this.createVertexWipeAnimation(f,c)))}return e};
-Graph.prototype.createEdgeWipeAnimation=function(b,c){var e=b.absolutePoints.slice(),k=b.segments,f=b.length,n=e.length;return{execute:mxUtils.bind(this,function(t,d){if(null!=b.shape){var g=[e[0]],l=t/d;c||(l=1-l);for(var q=f*l,p=1;p<n;p++)if(q<=k[p-1]){g.push(new mxPoint(e[p-1].x+(e[p].x-e[p-1].x)*q/k[p-1],e[p-1].y+(e[p].y-e[p-1].y)*q/k[p-1]));break}else q-=k[p-1],g.push(e[p]);b.shape.points=g;b.shape.redraw();0==t&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+k;if("circleLayout"==e.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==e.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==e.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=null!=b[e].value?b[e].value.attributes:null,g={};g.id=b[e].id;if(null!=k)for(var p=0;p<k.length;p++)g[k[p].nodeName]=k[p].nodeValue;else g.label=this.convertValueToString(b[e]);c.push(g)}return c};
+Graph.prototype.getNodesForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=this.view.getState(b[e]);if(null!=k){for(var g=this.cellRenderer.getShapesForState(k),p=0;p<g.length;p++)null!=g[p]&&null!=g[p].node&&c.push(g[p].node);null!=k.control&&null!=k.control.node&&c.push(k.control.node)}}return c};
+Graph.prototype.createWipeAnimations=function(b,c){for(var e=[],k=0;k<b.length;k++){var g=this.view.getState(b[k]);null!=g&&null!=g.shape&&(this.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?e.push(this.createEdgeWipeAnimation(g,c)):this.model.isVertex(g.cell)&&null!=g.shape.bounds&&e.push(this.createVertexWipeAnimation(g,c)))}return e};
+Graph.prototype.createEdgeWipeAnimation=function(b,c){var e=b.absolutePoints.slice(),k=b.segments,g=b.length,p=e.length;return{execute:mxUtils.bind(this,function(t,d){if(null!=b.shape){var f=[e[0]],l=t/d;c||(l=1-l);for(var m=g*l,q=1;q<p;q++)if(m<=k[q-1]){f.push(new mxPoint(e[q-1].x+(e[q].x-e[q-1].x)*m/k[q-1],e[q-1].y+(e[q].y-e[q-1].y)*m/k[q-1]));break}else m-=k[q-1],f.push(e[q]);b.shape.points=f;b.shape.redraw();0==t&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=l)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=e,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(b,c){var e=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(k,f){if(null!=b.shape){var n=k/f;c||(n=1-n);b.shape.bounds=new mxRectangle(e.x,e.y,e.width*n,e.height);b.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=n)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=e,b.shape.redraw(),null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};Graph.prototype.executeAnimations=function(b,c,e,k){e=null!=e?e:30;k=null!=k?k:30;var f=null,n=0,t=mxUtils.bind(this,function(){if(n==e||this.stoppingCustomActions){window.clearInterval(f);for(var d=0;d<b.length;d++)b[d].stop();null!=c&&c()}else for(d=0;d<b.length;d++)b[d].execute(n,e);n++}),f=window.setInterval(t,k);t()};
+Graph.prototype.createVertexWipeAnimation=function(b,c){var e=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(k,g){if(null!=b.shape){var p=k/g;c||(p=1-p);b.shape.bounds=new mxRectangle(e.x,e.y,e.width*p,e.height);b.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=p)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=e,b.shape.redraw(),null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};Graph.prototype.executeAnimations=function(b,c,e,k){e=null!=e?e:30;k=null!=k?k:30;var g=null,p=0,t=mxUtils.bind(this,function(){if(p==e||this.stoppingCustomActions){window.clearInterval(g);for(var d=0;d<b.length;d++)b[d].stop();null!=c&&c()}else for(d=0;d<b.length;d++)b[d].execute(p,e);p++}),g=window.setInterval(t,k);t()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),c=this.getGraphBounds();if(0==c.width||0==c.height)return new mxRectangle(0,0,1,1);var e=Math.floor(Math.ceil(c.x/this.view.scale-this.view.translate.x)/b.width),k=Math.floor(Math.ceil(c.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(e,k,Math.ceil((Math.floor((c.x+c.width)/this.view.scale)-this.view.translate.x)/b.width)-e,Math.ceil((Math.floor((c.y+c.height)/this.view.scale)-this.view.translate.y)/b.height)-
k)};Graph.prototype.sanitizeHtml=function(b,c){return Graph.sanitizeHtml(b,c)};Graph.prototype.updatePlaceholders=function(){var b=!1,c;for(c in this.model.cells){var e=this.model.cells[c];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
@@ -2386,39 +2389,39 @@ Graph.prototype.getLabel=function(b){var c=mxGraph.prototype.getLabel.apply(this
Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var c=this.getLinkForCell(b);if(null!=c)return c;b=this.model.getParent(b)}while(null!=b);return null};
Graph.prototype.getGlobalVariable=function(b){var c=null;"date"==b?c=(new Date).toLocaleDateString():"time"==b?c=(new Date).toLocaleTimeString():"timestamp"==b?c=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),c=this.formatDate(new Date,b));return c};
Graph.prototype.formatDate=function(b,c,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var k=this.dateFormatCache,f=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,t=function(b,d){b=String(b);for(d=d||2;b.length<d;)b="0"+b;return b};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(c=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");c=String(k.masks[c]||c||k.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),e=!0);var d=e?"getUTC":"get",g=b[d+"Date"](),l=b[d+"Day"](),q=b[d+"Month"](),p=b[d+"FullYear"](),m=b[d+"Hours"](),v=b[d+"Minutes"](),u=b[d+"Seconds"](),d=b[d+"Milliseconds"](),B=e?0:b.getTimezoneOffset(),x={d:g,dd:t(g),ddd:k.i18n.dayNames[l],dddd:k.i18n.dayNames[l+7],m:q+1,mm:t(q+1),mmm:k.i18n.monthNames[q],mmmm:k.i18n.monthNames[q+
-12],yy:String(p).slice(2),yyyy:p,h:m%12||12,hh:t(m%12||12),H:m,HH:t(m),M:v,MM:t(v),s:u,ss:t(u),l:t(d,3),L:t(99<d?Math.round(d/10):d),t:12>m?"a":"p",tt:12>m?"am":"pm",T:12>m?"A":"P",TT:12>m?"AM":"PM",Z:e?"UTC":(String(b).match(f)||[""]).pop().replace(n,""),o:(0<B?"-":"+")+t(100*Math.floor(Math.abs(B)/60)+Math.abs(B)%60,4),S:["th","st","nd","rd"][3<g%10?0:(10!=g%100-g%10)*g%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(b){return b in x?x[b]:b.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var k=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,t=function(b,d){b=String(b);for(d=d||2;b.length<d;)b="0"+b;return b};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(c=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");c=String(k.masks[c]||c||k.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),e=!0);var d=e?"getUTC":"get",f=b[d+"Date"](),l=b[d+"Day"](),m=b[d+"Month"](),q=b[d+"FullYear"](),n=b[d+"Hours"](),v=b[d+"Minutes"](),u=b[d+"Seconds"](),d=b[d+"Milliseconds"](),y=e?0:b.getTimezoneOffset(),x={d:f,dd:t(f),ddd:k.i18n.dayNames[l],dddd:k.i18n.dayNames[l+7],m:m+1,mm:t(m+1),mmm:k.i18n.monthNames[m],mmmm:k.i18n.monthNames[m+
+12],yy:String(q).slice(2),yyyy:q,h:n%12||12,hh:t(n%12||12),H:n,HH:t(n),M:v,MM:t(v),s:u,ss:t(u),l:t(d,3),L:t(99<d?Math.round(d/10):d),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(b).match(g)||[""]).pop().replace(p,""),o:(0<y?"-":"+")+t(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(b){return b in x?x[b]:b.slice(1,
b.length-1)})};Graph.prototype.getLayerForCells=function(b){var c=null;if(0<b.length){for(c=b[0];!this.model.isLayer(c);)c=this.model.getParent(c);for(var e=1;e<b.length;e++)if(!this.model.isAncestor(c,b[e])){c=null;break}}return c};
-Graph.prototype.createLayersDialog=function(b){var c=document.createElement("div");c.style.position="absolute";for(var e=this.getModel(),k=e.getChildCount(e.root),f=0;f<k;f++)mxUtils.bind(this,function(f){var k=document.createElement("div");k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";var d=document.createElement("input");d.style.display="inline-block";d.setAttribute("type","checkbox");e.isVisible(f)&&(d.setAttribute("checked","checked"),
-d.defaultChecked=!0);k.appendChild(d);var g=this.convertValueToString(f)||mxResources.get("background")||"Background";k.setAttribute("title",g);mxUtils.write(k,g);c.appendChild(k);mxEvent.addListener(d,"click",function(){null!=d.getAttribute("checked")?d.removeAttribute("checked"):d.setAttribute("checked","checked");e.setVisible(f,d.checked);null!=b&&b(f)})})(e.getChildAt(e.root,f));return c};
-Graph.prototype.replacePlaceholders=function(b,c,e,k){k=[];if(null!=c){for(var f=0;match=this.placeholderPattern.exec(c);){var n=match[0];if(2<n.length&&"%label%"!=n&&"%tooltip%"!=n){var t=null;if(match.index>f&&"%"==c.charAt(match.index-1))t=n.substring(1);else{var d=n.substring(1,n.length-1);if("id"==d)t=b.id;else if(0>d.indexOf("{"))for(var g=b;null==t&&null!=g;)null!=g.value&&"object"==typeof g.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(t=g.getAttribute(d+"_"+Graph.diagramLanguage)),
-null==t&&(t=g.hasAttribute(d)?null!=g.getAttribute(d)?g.getAttribute(d):"":null)),g=this.model.getParent(g);null==t&&(t=this.getGlobalVariable(d));null==t&&null!=e&&(t=e[d])}k.push(c.substring(f,match.index)+(null!=t?t:n));f=match.index+n.length}}k.push(c.substring(f))}return k.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var c=[],e=0;e<b.length;e++){var k=this.model.getCell(b[e].id);null!=k&&c.push(k)}this.setSelectionCells(c)}else this.clearSelection()};
+Graph.prototype.createLayersDialog=function(b){var c=document.createElement("div");c.style.position="absolute";for(var e=this.getModel(),k=e.getChildCount(e.root),g=0;g<k;g++)mxUtils.bind(this,function(g){var k=document.createElement("div");k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";var d=document.createElement("input");d.style.display="inline-block";d.setAttribute("type","checkbox");e.isVisible(g)&&(d.setAttribute("checked","checked"),
+d.defaultChecked=!0);k.appendChild(d);var f=this.convertValueToString(g)||mxResources.get("background")||"Background";k.setAttribute("title",f);mxUtils.write(k,f);c.appendChild(k);mxEvent.addListener(d,"click",function(){null!=d.getAttribute("checked")?d.removeAttribute("checked"):d.setAttribute("checked","checked");e.setVisible(g,d.checked);null!=b&&b(g)})})(e.getChildAt(e.root,g));return c};
+Graph.prototype.replacePlaceholders=function(b,c,e,k){k=[];if(null!=c){for(var g=0;match=this.placeholderPattern.exec(c);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var t=null;if(match.index>g&&"%"==c.charAt(match.index-1))t=p.substring(1);else{var d=p.substring(1,p.length-1);if("id"==d)t=b.id;else if(0>d.indexOf("{"))for(var f=b;null==t&&null!=f;)null!=f.value&&"object"==typeof f.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(t=f.getAttribute(d+"_"+Graph.diagramLanguage)),
+null==t&&(t=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)),f=this.model.getParent(f);null==t&&(t=this.getGlobalVariable(d));null==t&&null!=e&&(t=e[d])}k.push(c.substring(g,match.index)+(null!=t?t:p));g=match.index+p.length}}k.push(c.substring(g))}return k.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var c=[],e=0;e<b.length;e++){var k=this.model.getCell(b[e].id);null!=k&&c.push(k)}this.setSelectionCells(c)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(b,c,e){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=e&&(mxEvent.isTouchEvent(c)?e.update(e.getState(this.view.getState(b[1]))):e.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=c&&c.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,c,e,k,f,n,t,d){n=n?n:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var g=this.isCloneConnectSource(b),l=g?b:this.getCompositeParent(b),q=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(q.x+=l.geometry.width/2,q.y-=e):c==
-mxConstants.DIRECTION_SOUTH?(q.x+=l.geometry.width/2,q.y+=l.geometry.height+e):(q.x=c==mxConstants.DIRECTION_WEST?q.x-e:q.x+(l.geometry.width+e),q.y+=l.geometry.height/2);var p=this.view.getState(this.model.getParent(b));e=this.view.scale;var m=this.view.translate,l=m.x*e,m=m.y*e;null!=p&&this.model.isVertex(p.cell)&&(l=p.x,m=p.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(q.x+=b.parent.geometry.x,q.y+=b.parent.geometry.y);n=n?null:(new mxRectangle(l+q.x*e,m+q.y*e)).grow(40*e);n=null!=n?
-this.getCells(0,0,0,0,null,null,n,null,!0):null;var p=this.view.getState(b),v=null,u=null;if(null!=n){n=n.reverse();for(var B=0;B<n.length;B++)if(!this.isCellLocked(n[B])&&!this.model.isEdge(n[B])&&n[B]!=b)if(!this.model.isAncestor(b,n[B])&&this.isContainer(n[B])&&(null==v||n[B]==this.model.getParent(b)))v=n[B];else if(null==u&&this.isCellConnectable(n[B])&&!this.model.isAncestor(n[B],b)&&!this.isSwimlane(n[B])){var x=this.view.getState(n[B]);null==p||null==x||mxUtils.intersects(p,x)||(u=n[B])}}var E=
-!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||f;E&&("1"!=urlParams.sketch||f)&&(c==mxConstants.DIRECTION_NORTH?q.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?q.y+=b.geometry.height/2:q.x=c==mxConstants.DIRECTION_WEST?q.x-b.geometry.width/2:q.x+b.geometry.width/2);var A=[],F=u,u=v;f=mxUtils.bind(this,function(e){if(null==t||null!=e||null==u&&g){this.model.beginUpdate();try{if(null==F&&E){var f=this.getAbsoluteParent(null!=e?e:b),f=g?b:this.getCompositeParent(f);F=null!=e?e:this.duplicateCells([f],
-!1)[0];null!=e&&this.addCells([F],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(F);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?q.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?q.y+=l.height/2:q.x=c==mxConstants.DIRECTION_WEST?q.x-l.width/2:q.x+l.width/2),l.x=q.x-l.width/2,l.y=q.y-l.height/2);null!=v?(this.addCells([F],v,null,null,null,!0),u=null):E&&!g&&this.addCells([F],this.getDefaultParent(),null,null,null,!0)}var m=mxEvent.isControlDown(k)&&
-mxEvent.isShiftDown(k)&&E||null==u&&g?null:this.insertEdge(this.model.getParent(b),null,"",b,F,this.createCurrentEdgeStyle());if(null!=m&&this.connectionHandler.insertBeforeSource){var p=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=m.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==m.parent&&(p=e.parent.getIndex(e),this.model.add(e.parent,m,p))}null==u&&null!=F&&null!=b.parent&&g&&c==mxConstants.DIRECTION_WEST&&(p=b.parent.getIndex(b),this.model.add(b.parent,
-F,p));null!=m&&A.push(m);null==u&&null!=F&&A.push(F);null==F&&null!=m&&m.geometry.setTerminalPoint(q,!1);null!=m&&this.fireEvent(new mxEventObject("cellsInserted","cells",[m]))}finally{this.model.endUpdate()}}if(null!=d)d(A);else return A});if(null==t||null!=F||!E||null==u&&g)return f(F);t(l+q.x*e,m+q.y*e,f)};
+Graph.prototype.connectVertex=function(b,c,e,k,g,p,t,d){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),l=f?b:this.getCompositeParent(b),m=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(m.x+=l.geometry.width/2,m.y-=e):c==
+mxConstants.DIRECTION_SOUTH?(m.x+=l.geometry.width/2,m.y+=l.geometry.height+e):(m.x=c==mxConstants.DIRECTION_WEST?m.x-e:m.x+(l.geometry.width+e),m.y+=l.geometry.height/2);var q=this.view.getState(this.model.getParent(b));e=this.view.scale;var n=this.view.translate,l=n.x*e,n=n.y*e;null!=q&&this.model.isVertex(q.cell)&&(l=q.x,n=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(l+m.x*e,n+m.y*e)).grow(40*e);p=null!=p?
+this.getCells(0,0,0,0,null,null,p,null,!0):null;var q=this.view.getState(b),v=null,u=null;if(null!=p){p=p.reverse();for(var y=0;y<p.length;y++)if(!this.isCellLocked(p[y])&&!this.model.isEdge(p[y])&&p[y]!=b)if(!this.model.isAncestor(b,p[y])&&this.isContainer(p[y])&&(null==v||p[y]==this.model.getParent(b)))v=p[y];else if(null==u&&this.isCellConnectable(p[y])&&!this.model.isAncestor(p[y],b)&&!this.isSwimlane(p[y])){var x=this.view.getState(p[y]);null==q||null==x||mxUtils.intersects(q,x)||(u=p[y])}}var H=
+!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;H&&("1"!=urlParams.sketch||g)&&(c==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var D=[],E=u,u=v;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==u&&f){this.model.beginUpdate();try{if(null==E&&H){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);E=null!=e?e:this.duplicateCells([g],
+!1)[0];null!=e&&this.addCells([E],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(E);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?m.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=l.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-l.width/2:m.x+l.width/2),l.x=m.x-l.width/2,l.y=m.y-l.height/2);null!=v?(this.addCells([E],v,null,null,null,!0),u=null):H&&!f&&this.addCells([E],this.getDefaultParent(),null,null,null,!0)}var q=mxEvent.isControlDown(k)&&
+mxEvent.isShiftDown(k)&&H||null==u&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,E,this.createCurrentEdgeStyle());if(null!=q&&this.connectionHandler.insertBeforeSource){var n=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=q.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==q.parent&&(n=e.parent.getIndex(e),this.model.add(e.parent,q,n))}null==u&&null!=E&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(n=b.parent.getIndex(b),this.model.add(b.parent,
+E,n));null!=q&&D.push(q);null==u&&null!=E&&D.push(E);null==E&&null!=q&&q.geometry.setTerminalPoint(m,!1);null!=q&&this.fireEvent(new mxEventObject("cellsInserted","cells",[q]))}finally{this.model.endUpdate()}}if(null!=d)d(D);else return D});if(null==t||null!=E||!H||null==u&&f)return g(E);t(l+m.x*e,n+m.y*e,g)};
Graph.prototype.getIndexableText=function(){var b=document.createElement("div"),c=[],e,k;for(k in this.model.cells)if(e=this.model.cells[k],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&c.push(e);return c.join(" ")};
Graph.prototype.convertValueToString=function(b){var c=this.model.getValue(b);if(null!=c&&"object"==typeof c){var e=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),k=b;null==e&&null!=k;)null!=k.value&&"object"==typeof k.value&&(e=k.hasAttribute(c)?null!=k.getAttribute(c)?k.getAttribute(c):"":null),k=this.model.getParent(k);else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=c.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=c.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.getCellStyle=function(b){var c=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=b&&null!=this.layoutManager){var e=this.model.getParent(b);this.model.isVertex(e)&&this.isCellCollapsed(b)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(c[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return c};
Graph.prototype.updateAlternateBounds=function(b,c,e){if(null!=b&&null!=c&&null!=this.layoutManager&&null!=c.alternateBounds){var k=this.layoutManager.getLayout(this.model.getParent(b));null!=k&&k.constructor==mxStackLayout&&(k.horizontal?c.alternateBounds.height=0:c.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,c){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(c.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,c,e,k,f){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),b));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<e.length;n++){var t=this.view.getState(e[n]),d=this.getCellGeometry(e[n]);if(null!=t&&null!=d){var g=Math.round(d.width-t.width/this.view.scale),l=Math.round(d.height-t.height/this.view.scale);if(0!=l||0!=g){var q=this.model.getParent(e[n]),p=this.layoutManager.getLayout(q);
-null==p?null!=f&&this.isMoveCellsEvent(f,t)&&this.moveSiblings(t,q,g,l):null!=f&&mxEvent.isAltDown(f)||p.constructor!=mxStackLayout||p.resizeLast||this.resizeParentStacks(q,p,g,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
-Graph.prototype.moveSiblings=function(b,c,e,k){this.model.beginUpdate();try{var f=this.getCellsBeyond(b.x,b.y,c,!0,!0);for(c=0;c<f.length;c++)if(f[c]!=b.cell){var n=this.view.getState(f[c]),t=this.getCellGeometry(f[c]);null!=n&&null!=t&&(t=t.clone(),t.translate(Math.round(e*Math.max(0,Math.min(1,(n.x-b.x)/b.width))),Math.round(k*Math.max(0,Math.min(1,(n.y-b.y)/b.height)))),this.model.setGeometry(f[c],t))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(b,c,e,k){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var f=c.horizontal;null!=b&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==f&&!c.resizeLast;){var n=this.getCellGeometry(b),t=this.view.getState(b);null!=t&&null!=n&&(n=n.clone(),c.horizontal?n.width+=e+Math.min(0,t.width/this.view.scale-n.width):n.height+=k+Math.min(0,t.height/this.view.scale-n.height),this.model.setGeometry(b,
-n));b=this.model.getParent(b);c=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var c=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(b){var c=this.getCurrentCellStyle(b);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.foldCells=function(b,c,e,k,g){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),b));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<e.length;p++){var t=this.view.getState(e[p]),d=this.getCellGeometry(e[p]);if(null!=t&&null!=d){var f=Math.round(d.width-t.width/this.view.scale),l=Math.round(d.height-t.height/this.view.scale);if(0!=l||0!=f){var m=this.model.getParent(e[p]),q=this.layoutManager.getLayout(m);
+null==q?null!=g&&this.isMoveCellsEvent(g,t)&&this.moveSiblings(t,m,f,l):null!=g&&mxEvent.isAltDown(g)||q.constructor!=mxStackLayout||q.resizeLast||this.resizeParentStacks(m,q,f,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.moveSiblings=function(b,c,e,k){this.model.beginUpdate();try{var g=this.getCellsBeyond(b.x,b.y,c,!0,!0);for(c=0;c<g.length;c++)if(g[c]!=b.cell){var p=this.view.getState(g[c]),t=this.getCellGeometry(g[c]);null!=p&&null!=t&&(t=t.clone(),t.translate(Math.round(e*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(k*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(g[c],t))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(b,c,e,k){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var g=c.horizontal;null!=b&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==g&&!c.resizeLast;){var p=this.getCellGeometry(b),t=this.view.getState(b);null!=t&&null!=p&&(p=p.clone(),c.horizontal?p.width+=e+Math.min(0,t.width/this.view.scale-p.width):p.height+=k+Math.min(0,t.height/this.view.scale-p.height),this.model.setGeometry(b,
+p));b=this.model.getParent(b);c=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var c=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(b){var c=this.getCurrentCellStyle(b);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(b){var c=this.getCurrentCellStyle(b);return null!=c.movableLabel?"0"!=c.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,c,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};
Graph.prototype.getSwimlaneAt=function(b,c,e){var k=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(k)&&(k=null);return k};Graph.prototype.isCellFoldable=function(b){var c=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&("1"==c.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=c.collapsible||!this.isContainer(b)&&"1"==c.collapsible))};
Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,c){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(b,c){c=null!=c?c:10;var e=this.container.clientWidth-c,k=this.container.clientHeight-c,f=Math.floor(20*Math.min(e/b.width,k/b.height))/20;this.zoomTo(f);if(mxUtils.hasScrollbars(this.container)){var n=this.view.translate;this.container.scrollTop=(b.y+n.y)*f-Math.max((k-b.height*f)/2+c/2,0);this.container.scrollLeft=(b.x+n.x)*f-Math.max((e-b.width*f)/2+c/2,0)}};
-Graph.prototype.getTooltipForCell=function(b){var c="";if(mxUtils.isNode(b.value)){var e=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==e&&(e=b.value.getAttribute("tooltip"));if(null!=e)null!=e&&this.isReplacePlaceholders(b)&&(e=this.replacePlaceholders(b,e)),c=this.sanitizeHtml(e);else{e=this.builtInProperties;b=b.value.attributes;var k=[];this.isEnabled()&&(e.push("linkTarget"),e.push("link"));for(var f=0;f<b.length;f++)0>
-mxUtils.indexOf(e,b[f].nodeName)&&0<b[f].nodeValue.length&&k.push({name:b[f].nodeName,value:b[f].nodeValue});k.sort(function(b,c){return b.name<c.name?-1:b.name>c.name?1:0});for(f=0;f<k.length;f++)"link"==k[f].name&&this.isCustomLink(k[f].value)||(c+=("link"!=k[f].name?"<b>"+k[f].name+":</b> ":"")+mxUtils.htmlEntities(k[f].value)+"\n");0<c.length&&(c=c.substring(0,c.length-1),mxClient.IS_SVG&&(c='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+c+"</div>"))}}return c};
+Graph.prototype.fitWindow=function(b,c){c=null!=c?c:10;var e=this.container.clientWidth-c,k=this.container.clientHeight-c,g=Math.floor(20*Math.min(e/b.width,k/b.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*g-Math.max((k-b.height*g)/2+c/2,0);this.container.scrollLeft=(b.x+p.x)*g-Math.max((e-b.width*g)/2+c/2,0)}};
+Graph.prototype.getTooltipForCell=function(b){var c="";if(mxUtils.isNode(b.value)){var e=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==e&&(e=b.value.getAttribute("tooltip"));if(null!=e)null!=e&&this.isReplacePlaceholders(b)&&(e=this.replacePlaceholders(b,e)),c=this.sanitizeHtml(e);else{e=this.builtInProperties;b=b.value.attributes;var k=[];this.isEnabled()&&(e.push("linkTarget"),e.push("link"));for(var g=0;g<b.length;g++)0>
+mxUtils.indexOf(e,b[g].nodeName)&&0<b[g].nodeValue.length&&k.push({name:b[g].nodeName,value:b[g].nodeValue});k.sort(function(b,c){return b.name<c.name?-1:b.name>c.name?1:0});for(g=0;g<k.length;g++)"link"==k[g].name&&this.isCustomLink(k[g].value)||(c+=("link"!=k[g].name?"<b>"+k[g].name+":</b> ":"")+mxUtils.htmlEntities(k[g].value)+"\n");0<c.length&&(c=c.substring(0,c.length-1),mxClient.IS_SVG&&(c='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+c+"</div>"))}}return c};
Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var c=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(c);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,c){return Graph.compress(b,c)};
Graph.prototype.decompress=function(b,c){return Graph.decompress(b,c)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
@@ -2431,7 +2434,7 @@ HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangle
this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);
this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(b){null!=b.relatedTarget&&
mxEvent.getSource(b)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(b){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(c){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(c.getEvent())||this.graph.model.isVertex(c.getCell())||this.reset()});var c=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(b,
-k){c=!1;var e=k.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var n=this.getState(k.getState());null==n&&mxEvent.isTouchEvent(e)||this.update(n)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(b,k){var e=k.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(k.getState()),k.getGraphX(),k.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(c=!0)}),mouseUp:mxUtils.bind(this,
+k){c=!1;var e=k.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var p=this.getState(k.getState());null==p&&mxEvent.isTouchEvent(e)||this.update(p)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(b,k){var e=k.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(k.getState()),k.getGraphX(),k.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(c=!0)}),mouseUp:mxUtils.bind(this,
function(b,k){var e=k.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));this.isResetEvent(e)?this.reset():this.isActive()&&!c&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),k):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(k.getGraphX(),k.getGraphY())))):mxEvent.isTouchEvent(e)||
null!=this.bbox&&mxUtils.contains(this.bbox,k.getGraphX(),k.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||this.reset();c=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,c){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
HoverIcons.prototype.createArrow=function(b,c,e){var k=null,k=mxUtils.createImage(b.src);k.style.width=b.width+"px";k.style.height=b.height+"px";k.style.padding=this.tolerance+"px";null!=c&&k.setAttribute("title",c);k.style.position="absolute";k.style.cursor=this.cssCursor;mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){null==this.currentState||this.isResetEvent(b)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),this.drag(b,
@@ -2441,187 +2444,187 @@ HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;th
HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(c){c.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(b,c,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,c,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,c=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=c&&c.setHandlesVisible(!1),c=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=c&&"orthogonalEdgeStyle"===
mxUtils.getValue(c.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),c.cell.style=mxUtils.setStyle(c.cell.style,"sourcePortConstraint",b),c.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,c,e){return this.graph.view.getState(this.graph.getCellAt(c,e))};
-HoverIcons.prototype.click=function(b,c,e){var k=e.getEvent(),f=e.getGraphX(),n=e.getGraphY(),f=this.getStateAt(b,f,n);null==f||!this.graph.model.isEdge(f.cell)||this.graph.isCloneEvent(k)||f.getVisibleTerminalState(!0)!=b&&f.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,c,e):(this.graph.setSelectionCell(f.cell),this.reset());e.consume()};
+HoverIcons.prototype.click=function(b,c,e){var k=e.getEvent(),g=e.getGraphX(),p=e.getGraphY(),g=this.getStateAt(b,g,p);null==g||!this.graph.model.isEdge(g.cell)||this.graph.isCloneEvent(k)||g.getVisibleTerminalState(!0)!=b&&g.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,c,e):(this.graph.setSelectionCell(g.cell),this.reset());e.consume()};
HoverIcons.prototype.execute=function(b,c,e){e=e.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,c,this.graph.defaultEdgeLength,e,this.graph.isCloneEvent(e),this.graph.isCloneEvent(e)),e,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var c=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(c=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var e=null;null!=c&&(b.x-=c.horizontalOffset/2,b.y-=c.verticalOffset/2,b.width+=c.horizontalOffset,b.height+=c.verticalOffset,null!=c.rotationShape&&null!=c.rotationShape.node&&"hidden"!=c.rotationShape.node.style.visibility&&"none"!=c.rotationShape.node.style.display&&null!=c.rotationShape.boundingBox&&
-(e=c.rotationShape.boundingBox));c=mxUtils.bind(this,function(b,g,c){if(null!=e){var d=new mxRectangle(g,c,b.clientWidth,b.clientHeight);mxUtils.intersects(d,e)&&(b==this.arrowUp?c-=d.y+d.height-e.y:b==this.arrowRight?g+=e.x+e.width-d.x:b==this.arrowDown?c+=e.y+e.height-d.y:b==this.arrowLeft&&(g-=d.x+d.width-e.x))}b.style.left=g+"px";b.style.top=c+"px";mxUtils.setOpacity(b,this.inactiveOpacity)});c(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+(e=c.rotationShape.boundingBox));c=mxUtils.bind(this,function(b,f,c){if(null!=e){var d=new mxRectangle(f,c,b.clientWidth,b.clientHeight);mxUtils.intersects(d,e)&&(b==this.arrowUp?c-=d.y+d.height-e.y:b==this.arrowRight?f+=e.x+e.width-d.x:b==this.arrowDown?c+=e.y+e.height-d.y:b==this.arrowLeft&&(f-=d.x+d.width-e.x))}b.style.left=f+"px";b.style.top=c+"px";mxUtils.setOpacity(b,this.inactiveOpacity)});c(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));c(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));c(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));c(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var c=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY()),
-k=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),f=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2),b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=c&&c==k&&k==f&&f==b&&(b=f=k=c=null);var n=this.graph.getCellGeometry(this.currentState.cell),t=mxUtils.bind(this,function(b,g){var d=this.graph.model.isVertex(b)&&this.graph.getCellGeometry(b);null==b||this.graph.model.isAncestor(b,
-this.currentState.cell)||this.graph.isSwimlane(b)||!(null==d||null==n||d.height<3*n.height&&d.width<3*n.width)?g.style.visibility="visible":g.style.visibility="hidden"});t(c,this.arrowRight);t(k,this.arrowLeft);t(f,this.arrowUp);t(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+k=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),g=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2),b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=c&&c==k&&k==g&&g==b&&(b=g=k=c=null);var p=this.graph.getCellGeometry(this.currentState.cell),t=mxUtils.bind(this,function(b,f){var d=this.graph.model.isVertex(b)&&this.graph.getCellGeometry(b);null==b||this.graph.model.isAncestor(b,
+this.currentState.cell)||this.graph.isSwimlane(b)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?f.style.visibility="visible":f.style.visibility="hidden"});t(c,this.arrowRight);t(k,this.arrowLeft);t(g,this.arrowUp);t(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(c){null!=c.parentNode&&(c=new mxRectangle(c.offsetLeft,c.offsetTop,c.offsetWidth,c.offsetHeight),null==b?b=c:b.add(c))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var c=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(c)&&this.graph.isCellConnectable(c)&&(b=c)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
HoverIcons.prototype.update=function(b,c,e){if(!this.graph.connectionArrowsEnabled||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var k=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,k=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,c,e))}),this.updateDelay+10))):null!=this.startTime&&(k=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&k<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,c,e)?this.reset(!1):(null!=this.currentState||k>this.activationDelay)&&this.currentState!=b&&(k>this.updateDelay&&null!=b||null==this.bbox||null==c||null==e||!mxUtils.contains(this.bbox,
c,e))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,c,e,k,f){b=this.cloneCell(b);for(var n=0;n<e;n++){var t=this.cloneCell(c),d=this.getCellGeometry(t);null!=d&&(d.x+=n*k,d.y+=n*f);b.insert(t)}return b};
-Graph.prototype.createTable=function(b,c,e,k,f,n,t,d,g){e=null!=e?e:60;k=null!=k?k:40;n=null!=n?n:30;d=null!=d?d:"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";g=null!=g?g:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,null,null!=f?f:"",0,0,c*e,
-b*k+(null!=f?n:0),null!=t?t:"shape=table;startSize="+(null!=f?n:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*e,k,d),this.createVertex(null,null,"",0,0,e,k,g),c,e,0),b,0,k)};Graph.prototype.setTableValues=function(b,c,e){for(var k=this.model.getChildCells(b,!0),f=0;f<k.length;f++)if(null!=e&&(k[f].value=e[f]),null!=c)for(var n=this.model.getChildCells(k[f],!0),t=0;t<n.length;t++)null!=c[f][t]&&(n[t].value=c[f][t]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,c,e,k,f,n,t,d,g){e=null!=e?e:120;k=null!=k?k:120;var l=null==f?0:40;t=null!=t?t:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+l+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";d=null!=d?d:"swimlane;connectable=0;startSize=40;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";g=null!=g?g:"swimlane;connectable=0;startSize="+(null==f?"40":"0")+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
-f=this.createVertex(null,null,null!=f?f:"",0,0,c*e,b*k,null!=n?n:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+l+";"+(null==f?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");n=mxUtils.getValue(this.getCellStyle(f),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);f.geometry.width+=n;f.geometry.height+=n;t=this.createVertex(null,null,"",0,n,c*e+n,k,t);f.insert(this.createParent(t,this.createVertex(null,null,"",n,0,e,k,d),c,e,0));
-return 1<b?(t.geometry.y=k+n,this.createParent(f,this.createParent(t,this.createVertex(null,null,"",n,0,e,k,g),c,e,0),b-1,0,k)):f};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};
-Graph.prototype.setTableRowHeight=function(b,c,e){e=null!=e?e:!0;var k=this.getModel();k.beginUpdate();try{var f=this.getCellGeometry(b);if(null!=f){f=f.clone();f.height+=c;k.setGeometry(b,f);var n=k.getParent(b),t=k.getChildCells(n,!0);if(!e){var d=mxUtils.indexOf(t,b);if(d<t.length-1){var g=t[d+1],l=this.getCellGeometry(g);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,k.setGeometry(g,l))}}var q=this.getCellGeometry(n);null!=q&&(e||(e=b==t[t.length-1]),e&&(q=q.clone(),q.height+=c,k.setGeometry(n,q)));
-null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}}finally{k.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),f=k.getParent(b),n=k.getParent(f),t=k.getChildCells(f,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var g=k.getChildCells(n,!0),l=0;l<g.length;l++){var f=g[l],t=k.getChildCells(f,!0),q=t[b],p=this.getCellGeometry(q);null!=p&&(p=p.clone(),p.width+=c,k.setGeometry(q,p));b<t.length-1&&(q=t[b+1],p=this.getCellGeometry(q),null!=p&&(p=p.clone(),p.x+=c,e||(p.width-=c),k.setGeometry(q,p)))}if(d||
-e){var m=this.getCellGeometry(n);null!=m&&(m=m.clone(),m.width+=c,k.setGeometry(n,m))}null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};
-TableLayout.prototype.getSize=function(b,c){for(var e=0,k=0;k<b.length;k++)if(!this.isVertexIgnored(b[k])){var f=this.graph.getCellGeometry(b[k]);null!=f&&(e+=c?f.width:f.height)}return e};TableLayout.prototype.getRowLayout=function(b,c){for(var e=this.graph.model.getChildCells(b,!0),k=this.graph.getActualStartSize(b,!0),f=this.getSize(e,!0),n=c-k.x-k.width,t=[],k=k.x,d=0;d<e.length;d++){var g=this.graph.getCellGeometry(e[d]);null!=g&&(k+=g.width*n/f,t.push(Math.round(k)))}return t};
-TableLayout.prototype.layoutRow=function(b,c,e,k){var f=this.graph.getModel(),n=f.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var t=b.x,d=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var g=0;g<n.length;g++){var l=this.graph.getCellGeometry(n[g]);null!=l&&(l=l.clone(),l.y=b.y,l.height=e-b.y-b.height,null!=c?(l.x=c[g],l.width=c[g+1]-l.x,g==n.length-1&&g<c.length-2&&(l.width=k-l.x-b.x-b.width)):(l.x=t,t+=l.width,g==n.length-1?l.width=k-b.x-b.width-d:d+=l.width),f.setGeometry(n[g],l))}return d};
-TableLayout.prototype.execute=function(b){if(null!=b){var c=this.graph.getActualStartSize(b,!0),e=this.graph.getCellGeometry(b),k=this.graph.getCellStyle(b),f="1"==mxUtils.getValue(k,"resizeLastRow","0"),n="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),t=this.graph.getModel(),d=0;t.beginUpdate();try{var g=e.height-c.y-c.height,l=e.width-c.x-c.width,q=t.getChildCells(b,!0),p=this.getSize(q,!1);if(0<g&&0<l&&0<q.length&&0<p){if(f){var m=this.graph.getCellGeometry(q[q.length-
-1]);null!=m&&(m=m.clone(),m.height=g-p+m.height,t.setGeometry(q[q.length-1],m))}for(var v=n?null:this.getRowLayout(q[0],l),u=c.y,B=0;B<q.length;B++)m=this.graph.getCellGeometry(q[B]),null!=m&&(m=m.clone(),m.x=c.x,m.width=l,m.y=Math.round(u),u=f||k?u+m.height:u+m.height/p*g,m.height=Math.round(u)-m.y,t.setGeometry(q[B],m)),d=Math.max(d,this.layoutRow(q[B],v,m.height,l));k&&g<p&&(e=e.clone(),e.height=u+c.height,t.setGeometry(b,e));n&&l<d+Graph.minTableColumnWidth&&(e=e.clone(),e.width=d+c.width+c.x+
+HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,c,e,k,g){b=this.cloneCell(b);for(var p=0;p<e;p++){var t=this.cloneCell(c),d=this.getCellGeometry(t);null!=d&&(d.x+=p*k,d.y+=p*g);b.insert(t)}return b};
+Graph.prototype.createTable=function(b,c,e,k,g,p,t,d,f){e=null!=e?e:60;k=null!=k?k:40;p=null!=p?p:30;d=null!=d?d:"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";f=null!=f?f:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,null,null!=g?g:"",0,0,c*e,
+b*k+(null!=g?p:0),null!=t?t:"shape=table;startSize="+(null!=g?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*e,k,d),this.createVertex(null,null,"",0,0,e,k,f),c,e,0),b,0,k)};Graph.prototype.setTableValues=function(b,c,e){for(var k=this.model.getChildCells(b,!0),g=0;g<k.length;g++)if(null!=e&&(k[g].value=e[g]),null!=c)for(var p=this.model.getChildCells(k[g],!0),t=0;t<p.length;t++)null!=c[g][t]&&(p[t].value=c[g][t]);return b};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,c,e,k,g,p,t,d,f){e=null!=e?e:120;k=null!=k?k:120;var l=null==g?0:40;t=null!=t?t:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+l+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";d=null!=d?d:"swimlane;connectable=0;startSize=40;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";f=null!=f?f:"swimlane;connectable=0;startSize="+(null==g?"40":"0")+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
+g=this.createVertex(null,null,null!=g?g:"",0,0,c*e,b*k,null!=p?p:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+l+";"+(null==g?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");p=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=p;g.geometry.height+=p;t=this.createVertex(null,null,"",0,p,c*e+p,k,t);g.insert(this.createParent(t,this.createVertex(null,null,"",p,0,e,k,d),c,e,0));
+return 1<b?(t.geometry.y=k+p,this.createParent(g,this.createParent(t,this.createVertex(null,null,"",p,0,e,k,f),c,e,0),b-1,0,k)):g};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};
+Graph.prototype.setTableRowHeight=function(b,c,e){e=null!=e?e:!0;var k=this.getModel();k.beginUpdate();try{var g=this.getCellGeometry(b);if(null!=g){g=g.clone();g.height+=c;k.setGeometry(b,g);var p=k.getParent(b),t=k.getChildCells(p,!0);if(!e){var d=mxUtils.indexOf(t,b);if(d<t.length-1){var f=t[d+1],l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,k.setGeometry(f,l))}}var m=this.getCellGeometry(p);null!=m&&(e||(e=b==t[t.length-1]),e&&(m=m.clone(),m.height+=c,k.setGeometry(p,m)));
+null!=this.layoutManager&&this.layoutManager.executeLayout(p,!0)}}finally{k.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),g=k.getParent(b),p=k.getParent(g),t=k.getChildCells(g,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var f=k.getChildCells(p,!0),l=0;l<f.length;l++){var g=f[l],t=k.getChildCells(g,!0),m=t[b],q=this.getCellGeometry(m);null!=q&&(q=q.clone(),q.width+=c,k.setGeometry(m,q));b<t.length-1&&(m=t[b+1],q=this.getCellGeometry(m),null!=q&&(q=q.clone(),q.x+=c,e||(q.width-=c),k.setGeometry(m,q)))}if(d||
+e){var n=this.getCellGeometry(p);null!=n&&(n=n.clone(),n.width+=c,k.setGeometry(p,n))}null!=this.layoutManager&&this.layoutManager.executeLayout(p,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};
+TableLayout.prototype.getSize=function(b,c){for(var e=0,k=0;k<b.length;k++)if(!this.isVertexIgnored(b[k])){var g=this.graph.getCellGeometry(b[k]);null!=g&&(e+=c?g.width:g.height)}return e};TableLayout.prototype.getRowLayout=function(b,c){for(var e=this.graph.model.getChildCells(b,!0),k=this.graph.getActualStartSize(b,!0),g=this.getSize(e,!0),p=c-k.x-k.width,t=[],k=k.x,d=0;d<e.length;d++){var f=this.graph.getCellGeometry(e[d]);null!=f&&(k+=f.width*p/g,t.push(Math.round(k)))}return t};
+TableLayout.prototype.layoutRow=function(b,c,e,k){var g=this.graph.getModel(),p=g.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var t=b.x,d=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var f=0;f<p.length;f++){var l=this.graph.getCellGeometry(p[f]);null!=l&&(l=l.clone(),l.y=b.y,l.height=e-b.y-b.height,null!=c?(l.x=c[f],l.width=c[f+1]-l.x,f==p.length-1&&f<c.length-2&&(l.width=k-l.x-b.x-b.width)):(l.x=t,t+=l.width,f==p.length-1?l.width=k-b.x-b.width-d:d+=l.width),g.setGeometry(p[f],l))}return d};
+TableLayout.prototype.execute=function(b){if(null!=b){var c=this.graph.getActualStartSize(b,!0),e=this.graph.getCellGeometry(b),k=this.graph.getCellStyle(b),g="1"==mxUtils.getValue(k,"resizeLastRow","0"),p="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),t=this.graph.getModel(),d=0;t.beginUpdate();try{var f=e.height-c.y-c.height,l=e.width-c.x-c.width,m=t.getChildCells(b,!0),q=this.getSize(m,!1);if(0<f&&0<l&&0<m.length&&0<q){if(g){var n=this.graph.getCellGeometry(m[m.length-
+1]);null!=n&&(n=n.clone(),n.height=f-q+n.height,t.setGeometry(m[m.length-1],n))}for(var v=p?null:this.getRowLayout(m[0],l),u=c.y,y=0;y<m.length;y++)n=this.graph.getCellGeometry(m[y]),null!=n&&(n=n.clone(),n.x=c.x,n.width=l,n.y=Math.round(u),u=g||k?u+n.height:u+n.height/q*f,n.height=Math.round(u)-n.y,t.setGeometry(m[y],n)),d=Math.max(d,this.layoutRow(m[y],v,n.height,l));k&&f<q&&(e=e.clone(),e.height=u+c.height,t.setGeometry(b,e));p&&l<d+Graph.minTableColumnWidth&&(e=e.clone(),e.width=d+c.width+c.x+
Graph.minTableColumnWidth,t.setGeometry(b,e))}}finally{t.endUpdate()}}};
-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(b,d){d=null!=d?d:!0;var g=this.getState(b);null!=g&&d&&this.graph.model.isEdge(g.cell)&&null!=g.style&&1!=g.style[mxConstants.STYLE_CURVED]&&!g.invalid&&this.updateLineJumps(g)&&this.graph.cellRenderer.redraw(g,!1,this.isRendering());g=c.apply(this,
-arguments);null!=g&&d&&this.graph.model.isEdge(g.cell)&&null!=g.style&&1!=g.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(g);return g};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(){e.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var b=this.node.getElementsByTagName("path");if(1<b.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&b[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var d=this.state.view.graph.getFlowAnimationStyle();null!=d&&b[1].setAttribute("class",d.getAttribute("id"))}}};var k=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(b,d){return k.apply(this,arguments)||null!=b.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.routedPoints,b.routedPoints)};var f=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(b){f.apply(this,arguments);this.graph.model.isEdge(b.cell)&&1!=b.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(b)};mxGraphView.prototype.updateLineJumps=function(b){var d=b.absolutePoints;if(Graph.lineJumpsEnabled){var g=null!=b.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(b.style,"jumpStyle","none")){for(var e=function(d,g,e){var f=new mxPoint(g,e);f.type=d;c.push(f);f=null!=b.routedPoints?b.routedPoints[c.length-1]:null;return null==f||f.type!=
-d||f.x!=g||f.y!=e},f=.5*this.scale,g=!1,c=[],l=0;l<d.length-1;l++){for(var k=d[l+1],q=d[l],n=[],t=d[l+2];l<d.length-2&&mxUtils.ptSegDistSq(q.x,q.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,l++,t=d[l+2];for(var g=e(0,q.x,q.y)||g,L=0;L<this.validEdges.length;L++){var H=this.validEdges[L],K=H.absolutePoints;if(null!=K&&mxUtils.intersects(b,H)&&"1"!=H.style.noJump)for(H=0;H<K.length-1;H++){for(var C=K[H+1],N=K[H],t=K[H+2];H<K.length-2&&mxUtils.ptSegDistSq(N.x,N.y,t.x,t.y,C.x,C.y)<1*this.scale*this.scale;)C=
-t,H++,t=K[H+2];t=mxUtils.intersection(q.x,q.y,k.x,k.y,N.x,N.y,C.x,C.y);if(null!=t&&(Math.abs(t.x-q.x)>f||Math.abs(t.y-q.y)>f)&&(Math.abs(t.x-k.x)>f||Math.abs(t.y-k.y)>f)&&(Math.abs(t.x-N.x)>f||Math.abs(t.y-N.y)>f)&&(Math.abs(t.x-C.x)>f||Math.abs(t.y-C.y)>f)){C=t.x-q.x;N=t.y-q.y;t={distSq:C*C+N*N,x:t.x,y:t.y};for(C=0;C<n.length;C++)if(n[C].distSq>t.distSq){n.splice(C,0,t);t=null;break}null==t||0!=n.length&&n[n.length-1].x===t.x&&n[n.length-1].y===t.y||n.push(t)}}}for(H=0;H<n.length;H++)g=e(1,n[H].x,
-n[H].y)||g}t=d[d.length-1];g=e(0,t.x,t.y)||g}b.routedPoints=c;return g}return!1};var n=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(b,d,g){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)n.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,
-"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,f=mxUtils.getValue(this.style,"jumpStyle","none"),l=!0,k=null,q=null,m=[],p=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var H=this.state.routedPoints[t],K=new mxPoint(H.x/this.scale,H.y/this.scale);0==t?K=d[0]:t==this.state.routedPoints.length-1&&(K=d[d.length-1]);var C=!1;if(null!=k&&1==H.type){var N=this.state.routedPoints[t+1],H=N.x/this.scale-K.x,N=N.y/this.scale-K.y,H=H*H+N*N;null==p&&(p=new mxPoint(K.x-k.x,K.y-k.y),
-q=Math.sqrt(p.x*p.x+p.y*p.y),0<q?(p.x=p.x*e/q,p.y=p.y*e/q):p=null);H>e*e&&0<q&&(H=k.x-K.x,N=k.y-K.y,H=H*H+N*N,H>e*e&&(C=new mxPoint(K.x-p.x,K.y-p.y),H=new mxPoint(K.x+p.x,K.y+p.y),m.push(C),this.addPoints(b,m,g,c,!1,null,l),m=0>Math.round(p.x)||0==Math.round(p.x)&&0>=Math.round(p.y)?1:-1,l=!1,"sharp"==f?(b.lineTo(C.x-p.y*m,C.y+p.x*m),b.lineTo(H.x-p.y*m,H.y+p.x*m),b.lineTo(H.x,H.y)):"line"==f?(b.moveTo(C.x+p.y*m,C.y-p.x*m),b.lineTo(C.x-p.y*m,C.y+p.x*m),b.moveTo(H.x-p.y*m,H.y+p.x*m),b.lineTo(H.x+p.y*
-m,H.y-p.x*m),b.moveTo(H.x,H.y)):"arc"==f?(m*=1.3,b.curveTo(C.x-p.y*m,C.y+p.x*m,H.x-p.y*m,H.y+p.x*m,H.x,H.y)):(b.moveTo(H.x,H.y),l=!0),m=[H],C=!0))}else p=null;C||(m.push(K),k=K)}this.addPoints(b,m,g,c,!1,null,l);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,g,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
-mxGraphView.prototype.updateFloatingTerminalPoint=function(b,g,c,e){if(null==g||null==b||"1"!=g.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{g=this.getTerminalPort(b,g,e);var f=this.getNextPoint(b,c,e),l=this.graph.isOrthogonal(b),k=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),q=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=k)var m=Math.cos(-k),p=Math.sin(-k),f=mxUtils.getRotatedPoint(f,m,p,q);m=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);m+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(g,f,0==k&&l,m);0!=k&&(m=Math.cos(k),p=Math.sin(k),f=mxUtils.getRotatedPoint(f,m,p,q));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,g,c,e,f),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,g,c,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);c=g=null;if(null!=b)for(var f=0;f<b.length;f++){var l=this.graph.getConnectionPoint(d,
-b[f]);if(null!=l){var k=(l.x-e.x)*(l.x-e.x)+(l.y-e.y)*(l.y-e.y);if(null==c||k<c)g=l,c=k}}null!=g&&(e=g)}return e};var g=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(b,d,c){var e=g.apply(this,arguments);"1"==b.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var l=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(b){if(null!=b.style&&"undefined"!==typeof pako){var d=
-mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"string"===typeof d&&"stencil("==d.substring(0,8))try{var g=d.substring(8,d.length-1),c=mxUtils.parseXml(Graph.decompress(g));return new mxShape(new mxStencil(c.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return l.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(b,d){d=null!=d?d:!0;var f=this.getState(b);null!=f&&d&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=c.apply(this,
+arguments);null!=f&&d&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(){e.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var b=this.node.getElementsByTagName("path");if(1<b.length){"1"!=mxUtils.getValue(this.state.style,
+mxConstants.STYLE_DASHED,"0")&&b[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var d=this.state.view.graph.getFlowAnimationStyle();null!=d&&b[1].setAttribute("class",d.getAttribute("id"))}}};var k=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(b,d){return k.apply(this,arguments)||null!=b.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.routedPoints,b.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(b){g.apply(this,arguments);this.graph.model.isEdge(b.cell)&&1!=b.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(b)};mxGraphView.prototype.updateLineJumps=function(b){var d=b.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=b.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(b.style,"jumpStyle","none")){for(var e=function(d,f,e){var g=new mxPoint(f,e);g.type=d;c.push(g);g=null!=b.routedPoints?b.routedPoints[c.length-1]:null;return null==g||g.type!=
+d||g.x!=f||g.y!=e},g=.5*this.scale,f=!1,c=[],l=0;l<d.length-1;l++){for(var k=d[l+1],m=d[l],p=[],t=d[l+2];l<d.length-2&&mxUtils.ptSegDistSq(m.x,m.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,l++,t=d[l+2];for(var f=e(0,m.x,m.y)||f,L=0;L<this.validEdges.length;L++){var G=this.validEdges[L],K=G.absolutePoints;if(null!=K&&mxUtils.intersects(b,G)&&"1"!=G.style.noJump)for(G=0;G<K.length-1;G++){for(var C=K[G+1],M=K[G],t=K[G+2];G<K.length-2&&mxUtils.ptSegDistSq(M.x,M.y,t.x,t.y,C.x,C.y)<1*this.scale*this.scale;)C=
+t,G++,t=K[G+2];t=mxUtils.intersection(m.x,m.y,k.x,k.y,M.x,M.y,C.x,C.y);if(null!=t&&(Math.abs(t.x-m.x)>g||Math.abs(t.y-m.y)>g)&&(Math.abs(t.x-k.x)>g||Math.abs(t.y-k.y)>g)&&(Math.abs(t.x-M.x)>g||Math.abs(t.y-M.y)>g)&&(Math.abs(t.x-C.x)>g||Math.abs(t.y-C.y)>g)){C=t.x-m.x;M=t.y-m.y;t={distSq:C*C+M*M,x:t.x,y:t.y};for(C=0;C<p.length;C++)if(p[C].distSq>t.distSq){p.splice(C,0,t);t=null;break}null==t||0!=p.length&&p[p.length-1].x===t.x&&p[p.length-1].y===t.y||p.push(t)}}}for(G=0;G<p.length;G++)f=e(1,p[G].x,
+p[G].y)||f}t=d[d.length-1];f=e(0,t.x,t.y)||f}b.routedPoints=c;return f}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(b,d,f){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,
+"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),l=!0,k=null,m=null,q=[],n=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var G=this.state.routedPoints[t],K=new mxPoint(G.x/this.scale,G.y/this.scale);0==t?K=d[0]:t==this.state.routedPoints.length-1&&(K=d[d.length-1]);var C=!1;if(null!=k&&1==G.type){var M=this.state.routedPoints[t+1],G=M.x/this.scale-K.x,M=M.y/this.scale-K.y,G=G*G+M*M;null==n&&(n=new mxPoint(K.x-k.x,K.y-k.y),
+m=Math.sqrt(n.x*n.x+n.y*n.y),0<m?(n.x=n.x*e/m,n.y=n.y*e/m):n=null);G>e*e&&0<m&&(G=k.x-K.x,M=k.y-K.y,G=G*G+M*M,G>e*e&&(C=new mxPoint(K.x-n.x,K.y-n.y),G=new mxPoint(K.x+n.x,K.y+n.y),q.push(C),this.addPoints(b,q,f,c,!1,null,l),q=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,l=!1,"sharp"==g?(b.lineTo(C.x-n.y*q,C.y+n.x*q),b.lineTo(G.x-n.y*q,G.y+n.x*q),b.lineTo(G.x,G.y)):"line"==g?(b.moveTo(C.x+n.y*q,C.y-n.x*q),b.lineTo(C.x-n.y*q,C.y+n.x*q),b.moveTo(G.x-n.y*q,G.y+n.x*q),b.lineTo(G.x+n.y*
+q,G.y-n.x*q),b.moveTo(G.x,G.y)):"arc"==g?(q*=1.3,b.curveTo(C.x-n.y*q,C.y+n.x*q,G.x-n.y*q,G.y+n.x*q,G.x,G.y)):(b.moveTo(G.x,G.y),l=!0),q=[G],C=!0))}else n=null;C||(q.push(K),k=K)}this.addPoints(b,q,f,c,!1,null,l);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,f,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(b,f,c,e){if(null==f||null==b||"1"!=f.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{f=this.getTerminalPort(b,f,e);var g=this.getNextPoint(b,c,e),l=this.graph.isOrthogonal(b),k=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=k)var q=Math.cos(-k),n=Math.sin(-k),g=mxUtils.getRotatedPoint(g,q,n,m);q=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);q+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(f,g,0==k&&l,q);0!=k&&(q=Math.cos(k),n=Math.sin(k),g=mxUtils.getRotatedPoint(g,q,n,m));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,f,c,e,g),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,f,c,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);c=f=null;if(null!=b)for(var g=0;g<b.length;g++){var l=this.graph.getConnectionPoint(d,
+b[g]);if(null!=l){var k=(l.x-e.x)*(l.x-e.x)+(l.y-e.y)*(l.y-e.y);if(null==c||k<c)f=l,c=k}}null!=f&&(e=f)}return e};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(b,d,c){var e=f.apply(this,arguments);"1"==b.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var l=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(b){if(null!=b.style&&"undefined"!==typeof pako){var d=
+mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"string"===typeof d&&"stencil("==d.substring(0,8))try{var f=d.substring(8,d.length-1),c=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(c.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return l.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.filesLoaded={};
-mxStencilRegistry.getStencil=function(b){var c=mxStencilRegistry.stencils[b];if(null==c&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(b);if(null!=e){c=mxStencilRegistry.libraries[e];if(null!=c){if(null==mxStencilRegistry.packages[e]){for(var k=0;k<c.length;k++){var f=c[k];if(!mxStencilRegistry.filesLoaded[f])if(mxStencilRegistry.filesLoaded[f]=!0,".xml"==f.toLowerCase().substring(f.length-4,f.length))mxStencilRegistry.loadStencilSet(f,
-null);else if(".js"==f.toLowerCase().substring(f.length-3,f.length))try{if(mxStencilRegistry.allowEval){var n=mxUtils.load(f);null!=n&&200<=n.getStatus()&&299>=n.getStatus()&&eval.call(window,n.getText())}}catch(t){null!=window.console&&console.log("error in getStencil:",b,e,c,f,t)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);c=mxStencilRegistry.stencils[b]}}return c};
+mxStencilRegistry.getStencil=function(b){var c=mxStencilRegistry.stencils[b];if(null==c&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(b);if(null!=e){c=mxStencilRegistry.libraries[e];if(null!=c){if(null==mxStencilRegistry.packages[e]){for(var k=0;k<c.length;k++){var g=c[k];if(!mxStencilRegistry.filesLoaded[g])if(mxStencilRegistry.filesLoaded[g]=!0,".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g,
+null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(g);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(t){null!=window.console&&console.log("error in getStencil:",b,e,c,g,t)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);c=mxStencilRegistry.stencils[b]}}return c};
mxStencilRegistry.getBasenameForStencil=function(b){var c=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0]))for(var c=b[1],e=2;e<b.length-1;e++)c+="/"+b[e];return c};
-mxStencilRegistry.loadStencilSet=function(b,c,e,k){var f=mxStencilRegistry.packages[b];if(null!=e&&e||null==f){var n=!1;if(null==f)try{if(k){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(e){null!=e&&null!=e.documentElement&&(mxStencilRegistry.packages[b]=e,n=!0,mxStencilRegistry.parseStencilSet(e.documentElement,c,n))}));return}f=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=f;n=!0}catch(t){null!=window.console&&console.log("error in loadStencilSet:",b,t)}null!=f&&null!=
-f.documentElement&&mxStencilRegistry.parseStencilSet(f.documentElement,c,n)}};mxStencilRegistry.loadStencil=function(b,c){if(null!=c)mxUtils.get(b,mxUtils.bind(this,function(b){c(200<=b.getStatus()&&299>=b.getStatus()?b.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var c=0;c<b.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[c]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(b,c,e){if("stencils"==b.nodeName)for(var k=b.firstChild;null!=k;)"shapes"==k.nodeName&&mxStencilRegistry.parseStencilSet(k,c,e),k=k.nextSibling;else{e=null!=e?e:!0;var k=b.firstChild,f="";b=b.getAttribute("name");for(null!=b&&(f=b+".");null!=k;){if(k.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=k.getAttribute("name"),null!=b)){var f=f.toLowerCase(),n=b.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(f+n.toLowerCase(),new mxStencil(k));if(null!=c){var t=k.getAttribute("w"),
-d=k.getAttribute("h"),t=null==t?80:parseInt(t,10),d=null==d?80:parseInt(d,10);c(f,n,b,t,d)}}k=k.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(b,c,e,k){var g=mxStencilRegistry.packages[b];if(null!=e&&e||null==g){var p=!1;if(null==g)try{if(k){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(e){null!=e&&null!=e.documentElement&&(mxStencilRegistry.packages[b]=e,p=!0,mxStencilRegistry.parseStencilSet(e.documentElement,c,p))}));return}g=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=g;p=!0}catch(t){null!=window.console&&console.log("error in loadStencilSet:",b,t)}null!=g&&null!=
+g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,c,p)}};mxStencilRegistry.loadStencil=function(b,c){if(null!=c)mxUtils.get(b,mxUtils.bind(this,function(b){c(200<=b.getStatus()&&299>=b.getStatus()?b.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var c=0;c<b.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[c]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(b,c,e){if("stencils"==b.nodeName)for(var k=b.firstChild;null!=k;)"shapes"==k.nodeName&&mxStencilRegistry.parseStencilSet(k,c,e),k=k.nextSibling;else{e=null!=e?e:!0;var k=b.firstChild,g="";b=b.getAttribute("name");for(null!=b&&(g=b+".");null!=k;){if(k.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=k.getAttribute("name"),null!=b)){var g=g.toLowerCase(),p=b.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(g+p.toLowerCase(),new mxStencil(k));if(null!=c){var t=k.getAttribute("w"),
+d=k.getAttribute("h"),t=null==t?80:parseInt(t,10),d=null==d?80:parseInt(d,10);c(g,p,b,t,d)}}k=k.nextSibling}}};
"undefined"!=typeof mxVertexHandler&&function(){function b(){var b=document.createElement("div");b.className="geHint";b.style.whiteSpace="nowrap";b.style.position="absolute";return b}function c(b,d){switch(d){case mxConstants.POINTS:return b;case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR=
"#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=
-!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(b){return!mxEvent.isAltDown(b)};var e=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(b){return e.apply(this,arguments)||this.graph.isTableRow(b)||this.graph.isTableCell(b)};var k=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(b){return k.apply(this,arguments)||this.graph.isEdgeIgnored(b)};var f=mxConnectionHandler.prototype.isCreateTarget;
-mxConnectionHandler.prototype.isCreateTarget=function(b){return this.graph.isCloneEvent(b)||f.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var b=new mxEllipse(null,this.highlightColor,this.highlightColor,0);b.opacity=mxConstants.HIGHLIGHT_OPACITY;return b};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(b){b=this.graph.createCurrentEdgeStyle();b=this.graph.createEdge(null,
-null,null,null,null,b);b=new mxCellState(this.graph.view,b,this.graph.getCellStyle(b));for(var d in this.graph.currentEdgeStyle)b.style[d]=this.graph.currentEdgeStyle[d];return b};var n=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var b=n.apply(this,arguments);b.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return b};mxConnectionHandler.prototype.updatePreview=function(b){};var t=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
-function(){var b=t.apply(this,arguments),d=b.getCell;b.getCell=mxUtils.bind(this,function(b){var g=d.apply(this,arguments);this.error=null;return g});return b};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var b="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",d="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),
-g=0;g<d.length;g++)null!=this.currentEdgeStyle[d[g]]&&(b+=d[g]+"="+this.currentEdgeStyle[d[g]]+";");null!=this.currentEdgeStyle.orthogonalLoop?b+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(b+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?b+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(b+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
-";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(b+="elbow="+this.currentEdgeStyle.elbow+";");return b=null!=this.currentEdgeStyle.html?b+("html="+this.currentEdgeStyle.html+";"):b+"html=1;"};Graph.prototype.updateCellStyles=function(b,d,g){this.model.beginUpdate();try{for(var c=0;c<g.length;c++)if(this.model.isVertex(g[c])||this.model.isEdge(g[c])){this.setCellStyles(b,null,[g[c]]);var e=this.getCellStyle(g[c])[b];d!=(null==e?mxConstants.NONE:e)&&this.setCellStyles(b,
-d,[g[c]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var b=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=b&&(new mxCodec(b.ownerDocument)).decode(b,this.getStylesheet())};Graph.prototype.createCellLookup=function(b,d){d=null!=d?d:{};for(var g=0;g<b.length;g++){var c=b[g];d[mxObjectIdentity.get(c)]=
-c.getId();for(var e=this.model.getChildCount(c),f=0;f<e;f++)this.createCellLookup([this.model.getChildAt(c,f)],d)}return d};Graph.prototype.createCellMapping=function(b,d,g){g=null!=g?g:{};for(var c in b){var e=d[c];null==g[e]&&(g[e]=b[c].getId()||"")}return g};Graph.prototype.importGraphModel=function(b,d,g,c){d=null!=d?d:0;g=null!=g?g:0;var e=new mxCodec(b.ownerDocument),f=new mxGraphModel;e.decode(b,f);b=[];var e={},l={},k=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges(),e));if(null!=
-k){var q=this.createCellLookup([f.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<k.length;f++)m=this.model.getChildren(this.moveCells([k[f]],d,g,!1,this.model.getRoot())[0]),null!=m&&(b=b.concat(m));else{var m=f.getChildren(k[0]);null!=m&&(b=this.moveCells(m,d,g,!1,this.getDefaultParent()),l[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId())}if(null!=b&&(this.createCellMapping(e,q,l),this.updateCustomLinks(l,b),c)){this.isGridEnabled()&&
-(d=this.snap(d),g=this.snap(g));var p=this.getBoundingBoxFromGeometry(b,!0);null!=p&&this.moveCells(b,d-p.x,g-p.y)}}finally{this.model.endUpdate()}}return b};Graph.prototype.encodeCells=function(b){for(var d={},g=this.cloneCells(b,null,d),c=new mxDictionary,e=0;e<b.length;e++)c.put(b[e],!0);for(var f=new mxCodec,l=new mxGraphModel,k=l.getChildAt(l.getRoot(),0),e=0;e<g.length;e++){l.add(k,g[e]);var m=this.view.getState(b[e]);if(null!=m){var q=this.getCellGeometry(g[e]);null!=q&&q.relative&&!this.model.isEdge(b[e])&&
-null==c.get(this.model.getParent(b[e]))&&(q.offset=null,q.relative=!1,q.x=m.x/m.view.scale-m.view.translate.x,q.y=m.y/m.view.scale-m.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(b)),g);return f.encode(l)};Graph.prototype.isSwimlane=function(b,d){if(null!=b&&this.model.getParent(b)!=this.model.getRoot()&&!this.model.isEdge(b)){var g=this.getCurrentCellStyle(b,d)[mxConstants.STYLE_SHAPE];return g==mxConstants.SHAPE_SWIMLANE||"table"==g}return!1};var d=Graph.prototype.isExtendParent;
-Graph.prototype.isExtendParent=function(b){var g=this.model.getParent(b);if(null!=g){var c=this.getCurrentCellStyle(g);if(null!=c.expand)return"0"!=c.expand}return d.apply(this,arguments)&&(null==g||!this.isTable(g))};var g=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(b,d,c,e,f,l,k,m){null==m&&(m=this.model.getParent(b),this.isTable(m)||this.isTableRow(m))&&(m=this.getCellAt(l,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=g.apply(this,[b,d,c,e,f,l,k,m]);this.model.setValue(c,
-"");var q=this.getChildCells(c,!0);for(d=0;d<q.length;d++){var p=this.getCellGeometry(q[d]);null!=p&&p.relative&&0<p.x&&this.model.remove(q[d])}var G=this.getChildCells(b,!0);for(d=0;d<G.length;d++)p=this.getCellGeometry(G[d]),null!=p&&p.relative&&0>=p.x&&this.model.remove(G[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
-mxConstants.NONE,[b]);var u=this.model.getTerminal(c,!1);if(null!=u){var da=this.getCurrentCellStyle(u);null!=da&&"1"==da.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(b,d,g){if(d||g)l.apply(this,arguments);
-else{var c=this.getSelectionCell(),e=null,f=[],k=mxUtils.bind(this,function(d){if(null!=this.view.getState(d)&&(this.model.isVertex(d)||this.model.isEdge(d)))if(f.push(d),d==c)e=f.length-1;else if(b&&null==c&&0<f.length||null!=e&&b&&f.length>e||!b&&0<e)return;for(var g=0;g<this.model.getChildCount(d);g++)k(this.model.getChildAt(d,g))});k(this.model.root);0<f.length&&(e=null!=e?mxUtils.mod(e+(b?1:-1),f.length):0,this.setSelectionCell(f[e]))}};var q=Graph.prototype.moveCells;Graph.prototype.moveCells=
-function(b,d,g,c,e,f,l){l=null!=l?l:{};if(this.isTable(e)){for(var k=[],m=0;m<b.length;m++)this.isTable(b[m])?k=k.concat(this.model.getChildCells(b[m],!0).reverse()):k.push(b[m]);b=k}this.model.beginUpdate();try{k=[];for(m=0;m<b.length;m++)if(null!=e&&this.isTableRow(b[m])){var p=this.model.getParent(b[m]),G=this.getCellGeometry(b[m]);this.isTable(p)&&k.push(p);if(null!=p&&null!=G&&this.isTable(p)&&this.isTable(e)&&(c||p!=e)){if(!c){var u=this.getCellGeometry(p);null!=u&&(u=u.clone(),u.height-=G.height,
-this.model.setGeometry(p,u))}u=this.getCellGeometry(e);null!=u&&(u=u.clone(),u.height+=G.height,this.model.setGeometry(e,u));var da=this.model.getChildCells(e,!0);if(0<da.length){b[m]=c?this.cloneCell(b[m]):b[m];var y=this.model.getChildCells(b[m],!0),D=this.model.getChildCells(da[0],!0),n=D.length-y.length;if(0<n)for(var v=0;v<n;v++){var x=this.cloneCell(y[y.length-1]);null!=x&&(x.value="",this.model.add(b[m],x))}else if(0>n)for(v=0;v>n;v--)this.model.remove(y[y.length+v-1]);y=this.model.getChildCells(b[m],
-!0);for(v=0;v<D.length;v++){var J=this.getCellGeometry(D[v]),t=this.getCellGeometry(y[v]);null!=J&&null!=t&&(t=t.clone(),t.width=J.width,this.model.setGeometry(y[v],t))}}}}for(var A=q.apply(this,arguments),m=0;m<k.length;m++)!c&&this.model.contains(k[m])&&0==this.model.getChildCount(k[m])&&this.model.remove(k[m]);c&&this.updateCustomLinks(this.createCellMapping(l,this.createCellLookup(b)),A)}finally{this.model.endUpdate()}return A};var p=Graph.prototype.removeCells;Graph.prototype.removeCells=function(b,
-d){var g=[];this.model.beginUpdate();try{for(var c=0;c<b.length;c++)if(this.isTableCell(b[c])){var e=this.model.getParent(b[c]),f=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(f)?0>mxUtils.indexOf(b,f)&&0>mxUtils.indexOf(g,f)&&g.push(f):this.labelChanged(b[c],"")}else{if(this.isTableRow(b[c])&&(f=this.model.getParent(b[c]),0>mxUtils.indexOf(b,f)&&0>mxUtils.indexOf(g,f))){for(var l=this.model.getChildCells(f,!0),k=0,m=0;m<l.length;m++)0<=mxUtils.indexOf(b,l[m])&&
-k++;k==l.length&&g.push(f)}g.push(b[c])}g=p.apply(this,[g,d])}finally{this.model.endUpdate()}return g};Graph.prototype.updateCustomLinks=function(b,d,g){g=null!=g?g:new Graph;for(var c=0;c<d.length;c++)null!=d[c]&&g.updateCustomLinksForCell(b,d[c],g)};Graph.prototype.updateCustomLinksForCell=function(b,d){this.doUpdateCustomLinksForCell(b,d);for(var g=this.model.getChildCount(d),c=0;c<g;c++)this.updateCustomLinksForCell(b,this.model.getChildAt(d,c))};Graph.prototype.doUpdateCustomLinksForCell=function(b,
-d){};Graph.prototype.getAllConnectionConstraints=function(b,d){if(null!=b){var g=mxUtils.getValue(b.style,"points",null);if(null!=g){var c=[];try{for(var e=JSON.parse(g),g=0;g<e.length;g++){var f=e[g];c.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(va){}return c}if(null!=b.shape&&null!=b.shape.bounds){f=b.shape.direction;e=b.shape.bounds;g=b.shape.scale;c=e.width/g;e=e.height/g;if(f==mxConstants.DIRECTION_NORTH||f==
-mxConstants.DIRECTION_SOUTH)f=c,c=e,e=f;g=b.shape.getConstraints(b.style,c,e);if(null!=g)return g;if(null!=b.shape.stencil&&null!=b.shape.stencil.constraints)return b.shape.stencil.constraints;if(null!=b.shape.constraints)return b.shape.constraints}}return null};Graph.prototype.flipEdge=function(b){if(null!=b){var d=this.getCurrentCellStyle(b),d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
-this.setCellStyles(mxConstants.STYLE_ELBOW,d,[b])}};Graph.prototype.isValidRoot=function(b){for(var d=this.model.getChildCount(b),g=0,c=0;c<d;c++){var e=this.model.getChildAt(b,c);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||g++)}return 0<g||this.isContainer(b)};Graph.prototype.isValidDropTarget=function(b,d,g){for(var c=this.getCurrentCellStyle(b),e=!0,f=!0,l=0;l<d.length&&f;l++)e=e&&this.isTable(d[l]),f=f&&this.isTableRow(d[l]);return("1"!=mxUtils.getValue(c,"part","0")||
-this.isContainer(b))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(b))&&!this.isTableRow(b)&&(!this.isTable(b)||f||e)};Graph.prototype.createGroupCell=function(){var b=mxGraph.prototype.createGroupCell.apply(this,arguments);b.setStyle("group");return b};Graph.prototype.isExtendParentsOnAdd=function(b){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=b&&null!=this.layoutManager){var g=this.model.getParent(b);
-null!=g&&(g=this.layoutManager.getLayout(g),null!=g&&g.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(b){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(b,d){var g=this.getModel(),c=[];g.beginUpdate();try{for(var e=0;e<b.length;e++){var f=b[e];if(g.isEdge(f)){var l=g.getTerminal(f,
-!0),k=g.getTerminal(f,!1);g.setTerminal(f,k,!0);g.setTerminal(f,l,!1);var m=g.getGeometry(f);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var q=m.getTerminalPoint(!0),p=m.getTerminalPoint(!1);m.setTerminalPoint(q,!1);m.setTerminalPoint(p,!0);g.setGeometry(f,m);var G=this.view.getState(f),u=this.view.getState(l),y=this.view.getState(k);if(null!=G){var n=null!=u?this.getConnectionConstraint(G,u,!0):null,v=null!=y?this.getConnectionConstraint(G,y,!1):null;this.setConnectionConstraint(f,
-l,!0,v);this.setConnectionConstraint(f,k,!1,n);var D=mxUtils.getValue(G.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(G.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[f]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,D,[f])}c.push(f)}}else if(g.isVertex(f)&&(m=this.getCellGeometry(f),null!=m)){if(!(this.isTable(f)||this.isTableRow(f)||this.isTableCell(f)||this.isSwimlane(f))){m=m.clone();m.x+=m.width/
-2-m.height/2;m.y+=m.height/2-m.width/2;var da=m.width;m.width=m.height;m.height=da;g.setGeometry(f,m)}var x=this.view.getState(f);if(null!=x){var J=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],t=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,J[mxUtils.mod(mxUtils.indexOf(J,t)+(d?-1:1),J.length)],[f])}c.push(f)}}}finally{g.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=
-function(b){if(null!=b&&null!=b.fgNode)for(b=b.fgNode.firstChild;null!=b;){if("text"==b.nodeName&&"1"==b.getAttribute("placeholders"))return!0;b=b.nextSibling}return!1};var m=Graph.prototype.processChange;Graph.prototype.processChange=function(b){if(b instanceof mxGeometryChange&&(this.isTableCell(b.cell)||this.isTableRow(b.cell))&&(null==b.previous&&null!=b.geometry||null!=b.previous&&!b.previous.equals(b.geometry))){var d=b.cell;this.isTableCell(d)&&(d=this.model.getParent(d));this.isTableRow(d)&&
-(d=this.model.getParent(d));var g=this.view.getState(d);null!=g&&null!=g.shape&&(this.view.invalidate(d),g.shape.bounds=null)}m.apply(this,arguments);b instanceof mxValueChange&&null!=b.cell&&null!=b.cell.value&&"object"==typeof b.cell.value&&this.invalidateDescendantsWithPlaceholders(b.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(b){b=this.model.getDescendants(b);if(0<b.length)for(var d=0;d<b.length;d++){var g=this.view.getState(b[d]);null!=g&&null!=g.shape&&null!=g.shape.stencil&&
-this.stencilHasPlaceholders(g.shape.stencil)?this.removeStateForCell(b[d]):this.isReplacePlaceholders(b[d])&&this.view.invalidate(b[d],!1,!1)}};Graph.prototype.replaceElement=function(b,d){for(var g=b.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(b.attributes);attr=c.pop();)g.setAttribute(attr.nodeName,attr.nodeValue);g.innerHTML=b.innerHTML;b.parentNode.replaceChild(g,b)};Graph.prototype.processElements=function(b,d){if(null!=b)for(var g=b.getElementsByTagName("*"),c=
-0;c<g.length;c++)d(g[c])};Graph.prototype.updateLabelElements=function(b,d,g){b=null!=b?b:this.getSelectionCells();for(var c=document.createElement("div"),e=0;e<b.length;e++)if(this.isHtmlLabel(b[e])){var f=this.convertValueToString(b[e]);if(null!=f&&0<f.length){c.innerHTML=f;for(var l=c.getElementsByTagName(null!=g?g:"*"),k=0;k<l.length;k++)d(l[k]);c.innerHTML!=f&&this.cellLabelChanged(b[e],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(b,d,g){d=Graph.zapGremlins(d);this.model.beginUpdate();
-try{if(null!=b.value&&"object"==typeof b.value){if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),e=b;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(c)){this.setAttributeForCell(e,c,d);break}e=this.model.getParent(e)}var f=b.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&f.hasAttribute("label_"+Graph.diagramLanguage)?f.setAttribute("label_"+Graph.diagramLanguage,d):
-f.setAttribute("label",d);d=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(b){if(null!=b){for(var d=new mxDictionary,g=0;g<b.length;g++)d.put(b[g],!0);for(var c=[],g=0;g<b.length;g++){var e=this.model.getParent(b[g]);null==e||d.get(e)||(d.put(e,!0),c.push(e))}for(g=0;g<c.length;g++)if(e=this.view.getState(c[g]),null!=e&&(this.model.isEdge(e.cell)||this.model.isVertex(e.cell))&&this.isCellDeletable(e.cell)&&this.isTransparentState(e)){for(var f=
-!0,l=0;l<this.model.getChildCount(e.cell)&&f;l++)d.get(this.model.getChildAt(e.cell,l))||(f=!1);f&&b.push(e.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(b){for(var d=[],g=0;g<b.length;g++)this.isCellDeletable(b[g])&&this.isTransparentState(this.view.getState(b[g]))&&d.push(b[g]);b=d;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(b,d){this.setAttributeForCell(b,"link",d)};Graph.prototype.setTooltipForCell=
-function(b,d){var g="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(b.value)&&b.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(g="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(b,g,d)};Graph.prototype.getAttributeForCell=function(b,d,g){b=null!=b.value&&"object"===typeof b.value?b.value.getAttribute(d):null;return null!=b?b:g};Graph.prototype.setAttributeForCell=function(b,d,g){var c;null!=b.value&&"object"==typeof b.value?c=b.value.cloneNode(!0):(c=
-mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",b.value||""));null!=g?c.setAttribute(d,g):c.removeAttribute(d);this.model.setValue(b,c)};var v=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(b,d,g,c){this.getModel();if(mxEvent.isAltDown(d))return null;for(var e=0;e<b.length;e++){var f=this.model.getParent(b[e]);if(this.model.isEdge(f)&&0>mxUtils.indexOf(b,f))return null}for(var f=v.apply(this,arguments),l=!0,e=0;e<b.length&&l;e++)l=l&&this.isTableRow(b[e]);
-l&&(this.isTableCell(f)&&(f=this.model.getParent(f)),this.isTableRow(f)&&(f=this.model.getParent(f)),this.isTable(f)||(f=null));return f};Graph.prototype.click=function(b){mxGraph.prototype.click.call(this,b);this.firstClickState=b.getState();this.firstClickSource=b.getSource()};Graph.prototype.dblClick=function(b,d){this.isEnabled()&&(d=this.insertTextForEvent(b,d),mxGraph.prototype.dblClick.call(this,b,d))};Graph.prototype.insertTextForEvent=function(b,d){var g=mxUtils.convertPoint(this.container,
-mxEvent.getClientX(b),mxEvent.getClientY(b));if(null!=b&&!this.model.isVertex(d)){var c=this.model.isEdge(d)?this.view.getState(d):null,e=mxEvent.getSource(b);this.firstClickState!=c||this.firstClickSource!=e||null!=c&&null!=c.text&&null!=c.text.node&&null!=c.text.boundingBox&&(mxUtils.contains(c.text.boundingBox,g.x,g.y)||mxUtils.isAncestorNode(c.text.node,mxEvent.getSource(b)))||(null!=c||this.isCellLocked(this.getDefaultParent()))&&(null==c||this.isCellLocked(c.cell))||!(null!=c||mxClient.IS_SVG&&
-e==this.view.getCanvas().ownerSVGElement)||(null==c&&(c=this.view.getState(this.getCellAt(g.x,g.y))),d=this.addText(g.x,g.y,c))}return d};Graph.prototype.getInsertPoint=function(){var b=this.getGridSize(),d=this.container.scrollLeft/this.view.scale-this.view.translate.x,g=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var c=this.getPageLayout(),e=this.getPageSize(),d=Math.max(d,c.x*e.width),g=Math.max(g,c.y*e.height);return new mxPoint(this.snap(d+b),this.snap(g+
-b))};Graph.prototype.getFreeInsertPoint=function(){var b=this.view,d=this.getGraphBounds(),g=this.getInsertPoint(),c=this.snap(Math.round(Math.max(g.x,d.x/b.scale-b.translate.x+(0==d.width?2*this.gridSize:0)))),b=this.snap(Math.round(Math.max(g.y,(d.y+d.height)/b.scale-b.translate.y+2*this.gridSize)));return new mxPoint(c,b)};Graph.prototype.getCenterInsertPoint=function(b){b=null!=b?b:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+
+!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(b){return!mxEvent.isAltDown(b)};var e=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(b){return e.apply(this,arguments)||this.graph.isTableRow(b)||this.graph.isTableCell(b)};var k=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(b){return k.apply(this,arguments)||this.graph.isEdgeIgnored(b)};var g=mxConnectionHandler.prototype.isCreateTarget;
+mxConnectionHandler.prototype.isCreateTarget=function(b){return this.graph.isCloneEvent(b)||g.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var b=new mxEllipse(null,this.highlightColor,this.highlightColor,0);b.opacity=mxConstants.HIGHLIGHT_OPACITY;return b};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(b){b=this.graph.createCurrentEdgeStyle();b=this.graph.createEdge(null,
+null,null,null,null,b);b=new mxCellState(this.graph.view,b,this.graph.getCellStyle(b));for(var d in this.graph.currentEdgeStyle)b.style[d]=this.graph.currentEdgeStyle[d];return b};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var b=p.apply(this,arguments);b.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return b};mxConnectionHandler.prototype.updatePreview=function(b){};var t=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
+function(){var b=t.apply(this,arguments),d=b.getCell;b.getCell=mxUtils.bind(this,function(b){var f=d.apply(this,arguments);this.error=null;return f});return b};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var b="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",d="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),
+f=0;f<d.length;f++)null!=this.currentEdgeStyle[d[f]]&&(b+=d[f]+"="+this.currentEdgeStyle[d[f]]+";");null!=this.currentEdgeStyle.orthogonalLoop?b+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(b+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?b+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(b+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(b+="elbow="+this.currentEdgeStyle.elbow+";");return b=null!=this.currentEdgeStyle.html?b+("html="+this.currentEdgeStyle.html+";"):b+"html=1;"};Graph.prototype.updateCellStyles=function(b,d,f){this.model.beginUpdate();try{for(var c=0;c<f.length;c++)if(this.model.isVertex(f[c])||this.model.isEdge(f[c])){this.setCellStyles(b,null,[f[c]]);var e=this.getCellStyle(f[c])[b];d!=(null==e?mxConstants.NONE:e)&&this.setCellStyles(b,
+d,[f[c]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var b=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=b&&(new mxCodec(b.ownerDocument)).decode(b,this.getStylesheet())};Graph.prototype.createCellLookup=function(b,d){d=null!=d?d:{};for(var f=0;f<b.length;f++){var c=b[f];d[mxObjectIdentity.get(c)]=
+c.getId();for(var e=this.model.getChildCount(c),g=0;g<e;g++)this.createCellLookup([this.model.getChildAt(c,g)],d)}return d};Graph.prototype.createCellMapping=function(b,d,f){f=null!=f?f:{};for(var c in b){var e=d[c];null==f[e]&&(f[e]=b[c].getId()||"")}return f};Graph.prototype.importGraphModel=function(b,d,f,c){d=null!=d?d:0;f=null!=f?f:0;var e=new mxCodec(b.ownerDocument),g=new mxGraphModel;e.decode(b,g);b=[];var e={},l={},k=g.getChildren(this.cloneCell(g.root,this.isCloneInvalidEdges(),e));if(null!=
+k){var m=this.createCellLookup([g.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<k.length;g++)q=this.model.getChildren(this.moveCells([k[g]],d,f,!1,this.model.getRoot())[0]),null!=q&&(b=b.concat(q));else{var q=g.getChildren(k[0]);null!=q&&(b=this.moveCells(q,d,f,!1,this.getDefaultParent()),l[g.getChildAt(g.root,0).getId()]=this.getDefaultParent().getId())}if(null!=b&&(this.createCellMapping(e,m,l),this.updateCustomLinks(l,b),c)){this.isGridEnabled()&&
+(d=this.snap(d),f=this.snap(f));var n=this.getBoundingBoxFromGeometry(b,!0);null!=n&&this.moveCells(b,d-n.x,f-n.y)}}finally{this.model.endUpdate()}}return b};Graph.prototype.encodeCells=function(b){for(var d={},f=this.cloneCells(b,null,d),c=new mxDictionary,e=0;e<b.length;e++)c.put(b[e],!0);for(var g=new mxCodec,l=new mxGraphModel,k=l.getChildAt(l.getRoot(),0),e=0;e<f.length;e++){l.add(k,f[e]);var m=this.view.getState(b[e]);if(null!=m){var q=this.getCellGeometry(f[e]);null!=q&&q.relative&&!this.model.isEdge(b[e])&&
+null==c.get(this.model.getParent(b[e]))&&(q.offset=null,q.relative=!1,q.x=m.x/m.view.scale-m.view.translate.x,q.y=m.y/m.view.scale-m.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(b)),f);return g.encode(l)};Graph.prototype.isSwimlane=function(b,d){if(null!=b&&this.model.getParent(b)!=this.model.getRoot()&&!this.model.isEdge(b)){var f=this.getCurrentCellStyle(b,d)[mxConstants.STYLE_SHAPE];return f==mxConstants.SHAPE_SWIMLANE||"table"==f}return!1};var d=Graph.prototype.isExtendParent;
+Graph.prototype.isExtendParent=function(b){var f=this.model.getParent(b);if(null!=f){var c=this.getCurrentCellStyle(f);if(null!=c.expand)return"0"!=c.expand}return d.apply(this,arguments)&&(null==f||!this.isTable(f))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(b,d,c,e,g,l,k,m){null==m&&(m=this.model.getParent(b),this.isTable(m)||this.isTableRow(m))&&(m=this.getCellAt(l,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=f.apply(this,[b,d,c,e,g,l,k,m]);this.model.setValue(c,
+"");var q=this.getChildCells(c,!0);for(d=0;d<q.length;d++){var n=this.getCellGeometry(q[d]);null!=n&&n.relative&&0<n.x&&this.model.remove(q[d])}var F=this.getChildCells(b,!0);for(d=0;d<F.length;d++)n=this.getCellGeometry(F[d]),null!=n&&n.relative&&0>=n.x&&this.model.remove(F[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
+mxConstants.NONE,[b]);var u=this.model.getTerminal(c,!1);if(null!=u){var da=this.getCurrentCellStyle(u);null!=da&&"1"==da.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(b,d,f){if(d||f)l.apply(this,arguments);
+else{var c=this.getSelectionCell(),e=null,g=[],k=mxUtils.bind(this,function(d){if(null!=this.view.getState(d)&&(this.model.isVertex(d)||this.model.isEdge(d)))if(g.push(d),d==c)e=g.length-1;else if(b&&null==c&&0<g.length||null!=e&&b&&g.length>e||!b&&0<e)return;for(var f=0;f<this.model.getChildCount(d);f++)k(this.model.getChildAt(d,f))});k(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(b?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=
+function(b,d,f,c,e,g,l){l=null!=l?l:{};if(this.isTable(e)){for(var k=[],q=0;q<b.length;q++)this.isTable(b[q])?k=k.concat(this.model.getChildCells(b[q],!0).reverse()):k.push(b[q]);b=k}this.model.beginUpdate();try{k=[];for(q=0;q<b.length;q++)if(null!=e&&this.isTableRow(b[q])){var n=this.model.getParent(b[q]),F=this.getCellGeometry(b[q]);this.isTable(n)&&k.push(n);if(null!=n&&null!=F&&this.isTable(n)&&this.isTable(e)&&(c||n!=e)){if(!c){var u=this.getCellGeometry(n);null!=u&&(u=u.clone(),u.height-=F.height,
+this.model.setGeometry(n,u))}u=this.getCellGeometry(e);null!=u&&(u=u.clone(),u.height+=F.height,this.model.setGeometry(e,u));var da=this.model.getChildCells(e,!0);if(0<da.length){b[q]=c?this.cloneCell(b[q]):b[q];var p=this.model.getChildCells(b[q],!0),v=this.model.getChildCells(da[0],!0),A=v.length-p.length;if(0<A)for(var B=0;B<A;B++){var x=this.cloneCell(p[p.length-1]);null!=x&&(x.value="",this.model.add(b[q],x))}else if(0>A)for(B=0;B>A;B--)this.model.remove(p[p.length+B-1]);p=this.model.getChildCells(b[q],
+!0);for(B=0;B<v.length;B++){var I=this.getCellGeometry(v[B]),qa=this.getCellGeometry(p[B]);null!=I&&null!=qa&&(qa=qa.clone(),qa.width=I.width,this.model.setGeometry(p[B],qa))}}}}for(var t=m.apply(this,arguments),q=0;q<k.length;q++)!c&&this.model.contains(k[q])&&0==this.model.getChildCount(k[q])&&this.model.remove(k[q]);c&&this.updateCustomLinks(this.createCellMapping(l,this.createCellLookup(b)),t)}finally{this.model.endUpdate()}return t};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=
+function(b,d){var f=[];this.model.beginUpdate();try{for(var c=0;c<b.length;c++)if(this.isTableCell(b[c])){var e=this.model.getParent(b[c]),g=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(g)?0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g)&&f.push(g):this.labelChanged(b[c],"")}else{if(this.isTableRow(b[c])&&(g=this.model.getParent(b[c]),0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g))){for(var l=this.model.getChildCells(g,!0),k=0,m=0;m<l.length;m++)0<=mxUtils.indexOf(b,
+l[m])&&k++;k==l.length&&f.push(g)}f.push(b[c])}f=q.apply(this,[f,d])}finally{this.model.endUpdate()}return f};Graph.prototype.updateCustomLinks=function(b,d,f){f=null!=f?f:new Graph;for(var c=0;c<d.length;c++)null!=d[c]&&f.updateCustomLinksForCell(b,d[c],f)};Graph.prototype.updateCustomLinksForCell=function(b,d){this.doUpdateCustomLinksForCell(b,d);for(var f=this.model.getChildCount(d),c=0;c<f;c++)this.updateCustomLinksForCell(b,this.model.getChildAt(d,c))};Graph.prototype.doUpdateCustomLinksForCell=
+function(b,d){};Graph.prototype.getAllConnectionConstraints=function(b,d){if(null!=b){var f=mxUtils.getValue(b.style,"points",null);if(null!=f){var c=[];try{for(var e=JSON.parse(f),f=0;f<e.length;f++){var g=e[f];c.push(new mxConnectionConstraint(new mxPoint(g[0],g[1]),2<g.length?"0"!=g[2]:!0,null,3<g.length?g[3]:0,4<g.length?g[4]:0))}}catch(va){}return c}if(null!=b.shape&&null!=b.shape.bounds){g=b.shape.direction;e=b.shape.bounds;f=b.shape.scale;c=e.width/f;e=e.height/f;if(g==mxConstants.DIRECTION_NORTH||
+g==mxConstants.DIRECTION_SOUTH)g=c,c=e,e=g;f=b.shape.getConstraints(b.style,c,e);if(null!=f)return f;if(null!=b.shape.stencil&&null!=b.shape.stencil.constraints)return b.shape.stencil.constraints;if(null!=b.shape.constraints)return b.shape.constraints}}return null};Graph.prototype.flipEdge=function(b){if(null!=b){var d=this.getCurrentCellStyle(b),d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
+this.setCellStyles(mxConstants.STYLE_ELBOW,d,[b])}};Graph.prototype.isValidRoot=function(b){for(var d=this.model.getChildCount(b),f=0,c=0;c<d;c++){var e=this.model.getChildAt(b,c);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||f++)}return 0<f||this.isContainer(b)};Graph.prototype.isValidDropTarget=function(b,d,f){for(var c=this.getCurrentCellStyle(b),e=!0,g=!0,l=0;l<d.length&&g;l++)e=e&&this.isTable(d[l]),g=g&&this.isTableRow(d[l]);return("1"!=mxUtils.getValue(c,"part","0")||
+this.isContainer(b))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(b))&&!this.isTableRow(b)&&(!this.isTable(b)||g||e)};Graph.prototype.createGroupCell=function(){var b=mxGraph.prototype.createGroupCell.apply(this,arguments);b.setStyle("group");return b};Graph.prototype.isExtendParentsOnAdd=function(b){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=b&&null!=this.layoutManager){var f=this.model.getParent(b);
+null!=f&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(b){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(b,d){var f=this.getModel(),c=[];f.beginUpdate();try{for(var e=0;e<b.length;e++){var g=b[e];if(f.isEdge(g)){var l=f.getTerminal(g,
+!0),k=f.getTerminal(g,!1);f.setTerminal(g,k,!0);f.setTerminal(g,l,!1);var m=f.getGeometry(g);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var q=m.getTerminalPoint(!0),n=m.getTerminalPoint(!1);m.setTerminalPoint(q,!1);m.setTerminalPoint(n,!0);f.setGeometry(g,m);var F=this.view.getState(g),u=this.view.getState(l),p=this.view.getState(k);if(null!=F){var v=null!=u?this.getConnectionConstraint(F,u,!0):null,A=null!=p?this.getConnectionConstraint(F,p,!1):null;this.setConnectionConstraint(g,
+l,!0,A);this.setConnectionConstraint(g,k,!1,v);var B=mxUtils.getValue(F.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(F.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,B,[g])}c.push(g)}}else if(f.isVertex(g)&&(m=this.getCellGeometry(g),null!=m)){if(!(this.isTable(g)||this.isTableRow(g)||this.isTableCell(g)||this.isSwimlane(g))){m=m.clone();m.x+=m.width/
+2-m.height/2;m.y+=m.height/2-m.width/2;var da=m.width;m.width=m.height;m.height=da;f.setGeometry(g,m)}var x=this.view.getState(g);if(null!=x){var I=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],t=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,I[mxUtils.mod(mxUtils.indexOf(I,t)+(d?-1:1),I.length)],[g])}c.push(g)}}}finally{f.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=
+function(b){if(null!=b&&null!=b.fgNode)for(b=b.fgNode.firstChild;null!=b;){if("text"==b.nodeName&&"1"==b.getAttribute("placeholders"))return!0;b=b.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(b){if(b instanceof mxGeometryChange&&(this.isTableCell(b.cell)||this.isTableRow(b.cell))&&(null==b.previous&&null!=b.geometry||null!=b.previous&&!b.previous.equals(b.geometry))){var d=b.cell;this.isTableCell(d)&&(d=this.model.getParent(d));this.isTableRow(d)&&
+(d=this.model.getParent(d));var f=this.view.getState(d);null!=f&&null!=f.shape&&(this.view.invalidate(d),f.shape.bounds=null)}n.apply(this,arguments);b instanceof mxValueChange&&null!=b.cell&&null!=b.cell.value&&"object"==typeof b.cell.value&&this.invalidateDescendantsWithPlaceholders(b.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(b){b=this.model.getDescendants(b);if(0<b.length)for(var d=0;d<b.length;d++){var f=this.view.getState(b[d]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&
+this.stencilHasPlaceholders(f.shape.stencil)?this.removeStateForCell(b[d]):this.isReplacePlaceholders(b[d])&&this.view.invalidate(b[d],!1,!1)}};Graph.prototype.replaceElement=function(b,d){for(var f=b.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(b.attributes);attr=c.pop();)f.setAttribute(attr.nodeName,attr.nodeValue);f.innerHTML=b.innerHTML;b.parentNode.replaceChild(f,b)};Graph.prototype.processElements=function(b,d){if(null!=b)for(var f=b.getElementsByTagName("*"),c=
+0;c<f.length;c++)d(f[c])};Graph.prototype.updateLabelElements=function(b,d,f){b=null!=b?b:this.getSelectionCells();for(var c=document.createElement("div"),e=0;e<b.length;e++)if(this.isHtmlLabel(b[e])){var g=this.convertValueToString(b[e]);if(null!=g&&0<g.length){c.innerHTML=g;for(var l=c.getElementsByTagName(null!=f?f:"*"),k=0;k<l.length;k++)d(l[k]);c.innerHTML!=g&&this.cellLabelChanged(b[e],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(b,d,f){d=Graph.zapGremlins(d);this.model.beginUpdate();
+try{if(null!=b.value&&"object"==typeof b.value){if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),e=b;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(c)){this.setAttributeForCell(e,c,d);break}e=this.model.getParent(e)}var g=b.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&g.hasAttribute("label_"+Graph.diagramLanguage)?g.setAttribute("label_"+Graph.diagramLanguage,d):
+g.setAttribute("label",d);d=g}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(b){if(null!=b){for(var d=new mxDictionary,f=0;f<b.length;f++)d.put(b[f],!0);for(var c=[],f=0;f<b.length;f++){var e=this.model.getParent(b[f]);null==e||d.get(e)||(d.put(e,!0),c.push(e))}for(f=0;f<c.length;f++)if(e=this.view.getState(c[f]),null!=e&&(this.model.isEdge(e.cell)||this.model.isVertex(e.cell))&&this.isCellDeletable(e.cell)&&this.isTransparentState(e)){for(var g=
+!0,l=0;l<this.model.getChildCount(e.cell)&&g;l++)d.get(this.model.getChildAt(e.cell,l))||(g=!1);g&&b.push(e.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(b){for(var d=[],f=0;f<b.length;f++)this.isCellDeletable(b[f])&&this.isTransparentState(this.view.getState(b[f]))&&d.push(b[f]);b=d;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(b,d){this.setAttributeForCell(b,"link",d)};Graph.prototype.setTooltipForCell=
+function(b,d){var f="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(b.value)&&b.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(f="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(b,f,d)};Graph.prototype.getAttributeForCell=function(b,d,f){b=null!=b.value&&"object"===typeof b.value?b.value.getAttribute(d):null;return null!=b?b:f};Graph.prototype.setAttributeForCell=function(b,d,f){var c;null!=b.value&&"object"==typeof b.value?c=b.value.cloneNode(!0):(c=
+mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",b.value||""));null!=f?c.setAttribute(d,f):c.removeAttribute(d);this.model.setValue(b,c)};var v=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(b,d,f,c){this.getModel();if(mxEvent.isAltDown(d))return null;for(var e=0;e<b.length;e++){var g=this.model.getParent(b[e]);if(this.model.isEdge(g)&&0>mxUtils.indexOf(b,g))return null}for(var g=v.apply(this,arguments),l=!0,e=0;e<b.length&&l;e++)l=l&&this.isTableRow(b[e]);
+l&&(this.isTableCell(g)&&(g=this.model.getParent(g)),this.isTableRow(g)&&(g=this.model.getParent(g)),this.isTable(g)||(g=null));return g};Graph.prototype.click=function(b){mxGraph.prototype.click.call(this,b);this.firstClickState=b.getState();this.firstClickSource=b.getSource()};Graph.prototype.dblClick=function(b,d){this.isEnabled()&&(d=this.insertTextForEvent(b,d),mxGraph.prototype.dblClick.call(this,b,d))};Graph.prototype.insertTextForEvent=function(b,d){var f=mxUtils.convertPoint(this.container,
+mxEvent.getClientX(b),mxEvent.getClientY(b));if(null!=b&&!this.model.isVertex(d)){var c=this.model.isEdge(d)?this.view.getState(d):null,e=mxEvent.getSource(b);this.firstClickState!=c||this.firstClickSource!=e||null!=c&&null!=c.text&&null!=c.text.node&&null!=c.text.boundingBox&&(mxUtils.contains(c.text.boundingBox,f.x,f.y)||mxUtils.isAncestorNode(c.text.node,mxEvent.getSource(b)))||(null!=c||this.isCellLocked(this.getDefaultParent()))&&(null==c||this.isCellLocked(c.cell))||!(null!=c||mxClient.IS_SVG&&
+e==this.view.getCanvas().ownerSVGElement)||(null==c&&(c=this.view.getState(this.getCellAt(f.x,f.y))),d=this.addText(f.x,f.y,c))}return d};Graph.prototype.getInsertPoint=function(){var b=this.getGridSize(),d=this.container.scrollLeft/this.view.scale-this.view.translate.x,f=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var c=this.getPageLayout(),e=this.getPageSize(),d=Math.max(d,c.x*e.width),f=Math.max(f,c.y*e.height);return new mxPoint(this.snap(d+b),this.snap(f+
+b))};Graph.prototype.getFreeInsertPoint=function(){var b=this.view,d=this.getGraphBounds(),f=this.getInsertPoint(),c=this.snap(Math.round(Math.max(f.x,d.x/b.scale-b.translate.x+(0==d.width?2*this.gridSize:0)))),b=this.snap(Math.round(Math.max(f.y,(d.y+d.height)/b.scale-b.translate.y+2*this.gridSize)));return new mxPoint(c,b)};Graph.prototype.getCenterInsertPoint=function(b){b=null!=b?b:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+
this.container.clientWidth/2)/this.view.scale-this.view.translate.x-b.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-b.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-b.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-b.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=
-function(b,d,g){var c=new mxCell;c.value="Text";c.geometry=new mxGeometry(0,0,0,0);c.vertex=!0;if(null!=g&&this.model.isEdge(g.cell)){c.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";c.geometry.relative=!0;c.connectable=!1;var e=this.view.getRelativePoint(g,b,d);c.geometry.x=Math.round(1E4*e.x)/1E4;c.geometry.y=Math.round(e.y);c.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(g,c.geometry),f=this.view.scale;c.geometry.offset=new mxPoint(Math.round((b-e.x)/
-f),Math.round((d-e.y)/f))}else e=this.view.translate,c.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",c.geometry.width=40,c.geometry.height=20,c.geometry.x=Math.round(b/this.view.scale)-e.x-(null!=g?g.origin.x:0),c.geometry.y=Math.round(d/this.view.scale)-e.y-(null!=g?g.origin.y:0),c.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([c],null!=g?g.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[c])),this.autoSizeCell(c)}finally{this.getModel().endUpdate()}return c};
-Graph.prototype.addClickHandler=function(b,d,g){var c=mxUtils.bind(this,function(){var b=this.container.getElementsByTagName("a");if(null!=b)for(var g=0;g<b.length;g++){var c=this.getAbsoluteUrl(b[g].getAttribute("href"));null!=c&&(b[g].setAttribute("rel",this.linkRelation),b[g].setAttribute("href",c),null!=d&&mxEvent.addGestureListeners(b[g],null,null,d))}});this.model.addListener(mxEvent.CHANGE,c);c();var e=this.container.style.cursor,f=this.getTolerance(),l=this,k={currentState:null,currentLink:null,
-currentTarget:null,highlight:null!=b&&""!=b&&b!=mxConstants.NONE?new mxCellHighlight(l,b,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(b){var d=b.sourceState;if(null==d||null==l.getLinkForCell(d.cell))b=l.getCellAt(b.getGraphX(),b.getGraphY(),null,null,null,function(b,d,g){return null==l.getLinkForCell(b.cell)}),d=null==d||l.model.isAncestor(b,d.cell)?l.view.getState(b):null;d!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=d,null!=this.currentState&&
-this.activate(this.currentState))},mouseDown:function(b,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=l.container.scrollLeft;this.scrollTop=l.container.scrollTop;null==this.currentLink&&"auto"==l.container.style.overflow&&(l.container.style.cursor="move");this.updateCurrentState(d)},mouseMove:function(b,d){if(l.isMouseDown){if(null!=this.currentLink){var g=Math.abs(this.startX-d.getGraphX()),c=Math.abs(this.startY-d.getGraphY());(g>f||c>f)&&this.clear()}}else{for(g=d.getSource();null!=
-g&&"a"!=g.nodeName.toLowerCase();)g=g.parentNode;null!=g?this.clear():(null!=l.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&l.tooltipHandler.reset(d,!0,this.currentState),(null==this.currentState||d.getState()!=this.currentState&&null!=d.sourceState||!l.intersects(this.currentState,d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d))}},mouseUp:function(b,c){for(var e=c.getSource(),k=c.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-
-l.container.scrollLeft)<f&&Math.abs(this.scrollTop-l.container.scrollTop)<f&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(e=l.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==d||d(k,this.currentLink),mxEvent.isConsumed(k)||(k=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(k)?"_blank":
-e?l.linkTarget:"_top",l.openLink(this.currentLink,k),c.consume())):null!=g&&!c.isConsumed()&&Math.abs(this.scrollLeft-l.container.scrollLeft)<f&&Math.abs(this.scrollTop-l.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-c.getGraphY())<f&&g(c.getEvent()));this.clear()},activate:function(b){this.currentLink=l.getAbsoluteUrl(l.getLinkForCell(b.cell));null!=this.currentLink&&(this.currentTarget=l.getLinkTargetForCell(b.cell),l.container.style.cursor="pointer",null!=
-this.highlight&&this.highlight.highlight(b))},clear:function(){null!=l.container&&(l.container.style.cursor=e);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=l.tooltipHandler&&l.tooltipHandler.hide()}};l.click=function(b){};l.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(b){k.clear()})};Graph.prototype.duplicateCells=function(b,d){b=null!=b?b:this.getSelectionCells();d=null!=d?d:!0;for(var g=0;g<b.length;g++)this.isTableCell(b[g])&&
-(b[g]=this.model.getParent(b[g]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,f=[];c.beginUpdate();try{for(var l={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,l,!0),g=0;g<b.length;g++){var q=c.getParent(b[g]);if(null!=q){var p=this.moveCells([m[g]],e,e,!1)[0];f.push(p);if(d)c.add(q,m[g]);else{var G=q.getIndex(b[g]);c.add(q,m[g],G+1)}if(this.isTable(q)){var u=this.getCellGeometry(m[g]),y=this.getCellGeometry(q);null!=u&&null!=y&&(y=y.clone(),y.height+=u.height,c.setGeometry(q,
-y))}}else f.push(m[g])}this.updateCustomLinks(this.createCellMapping(l,k),m,this)}finally{c.endUpdate()}return f};Graph.prototype.insertImage=function(b,d,g){if(null!=b&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<c.length;f++)e.push(c[f]);document.execCommand("insertimage",!1,b);b=this.cellEditor.textarea.getElementsByTagName("img");if(b.length==e.length+1)for(f=b.length-1;0<=f;f--)if(0==f||b[f]!=e[f-1]){b[f].setAttribute("width",d);b[f].setAttribute("height",
-g);break}}};Graph.prototype.insertLink=function(b){if(null!=this.cellEditor.textarea)if(0==b.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var d=this.cellEditor.textarea.getElementsByTagName("a"),g=[],c=0;c<d.length;c++)g.push(d[c]);document.execCommand("createlink",!1,mxUtils.trim(b));d=this.cellEditor.textarea.getElementsByTagName("a");if(d.length==g.length+1)for(c=d.length-1;0<=c;c--)if(d[c]!=g[c-1]){for(d=d[c].getElementsByTagName("a");0<d.length;){for(g=d[0].parentNode;null!=
-d[0].firstChild;)g.insertBefore(d[0].firstChild,d[0]);g.removeChild(d[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(b))};Graph.prototype.isCellResizable=function(b){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),g=this.getCurrentCellStyle(b);return!this.isTableCell(b)&&!this.isTableRow(b)&&(d||"0"!=mxUtils.getValue(g,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==g[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(b,d){null==d&&(d=this.getSelectionCells());
-if(null!=d&&1<d.length){for(var g=[],c=null,e=null,f=0;f<d.length;f++)if(this.getModel().isVertex(d[f])){var l=this.view.getState(d[f]);if(null!=l){var k=b?l.getCenterX():l.getCenterY(),c=null!=c?Math.max(c,k):k,e=null!=e?Math.min(e,k):k;g.push(l)}}if(2<g.length){g.sort(function(d,g){return b?d.x-g.x:d.y-g.y});l=this.view.translate;k=this.view.scale;e=e/k-(b?l.x:l.y);c=c/k-(b?l.x:l.y);this.getModel().beginUpdate();try{for(var m=(c-e)/(g.length-1),c=e,f=1;f<g.length-1;f++){var q=this.view.getState(this.model.getParent(g[f].cell)),
-p=this.getCellGeometry(g[f].cell),c=c+m;null!=p&&null!=q&&(p=p.clone(),b?p.x=Math.round(c-p.width/2)-q.origin.x:p.y=Math.round(c-p.height/2)-q.origin.y,this.getModel().setGeometry(g[f].cell,p))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,d){return this.getLinkForCell(b.cell)});
-return b};Graph.prototype.parseBackgroundImage=function(b){var d=null;null!=b&&0<b.length&&(b=JSON.parse(b),d=new mxImage(b.src,b.width,b.height));return d};Graph.prototype.getBackgroundImageObject=function(b){return b};Graph.prototype.getSvg=function(b,d,g,c,e,f,l,k,m,q,p,G,u,y){var n=null;if(null!=y)for(n=new mxDictionary,p=0;p<y.length;p++)n.put(y[p],!0);if(y=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;g=null!=g?g:0;e=null!=e?e:!0;
-f=null!=f?f:!0;l=null!=l?l:!0;var v="page"==u?this.view.getBackgroundPageBounds():f&&null==n||c||"diagram"==u?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),D=this.view.scale;"diagram"==u&&null!=this.backgroundImage&&v.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*D,(this.view.translate.y+this.backgroundImage.y)*D,this.backgroundImage.width*D,this.backgroundImage.height*D));if(null==v)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),
-J=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=b&&(null!=J.style?J.style.backgroundColor=b:J.setAttribute("style","background-color:"+b));null==x.createElementNS?(J.setAttribute("xmlns",mxConstants.NS_SVG),J.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):J.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/D;var t=Math.max(1,Math.ceil(v.width*b)+2*g)+(q?5:0),A=Math.max(1,Math.ceil(v.height*b)+2*g)+(q?5:0);J.setAttribute("version",
-"1.1");J.setAttribute("width",t+"px");J.setAttribute("height",A+"px");J.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+t+" "+A);x.appendChild(J);var B=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");J.appendChild(B);var W=this.createSvgCanvas(B);W.foOffset=e?-.5:0;W.textOffset=e?-.5:0;W.imageOffset=e?-.5:0;W.translate(Math.floor(g/d-v.x/D),Math.floor(g/d-v.y/D));var C=document.createElement("div"),da=W.getAlternateText;W.getAlternateText=function(b,d,g,c,e,
-f,l,k,m,q,p,G,z){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(C.innerHTML=f,f=mxUtils.extractTextWithWhitespace(C.childNodes));for(var Fa=Math.ceil(2*c/this.state.fontSize),Qa=[],sa=0,Ra=0;(0==Fa||sa<Fa)&&Ra<f.length;){var Ua=f.charCodeAt(Ra);if(10==Ua||13==Ua){if(0<sa)break}else Qa.push(f.charAt(Ra)),255>Ua&&sa++;Ra++}Qa.length<f.length&&1<f.length-Qa.length&&(f=mxUtils.trim(Qa.join(""))+"...");return f}catch(gb){return da.apply(this,arguments)}else return da.apply(this,
-arguments)};var O=this.backgroundImage;if(null!=O){d=D/d;var M=this.view.translate,F=new mxRectangle((O.x+M.x)*d,(O.y+M.y)*d,O.width*d,O.height*d);mxUtils.intersects(v,F)&&W.image(O.x+M.x,O.y+M.y,O.width,O.height,O.src,!0)}W.scale(b);W.textEnabled=l;k=null!=k?k:this.createSvgImageExport();var ua=k.drawCellState,aa=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var g=aa.apply(this,arguments);return null==g||b.view.graph.isCustomLink(g)?null:g};k.getLinkTargetForCellState=function(b,d){return b.view.graph.getLinkTargetForCell(b.cell)};
-k.drawCellState=function(b,d){for(var g=b.view.graph,c=null!=n?n.get(b.cell):g.isCellSelected(b.cell),e=g.model.getParent(b.cell);!(f&&null==n||c)&&null!=e;)c=null!=n?n.get(e):g.isCellSelected(e),e=g.model.getParent(e);(f&&null==n||c)&&ua.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),W);this.updateSvgLinks(J,m,!0);this.addForeignObjectWarning(W,J);return J}finally{y&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
-function(b,d){if("0"!=urlParams["svg-warning"]&&0<d.getElementsByTagName("foreignObject").length){var g=b.createElement("switch"),c=b.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=b.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||d.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,
-"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=b.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);g.appendChild(c);e.appendChild(f);g.appendChild(e);d.appendChild(g)}};Graph.prototype.updateSvgLinks=function(b,d,g){b=b.getElementsByTagName("a");for(var c=0;c<b.length;c++)if(null==b[c].getAttribute("target")){var e=
-b[c].getAttribute("href");null==e&&(e=b[c].getAttribute("xlink:href"));null!=e&&(null!=d&&/^https?:\/\//.test(e)?b[c].setAttribute("target",d):g&&this.isCustomLink(e)&&b[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(b){b=new mxSvgCanvas2D(b);b.pointerEvents=!0;return b};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(b=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&
-(b=document.selection.createRange().parentElement());return b};Graph.prototype.getSelectedEditingElement=function(){for(var b=this.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;null!=b&&b==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=this.cellEditor.textarea.firstChild);return b};Graph.prototype.getParentByName=function(b,d,g){for(;null!=b&&b.nodeName!=
-d;){if(b==g)return null;b=b.parentNode}return b};Graph.prototype.getParentByNames=function(b,d,g){for(;null!=b&&!(0<=mxUtils.indexOf(d,b.nodeName));){if(b==g)return null;b=b.parentNode}return b};Graph.prototype.selectNode=function(b){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var g=document.createRange();g.selectNode(b);d.removeAllRanges();d.addRange(g)}}else(d=document.selection)&&"Control"!=d.type&&(b=d.createRange(),b.collapse(!0),g=d.createRange(),
-g.setEndPoint("StartToStart",b),g.select())};Graph.prototype.deleteCells=function(b,d){var g=null;if(null!=b&&0<b.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var e=this.model.getParent(b[c]);if(this.isTable(e)){var f=this.getCellGeometry(b[c]),l=this.getCellGeometry(e);null!=f&&null!=l&&(l=l.clone(),l.height-=f.height,this.model.setGeometry(e,l))}}var k=this.selectParentAfterDelete?this.model.getParents(b):null;this.removeCells(b,d)}finally{this.model.endUpdate()}if(null!=k)for(g=
-[],c=0;c<k.length;c++)this.model.contains(k[c])&&(this.model.isVertex(k[c])||this.model.isEdge(k[c]))&&g.push(k[c])}return g};Graph.prototype.insertTableColumn=function(b,d){var g=this.getModel();g.beginUpdate();try{var c=b,e=0;if(this.isTableCell(b))var f=g.getParent(b),c=g.getParent(f),e=mxUtils.indexOf(g.getChildCells(f,!0),b);else this.isTableRow(b)?c=g.getParent(b):b=g.getChildCells(c,!0)[0],d||(e=g.getChildCells(b,!0).length-1);for(var l=g.getChildCells(c,!0),k=Graph.minTableColumnWidth,f=0;f<
-l.length;f++){var m=g.getChildCells(l[f],!0)[e],q=g.cloneCell(m,!1),p=this.getCellGeometry(q);q.value=null;if(null!=p){var k=p.width,G=this.getCellGeometry(l[f]);null!=G&&(p.height=G.height)}g.add(l[f],q,e+(d?0:1))}var u=this.getCellGeometry(c);null!=u&&(u=u.clone(),u.width+=k,g.setGeometry(c,u))}finally{g.endUpdate()}};Graph.prototype.insertTableRow=function(b,d){var g=this.getModel();g.beginUpdate();try{var c=b,e=b;if(this.isTableCell(b))e=g.getParent(b),c=g.getParent(e);else if(this.isTableRow(b))c=
-g.getParent(b);else var f=g.getChildCells(c,!0),e=f[d?0:f.length-1];var l=g.getChildCells(e,!0),k=c.getIndex(e),e=g.cloneCell(e,!1);e.value=null;var m=this.getCellGeometry(e);if(null!=m){for(f=0;f<l.length;f++){b=g.cloneCell(l[f],!1);e.insert(b);b.value=null;var q=this.getCellGeometry(b);null!=q&&(q.height=m.height)}g.add(c,e,k+(d?0:1));var p=this.getCellGeometry(c);null!=p&&(p=p.clone(),p.height+=m.height,g.setGeometry(c,p))}}finally{g.endUpdate()}};Graph.prototype.deleteTableColumn=function(b){var d=
-this.getModel();d.beginUpdate();try{var g=b,c=b;this.isTableCell(b)&&(c=d.getParent(b));this.isTableRow(c)&&(g=d.getParent(c));var e=d.getChildCells(g,!0);if(0==e.length)d.remove(g);else{this.isTableRow(c)||(c=e[0]);var f=d.getChildCells(c,!0);if(1>=f.length)d.remove(g);else{var l=f.length-1;this.isTableCell(b)&&(l=mxUtils.indexOf(f,b));for(c=b=0;c<e.length;c++){var k=d.getChildCells(e[c],!0)[l];d.remove(k);var m=this.getCellGeometry(k);null!=m&&(b=Math.max(b,m.width))}var q=this.getCellGeometry(g);
-null!=q&&(q=q.clone(),q.width-=b,d.setGeometry(g,q))}}}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(b){var d=this.getModel();d.beginUpdate();try{var g=b,c=b;this.isTableCell(b)&&(b=c=d.getParent(b));this.isTableRow(b)&&(g=d.getParent(c));var e=d.getChildCells(g,!0);if(1>=e.length)d.remove(g);else{this.isTableRow(c)||(c=e[e.length-1]);d.remove(c);b=0;var f=this.getCellGeometry(c);null!=f&&(b=f.height);var l=this.getCellGeometry(g);null!=l&&(l=l.clone(),l.height-=b,d.setGeometry(g,
-l))}}finally{d.endUpdate()}};Graph.prototype.insertRow=function(b,d){for(var g=b.tBodies[0],c=g.rows[0].cells,e=0,f=0;f<c.length;f++)var l=c[f].getAttribute("colspan"),e=e+(null!=l?parseInt(l):1);g=g.insertRow(d);for(f=0;f<e;f++)mxUtils.br(g.insertCell(-1));return g.cells[0]};Graph.prototype.deleteRow=function(b,d){b.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(b,d){var g=b.tHead;if(null!=g)for(var c=0;c<g.rows.length;c++){var e=document.createElement("th");g.rows[c].appendChild(e);
-mxUtils.br(e)}g=b.tBodies[0];for(c=0;c<g.rows.length;c++)e=g.rows[c].insertCell(d),mxUtils.br(e);return g.rows[0].cells[0<=d?d:g.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(b,d){if(0<=d)for(var g=b.tBodies[0].rows,c=0;c<g.length;c++)g[c].cells.length>d&&g[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(b){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var g=document.createElement("div");g.innerHTML=
-b;b=document.createDocumentFragment();for(var c;c=g.firstChild;)lastNode=b.appendChild(c);d.insertNode(b)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(b)};Graph.prototype.createLinkForHint=function(b,d){function g(b,d){b.length>d&&(b=b.substring(0,Math.round(d/2))+"..."+b.substring(b.length-Math.round(d/4)));return b}b=null!=b?b:"javascript:void(0);";if(null==d||0==d.length)d=this.isCustomLink(b)?this.getLinkTitle(b):b;var c=document.createElement("a");c.setAttribute("rel",
-this.linkRelation);c.setAttribute("href",this.getAbsoluteUrl(b));c.setAttribute("title",g(this.isCustomLink(b)?this.getLinkTitle(b):b,80));null!=this.linkTarget&&c.setAttribute("target",this.linkTarget);mxUtils.write(c,g(d,40));this.isCustomLink(b)&&mxEvent.addListener(c,"click",mxUtils.bind(this,function(d){this.customLinkClicked(b);mxEvent.consume(d)}));return c};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};
-this.addListener(mxEvent.START_EDITING,function(b,d){this.popupMenuHandler.hideMenu()});var b=this.updateMouseEvent;this.updateMouseEvent=function(d){d=b.apply(this,arguments);if(mxEvent.isTouchEvent(d.getEvent())&&null==d.getState()){var g=this.getCellAt(d.graphX,d.graphY);null!=g&&this.isSwimlane(g)&&this.hitsSwimlaneContent(g,d.graphX,d.graphY)||(d.state=this.view.getState(g),null!=d.state&&null!=d.state.shape&&(this.container.style.cursor=d.state.shape.node.style.cursor))}null==d.getState()&&
-this.isEnabled()&&(this.container.style.cursor="default");return d};var d=!1,g=!1,c=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(b,f,l){b==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),d=this.isCellSelected(f.getCell()),g=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(b,e){var f=mxEvent.isMouseEvent(e.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==
-e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!f&&(g&&null==e.getCell()&&this.isSelectionEmpty()||d&&this.isCellSelected(e.getCell())));f=!d||f?null:mxUtils.bind(this,function(b){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var d=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(e.getX()+d.x+1,e.getY()+d.y+1,b,e.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[b,e,f])})};mxCellEditor.prototype.isContentEditing=
+function(b,d,f){var c=new mxCell;c.value="Text";c.geometry=new mxGeometry(0,0,0,0);c.vertex=!0;if(null!=f&&this.model.isEdge(f.cell)){c.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";c.geometry.relative=!0;c.connectable=!1;var e=this.view.getRelativePoint(f,b,d);c.geometry.x=Math.round(1E4*e.x)/1E4;c.geometry.y=Math.round(e.y);c.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(f,c.geometry),g=this.view.scale;c.geometry.offset=new mxPoint(Math.round((b-e.x)/
+g),Math.round((d-e.y)/g))}else e=this.view.translate,c.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",c.geometry.width=40,c.geometry.height=20,c.geometry.x=Math.round(b/this.view.scale)-e.x-(null!=f?f.origin.x:0),c.geometry.y=Math.round(d/this.view.scale)-e.y-(null!=f?f.origin.y:0),c.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([c],null!=f?f.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[c])),this.autoSizeCell(c)}finally{this.getModel().endUpdate()}return c};
+Graph.prototype.addClickHandler=function(b,d,f){var c=mxUtils.bind(this,function(){var b=this.container.getElementsByTagName("a");if(null!=b)for(var f=0;f<b.length;f++){var c=this.getAbsoluteUrl(b[f].getAttribute("href"));null!=c&&(b[f].setAttribute("rel",this.linkRelation),b[f].setAttribute("href",c),null!=d&&mxEvent.addGestureListeners(b[f],null,null,d))}});this.model.addListener(mxEvent.CHANGE,c);c();var e=this.container.style.cursor,g=this.getTolerance(),l=this,k={currentState:null,currentLink:null,
+currentTarget:null,highlight:null!=b&&""!=b&&b!=mxConstants.NONE?new mxCellHighlight(l,b,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(b){var d=b.sourceState;if(null==d||null==l.getLinkForCell(d.cell))b=l.getCellAt(b.getGraphX(),b.getGraphY(),null,null,null,function(b,d,f){return null==l.getLinkForCell(b.cell)}),d=null==d||l.model.isAncestor(b,d.cell)?l.view.getState(b):null;d!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=d,null!=this.currentState&&
+this.activate(this.currentState))},mouseDown:function(b,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=l.container.scrollLeft;this.scrollTop=l.container.scrollTop;null==this.currentLink&&"auto"==l.container.style.overflow&&(l.container.style.cursor="move");this.updateCurrentState(d)},mouseMove:function(b,d){if(l.isMouseDown){if(null!=this.currentLink){var f=Math.abs(this.startX-d.getGraphX()),c=Math.abs(this.startY-d.getGraphY());(f>g||c>g)&&this.clear()}}else{for(f=d.getSource();null!=
+f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null!=f?this.clear():(null!=l.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&l.tooltipHandler.reset(d,!0,this.currentState),(null==this.currentState||d.getState()!=this.currentState&&null!=d.sourceState||!l.intersects(this.currentState,d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d))}},mouseUp:function(b,c){for(var e=c.getSource(),k=c.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-
+l.container.scrollLeft)<g&&Math.abs(this.scrollTop-l.container.scrollTop)<g&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(e=l.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==d||d(k,this.currentLink),mxEvent.isConsumed(k)||(k=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(k)?"_blank":
+e?l.linkTarget:"_top",l.openLink(this.currentLink,k),c.consume())):null!=f&&!c.isConsumed()&&Math.abs(this.scrollLeft-l.container.scrollLeft)<g&&Math.abs(this.scrollTop-l.container.scrollTop)<g&&Math.abs(this.startX-c.getGraphX())<g&&Math.abs(this.startY-c.getGraphY())<g&&f(c.getEvent()));this.clear()},activate:function(b){this.currentLink=l.getAbsoluteUrl(l.getLinkForCell(b.cell));null!=this.currentLink&&(this.currentTarget=l.getLinkTargetForCell(b.cell),l.container.style.cursor="pointer",null!=
+this.highlight&&this.highlight.highlight(b))},clear:function(){null!=l.container&&(l.container.style.cursor=e);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=l.tooltipHandler&&l.tooltipHandler.hide()}};l.click=function(b){};l.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(b){k.clear()})};Graph.prototype.duplicateCells=function(b,d){b=null!=b?b:this.getSelectionCells();d=null!=d?d:!0;for(var f=0;f<b.length;f++)this.isTableCell(b[f])&&
+(b[f]=this.model.getParent(b[f]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,g=[];c.beginUpdate();try{for(var l={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,l,!0),f=0;f<b.length;f++){var q=c.getParent(b[f]);if(null!=q){var n=this.moveCells([m[f]],e,e,!1)[0];g.push(n);if(d)c.add(q,m[f]);else{var F=q.getIndex(b[f]);c.add(q,m[f],F+1)}if(this.isTable(q)){var u=this.getCellGeometry(m[f]),p=this.getCellGeometry(q);null!=u&&null!=p&&(p=p.clone(),p.height+=u.height,c.setGeometry(q,
+p))}}else g.push(m[f])}this.updateCustomLinks(this.createCellMapping(l,k),m,this)}finally{c.endUpdate()}return g};Graph.prototype.insertImage=function(b,d,f){if(null!=b&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),e=[],g=0;g<c.length;g++)e.push(c[g]);document.execCommand("insertimage",!1,b);b=this.cellEditor.textarea.getElementsByTagName("img");if(b.length==e.length+1)for(g=b.length-1;0<=g;g--)if(0==g||b[g]!=e[g-1]){b[g].setAttribute("width",d);b[g].setAttribute("height",
+f);break}}};Graph.prototype.insertLink=function(b){if(null!=this.cellEditor.textarea)if(0==b.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var d=this.cellEditor.textarea.getElementsByTagName("a"),f=[],c=0;c<d.length;c++)f.push(d[c]);document.execCommand("createlink",!1,mxUtils.trim(b));d=this.cellEditor.textarea.getElementsByTagName("a");if(d.length==f.length+1)for(c=d.length-1;0<=c;c--)if(d[c]!=f[c-1]){for(d=d[c].getElementsByTagName("a");0<d.length;){for(f=d[0].parentNode;null!=
+d[0].firstChild;)f.insertBefore(d[0].firstChild,d[0]);f.removeChild(d[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(b))};Graph.prototype.isCellResizable=function(b){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),f=this.getCurrentCellStyle(b);return!this.isTableCell(b)&&!this.isTableRow(b)&&(d||"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==f[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(b,d){null==d&&(d=this.getSelectionCells());
+if(null!=d&&1<d.length){for(var f=[],c=null,e=null,g=0;g<d.length;g++)if(this.getModel().isVertex(d[g])){var l=this.view.getState(d[g]);if(null!=l){var k=b?l.getCenterX():l.getCenterY(),c=null!=c?Math.max(c,k):k,e=null!=e?Math.min(e,k):k;f.push(l)}}if(2<f.length){f.sort(function(d,f){return b?d.x-f.x:d.y-f.y});l=this.view.translate;k=this.view.scale;e=e/k-(b?l.x:l.y);c=c/k-(b?l.x:l.y);this.getModel().beginUpdate();try{for(var m=(c-e)/(f.length-1),c=e,g=1;g<f.length-1;g++){var q=this.view.getState(this.model.getParent(f[g].cell)),
+n=this.getCellGeometry(f[g].cell),c=c+m;null!=n&&null!=q&&(n=n.clone(),b?n.x=Math.round(c-n.width/2)-q.origin.x:n.y=Math.round(c-n.height/2)-q.origin.y,this.getModel().setGeometry(f[g].cell,n))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,d){return this.getLinkForCell(b.cell)});
+return b};Graph.prototype.parseBackgroundImage=function(b){var d=null;null!=b&&0<b.length&&(b=JSON.parse(b),d=new mxImage(b.src,b.width,b.height));return d};Graph.prototype.getBackgroundImageObject=function(b){return b};Graph.prototype.getSvg=function(b,d,f,c,e,g,l,k,m,q,n,F,u,p){var v=null;if(null!=p)for(v=new mxDictionary,n=0;n<p.length;n++)v.put(p[n],!0);if(p=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;f=null!=f?f:0;e=null!=e?e:!0;
+g=null!=g?g:!0;l=null!=l?l:!0;var A="page"==u?this.view.getBackgroundPageBounds():g&&null==v||c||"diagram"==u?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),B=this.view.scale;"diagram"==u&&null!=this.backgroundImage&&A.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*B,(this.view.translate.y+this.backgroundImage.y)*B,this.backgroundImage.width*B,this.backgroundImage.height*B));if(null==A)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),
+I=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=b&&(null!=I.style?I.style.backgroundColor=b:I.setAttribute("style","background-color:"+b));null==x.createElementNS?(I.setAttribute("xmlns",mxConstants.NS_SVG),I.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):I.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/B;var t=Math.max(1,Math.ceil(A.width*b)+2*f)+(q?5:0),y=Math.max(1,Math.ceil(A.height*b)+2*f)+(q?5:0);I.setAttribute("version",
+"1.1");I.setAttribute("width",t+"px");I.setAttribute("height",y+"px");I.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+t+" "+y);x.appendChild(I);var D=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");I.appendChild(D);var W=this.createSvgCanvas(D);W.foOffset=e?-.5:0;W.textOffset=e?-.5:0;W.imageOffset=e?-.5:0;W.translate(Math.floor(f/d-A.x/B),Math.floor(f/d-A.y/B));var da=document.createElement("div"),C=W.getAlternateText;W.getAlternateText=function(b,d,f,c,e,
+g,l,k,m,q,n,F,z){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?g=g.innerText:(da.innerHTML=g,g=mxUtils.extractTextWithWhitespace(da.childNodes));for(var Ga=Math.ceil(2*c/this.state.fontSize),Qa=[],la=0,Ra=0;(0==Ga||la<Ga)&&Ra<g.length;){var Ua=g.charCodeAt(Ra);if(10==Ua||13==Ua){if(0<la)break}else Qa.push(g.charAt(Ra)),255>Ua&&la++;Ra++}Qa.length<g.length&&1<g.length-Qa.length&&(g=mxUtils.trim(Qa.join(""))+"...");return g}catch(gb){return C.apply(this,arguments)}else return C.apply(this,
+arguments)};var N=this.backgroundImage;if(null!=N){d=B/d;var O=this.view.translate,aa=new mxRectangle((N.x+O.x)*d,(N.y+O.y)*d,N.width*d,N.height*d);mxUtils.intersects(A,aa)&&W.image(N.x+O.x,N.y+O.y,N.width,N.height,N.src,!0)}W.scale(b);W.textEnabled=l;k=null!=k?k:this.createSvgImageExport();var E=k.drawCellState,qa=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=qa.apply(this,arguments);return null==f||b.view.graph.isCustomLink(f)?null:f};k.getLinkTargetForCellState=function(b,d){return b.view.graph.getLinkTargetForCell(b.cell)};
+k.drawCellState=function(b,d){for(var f=b.view.graph,c=null!=v?v.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(g&&null==v||c)&&null!=e;)c=null!=v?v.get(e):f.isCellSelected(e),e=f.model.getParent(e);(g&&null==v||c)&&E.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),W);this.updateSvgLinks(I,m,!0);this.addForeignObjectWarning(W,I);return I}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
+function(b,d){if("0"!=urlParams["svg-warning"]&&0<d.getElementsByTagName("foreignObject").length){var f=b.createElement("switch"),c=b.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=b.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||d.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,
+"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var g=b.createElement("text");g.setAttribute("text-anchor","middle");g.setAttribute("font-size","10px");g.setAttribute("x","50%");g.setAttribute("y","100%");mxUtils.write(g,Graph.foreignObjectWarningText);f.appendChild(c);e.appendChild(g);f.appendChild(e);d.appendChild(f)}};Graph.prototype.updateSvgLinks=function(b,d,f){b=b.getElementsByTagName("a");for(var c=0;c<b.length;c++)if(null==b[c].getAttribute("target")){var e=
+b[c].getAttribute("href");null==e&&(e=b[c].getAttribute("xlink:href"));null!=e&&(null!=d&&/^https?:\/\//.test(e)?b[c].setAttribute("target",d):f&&this.isCustomLink(e)&&b[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(b){b=new mxSvgCanvas2D(b);b.pointerEvents=!0;return b};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(b=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&
+(b=document.selection.createRange().parentElement());return b};Graph.prototype.getSelectedEditingElement=function(){for(var b=this.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;null!=b&&b==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=this.cellEditor.textarea.firstChild);return b};Graph.prototype.getParentByName=function(b,d,f){for(;null!=b&&b.nodeName!=
+d;){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.getParentByNames=function(b,d,f){for(;null!=b&&!(0<=mxUtils.indexOf(d,b.nodeName));){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.selectNode=function(b){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var f=document.createRange();f.selectNode(b);d.removeAllRanges();d.addRange(f)}}else(d=document.selection)&&"Control"!=d.type&&(b=d.createRange(),b.collapse(!0),f=d.createRange(),
+f.setEndPoint("StartToStart",b),f.select())};Graph.prototype.deleteCells=function(b,d){var f=null;if(null!=b&&0<b.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var e=this.model.getParent(b[c]);if(this.isTable(e)){var g=this.getCellGeometry(b[c]),l=this.getCellGeometry(e);null!=g&&null!=l&&(l=l.clone(),l.height-=g.height,this.model.setGeometry(e,l))}}var k=this.selectParentAfterDelete?this.model.getParents(b):null;this.removeCells(b,d)}finally{this.model.endUpdate()}if(null!=k)for(f=
+[],c=0;c<k.length;c++)this.model.contains(k[c])&&(this.model.isVertex(k[c])||this.model.isEdge(k[c]))&&f.push(k[c])}return f};Graph.prototype.insertTableColumn=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=0;if(this.isTableCell(b))var g=f.getParent(b),c=f.getParent(g),e=mxUtils.indexOf(f.getChildCells(g,!0),b);else this.isTableRow(b)?c=f.getParent(b):b=f.getChildCells(c,!0)[0],d||(e=f.getChildCells(b,!0).length-1);for(var l=f.getChildCells(c,!0),k=Graph.minTableColumnWidth,g=0;g<
+l.length;g++){var m=f.getChildCells(l[g],!0)[e],q=f.cloneCell(m,!1),n=this.getCellGeometry(q);q.value=null;if(null!=n){var k=n.width,F=this.getCellGeometry(l[g]);null!=F&&(n.height=F.height)}f.add(l[g],q,e+(d?0:1))}var u=this.getCellGeometry(c);null!=u&&(u=u.clone(),u.width+=k,f.setGeometry(c,u))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=b;if(this.isTableCell(b))e=f.getParent(b),c=f.getParent(e);else if(this.isTableRow(b))c=
+f.getParent(b);else var g=f.getChildCells(c,!0),e=g[d?0:g.length-1];var l=f.getChildCells(e,!0),k=c.getIndex(e),e=f.cloneCell(e,!1);e.value=null;var m=this.getCellGeometry(e);if(null!=m){for(g=0;g<l.length;g++){b=f.cloneCell(l[g],!1);e.insert(b);b.value=null;var q=this.getCellGeometry(b);null!=q&&(q.height=m.height)}f.add(c,e,k+(d?0:1));var n=this.getCellGeometry(c);null!=n&&(n=n.clone(),n.height+=m.height,f.setGeometry(c,n))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(b){var d=
+this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(c=d.getParent(b));this.isTableRow(c)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(0==e.length)d.remove(f);else{this.isTableRow(c)||(c=e[0]);var g=d.getChildCells(c,!0);if(1>=g.length)d.remove(f);else{var l=g.length-1;this.isTableCell(b)&&(l=mxUtils.indexOf(g,b));for(c=b=0;c<e.length;c++){var k=d.getChildCells(e[c],!0)[l];d.remove(k);var m=this.getCellGeometry(k);null!=m&&(b=Math.max(b,m.width))}var q=this.getCellGeometry(f);
+null!=q&&(q=q.clone(),q.width-=b,d.setGeometry(f,q))}}}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(b=c=d.getParent(b));this.isTableRow(b)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(1>=e.length)d.remove(f);else{this.isTableRow(c)||(c=e[e.length-1]);d.remove(c);b=0;var g=this.getCellGeometry(c);null!=g&&(b=g.height);var l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.height-=b,d.setGeometry(f,
+l))}}finally{d.endUpdate()}};Graph.prototype.insertRow=function(b,d){for(var f=b.tBodies[0],c=f.rows[0].cells,e=0,g=0;g<c.length;g++)var l=c[g].getAttribute("colspan"),e=e+(null!=l?parseInt(l):1);f=f.insertRow(d);for(g=0;g<e;g++)mxUtils.br(f.insertCell(-1));return f.cells[0]};Graph.prototype.deleteRow=function(b,d){b.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(b,d){var f=b.tHead;if(null!=f)for(var c=0;c<f.rows.length;c++){var e=document.createElement("th");f.rows[c].appendChild(e);
+mxUtils.br(e)}f=b.tBodies[0];for(c=0;c<f.rows.length;c++)e=f.rows[c].insertCell(d),mxUtils.br(e);return f.rows[0].cells[0<=d?d:f.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(b,d){if(0<=d)for(var f=b.tBodies[0].rows,c=0;c<f.length;c++)f[c].cells.length>d&&f[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(b){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var f=document.createElement("div");f.innerHTML=
+b;b=document.createDocumentFragment();for(var c;c=f.firstChild;)lastNode=b.appendChild(c);d.insertNode(b)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(b)};Graph.prototype.createLinkForHint=function(b,d){function f(b,d){b.length>d&&(b=b.substring(0,Math.round(d/2))+"..."+b.substring(b.length-Math.round(d/4)));return b}b=null!=b?b:"javascript:void(0);";if(null==d||0==d.length)d=this.isCustomLink(b)?this.getLinkTitle(b):b;var c=document.createElement("a");c.setAttribute("rel",
+this.linkRelation);c.setAttribute("href",this.getAbsoluteUrl(b));c.setAttribute("title",f(this.isCustomLink(b)?this.getLinkTitle(b):b,80));null!=this.linkTarget&&c.setAttribute("target",this.linkTarget);mxUtils.write(c,f(d,40));this.isCustomLink(b)&&mxEvent.addListener(c,"click",mxUtils.bind(this,function(d){this.customLinkClicked(b);mxEvent.consume(d)}));return c};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};
+this.addListener(mxEvent.START_EDITING,function(b,d){this.popupMenuHandler.hideMenu()});var b=this.updateMouseEvent;this.updateMouseEvent=function(d){d=b.apply(this,arguments);if(mxEvent.isTouchEvent(d.getEvent())&&null==d.getState()){var f=this.getCellAt(d.graphX,d.graphY);null!=f&&this.isSwimlane(f)&&this.hitsSwimlaneContent(f,d.graphX,d.graphY)||(d.state=this.view.getState(f),null!=d.state&&null!=d.state.shape&&(this.container.style.cursor=d.state.shape.node.style.cursor))}null==d.getState()&&
+this.isEnabled()&&(this.container.style.cursor="default");return d};var d=!1,f=!1,c=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(b,g,l){b==mxEvent.MOUSE_DOWN&&(g=this.updateMouseEvent(g),d=this.isCellSelected(g.getCell()),f=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(b,e){var g=mxEvent.isMouseEvent(e.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==
+e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!g&&(f&&null==e.getCell()&&this.isSelectionEmpty()||d&&this.isCellSelected(e.getCell())));g=!d||g?null:mxUtils.bind(this,function(b){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var d=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(e.getX()+d.x+1,e.getY()+d.y+1,b,e.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[b,e,g])})};mxCellEditor.prototype.isContentEditing=
function(){var b=this.graph.view.getState(this.editingCell);return null!=b&&1==b.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var b="";window.getSelection?b=window.getSelection():document.getSelection?b=document.getSelection():document.selection&&(b=document.selection.createRange().text);return""!=b};mxCellEditor.prototype.insertTab=function(b){var d=
-this.textarea.ownerDocument.defaultView.getSelection(),g=d.getRangeAt(0),c="\t";if(null!=b)for(c="";0<b;)c+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(c));g.insertNode(b);g.setStartAfter(b);g.setEndAfter(b);d.removeAllRanges();d.addRange(g)};mxCellEditor.prototype.alignText=function(b,d){var g=null!=d&&mxEvent.isShiftDown(d);if(g||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=!0;this.graph.processElements(this.textarea,
-function(b){g||window.getSelection().containsNode(b,!0)?(b.removeAttribute("align"),b.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(b)}document.execCommand("justify"+b.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var b=window.getSelection();if(b.getRangeAt&&b.rangeCount){for(var d=[],g=0,c=b.rangeCount;g<c;++g)d.push(b.getRangeAt(g));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
-return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,g=b.length;d<g;++d)sel.addRange(b[d])}else document.selection&&b.select&&b.select()}catch(ta){}};var u=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(b){null!=b.text&&(b.text.replaceLinefeeds="0"!=mxUtils.getValue(b.style,"nl2Br","1"));u.apply(this,arguments)};var B=mxConstraintHandler.prototype.update;
-mxConstraintHandler.prototype.update=function(b,d){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?B.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var x=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(b,d){b=this.graph.getStartEditingCell(b,d);x.apply(this,arguments);var g=this.graph.view.getState(b);
-this.textarea.className=null!=g&&1==g.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var g=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);if(this.graph.getModel().isEdge(g)&&null!=c&&c.relative||this.graph.getModel().isEdge(b))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var E=mxCellEditor.prototype.installListeners;
-mxCellEditor.prototype.installListeners=function(b){function d(b,g){g.originalNode=b;b=b.firstChild;for(var c=g.firstChild;null!=b&&null!=c;)d(b,c),b=b.nextSibling,c=c.nextSibling;return g}function g(b,d){if(null!=b)if(d.originalNode!=b)c(b);else for(b=b.firstChild,d=d.firstChild;null!=b;){var e=b.nextSibling;null==d?c(b):(g(b,d),d=d.nextSibling);b=e}}function c(b){for(var d=b.firstChild;null!=d;){var g=d.nextSibling;c(d);d=g}1==b.nodeType&&("BR"===b.nodeName||null!=b.firstChild)||3==b.nodeType&&
-0!=mxUtils.trim(mxUtils.getTextContent(b)).length?(3==b.nodeType&&mxUtils.setTextContent(b,mxUtils.getTextContent(b).replace(/\n|\r/g,"")),1==b.nodeType&&(b.removeAttribute("style"),b.removeAttribute("class"),b.removeAttribute("width"),b.removeAttribute("cellpadding"),b.removeAttribute("cellspacing"),b.removeAttribute("border"))):b.parentNode.removeChild(b)}E.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(b){var c=
-d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?g(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var b=this.graph.view.getState(this.editingCell);if(null!=b){var d=null!=b&&"0"!=mxUtils.getValue(b.style,"nl2Br","1"),g=this.saveSelection();if(this.codeViewMode){m=
-mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<m.length&&"\n"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1));m=this.graph.sanitizeHtml(d?m.replace(/\n/g,"<br/>"):m,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(b.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(b.style,
+this.textarea.ownerDocument.defaultView.getSelection(),f=d.getRangeAt(0),c="\t";if(null!=b)for(c="";0<b;)c+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(c));f.insertNode(b);f.setStartAfter(b);f.setEndAfter(b);d.removeAllRanges();d.addRange(f)};mxCellEditor.prototype.alignText=function(b,d){var f=null!=d&&mxEvent.isShiftDown(d);if(f||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=!0;this.graph.processElements(this.textarea,
+function(b){f||window.getSelection().containsNode(b,!0)?(b.removeAttribute("align"),b.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(b)}document.execCommand("justify"+b.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var b=window.getSelection();if(b.getRangeAt&&b.rangeCount){for(var d=[],f=0,c=b.rangeCount;f<c;++f)d.push(b.getRangeAt(f));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
+return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,f=b.length;d<f;++d)sel.addRange(b[d])}else document.selection&&b.select&&b.select()}catch(ua){}};var u=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(b){null!=b.text&&(b.text.replaceLinefeeds="0"!=mxUtils.getValue(b.style,"nl2Br","1"));u.apply(this,arguments)};var y=mxConstraintHandler.prototype.update;
+mxConstraintHandler.prototype.update=function(b,d){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?y.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var x=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(b,d){b=this.graph.getStartEditingCell(b,d);x.apply(this,arguments);var f=this.graph.view.getState(b);
+this.textarea.className=null!=f&&1==f.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var f=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);if(this.graph.getModel().isEdge(f)&&null!=c&&c.relative||this.graph.getModel().isEdge(b))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var H=mxCellEditor.prototype.installListeners;
+mxCellEditor.prototype.installListeners=function(b){function d(b,f){f.originalNode=b;b=b.firstChild;for(var c=f.firstChild;null!=b&&null!=c;)d(b,c),b=b.nextSibling,c=c.nextSibling;return f}function f(b,d){if(null!=b)if(d.originalNode!=b)c(b);else for(b=b.firstChild,d=d.firstChild;null!=b;){var e=b.nextSibling;null==d?c(b):(f(b,d),d=d.nextSibling);b=e}}function c(b){for(var d=b.firstChild;null!=d;){var f=d.nextSibling;c(d);d=f}1==b.nodeType&&("BR"===b.nodeName||null!=b.firstChild)||3==b.nodeType&&
+0!=mxUtils.trim(mxUtils.getTextContent(b)).length?(3==b.nodeType&&mxUtils.setTextContent(b,mxUtils.getTextContent(b).replace(/\n|\r/g,"")),1==b.nodeType&&(b.removeAttribute("style"),b.removeAttribute("class"),b.removeAttribute("width"),b.removeAttribute("cellpadding"),b.removeAttribute("cellspacing"),b.removeAttribute("border"))):b.parentNode.removeChild(b)}H.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(b){var c=
+d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?f(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var b=this.graph.view.getState(this.editingCell);if(null!=b){var d=null!=b&&"0"!=mxUtils.getValue(b.style,"nl2Br","1"),f=this.saveSelection();if(this.codeViewMode){m=
+mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<m.length&&"\n"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1));m=this.graph.sanitizeHtml(d?m.replace(/\n/g,"<br/>"):m,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(b.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),g=(mxUtils.getValue(b.style,
mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,l=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,k=[];(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&k.push("underline");(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&k.push("line-through");this.textarea.style.lineHeight=
-mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=k.join(" ");this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=l?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=
+mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=k.join(" ");this.textarea.style.fontWeight=g?"bold":"normal";this.textarea.style.fontStyle=l?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=
this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var m=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(m=mxUtils.replaceTrailingNewlines(m,"<div><br></div>"));m=this.graph.sanitizeHtml(d?m.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):m,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";
var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=
-m&&(this.textarea.innerHTML=m);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=g;this.resize()}};var A=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(b,d){if(null!=this.textarea)if(b=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=b){var g=b.view.scale;this.bounds=mxRectangle.fromRectangle(b);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=
-160*g;this.bounds.height=60*g;var c=null!=b.text?b.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/g)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/g)+"px";this.textarea.style.overflow=
-"auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/g)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*g);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/g)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*g);this.textarea.style.left=Math.round(this.bounds.x)+
-"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+g+","+g+")")}else this.textarea.style.height="",this.textarea.style.overflow="",A.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(b,d){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var g=this.graph.getEditingValue(b.cell,d);"1"==
-mxUtils.getValue(b.style,"nl2Br","1")&&(g=g.replace(/\n/g,"<br/>"));return g=this.graph.sanitizeHtml(g,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(b){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return d="1"==mxUtils.getValue(b.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,
-"").replace(/\n/g,"")};var F=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(b){this.codeViewMode&&this.toggleViewMode();F.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(da){}};var I=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(b,d){this.graph.getModel().beginUpdate();try{I.apply(this,arguments),""==d&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)&&
+m&&(this.textarea.innerHTML=m);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=f;this.resize()}};var D=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(b,d){if(null!=this.textarea)if(b=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=b){var f=b.view.scale;this.bounds=mxRectangle.fromRectangle(b);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=
+160*f;this.bounds.height=60*f;var c=null!=b.text?b.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/f)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/f)+"px";this.textarea.style.overflow=
+"auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/f)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*f);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/f)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*f);this.textarea.style.left=Math.round(this.bounds.x)+
+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+f+","+f+")")}else this.textarea.style.height="",this.textarea.style.overflow="",D.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(b,d){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var f=this.graph.getEditingValue(b.cell,d);"1"==
+mxUtils.getValue(b.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));return f=this.graph.sanitizeHtml(f,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(b){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return d="1"==mxUtils.getValue(b.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,
+"").replace(/\n/g,"")};var E=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(b){this.codeViewMode&&this.toggleViewMode();E.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(da){}};var J=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(b,d){this.graph.getModel().beginUpdate();try{J.apply(this,arguments),""==d&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)&&
this.graph.isTransparentState(b)&&this.graph.removeCells([b.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(b){var d=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=d&&d!=mxConstants.NONE||!(null!=b.cell.geometry&&0<b.cell.geometry.width)||0==mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)||(d=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,
null));d==mxConstants.NONE&&(d=null);return d};mxCellEditor.prototype.getMinimumSize=function(b){var d=this.graph.getView().scale;return new mxRectangle(0,0,null==b.text?30:b.text.size*d+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(b,d){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(d.getEvent)};mxGraphView.prototype.formatUnitText=function(b){return b?c(b,this.unit):b};mxGraphHandler.prototype.updateHint=
-function(d){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var g=this.graph.view.translate,e=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/e-g.x);g=this.roundLength((this.bounds.y+this.currentDy)/e-g.y);e=this.graph.view.unit;this.hint.innerHTML=c(d,e)+", "+c(g,e);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";
-this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var L=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(b,d){L.apply(this,arguments);var g=this.graph.getCellStyle(b);if(null==g.childLayout){var c=this.graph.model.getParent(b),e=null!=c?this.graph.getCellGeometry(c):null;if(null!=e&&(g=this.graph.getCellStyle(c),
-"stackLayout"==g.childLayout)){var f=parseFloat(mxUtils.getValue(g,"stackBorder",mxStackLayout.prototype.border)),g="1"==mxUtils.getValue(g,"horizontalStack","1"),l=this.graph.getActualStartSize(c),e=e.clone();g?e.height=d.height+l.y+l.height+2*f:e.width=d.width+l.x+l.width+2*f;this.graph.model.setGeometry(c,e)}}};var H=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function b(b){g.get(b)||(g.put(b,!0),e.push(b))}for(var d=
-H.apply(this,arguments),g=new mxDictionary,c=this.graph.model,e=[],f=0;f<d.length;f++){var l=d[f];this.graph.isTableCell(l)?b(c.getParent(c.getParent(l))):this.graph.isTableRow(l)&&b(c.getParent(l));b(l)}return e};var K=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(b){var d=K.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};var C=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
+function(d){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var f=this.graph.view.translate,e=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/e-f.x);f=this.roundLength((this.bounds.y+this.currentDy)/e-f.y);e=this.graph.view.unit;this.hint.innerHTML=c(d,e)+", "+c(f,e);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";
+this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var L=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(b,d){L.apply(this,arguments);var f=this.graph.getCellStyle(b);if(null==f.childLayout){var c=this.graph.model.getParent(b),e=null!=c?this.graph.getCellGeometry(c):null;if(null!=e&&(f=this.graph.getCellStyle(c),
+"stackLayout"==f.childLayout)){var g=parseFloat(mxUtils.getValue(f,"stackBorder",mxStackLayout.prototype.border)),f="1"==mxUtils.getValue(f,"horizontalStack","1"),l=this.graph.getActualStartSize(c),e=e.clone();f?e.height=d.height+l.y+l.height+2*g:e.width=d.width+l.x+l.width+2*g;this.graph.model.setGeometry(c,e)}}};var G=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function b(b){f.get(b)||(f.put(b,!0),e.push(b))}for(var d=
+G.apply(this,arguments),f=new mxDictionary,c=this.graph.model,e=[],g=0;g<d.length;g++){var l=d[g];this.graph.isTableCell(l)?b(c.getParent(c.getParent(l))):this.graph.isTableRow(l)&&b(c.getParent(l));b(l)}return e};var K=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(b){var d=K.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};var C=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
function(b){var d=C.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var b=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+b.x/2,this.bounds.y+this.rotationHandleVSpacing-b.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(b,d){return this.graph.isRecursiveVertexResize(b)&&!mxEvent.isControlDown(d.getEvent())};
-mxVertexHandler.prototype.isCenteredEvent=function(b,d){return!(!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&!this.graph.isCellCollapsed(b.cell)&&"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null))&&mxEvent.isControlDown(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};var N=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return N.apply(this,arguments)&&
-!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var S=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return S.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&
-!this.graph.isTableRow(this.state.cell)};var R=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(b){return b.tableHandle||R.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var b=0;this.graph.isTableRow(this.state.cell)?b=1:this.graph.isTableCell(this.state.cell)&&(b=2);return b};var M=mxVertexHandler.prototype.getSelectionBorderBounds;
-mxVertexHandler.prototype.getSelectionBorderBounds=function(){return M.apply(this,arguments).grow(-this.getSelectionBorderInset())};var P=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=P.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=this.graph,g=d.model,c=this.state,e=this.selectionBorder,f=this;null==b&&(b=[]);var l=d.view.getCellStates(g.getChildCells(this.state.cell,!0));if(0<l.length){for(var k=d.view.getCellStates(g.getChildCells(l[0].cell,
-!0)),g=0;g<k.length;g++)mxUtils.bind(this,function(g){var l=k[g],m=g<k.length-1?k[g+1]:null,q=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);q.isDashed=e.isDashed;q.svgStrokeTolerance++;q=new mxHandle(l,"col-resize",null,q);q.tableHandle=!0;var p=0;q.shape.node.parentNode.insertBefore(q.shape.node,q.shape.node.parentNode.firstChild);q.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==p?mxConstants.NONE:e.stroke;this.shape.bounds.x=
-this.state.x+this.state.width+p*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(g==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(g==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var G=!1;q.setPosition=function(b,g,c){p=Math.max(Graph.minTableColumnWidth-b.width,g.x-b.x-b.width);G=mxEvent.isShiftDown(c.getEvent());null==m||G||(p=Math.min((m.x+m.width-l.x-l.width)/d.view.scale-Graph.minTableColumnWidth,p))};q.execute=function(b){if(0!=
-p)d.setTableColumnWidth(this.state.cell,p,G);else if(!f.blockDelayedSelection){var g=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(g,b)}p=0};q.reset=function(){p=0};b.push(q)})(g);for(g=0;g<l.length;g++)mxUtils.bind(this,function(g){g=l[g];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=e.isDashed;k.svgStrokeTolerance++;g=new mxHandle(g,"row-resize",null,k);g.tableHandle=!0;var m=0;g.shape.node.parentNode.insertBefore(g.shape.node,g.shape.node.parentNode.firstChild);
-g.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:e.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};g.setPosition=function(b,d,g){m=Math.max(Graph.minTableRowHeight-b.height,d.y-b.y-b.height)};g.execute=function(b){if(0!=m)d.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(b.getEvent()));
-else if(!f.blockDelayedSelection){var g=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(g,b)}m=0};g.reset=function(){m=0};b.push(g)})(g)}}return null!=b?b.reverse():null};var G=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){G.apply(this,arguments);if(null!=this.moveHandles)for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].style.visibility=b?"":"hidden";if(null!=this.cornerHandles)for(d=0;d<this.cornerHandles.length;d++)this.cornerHandles[d].node.style.visibility=
-b?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var b=this.graph.model;if(null!=this.moveHandles){for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].parentNode.removeChild(this.moveHandles[d]);this.moveHandles=null}this.moveHandles=[];for(d=0;d<b.getChildCount(this.state.cell);d++)mxUtils.bind(this,function(d){if(null!=d&&b.isVertex(d.cell)){var g=mxUtils.createImage(Editor.rowMoveImage);g.style.position="absolute";g.style.cursor="pointer";g.style.width="7px";g.style.height=
-"4px";g.style.padding="4px 2px 4px 2px";g.rowState=d;mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(b)&&this.graph.isCellSelected(d.cell)||this.graph.selectCellForEvent(d.cell,b);mxEvent.isPopupTrigger(b)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=
-mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0);mxEvent.consume(b)}),null,mxUtils.bind(this,function(b){mxEvent.isPopupTrigger(b)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(b),mxEvent.getClientY(b),d.cell,b),mxEvent.consume(b))}));this.moveHandles.push(g);this.graph.container.appendChild(g)}})(this.graph.view.getState(b.getChildAt(this.state.cell,d)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var b=0;b<this.customHandles.length;b++)this.customHandles[b].destroy();
-this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var D=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),d=this.tolerance,g=this.state.style.shape;null==mxCellRenderer.defaultShapes[g]&&mxStencilRegistry.getStencil(g);g=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!g&&null!=this.customHandles)for(var c=0;c<this.customHandles.length;c++)if(null!=
-this.customHandles[c].shape&&null!=this.customHandles[c].shape.bounds){var e=this.customHandles[c].shape.bounds,f=e.getCenterX(),l=e.getCenterY();if(Math.abs(this.state.x-f)<e.width/2||Math.abs(this.state.y-l)<e.height/2||Math.abs(this.state.x+this.state.width-f)<e.width/2||Math.abs(this.state.y+this.state.height-l)<e.height/2){g=!0;break}}g&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,this.graph.isTable(this.state.cell)&&(d+=7),b.x=this.sizers[0].bounds.width+d,b.y=this.sizers[0].bounds.height+
-d):b=D.apply(this,arguments);return b};mxVertexHandler.prototype.updateHint=function(d){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{d=this.state.view.scale;var g=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/d),g)+" x "+c(this.roundLength(this.bounds.height/d),g)}d=mxUtils.getBoundingBox(this.bounds,
-null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==d&&(d=this.bounds);this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=d.y+d.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var y=mxEdgeHandler.prototype.mouseMove;
-mxEdgeHandler.prototype.mouseMove=function(b,d){y.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var W=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(b,d){W.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,g){null==this.hint&&
-(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,f=this.graph.view.scale,l=this.roundLength(g.x/f-e.x),e=this.roundLength(g.y/f-e.y),f=this.graph.view.unit;this.hint.innerHTML=c(l,f)+", "+c(e,f);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(l=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*l.x)+
-"%, "+Math.round(100*l.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),g.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
+mxVertexHandler.prototype.isCenteredEvent=function(b,d){return!(!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&!this.graph.isCellCollapsed(b.cell)&&"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null))&&mxEvent.isControlDown(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};var M=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return M.apply(this,arguments)&&
+!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var P=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return P.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&
+!this.graph.isTableRow(this.state.cell)};var S=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(b){return b.tableHandle||S.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var b=0;this.graph.isTableRow(this.state.cell)?b=1:this.graph.isTableCell(this.state.cell)&&(b=2);return b};var N=mxVertexHandler.prototype.getSelectionBorderBounds;
+mxVertexHandler.prototype.getSelectionBorderBounds=function(){return N.apply(this,arguments).grow(-this.getSelectionBorderInset())};var R=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=R.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=this.graph,f=d.model,c=this.state,e=this.selectionBorder,g=this;null==b&&(b=[]);var l=d.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<l.length){for(var k=d.view.getCellStates(f.getChildCells(l[0].cell,
+!0)),f=0;f<k.length;f++)mxUtils.bind(this,function(f){var l=k[f],m=f<k.length-1?k[f+1]:null,q=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);q.isDashed=e.isDashed;q.svgStrokeTolerance++;q=new mxHandle(l,"col-resize",null,q);q.tableHandle=!0;var n=0;q.shape.node.parentNode.insertBefore(q.shape.node,q.shape.node.parentNode.firstChild);q.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==n?mxConstants.NONE:e.stroke;this.shape.bounds.x=
+this.state.x+this.state.width+n*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(f==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(f==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var F=!1;q.setPosition=function(b,f,c){n=Math.max(Graph.minTableColumnWidth-b.width,f.x-b.x-b.width);F=mxEvent.isShiftDown(c.getEvent());null==m||F||(n=Math.min((m.x+m.width-l.x-l.width)/d.view.scale-Graph.minTableColumnWidth,n))};q.execute=function(b){if(0!=
+n)d.setTableColumnWidth(this.state.cell,n,F);else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}n=0};q.reset=function(){n=0};b.push(q)})(f);for(f=0;f<l.length;f++)mxUtils.bind(this,function(f){f=l[f];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=e.isDashed;k.svgStrokeTolerance++;f=new mxHandle(f,"row-resize",null,k);f.tableHandle=!0;var m=0;f.shape.node.parentNode.insertBefore(f.shape.node,f.shape.node.parentNode.firstChild);
+f.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:e.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};f.setPosition=function(b,d,f){m=Math.max(Graph.minTableRowHeight-b.height,d.y-b.y-b.height)};f.execute=function(b){if(0!=m)d.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(b.getEvent()));
+else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}m=0};f.reset=function(){m=0};b.push(f)})(f)}}return null!=b?b.reverse():null};var F=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){F.apply(this,arguments);if(null!=this.moveHandles)for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].style.visibility=b?"":"hidden";if(null!=this.cornerHandles)for(d=0;d<this.cornerHandles.length;d++)this.cornerHandles[d].node.style.visibility=
+b?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var b=this.graph.model;if(null!=this.moveHandles){for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].parentNode.removeChild(this.moveHandles[d]);this.moveHandles=null}this.moveHandles=[];for(d=0;d<b.getChildCount(this.state.cell);d++)mxUtils.bind(this,function(d){if(null!=d&&b.isVertex(d.cell)){var f=mxUtils.createImage(Editor.rowMoveImage);f.style.position="absolute";f.style.cursor="pointer";f.style.width="7px";f.style.height=
+"4px";f.style.padding="4px 2px 4px 2px";f.rowState=d;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(b){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(b)&&this.graph.isCellSelected(d.cell)||this.graph.selectCellForEvent(d.cell,b);mxEvent.isPopupTrigger(b)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=
+mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0);mxEvent.consume(b)}),null,mxUtils.bind(this,function(b){mxEvent.isPopupTrigger(b)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(b),mxEvent.getClientY(b),d.cell,b),mxEvent.consume(b))}));this.moveHandles.push(f);this.graph.container.appendChild(f)}})(this.graph.view.getState(b.getChildAt(this.state.cell,d)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var b=0;b<this.customHandles.length;b++)this.customHandles[b].destroy();
+this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var B=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),d=this.tolerance,f=this.state.style.shape;null==mxCellRenderer.defaultShapes[f]&&mxStencilRegistry.getStencil(f);f=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!f&&null!=this.customHandles)for(var c=0;c<this.customHandles.length;c++)if(null!=
+this.customHandles[c].shape&&null!=this.customHandles[c].shape.bounds){var e=this.customHandles[c].shape.bounds,g=e.getCenterX(),l=e.getCenterY();if(Math.abs(this.state.x-g)<e.width/2||Math.abs(this.state.y-l)<e.height/2||Math.abs(this.state.x+this.state.width-g)<e.width/2||Math.abs(this.state.y+this.state.height-l)<e.height/2){f=!0;break}}f&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,this.graph.isTable(this.state.cell)&&(d+=7),b.x=this.sizers[0].bounds.width+d,b.y=this.sizers[0].bounds.height+
+d):b=B.apply(this,arguments);return b};mxVertexHandler.prototype.updateHint=function(d){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{d=this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/d),f)+" x "+c(this.roundLength(this.bounds.height/d),f)}d=mxUtils.getBoundingBox(this.bounds,
+null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==d&&(d=this.bounds);this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=d.y+d.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var A=mxEdgeHandler.prototype.mouseMove;
+mxEdgeHandler.prototype.mouseMove=function(b,d){A.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var W=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(b,d){W.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,f){null==this.hint&&
+(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,g=this.graph.view.scale,l=this.roundLength(f.x/g-e.x),e=this.roundLength(f.y/g-e.y),g=this.graph.view.unit;this.hint.innerHTML=c(l,g)+", "+c(e,g);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(l=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*l.x)+
+"%, "+Math.round(100*l.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),f.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22" stroke-width="1"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>'):
new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+
'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,
@@ -2631,383 +2634,383 @@ HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.pro
HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=
!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(b){return!mxEvent.isShiftDown(b.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(b){return!mxEvent.isShiftDown(b.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||
0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(b){return mxEvent.isMouseEvent(b.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(d)||
-mxEvent.isPopupTrigger(d)&&(null==b.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var J=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(b,d){J.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return mxEvent.isLeftMouseButton(d)&&(this.useLeftButtonForPanning&&null==
+mxEvent.isPopupTrigger(d)&&(null==b.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var I=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(b,d){I.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return mxEvent.isLeftMouseButton(d)&&(this.useLeftButtonForPanning&&null==
b.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(b){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(b.getEvent())&&mxEvent.isShiftDown(b.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(b,d){if(this.cancelled)this.cancelled=
-!1,d.consume();else{var g=null!=this.div&&"none"!=this.div.style.display,c=null,e=null,f=null,l=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,e=this.first.y,f=(this.currentX-c)/this.graph.view.scale,l=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(f=this.graph.snap(f),l=this.graph.snap(l),this.graph.isGridEnabled()||(Math.abs(f)<this.graph.tolerance&&(f=0),Math.abs(l)<this.graph.tolerance&&(l=0))));this.reset();if(g){if(mxEvent.isAltDown(d.getEvent())&&
-this.graph.isToggleEvent(d.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),g=0;g<k.length;g++)if(this.graph.isCellMovable(k[g])){var m=this.graph.view.getState(k[g]),q=this.graph.getCellGeometry(k[g]);null!=m&&null!=q&&(q=q.clone(),q.translate(f,l),this.graph.model.setGeometry(k[g],
-q))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(b,d){if(!d.isConsumed()&&null!=this.first){var g=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);g.x-=c.x;g.y-=c.y;var c=d.getX()+g.x,g=d.getY()+g.y,e=this.first.x-c,f=this.first.y-g,l=this.graph.tolerance;if(null!=this.div||Math.abs(e)>l||Math.abs(f)>l)null==
-this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,g),this.isSpaceEvent(d)?(c=this.x+this.width,g=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=g-this.height)),
+!1,d.consume();else{var f=null!=this.div&&"none"!=this.div.style.display,c=null,e=null,g=null,l=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,e=this.first.y,g=(this.currentX-c)/this.graph.view.scale,l=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(g=this.graph.snap(g),l=this.graph.snap(l),this.graph.isGridEnabled()||(Math.abs(g)<this.graph.tolerance&&(g=0),Math.abs(l)<this.graph.tolerance&&(l=0))));this.reset();if(f){if(mxEvent.isAltDown(d.getEvent())&&
+this.graph.isToggleEvent(d.getEvent())){var g=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(g.x,g.y,g.width,g.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),f=0;f<k.length;f++)if(this.graph.isCellMovable(k[f])){var m=this.graph.view.getState(k[f]),q=this.graph.getCellGeometry(k[f]);null!=m&&null!=q&&(q=q.clone(),q.translate(g,l),this.graph.model.setGeometry(k[f],
+q))}}finally{this.graph.model.endUpdate()}}else g=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(g,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(b,d){if(!d.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);f.x-=c.x;f.y-=c.y;var c=d.getX()+f.x,f=d.getY()+f.y,e=this.first.x-c,g=this.first.y-f,l=this.graph.tolerance;if(null!=this.div||Math.abs(e)>l||Math.abs(g)>l)null==
+this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,f),this.isSpaceEvent(d)?(c=this.x+this.width,f=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=f-this.height)),
this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+
"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),d.consume()}};var O=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=
-this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);O.apply(this,arguments)};var aa=(new Date).getTime(),ma=0,ga=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,d,g,c){ga.apply(this,arguments);g!=this.currentTerminalState?(aa=(new Date).getTime(),ma=0):ma=(new Date).getTime()-aa;this.currentTerminalState=g};var ha=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return null!=
-this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<ma||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ha.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(b,d){var g=null!=b&&0==b,c=this.state.getVisibleTerminalState(g),e=null!=b&&(0==b||b>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,c,g):null,g=null!=(null!=
-e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(g),e):null)?this.fixedHandleImage:null!=e&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=g)return g=new mxImageShape(new mxRectangle(0,0,g.width,g.height),g.src),g.preserveImageAspect=!1,g;g=mxConstants.HANDLE_SIZE;this.preferHtml&&--g;return new mxRectangleShape(new mxRectangle(0,0,g,g),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var na=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=
-function(b,d,g){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return na.apply(this,arguments)};var X=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var d=this.graph.getModel(),g=d.getParent(b[0]),c=this.graph.getCellGeometry(b[0]);if(d.isEdge(g)&&null!=c&&c.relative&&(d=this.graph.view.getState(b[0]),null!=d&&2>d.width&&2>d.height&&
-null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return X.apply(this,arguments)};var ca=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var b=ca.apply(this,arguments),d=[],g=0;g<b.length;g++)"1"!=mxUtils.getValue(b[g].style,"part","0")&&d.push(b[g]);return d};var oa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var d=this.graph.getModel(),g=d.getParent(b.cell),
-c=this.graph.getCellGeometry(b.cell);return d.isEdge(g)&&null!=c&&c.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(d=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):oa.apply(this,arguments)};var V=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,d){var g=this.graph.getModel(),c=g.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!g.isEdge(c)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&V.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var b=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&b==mxConstants.NONE&&d==mxConstants.NONE?(b=mxUtils.mod(mxUtils.getValue(this.state.style,
+this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);O.apply(this,arguments)};var aa=(new Date).getTime(),na=0,ga=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,d,f,c){ga.apply(this,arguments);f!=this.currentTerminalState?(aa=(new Date).getTime(),na=0):na=(new Date).getTime()-aa;this.currentTerminalState=f};var ha=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return null!=
+this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<na||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ha.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(b,d){var f=null!=b&&0==b,c=this.state.getVisibleTerminalState(f),e=null!=b&&(0==b||b>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,c,f):null,f=null!=(null!=
+e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(f),e):null)?this.fixedHandleImage:null!=e&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=f)return f=new mxImageShape(new mxRectangle(0,0,f.width,f.height),f.src),f.preserveImageAspect=!1,f;f=mxConstants.HANDLE_SIZE;this.preferHtml&&--f;return new mxRectangleShape(new mxRectangle(0,0,f,f),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var oa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=
+function(b,d,f){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return oa.apply(this,arguments)};var X=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var d=this.graph.getModel(),f=d.getParent(b[0]),c=this.graph.getCellGeometry(b[0]);if(d.isEdge(f)&&null!=c&&c.relative&&(d=this.graph.view.getState(b[0]),null!=d&&2>d.width&&2>d.height&&
+null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return X.apply(this,arguments)};var ca=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var b=ca.apply(this,arguments),d=[],f=0;f<b.length;f++)"1"!=mxUtils.getValue(b[f].style,"part","0")&&d.push(b[f]);return d};var pa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var d=this.graph.getModel(),f=d.getParent(b.cell),
+c=this.graph.getCellGeometry(b.cell);return d.isEdge(f)&&null!=c&&c.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(d=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):pa.apply(this,arguments)};var V=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,d){var f=this.graph.getModel(),c=f.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!f.isEdge(c)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&V.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var b=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&b==mxConstants.NONE&&d==mxConstants.NONE?(b=mxUtils.mod(mxUtils.getValue(this.state.style,
mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,b,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Q=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,d){Q.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display=
-"none"))};var ra=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,d){ra.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Y=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Y.apply(this,arguments);var b=!1;
-null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var d=0;4>d;d++){var g=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);g.dialect=mxConstants.DIALECT_SVG;g.init(this.graph.view.getOverlayPane());
-this.cornerHandles.push(g)}}var c=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(b,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,
-this.changeHandler);this.editingHandler=mxUtils.bind(this,function(b,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);d=this.graph.getLinkForCell(this.state.cell);g=this.graph.getLinksForState(this.state);this.updateLinkHint(d,g);if(null!=d||null!=g&&0<g.length)b=!0;b&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(d,g){try{if(null==d&&(null==g||0==g.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
-this.linkHint=null);else if(null!=d||null!=g&&0<g.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===
+"none"))};var ta=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,d){ta.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Y=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Y.apply(this,arguments);var b=!1;
+null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var d=0;4>d;d++){var f=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);f.dialect=mxConstants.DIALECT_SVG;f.init(this.graph.view.getOverlayPane());
+this.cornerHandles.push(f)}}var c=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(b,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,
+this.changeHandler);this.editingHandler=mxUtils.bind(this,function(b,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);d=this.graph.getLinkForCell(this.state.cell);f=this.graph.getLinksForState(this.state);this.updateLinkHint(d,f);if(null!=d||null!=f&&0<f.length)b=!0;b&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(d,f){try{if(null==d&&(null==f||0==f.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
+this.linkHint=null);else if(null!=d||null!=f&&0<f.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===
typeof this.graph.editLink)){var c=document.createElement("img");c.setAttribute("src",Editor.editImage);c.setAttribute("title",mxResources.get("editLink"));c.setAttribute("width","11");c.setAttribute("height","11");c.style.marginLeft="10px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(b)}));this.linkHint.appendChildGraph.createRemoveIcon(mxResources.get("removeIt",
-[mxResources.get("link")]),mxUtils.bind(this,function(b){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(b)}))}if(null!=g)for(c=0;c<g.length;c++){var e=document.createElement("div");e.style.marginTop=null!=d||0<c?"6px":"0px";e.appendChild(this.graph.createLinkForHint(g[c].getAttribute("href"),mxUtils.getTextContent(g[c])));this.linkHint.appendChild(e)}}}catch(qa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var fa=mxEdgeHandler.prototype.init;
+[mxResources.get("link")]),mxUtils.bind(this,function(b){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(b)}))}if(null!=f)for(c=0;c<f.length;c++){var e=document.createElement("div");e.style.marginTop=null!=d||0<c?"6px":"0px";e.appendChild(this.graph.createLinkForHint(f[c].getAttribute("href"),mxUtils.getTextContent(f[c])));this.linkHint.appendChild(e)}}}catch(sa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var fa=mxEdgeHandler.prototype.init;
mxEdgeHandler.prototype.init=function(){fa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var b=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,
-function(d,g){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),g=this.graph.getLinksForState(this.state);if(null!=d||null!=g&&0<g.length)this.updateLinkHint(d,g),this.redrawHandles()};var ia=mxConnectionHandler.prototype.init;
-mxConnectionHandler.prototype.init=function(){ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var pa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.left=this.moveHandles[b].rowState.x+this.moveHandles[b].rowState.width-5+"px",this.moveHandles[b].style.top=this.moveHandles[b].rowState.y+
-this.moveHandles[b].rowState.height/2-6+"px";if(null!=this.cornerHandles){var b=this.getSelectionBorderInset(),d=this.cornerHandles,g=d[0].bounds.height/2;d[0].bounds.x=this.state.x-d[0].bounds.width/2+b;d[0].bounds.y=this.state.y-g+b;d[0].redraw();d[1].bounds.x=d[0].bounds.x+this.state.width-2*b;d[1].bounds.y=d[0].bounds.y;d[1].redraw();d[2].bounds.x=d[0].bounds.x;d[2].bounds.y=this.state.y+this.state.height-2*b;d[2].redraw();d[3].bounds.x=d[1].bounds.x;d[3].bounds.y=d[2].bounds.y;d[3].redraw();
-for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");pa.apply(this);null!=this.state&&null!=this.linkHint&&(b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-
-22,this.state.width+24,this.state.height+22),g=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",b),b=null!=g?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null,null==g&&(g=this.state),g=g.y+g.height,null!=d&&(g=Math.max(g,d.y+d.height)),this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(g+this.verticalOffset/
+function(d,f){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),f=this.graph.getLinksForState(this.state);if(null!=d||null!=f&&0<f.length)this.updateLinkHint(d,f),this.redrawHandles()};var ia=mxConnectionHandler.prototype.init;
+mxConnectionHandler.prototype.init=function(){ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var ra=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.left=this.moveHandles[b].rowState.x+this.moveHandles[b].rowState.width-5+"px",this.moveHandles[b].style.top=this.moveHandles[b].rowState.y+
+this.moveHandles[b].rowState.height/2-6+"px";if(null!=this.cornerHandles){var b=this.getSelectionBorderInset(),d=this.cornerHandles,f=d[0].bounds.height/2;d[0].bounds.x=this.state.x-d[0].bounds.width/2+b;d[0].bounds.y=this.state.y-f+b;d[0].redraw();d[1].bounds.x=d[0].bounds.x+this.state.width-2*b;d[1].bounds.y=d[0].bounds.y;d[1].redraw();d[2].bounds.x=d[0].bounds.x;d[2].bounds.y=this.state.y+this.state.height-2*b;d[2].redraw();d[3].bounds.x=d[1].bounds.x;d[3].bounds.y=d[2].bounds.y;d[3].redraw();
+for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");ra.apply(this);null!=this.state&&null!=this.linkHint&&(b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-
+22,this.state.width+24,this.state.height+22),f=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",b),b=null!=f?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null,null==f&&(f=this.state),f=f.y+f.height,null!=d&&(f=Math.max(f,d.y+d.height)),this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(f+this.verticalOffset/
2+Editor.hintOffset)+"px")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){U.apply(this,arguments);if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)null!=this.moveHandles[b]&&null!=this.moveHandles[b].parentNode&&this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);this.moveHandles=null}if(null!=this.cornerHandles){for(b=0;b<this.cornerHandles.length;b++)null!=this.cornerHandles[b]&&null!=this.cornerHandles[b].node&&null!=this.cornerHandles[b].node.parentNode&&
this.cornerHandles[b].node.parentNode.removeChild(this.cornerHandles[b].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};
var ja=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(ja.apply(this),null!=this.state&&null!=this.linkHint)){var b=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(b=new mxRectangle(b.x,b.y,b.width,b.height),b.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b.y+b.height+Editor.hintOffset)+"px"}};var ba=mxEdgeHandler.prototype.reset;
-mxEdgeHandler.prototype.reset=function(){ba.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var la=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){la.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function f(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function g(){mxShape.call(this)}function l(){mxShape.call(this)}function q(b,d,g,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=g;this.strokewidth=null!=c?c:1}function p(){mxActor.call(this)}function m(){mxCylinder.call(this)}
-function v(){mxCylinder.call(this)}function u(){mxActor.call(this)}function B(){mxActor.call(this)}function x(){mxActor.call(this)}function E(){mxActor.call(this)}function A(){mxActor.call(this)}function F(){mxActor.call(this)}function I(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
-this.canvas.moveTo=mxUtils.bind(this,L.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,L.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,L.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,L.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,L.prototype.arcTo)}function H(){mxRectangleShape.call(this)}function K(){mxRectangleShape.call(this)}
-function C(){mxActor.call(this)}function N(){mxActor.call(this)}function S(){mxActor.call(this)}function R(){mxRectangleShape.call(this)}function M(){mxRectangleShape.call(this)}function P(){mxCylinder.call(this)}function G(){mxShape.call(this)}function D(){mxShape.call(this)}function y(){mxEllipse.call(this)}function W(){mxShape.call(this)}function J(){mxShape.call(this)}function O(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ma(){mxShape.call(this)}function ga(){mxShape.call(this)}
-function ha(){mxShape.call(this)}function na(){mxShape.call(this)}function X(){mxCylinder.call(this)}function ca(){mxCylinder.call(this)}function oa(){mxRectangleShape.call(this)}function V(){mxDoubleEllipse.call(this)}function Q(){mxDoubleEllipse.call(this)}function ra(){mxArrowConnector.call(this);this.spacing=0}function Y(){mxArrowConnector.call(this);this.spacing=0}function fa(){mxActor.call(this)}function ia(){mxRectangleShape.call(this)}function pa(){mxActor.call(this)}function U(){mxActor.call(this)}
-function ja(){mxActor.call(this)}function ba(){mxActor.call(this)}function la(){mxActor.call(this)}function da(){mxActor.call(this)}function ua(){mxActor.call(this)}function ya(){mxActor.call(this)}function ta(){mxActor.call(this)}function qa(){mxActor.call(this)}function za(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function T(){mxEllipse.call(this)}function Aa(){mxRhombus.call(this)}function ka(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}
-function Ca(){mxEllipse.call(this)}function Da(){mxActor.call(this)}function xa(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Z(b,d,g,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=g;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ia(){mxConnector.call(this)}function Va(b,d,g,c,e,f,l,k,m,q){l+=m;var z=c.clone();c.x-=e*(2*l+m);c.y-=f*(2*l+m);e*=l+m;f*=l+m;return function(){b.ellipse(z.x-
-e-l,z.y-f-l,2*l,2*l);q?b.fillAndStroke():b.stroke()}}mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(b,d,g,c,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-d,-g));this.paintForeground(b,
-d,g,c,e)};b.prototype.paintForeground=function(b,d,g,c,e){if(null!=this.state){var z=this.flipH,f=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var l=z,z=f,f=l;b.rotate(-this.getShapeRotation(),z,f,d+c/2,g+e/2);s=this.scale;d=this.bounds.x/s;g=this.bounds.y/s;c=this.bounds.width/s;e=this.bounds.height/s;this.paintTableForeground(b,d,g,c,e)}};b.prototype.paintTableForeground=function(b,d,g,c,e){var z=this.state.view.graph,f=z.getActualStartSize(this.state.cell),
-l=z.model.getChildCells(this.state.cell,!0);if(0<l.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),Fa="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(k)for(k=1;k<l.length;k++){var m=z.getCellGeometry(l[k]);null!=m&&(b.begin(),b.moveTo(d+f.x,g+m.y),b.lineTo(d+c-f.width,g+m.y),b.end(),b.stroke())}if(Fa)for(c=z.model.getChildCells(l[0],!0),k=1;k<c.length;k++)m=z.getCellGeometry(c[k]),null!=m&&(b.begin(),b.moveTo(d+m.x+f.x,g+f.y),b.lineTo(d+m.x+f.x,g+e-f.height),b.end(),
-b.stroke())}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=function(b,d,g,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),l=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
-b.translate(d,g);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(z,e);b.lineTo(0,e-z);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=f&&(b.setFillAlpha(Math.abs(f)),b.setFillColor(0>f?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(c-z,0),b.lineTo(c,z),b.lineTo(z,z),b.close(),b.fill()),0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(z,z),b.lineTo(z,e),b.lineTo(0,e-z),
+mxEdgeHandler.prototype.reset=function(){ba.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ma=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ma.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function g(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function l(){mxShape.call(this)}function m(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function q(){mxActor.call(this)}function n(){mxCylinder.call(this)}
+function v(){mxCylinder.call(this)}function u(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function H(){mxActor.call(this)}function D(){mxActor.call(this)}function E(){mxActor.call(this)}function J(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
+this.canvas.moveTo=mxUtils.bind(this,L.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,L.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,L.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,L.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,L.prototype.arcTo)}function G(){mxRectangleShape.call(this)}function K(){mxRectangleShape.call(this)}
+function C(){mxActor.call(this)}function M(){mxActor.call(this)}function P(){mxActor.call(this)}function S(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function F(){mxShape.call(this)}function B(){mxShape.call(this)}function A(){mxEllipse.call(this)}function W(){mxShape.call(this)}function I(){mxShape.call(this)}function O(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function na(){mxShape.call(this)}function ga(){mxShape.call(this)}
+function ha(){mxShape.call(this)}function oa(){mxShape.call(this)}function X(){mxCylinder.call(this)}function ca(){mxCylinder.call(this)}function pa(){mxRectangleShape.call(this)}function V(){mxDoubleEllipse.call(this)}function Q(){mxDoubleEllipse.call(this)}function ta(){mxArrowConnector.call(this);this.spacing=0}function Y(){mxArrowConnector.call(this);this.spacing=0}function fa(){mxActor.call(this)}function ia(){mxRectangleShape.call(this)}function ra(){mxActor.call(this)}function U(){mxActor.call(this)}
+function ja(){mxActor.call(this)}function ba(){mxActor.call(this)}function ma(){mxActor.call(this)}function da(){mxActor.call(this)}function qa(){mxActor.call(this)}function ya(){mxActor.call(this)}function ua(){mxActor.call(this)}function sa(){mxActor.call(this)}function za(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function T(){mxEllipse.call(this)}function Aa(){mxRhombus.call(this)}function ka(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}
+function Ca(){mxEllipse.call(this)}function Da(){mxActor.call(this)}function xa(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Z(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ia(){mxConnector.call(this)}function Va(b,d,f,c,e,g,l,k,m,q){l+=m;var z=c.clone();c.x-=e*(2*l+m);c.y-=g*(2*l+m);e*=l+m;g*=l+m;return function(){b.ellipse(z.x-
+e-l,z.y-g-l,2*l,2*l);q?b.fillAndStroke():b.stroke()}}mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(b,d,f,c,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-d,-f));this.paintForeground(b,
+d,f,c,e)};b.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.state){var z=this.flipH,g=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var l=z,z=g,g=l;b.rotate(-this.getShapeRotation(),z,g,d+c/2,f+e/2);s=this.scale;d=this.bounds.x/s;f=this.bounds.y/s;c=this.bounds.width/s;e=this.bounds.height/s;this.paintTableForeground(b,d,f,c,e)}};b.prototype.paintTableForeground=function(b,d,f,c,e){var z=this.state.view.graph,g=z.getActualStartSize(this.state.cell),
+l=z.model.getChildCells(this.state.cell,!0);if(0<l.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),Ga="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(k)for(k=1;k<l.length;k++){var la=z.getCellGeometry(l[k]);null!=la&&(b.begin(),b.moveTo(d+g.x,f+la.y),b.lineTo(d+c-g.width,f+la.y),b.end(),b.stroke())}if(Ga)for(c=z.model.getChildCells(l[0],!0),k=1;k<c.length;k++)la=z.getCellGeometry(c[k]),null!=la&&(b.begin(),b.moveTo(d+la.x+g.x,f+g.y),b.lineTo(d+la.x+g.x,f+e-g.height),
+b.end(),b.stroke())}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),l=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
+b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(z,e);b.lineTo(0,e-z);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(c-z,0),b.lineTo(c,z),b.lineTo(z,z),b.close(),b.fill()),0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(z,z),b.lineTo(z,e),b.lineTo(0,e-z),
b.close(),b.fill()),b.begin(),b.moveTo(z,e),b.lineTo(z,z),b.lineTo(0,0),b.moveTo(z,z),b.lineTo(c,z),b.end(),b.stroke())};c.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",c);var Sa=Math.tan(mxUtils.toRadians(30)),Ja=(.5-Sa)/2;mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(e,mxCylinder);e.prototype.size=
-6;e.prototype.paintVertexShape=function(b,d,g,c,e){b.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(d+.5*(c-z),g+.5*(e-z),z,z);b.fill();b.setFillColor(mxConstants.NONE);b.rect(d,g,c,e);b.fill()};mxCellRenderer.registerShape("waypoint",e);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(b,d,g,c,e){d=Math.min(c,e/Sa);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ja);
-b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ja)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(b,d,g,c,e,f){d=Math.min(c,e/(.5+Sa));f?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ja)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ja)*d),b.lineTo(.5*d,(1-Ja)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ja),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ja)*d),b.lineTo(0,.75*
-d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",f);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(b,d,g,c,e,f){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),f||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),f||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),f||(b.stroke(),b.begin()),b.translate(0,-d);f||(b.moveTo(0,
-d),b.curveTo(0,-d/3,c,-d/3,c,d),b.lineTo(c,e-d),b.curveTo(c,e+d/3,0,e+d/3,0,e-d),b.close())};n.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(b,d,g,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=
-Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(d,g);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(0,e);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=f&&(b.setFillAlpha(Math.abs(f)),b.setFillColor(0>f?"#FFFFFF":"#000000"),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.close(),b.fill()),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.end(),b.stroke())};
-mxCellRenderer.registerShape("note",t);mxUtils.extend(d,t);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,0)}return null};mxUtils.extend(g,mxShape);g.prototype.isoAngle=15;g.prototype.paintVertexShape=function(b,d,g,c,e){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*
-Math.PI/200,z=Math.min(c*Math.tan(z),.5*e);b.translate(d,g);b.begin();b.moveTo(.5*c,0);b.lineTo(c,z);b.lineTo(c,e-z);b.lineTo(.5*c,e);b.lineTo(0,e-z);b.lineTo(0,z);b.close();b.fillAndStroke();b.setShadow(!1);b.begin();b.moveTo(0,z);b.lineTo(.5*c,2*z);b.lineTo(c,z);b.moveTo(.5*c,2*z);b.lineTo(.5*c,e);b.stroke()};mxCellRenderer.registerShape("isoCube2",g);mxUtils.extend(l,mxShape);l.prototype.size=15;l.prototype.paintVertexShape=function(b,d,g,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));b.translate(d,g);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(q,mxCylinder);q.prototype.size=15;q.prototype.paintVertexShape=function(b,
-d,g,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=mxUtils.getValue(this.style,"lid",!0);b.translate(d,g);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),f?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),f&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*
-c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",q);mxUtils.extend(p,mxActor);p.prototype.redrawPath=function(b,d,g,c,e){b.moveTo(0,0);b.quadTo(c/2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",p);mxUtils.extend(m,mxCylinder);m.prototype.tabWidth=60;m.prototype.tabHeight=20;m.prototype.tabPosition="right";m.prototype.arcSize=.1;m.prototype.paintVertexShape=function(b,
-d,g,c,e){b.translate(d,g);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),f=mxUtils.getValue(this.style,"rounded",!1),l=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));l||(k*=Math.min(c,e));k=Math.min(k,.5*c,.5*(e-g));d=Math.max(d,
-k);d=Math.min(c-k,d);f||(k=0);b.begin();"left"==z?(b.moveTo(Math.max(k,0),g),b.lineTo(Math.max(k,0),0),b.lineTo(d,0),b.lineTo(d,g)):(b.moveTo(c-d,g),b.lineTo(c-d,0),b.lineTo(c-Math.max(k,0),0),b.lineTo(c-Math.max(k,0),g));f?(b.moveTo(0,k+g),b.arcTo(k,k,0,0,1,k,g),b.lineTo(c-k,g),b.arcTo(k,k,0,0,1,c,k+g),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,g),b.lineTo(c,g),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,
-"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,g+20),b.lineTo(c-20,g+10),b.lineTo(c-10,g+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",m);m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var g=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,
-"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-g),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-g),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};
-mxUtils.extend(v,mxCylinder);v.prototype.arcSize=.1;v.prototype.paintVertexShape=function(b,d,g,c,e){b.translate(d,g);var z=mxUtils.getValue(this.style,"rounded",!1),f=mxUtils.getValue(this.style,"absoluteArcSize",!1);d=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));g=mxUtils.getValue(this.style,"umlStateConnection",null);f||(d*=Math.min(c,e));d=Math.min(d,.5*c,.5*e);z||(d=0);z=0;null!=g&&(z=10);b.begin();b.moveTo(z,d);b.arcTo(d,d,0,0,1,z+d,0);b.lineTo(c-d,0);b.arcTo(d,d,0,0,1,c,
-d);b.lineTo(c,e-d);b.arcTo(d,d,0,0,1,c-d,e);b.lineTo(z+d,e);b.arcTo(d,d,0,0,1,z,e-d);b.close();b.fillAndStroke();b.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(b.roundrect(c-40,e-20,10,10,3,3),b.stroke(),b.roundrect(c-20,e-20,10,10,3,3),b.stroke(),b.begin(),b.moveTo(c-30,e-15),b.lineTo(c-20,e-15),b.stroke());"connPointRefEntry"==g?(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke()):"connPointRefExit"==g&&(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke(),b.begin(),b.moveTo(5,
-.5*e-5),b.lineTo(15,.5*e+5),b.moveTo(15,.5*e-5),b.lineTo(5,.5*e+5),b.stroke())};v.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",v);mxUtils.extend(u,mxActor);u.prototype.size=30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(b,d,g,c,e){d=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,d)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(B,mxActor);B.prototype.size=.4;B.prototype.redrawPath=function(b,d,g,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,d/2);b.quadTo(c/4,1.4*d,c/2,d/2);b.quadTo(3*
-c/4,d*(1-1.4),c,d/2);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};B.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),g=b.width,c=b.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(b.x,b.y+d,g,c-2*d);d*=g;return new mxRectangle(b.x+d,b.y,g-
-2*d,c)}return b};mxCellRenderer.registerShape("tape",B);mxUtils.extend(x,mxActor);x.prototype.size=.3;x.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*b.height):null};x.prototype.redrawPath=function(b,d,g,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,0);b.lineTo(c,0);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/
-4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};mxCellRenderer.registerShape("document",x);var $a=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,d,g,c){var e=mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*
-this.scale,b.height*d),0,0)}return null};q.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,
-"labelInHeader",!1)){var g=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-
-g),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-g),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};v.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",
-15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,Math.max(0,d*this.scale))}return null};mxUtils.extend(E,mxActor);E.prototype.size=.2;E.prototype.fixedSize=20;E.prototype.isRoundable=function(){return!0};E.prototype.redrawPath=function(b,d,g,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));g=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,e)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("parallelogram",E);mxUtils.extend(A,mxActor);A.prototype.size=.2;A.prototype.fixedSize=20;A.prototype.isRoundable=function(){return!0};A.prototype.redrawPath=function(b,d,g,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",
-this.fixedSize)))):c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,e)],this.isRounded,g,!0)};mxCellRenderer.registerShape("trapezoid",A);mxUtils.extend(F,mxActor);F.prototype.size=.5;F.prototype.redrawPath=function(b,d,g,c,e){b.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,e/2),new mxPoint(0,e/2),new mxPoint(d,e/2),new mxPoint(d,e),new mxPoint(c,e)],this.isRounded,g,!1);b.end()};mxCellRenderer.registerShape("curlyBracket",F);mxUtils.extend(I,mxActor);I.prototype.redrawPath=function(b,d,g,c,e){b.setStrokeWidth(1);b.setFillColor(this.stroke);d=c/5;b.rect(0,0,d,e);b.fillAndStroke();b.rect(2*d,0,d,e);
-b.fillAndStroke();b.rect(4*d,0,d,e);b.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",I);L.prototype.moveTo=function(b,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d;this.firstX=b;this.firstY=d};L.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};L.prototype.quadTo=function(b,d,g,c){this.originalQuadTo.apply(this.canvas,
-arguments);this.lastX=g;this.lastY=c};L.prototype.curveTo=function(b,d,g,c,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};L.prototype.arcTo=function(b,d,g,c,e,f,l){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=l};L.prototype.lineTo=function(b,d){if(null!=this.lastX&&null!=this.lastY){var g=function(b){return"number"===typeof b?b?0>b?-1:1:b===b?0:NaN:NaN},c=Math.abs(b-this.lastX),e=Math.abs(d-this.lastY),z=Math.sqrt(c*c+e*e);if(2>z){this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=b;this.lastY=d;return}var f=Math.round(z/10),l=this.defaultVariation;5>f&&(f=5,l/=3);for(var k=g(b-this.lastX)*c/f,g=g(d-this.lastY)*e/f,c=c/z,e=e/z,z=0;z<f;z++){var m=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,k*z+this.lastX-m*e,g*z+this.lastY-m*c)}this.originalLineTo.call(this.canvas,b,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};L.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;
+6;e.prototype.paintVertexShape=function(b,d,f,c,e){b.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(d+.5*(c-z),f+.5*(e-z),z,z);b.fill();b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};mxCellRenderer.registerShape("waypoint",e);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/Sa);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ja);
+b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ja)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(g,mxCylinder);g.prototype.size=20;g.prototype.redrawPath=function(b,d,f,c,e,g){d=Math.min(c,e/(.5+Sa));g?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ja)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ja)*d),b.lineTo(.5*d,(1-Ja)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ja),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ja)*d),b.lineTo(0,.75*
+d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",g);mxUtils.extend(p,mxCylinder);p.prototype.redrawPath=function(b,d,f,c,e,g){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(g&&null!=this.fill||!g&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,-d);g||(b.moveTo(0,
+d),b.curveTo(0,-d/3,c,-d/3,c,d),b.lineTo(c,e-d),b.curveTo(c,e+d/3,0,e+d/3,0,e-d),b.close())};p.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",p);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=
+Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(0,e);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.close(),b.fill()),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.end(),b.stroke())};
+mxCellRenderer.registerShape("note",t);mxUtils.extend(d,t);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*
+Math.PI/200,z=Math.min(c*Math.tan(z),.5*e);b.translate(d,f);b.begin();b.moveTo(.5*c,0);b.lineTo(c,z);b.lineTo(c,e-z);b.lineTo(.5*c,e);b.lineTo(0,e-z);b.lineTo(0,z);b.close();b.fillAndStroke();b.setShadow(!1);b.begin();b.moveTo(0,z);b.lineTo(.5*c,2*z);b.lineTo(c,z);b.moveTo(.5*c,2*z);b.lineTo(.5*c,e);b.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(l,mxShape);l.prototype.size=15;l.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(b,
+d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"lid",!0);b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),g?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),g&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*
+c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c/2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",q);mxUtils.extend(n,mxCylinder);n.prototype.tabWidth=60;n.prototype.tabHeight=20;n.prototype.tabPosition="right";n.prototype.arcSize=.1;n.prototype.paintVertexShape=function(b,
+d,f,c,e){b.translate(d,f);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),g=mxUtils.getValue(this.style,"rounded",!1),l=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));l||(k*=Math.min(c,e));k=Math.min(k,.5*c,.5*(e-f));d=Math.max(d,
+k);d=Math.min(c-k,d);g||(k=0);b.begin();"left"==z?(b.moveTo(Math.max(k,0),f),b.lineTo(Math.max(k,0),0),b.lineTo(d,0),b.lineTo(d,f)):(b.moveTo(c-d,f),b.lineTo(c-d,0),b.lineTo(c-Math.max(k,0),0),b.lineTo(c-Math.max(k,0),f));g?(b.moveTo(0,k+f),b.arcTo(k,k,0,0,1,k,f),b.lineTo(c-k,f),b.arcTo(k,k,0,0,1,c,k+f),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,f),b.lineTo(c,f),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,
+"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,f+20),b.lineTo(c-20,f+10),b.lineTo(c-10,f+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",n);n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,
+"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};
+mxUtils.extend(v,mxCylinder);v.prototype.arcSize=.1;v.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);var z=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1);d=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f=mxUtils.getValue(this.style,"umlStateConnection",null);g||(d*=Math.min(c,e));d=Math.min(d,.5*c,.5*e);z||(d=0);z=0;null!=f&&(z=10);b.begin();b.moveTo(z,d);b.arcTo(d,d,0,0,1,z+d,0);b.lineTo(c-d,0);b.arcTo(d,d,0,0,1,c,
+d);b.lineTo(c,e-d);b.arcTo(d,d,0,0,1,c-d,e);b.lineTo(z+d,e);b.arcTo(d,d,0,0,1,z,e-d);b.close();b.fillAndStroke();b.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(b.roundrect(c-40,e-20,10,10,3,3),b.stroke(),b.roundrect(c-20,e-20,10,10,3,3),b.stroke(),b.begin(),b.moveTo(c-30,e-15),b.lineTo(c-20,e-15),b.stroke());"connPointRefEntry"==f?(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke()):"connPointRefExit"==f&&(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke(),b.begin(),b.moveTo(5,
+.5*e-5),b.lineTo(15,.5*e+5),b.moveTo(15,.5*e-5),b.lineTo(5,.5*e+5),b.stroke())};v.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",v);mxUtils.extend(u,mxActor);u.prototype.size=30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,d/2);b.quadTo(c/4,1.4*d,c/2,d/2);b.quadTo(3*
+c/4,d*(1-1.4),c,d/2);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};y.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),f=b.width,c=b.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(b.x,b.y+d,f,c-2*d);d*=f;return new mxRectangle(b.x+d,b.y,f-
+2*d,c)}return b};mxCellRenderer.registerShape("tape",y);mxUtils.extend(x,mxActor);x.prototype.size=.3;x.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*b.height):null};x.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,0);b.lineTo(c,0);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/
+4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};mxCellRenderer.registerShape("document",x);var $a=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,d,f,c){var e=mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*
+this.scale,b.height*d),0,0)}return null};m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,
+"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-
+f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};v.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",
+15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,Math.max(0,d*this.scale))}return null};mxUtils.extend(H,mxActor);H.prototype.size=.2;H.prototype.fixedSize=20;H.prototype.isRoundable=function(){return!0};H.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("parallelogram",H);mxUtils.extend(D,mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",
+this.fixedSize)))):c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("trapezoid",D);mxUtils.extend(E,mxActor);E.prototype.size=.5;E.prototype.redrawPath=function(b,d,f,c,e){b.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,e/2),new mxPoint(0,e/2),new mxPoint(d,e/2),new mxPoint(d,e),new mxPoint(c,e)],this.isRounded,f,!1);b.end()};mxCellRenderer.registerShape("curlyBracket",E);mxUtils.extend(J,mxActor);J.prototype.redrawPath=function(b,d,f,c,e){b.setStrokeWidth(1);b.setFillColor(this.stroke);d=c/5;b.rect(0,0,d,e);b.fillAndStroke();b.rect(2*d,0,d,e);
+b.fillAndStroke();b.rect(4*d,0,d,e);b.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",J);L.prototype.moveTo=function(b,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d;this.firstX=b;this.firstY=d};L.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};L.prototype.quadTo=function(b,d,f,c){this.originalQuadTo.apply(this.canvas,
+arguments);this.lastX=f;this.lastY=c};L.prototype.curveTo=function(b,d,f,c,e,g){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};L.prototype.arcTo=function(b,d,f,c,e,g,l){this.originalArcTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=l};L.prototype.lineTo=function(b,d){if(null!=this.lastX&&null!=this.lastY){var f=function(b){return"number"===typeof b?b?0>b?-1:1:b===b?0:NaN:NaN},c=Math.abs(b-this.lastX),e=Math.abs(d-this.lastY),z=Math.sqrt(c*c+e*e);if(2>z){this.originalLineTo.apply(this.canvas,
+arguments);this.lastX=b;this.lastY=d;return}var g=Math.round(z/10),l=this.defaultVariation;5>g&&(g=5,l/=3);for(var k=f(b-this.lastX)*c/g,f=f(d-this.lastY)*e/g,c=c/z,e=e/z,z=0;z<g;z++){var m=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,k*z+this.lastX-m*e,f*z+this.lastY-m*c)}this.originalLineTo.call(this.canvas,b,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};L.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;
this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var ab=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(b){ab.apply(this,arguments);null==b.handJiggle&&(b.handJiggle=this.createHandJiggle(b))};var bb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(b){bb.apply(this,arguments);null!=b.handJiggle&&(b.handJiggle.destroy(),
delete b.handJiggle)};mxShape.prototype.createComicCanvas=function(b){return new L(b,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(b)};mxRhombus.prototype.defaultJiggle=2;var cb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,
-"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&cb.apply(this,arguments)};var fb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(b,d,g,c,e){if(null==b.handJiggle||b.handJiggle.constructor!=L)fb.apply(this,arguments);else{var z=!0;null!=this.style&&(z="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(z||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)z||
-null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=!1),b.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?z=Math.min(c/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,z=Math.min(c*z,e*z)),b.moveTo(d+z,g),b.lineTo(d+c-z,g),b.quadTo(d+c,g,d+c,g+z),b.lineTo(d+c,g+e-z),b.quadTo(d+c,g+e,d+c-z,
-g+e),b.lineTo(d+z,g+e),b.quadTo(d,g+e,d,g+e-z),b.lineTo(d,g+z),b.quadTo(d,g,d+z,g)):(b.moveTo(d,g),b.lineTo(d+c,g),b.lineTo(d+c,g+e),b.lineTo(d,g+e),b.lineTo(d,g)),b.close(),b.end(),b.fillAndStroke()}};mxUtils.extend(H,mxRectangleShape);H.prototype.size=.1;H.prototype.fixedSize=!1;H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
-this.direction==mxConstants.DIRECTION_WEST)){var d=b.width,g=b.height;b=new mxRectangle(b.x,b.y,d,g);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*e,g*e));b.x+=Math.round(c);b.width-=Math.round(2*c)}return b};H.prototype.paintForeground=function(b,d,g,c,e){var z=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),
-f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),f=z?Math.max(0,Math.min(c,f)):c*Math.max(0,Math.min(1,f));this.isRounded&&(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*z,e*z)));f=Math.round(f);b.begin();b.moveTo(d+f,g);b.lineTo(d+f,g+e);b.moveTo(d+c-f,g);b.lineTo(d+c-f,g+e);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",H);mxCellRenderer.registerShape("process2",
-H);mxUtils.extend(K,mxRectangleShape);K.prototype.paintBackground=function(b,d,g,c,e){b.setFillColor(mxConstants.NONE);b.rect(d,g,c,e);b.fill()};K.prototype.paintForeground=function(b,d,g,c,e){};mxCellRenderer.registerShape("transparent",K);mxUtils.extend(C,mxHexagon);C.prototype.size=30;C.prototype.position=.5;C.prototype.position2=.5;C.prototype.base=20;C.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};C.prototype.isRoundable=
-function(){return!0};C.prototype.redrawPath=function(b,d,g,c,e){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var z=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
-this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-g),new mxPoint(Math.min(c,z+l),e-g),new mxPoint(f,e),new mxPoint(Math.max(0,z),e-g),new mxPoint(0,e-g)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",C);mxUtils.extend(N,mxActor);N.prototype.size=.2;N.prototype.fixedSize=20;N.prototype.isRoundable=function(){return!0};N.prototype.redrawPath=function(b,d,g,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(0,e),new mxPoint(d,e/2)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("step",N);mxUtils.extend(S,mxHexagon);S.prototype.size=.25;S.prototype.fixedSize=20;S.prototype.isRoundable=function(){return!0};
-S.prototype.redrawPath=function(b,d,g,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*e),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(0,.5*e)],this.isRounded,g,
-!0)};mxCellRenderer.registerShape("hexagon",S);mxUtils.extend(R,mxRectangleShape);R.prototype.isHtmlAllowed=function(){return!1};R.prototype.paintForeground=function(b,d,g,c,e){var z=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,g+z);b.lineTo(d+c/2,g+e-z);b.moveTo(d+z,g+e/2);b.lineTo(d+c-z,g+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",R);var Ya=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==
-this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};mxRhombus.prototype.paintVertexShape=function(b,d,g,c,e){Ya.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var z=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=z;g+=z;c-=2*z;e-=2*z;0<c&&0<e&&(b.setShadow(!1),Ya.apply(this,[b,d,g,c,e]))}};mxUtils.extend(M,
-mxRectangleShape);M.prototype.isHtmlAllowed=function(){return!1};M.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};M.prototype.paintForeground=function(b,d,g,c,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);d+=f;g+=f;c-=2*f;e-=2*f;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var f=0,z;do{z=mxCellRenderer.defaultShapes[this.style["symbol"+f]];if(null!=z){var l=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],m=this.style["symbol"+f+"Width"],q=this.style["symbol"+f+"Height"],p=this.style["symbol"+f+"Spacing"]||0,Fa=this.style["symbol"+f+"VSpacing"]||p,sa=this.style["symbol"+f+"ArcSpacing"];null!=sa&&(sa*=this.getArcSize(c+this.strokewidth,
-e+this.strokewidth),p+=sa,Fa+=sa);var sa=d,G=g,sa=l==mxConstants.ALIGN_CENTER?sa+(c-m)/2:l==mxConstants.ALIGN_RIGHT?sa+(c-m-p):sa+p,G=k==mxConstants.ALIGN_MIDDLE?G+(e-q)/2:k==mxConstants.ALIGN_BOTTOM?G+(e-q-Fa):G+Fa;b.save();l=new z;l.style=this.style;z.prototype.paintVertexShape.call(l,b,sa,G,m,q);b.restore()}f++}while(null!=z)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",M);mxUtils.extend(P,mxCylinder);P.prototype.redrawPath=function(b,d,g,
-c,e,f){f?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",P);mxUtils.extend(G,mxShape);G.prototype.paintBackground=function(b,d,g,c,e){b.translate(d,g);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();
-b.stroke()};mxCellRenderer.registerShape("umlActor",G);mxUtils.extend(D,mxShape);D.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};D.prototype.paintBackground=function(b,d,g,c,e){b.translate(d,g);b.begin();b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",D);mxUtils.extend(y,mxEllipse);y.prototype.paintVertexShape=function(b,
-d,g,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/8,g+e);b.lineTo(d+7*c/8,g+e);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",y);mxUtils.extend(W,mxShape);W.prototype.paintVertexShape=function(b,d,g,c,e){b.translate(d,g);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",W);mxUtils.extend(J,mxShape);J.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+
-b.height/8,b.width,7*b.height/8)};J.prototype.paintBackground=function(b,d,g,c,e){b.translate(d,g);b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};J.prototype.paintForeground=function(b,d,g,c,e){b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,e/4);b.end();b.stroke()};mxCellRenderer.registerShape("umlControl",J);mxUtils.extend(O,mxRectangleShape);O.prototype.size=40;O.prototype.isHtmlAllowed=function(){return!1};O.prototype.getLabelBounds=
-function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,d)};O.prototype.paintBackground=function(b,d,g,c,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),z=mxUtils.getValue(this.style,"participant");null==z||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,d,g,c,f):(z=this.state.view.graph.cellRenderer.getShape(z),null!=z&&z!=O&&(z=new z,
-z.apply(this.state),b.save(),z.paintVertexShape(b,d,g,c,f),b.restore()));f<e&&(b.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),b.begin(),b.moveTo(d+c/2,g+f),b.lineTo(d+c/2,g+e),b.end(),b.stroke())};O.prototype.paintForeground=function(b,d,g,c,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,b,d,g,c,Math.min(e,f))};mxCellRenderer.registerShape("umlLifeline",O);mxUtils.extend(aa,mxShape);
-aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.getLabelMargins=function(b){return new mxRectangle(0,0,b.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),b.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};aa.prototype.paintBackground=function(b,d,g,c,e){var f=this.corner,z=Math.min(c,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,
-"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(b.setFillColor(k),b.rect(d,g,c,e),b.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(b,d,g,c,e),b.setGradient(this.fill,this.gradient,d,g,c,e,this.gradientDirection)):b.setFillColor(this.fill);b.begin();b.moveTo(d,g);b.lineTo(d+z,g);b.lineTo(d+z,g+Math.max(0,l-1.5*f));b.lineTo(d+Math.max(0,z-
-f),g+l);b.lineTo(d,g+l);b.close();b.fillAndStroke();b.begin();b.moveTo(d+z,g);b.lineTo(d+c,g);b.lineTo(d+c,g+e);b.lineTo(d,g+e);b.lineTo(d,g+l);b.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(b,d,g,c){return new mxPoint(b.getCenterX(),b.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(b,d,g,c){c=O.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||
-1)*d.view.scale/2-1;g.x<b.getCenterX()&&(d=-1*(d+1));return new mxPoint(b.getCenterX()+d,Math.min(b.y+b.height,Math.max(b.y+c,g.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(b,d,g,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,d,g,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||
-1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return g.x<b.getCenterX()&&(c=-1*(c+1)),new mxPoint(b.getCenterX()+c,Math.min(b.y+b.height,Math.max(b.y,g.y)));g.y<b.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,g.x)),b.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=
-function(b,d,g,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(b,new mxRectangle(0,0,0,Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(d.style,"size",C.prototype.size))*d.view.scale))),d.style),d,g,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(b,d,g,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),f=e?E.prototype.fixedSize:E.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));
-e&&(f*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),z=[new mxPoint(l,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]):(e=e?Math.max(0,Math.min(.5*k,f)):k*Math.max(0,Math.min(1,f)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),
-new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(g.x<l||g.x>l+k?b.y=g.y:b.x=g.x);return mxUtils.getPerimeterPoint(z,b,g)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,g,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),f=e?A.prototype.fixedSize:A.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));e&&(f*=d.view.scale);var l=b.x,
-z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,f)):k*Math.max(0,Math.min(1,f)),z=[new mxPoint(l+e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),z=[new mxPoint(l,z),new mxPoint(l+k,z),new mxPoint(l+k-e,z+m),new mxPoint(l+
-e,z+m),new mxPoint(l,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),z=[new mxPoint(l,z+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),z=[new mxPoint(l,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(g.x<l||g.x>l+k?b.y=g.y:b.x=g.x);return mxUtils.getPerimeterPoint(z,
-b,g)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(b,d,g,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),f=e?N.prototype.fixedSize:N.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));e&&(f*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?
-(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),z=[new mxPoint(l,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,b),new mxPoint(l,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),new mxPoint(l+k-e,b),new mxPoint(l+k,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,f)):m*Math.max(0,
-Math.min(1,f)),z=[new mxPoint(l,z+e),new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(q,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),z=[new mxPoint(l,z),new mxPoint(q,z+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]);q=new mxPoint(q,b);c&&(g.x<l||g.x>l+k?q.y=g.y:q.x=g.x);return mxUtils.getPerimeterPoint(z,q,g)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);
-mxPerimeter.HexagonPerimeter2=function(b,d,g,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),f=e?S.prototype.fixedSize:S.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));e&&(f*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,f)):m*Math.max(0,
-Math.min(1,f)),z=[new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e),new mxPoint(q,z)]):(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),z=[new mxPoint(l+e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]);q=new mxPoint(q,b);c&&(g.x<l||g.x>l+k?q.y=g.y:q.x=g.x);return mxUtils.getPerimeterPoint(z,q,g)};mxStyleRegistry.putValue("hexagonPerimeter2",
-mxPerimeter.HexagonPerimeter2);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.paintBackground=function(b,d,g,c,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,g);b.ellipse((c-f)/2,0,f,f);b.fillAndStroke();b.begin();b.moveTo(c/2,f);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",ma);mxUtils.extend(ga,mxShape);ga.prototype.size=10;ga.prototype.inset=2;ga.prototype.paintBackground=function(b,d,g,c,e){var f=parseFloat(mxUtils.getValue(this.style,
-"size",this.size)),l=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,g);b.begin();b.moveTo(c/2,f+l);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-f)/2-l,f/2);b.quadTo((c-f)/2-l,f+l,c/2,f+l);b.quadTo((c+f)/2+l,f+l,(c+f)/2+l,f/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",ga);mxUtils.extend(ha,mxShape);ha.prototype.paintBackground=function(b,d,g,c,e){b.translate(d,g);b.begin();b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);
-b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",ha);mxUtils.extend(na,mxShape);na.prototype.inset=2;na.prototype.paintBackground=function(b,d,g,c,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,g);b.ellipse(0,f,c-2*f,e-2*f);b.fillAndStroke();b.begin();b.moveTo(c/2,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",na);mxUtils.extend(X,mxCylinder);X.prototype.jettyWidth=
-20;X.prototype.jettyHeight=10;X.prototype.redrawPath=function(b,d,g,c,e,f){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));g=l/2;var l=g+l/2,z=Math.min(d,e-d),k=Math.min(z+2*d,e-d);f?(b.moveTo(g,z),b.lineTo(l,z),b.lineTo(l,z+d),b.lineTo(g,z+d),b.moveTo(g,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(g,k+d)):(b.moveTo(g,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(g,e),b.lineTo(g,k+d),b.lineTo(0,k+d),b.lineTo(0,
-k),b.lineTo(g,k),b.lineTo(g,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(g,z),b.close());b.end()};mxCellRenderer.registerShape("module",X);mxUtils.extend(ca,mxCylinder);ca.prototype.jettyWidth=32;ca.prototype.jettyHeight=12;ca.prototype.redrawPath=function(b,d,g,c,e,f){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));g=l/2;var l=g+l/2,z=.3*e-d/2,k=.7*e-d/2;f?(b.moveTo(g,z),b.lineTo(l,z),b.lineTo(l,
-z+d),b.lineTo(g,z+d),b.moveTo(g,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(g,k+d)):(b.moveTo(g,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(g,e),b.lineTo(g,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(g,k),b.lineTo(g,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(g,z),b.close());b.end()};mxCellRenderer.registerShape("component",ca);mxUtils.extend(oa,mxRectangleShape);oa.prototype.paintForeground=function(b,d,g,c,e){var f=c/2,l=e/2,z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;b.begin();this.addPoints(b,[new mxPoint(d+f,g),new mxPoint(d+c,g+l),new mxPoint(d+f,g+e),new mxPoint(d,g+l)],this.isRounded,z,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",oa);mxUtils.extend(V,mxDoubleEllipse);V.prototype.outerStroke=!0;V.prototype.paintVertexShape=function(b,d,g,c,e){var f=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(d+f,g+f,c-2*f,e-2*f),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&
-(b.ellipse(d,g,c,e),b.stroke())};mxCellRenderer.registerShape("endState",V);mxUtils.extend(Q,V);Q.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Q);mxUtils.extend(ra,mxArrowConnector);ra.prototype.defaultWidth=4;ra.prototype.isOpenEnded=function(){return!0};ra.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ra.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
-ra);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=10;Y.prototype.defaultArrowWidth=20;Y.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Y.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
-Y);mxUtils.extend(fa,mxActor);fa.prototype.size=30;fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(b,d,g,c,e){d=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("manualInput",fa);mxUtils.extend(ia,mxRectangleShape);ia.prototype.dx=
-20;ia.prototype.dy=20;ia.prototype.isHtmlAllowed=function(){return!1};ia.prototype.paintForeground=function(b,d,g,c,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*l,e*l));l=Math.max(f,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
-b.begin();b.moveTo(d,g+f);b.lineTo(d+c,g+f);b.end();b.stroke();b.begin();b.moveTo(d+l,g);b.lineTo(d+l,g+e);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",ia);mxUtils.extend(pa,mxActor);pa.prototype.dx=20;pa.prototype.dy=20;pa.prototype.redrawPath=function(b,d,g,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));
-var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,g),new mxPoint(d,g),new mxPoint(d,e),new mxPoint(0,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("corner",pa);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(b,d,g,c,e){b.moveTo(0,0);b.lineTo(0,e);b.end();b.moveTo(c,0);b.lineTo(c,e);b.end();b.moveTo(0,e/2);b.lineTo(c,e/2);b.end()};mxCellRenderer.registerShape("crossbar",
-U);mxUtils.extend(ja,mxActor);ja.prototype.dx=20;ja.prototype.dy=20;ja.prototype.redrawPath=function(b,d,g,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,g),new mxPoint((c+
-d)/2,g),new mxPoint((c+d)/2,e),new mxPoint((c-d)/2,e),new mxPoint((c-d)/2,g),new mxPoint(0,g)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("tee",ja);mxUtils.extend(ba,mxActor);ba.prototype.arrowWidth=.3;ba.prototype.arrowSize=.2;ba.prototype.redrawPath=function(b,d,g,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));g=(e-f)/2;var f=
-g+f,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,g),new mxPoint(c-d,g),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,f),new mxPoint(0,f)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("singleArrow",ba);mxUtils.extend(la,mxActor);la.prototype.redrawPath=function(b,d,g,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ba.prototype.arrowWidth))));d=c*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ba.prototype.arrowSize))));g=(e-f)/2;var f=g+f,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e/2),new mxPoint(d,0),new mxPoint(d,g),new mxPoint(c-d,g),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,f),new mxPoint(d,f),new mxPoint(d,e)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",la);mxUtils.extend(da,mxActor);da.prototype.size=
-.1;da.prototype.fixedSize=20;da.prototype.redrawPath=function(b,d,g,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(d,0);b.lineTo(c,0);b.quadTo(c-2*d,e/2,c,e);b.lineTo(d,e);b.quadTo(d-2*d,e/2,d,0);b.close();b.end()};mxCellRenderer.registerShape("dataStorage",da);mxUtils.extend(ua,mxActor);ua.prototype.redrawPath=
-function(b,d,g,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.registerShape("or",ua);mxUtils.extend(ya,mxActor);ya.prototype.redrawPath=function(b,d,g,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.registerShape("xor",ya);mxUtils.extend(ta,mxActor);ta.prototype.size=20;ta.prototype.isRoundable=function(){return!0};ta.prototype.redrawPath=function(b,d,g,c,e){d=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*d)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("loopLimit",ta);mxUtils.extend(qa,mxActor);qa.prototype.size=.375;qa.prototype.isRoundable=function(){return!0};qa.prototype.redrawPath=function(b,d,g,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-d),new mxPoint(c/2,e),new mxPoint(0,e-d)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("offPageConnector",qa);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(b,d,g,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/2,g+e);b.lineTo(d+c,g+e);b.end();b.stroke()};
-mxCellRenderer.registerShape("tapeData",za);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(b,d,g,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,g+e/2);b.lineTo(d+c,g+e/2);b.end();b.stroke();b.begin();b.moveTo(d+c/2,g);b.lineTo(d+c/2,g+e);b.end();b.stroke()};mxCellRenderer.registerShape("orEllipse",va);mxUtils.extend(T,mxEllipse);T.prototype.paintVertexShape=function(b,d,g,c,e){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);b.setShadow(!1);b.begin();b.moveTo(d+.145*c,g+.145*e);b.lineTo(d+.855*c,g+.855*e);b.end();b.stroke();b.begin();b.moveTo(d+.855*c,g+.145*e);b.lineTo(d+.145*c,g+.855*e);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",T);mxUtils.extend(Aa,mxRhombus);Aa.prototype.paintVertexShape=function(b,d,g,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,g+e/2);b.lineTo(d+c,g+e/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",
-Aa);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(b,d,g,c,e){b.begin();b.moveTo(d,g);b.lineTo(d+c,g);b.lineTo(d+c/2,g+e/2);b.close();b.fillAndStroke();b.begin();b.moveTo(d,g+e);b.lineTo(d+c,g+e);b.lineTo(d+c/2,g+e/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",ka);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(b,d,g,c,e){var f=g+e-5;b.begin();b.moveTo(d,g);b.lineTo(d,g+e);b.moveTo(d,f);b.lineTo(d+10,f-5);b.moveTo(d,f);b.lineTo(d+10,
-f+5);b.moveTo(d,f);b.lineTo(d+c,f);b.moveTo(d+c,g);b.lineTo(d+c,g+e);b.moveTo(d+c,f);b.lineTo(d+c-10,f-5);b.moveTo(d+c,f);b.lineTo(d+c-10,f+5);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(b,d,g,c,e){this.outline||b.setStrokeColor(null);if(null!=this.style){var f=b.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=
-!1);b.rect(d,g,c,e);b.fill();b.pointerEvents=f;b.setStrokeColor(this.stroke);b.begin();b.moveTo(d,g);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?b.lineTo(d+c,g):b.moveTo(d+c,g);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?b.lineTo(d+c,g+e):b.moveTo(d+c,g+e);this.outline||"1"==mxUtils.getValue(this.style,"bottom","1")?b.lineTo(d,g+e):b.moveTo(d,g+e);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&b.lineTo(d,g);b.end();b.stroke()}};mxCellRenderer.registerShape("partialRectangle",
-wa);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(b,d,g,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(d+c/2,g),b.lineTo(d+c/2,g+e)):(b.moveTo(d,g+e/2),b.lineTo(d+c,g+e/2));b.end();b.stroke()};mxCellRenderer.registerShape("lineEllipse",Ca);mxUtils.extend(Da,mxActor);Da.prototype.redrawPath=function(b,d,g,c,e){d=Math.min(c,e/2);b.moveTo(0,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);
-b.quadTo(c,e,c-d,e);b.lineTo(0,e);b.close();b.end()};mxCellRenderer.registerShape("delay",Da);mxUtils.extend(xa,mxActor);xa.prototype.size=.2;xa.prototype.redrawPath=function(b,d,g,c,e){d=Math.min(e,c);var f=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(e-f)/2;g=d+f;var l=(c-f)/2,f=l+f;b.moveTo(0,d);b.lineTo(l,d);b.lineTo(l,0);b.lineTo(f,0);b.lineTo(f,d);b.lineTo(c,d);b.lineTo(c,g);b.lineTo(f,g);b.lineTo(f,e);b.lineTo(l,e);b.lineTo(l,g);b.lineTo(0,g);b.close();
-b.end()};mxCellRenderer.registerShape("cross",xa);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.25;Ea.prototype.redrawPath=function(b,d,g,c,e){d=Math.min(c,e/2);g=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);b.moveTo(0,e/2);b.lineTo(g,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c-d,e);b.lineTo(g,e);b.close();b.end()};mxCellRenderer.registerShape("display",Ea);mxUtils.extend(Z,mxActor);Z.prototype.cst={RECT2:"mxgraph.basic.rect"};Z.prototype.customProperties=
+"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&cb.apply(this,arguments)};var fb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(b,d,f,c,e){if(null==b.handJiggle||b.handJiggle.constructor!=L)fb.apply(this,arguments);else{var z=!0;null!=this.style&&(z="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(z||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)z||
+null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=!1),b.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?z=Math.min(c/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,z=Math.min(c*z,e*z)),b.moveTo(d+z,f),b.lineTo(d+c-z,f),b.quadTo(d+c,f,d+c,f+z),b.lineTo(d+c,f+e-z),b.quadTo(d+c,f+e,d+c-z,
+f+e),b.lineTo(d+z,f+e),b.quadTo(d,f+e,d,f+e-z),b.lineTo(d,f+z),b.quadTo(d,f,d+z,f)):(b.moveTo(d,f),b.lineTo(d+c,f),b.lineTo(d+c,f+e),b.lineTo(d,f+e),b.lineTo(d,f)),b.close(),b.end(),b.fillAndStroke()}};mxUtils.extend(G,mxRectangleShape);G.prototype.size=.1;G.prototype.fixedSize=!1;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
+this.direction==mxConstants.DIRECTION_WEST)){var d=b.width,f=b.height;b=new mxRectangle(b.x,b.y,d,f);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*e,f*e));b.x+=Math.round(c);b.width-=Math.round(2*c)}return b};G.prototype.paintForeground=function(b,d,f,c,e){var z=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),
+g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=z?Math.max(0,Math.min(c,g)):c*Math.max(0,Math.min(1,g));this.isRounded&&(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(c*z,e*z)));g=Math.round(g);b.begin();b.moveTo(d+g,f);b.lineTo(d+g,f+e);b.moveTo(d+c-g,f);b.lineTo(d+c-g,f+e);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",G);mxCellRenderer.registerShape("process2",
+G);mxUtils.extend(K,mxRectangleShape);K.prototype.paintBackground=function(b,d,f,c,e){b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};K.prototype.paintForeground=function(b,d,f,c,e){};mxCellRenderer.registerShape("transparent",K);mxUtils.extend(C,mxHexagon);C.prototype.size=30;C.prototype.position=.5;C.prototype.position2=.5;C.prototype.base=20;C.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};C.prototype.isRoundable=
+function(){return!0};C.prototype.redrawPath=function(b,d,f,c,e){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var z=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
+this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-f),new mxPoint(Math.min(c,z+l),e-f),new mxPoint(g,e),new mxPoint(Math.max(0,z),e-f),new mxPoint(0,e-f)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",C);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(0,e),new mxPoint(d,e/2)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("step",M);mxUtils.extend(P,mxHexagon);P.prototype.size=.25;P.prototype.fixedSize=20;P.prototype.isRoundable=function(){return!0};
+P.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*e),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(0,.5*e)],this.isRounded,f,
+!0)};mxCellRenderer.registerShape("hexagon",P);mxUtils.extend(S,mxRectangleShape);S.prototype.isHtmlAllowed=function(){return!1};S.prototype.paintForeground=function(b,d,f,c,e){var z=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,f+z);b.lineTo(d+c/2,f+e-z);b.moveTo(d+z,f+e/2);b.lineTo(d+c-z,f+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",S);var Ya=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==
+this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};mxRhombus.prototype.paintVertexShape=function(b,d,f,c,e){Ya.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var z=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=z;f+=z;c-=2*z;e-=2*z;0<c&&0<e&&(b.setShadow(!1),Ya.apply(this,[b,d,f,c,e]))}};mxUtils.extend(N,
+mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};N.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);d+=g;f+=g;c-=2*g;e-=2*g;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var g=0,z;do{z=mxCellRenderer.defaultShapes[this.style["symbol"+g]];if(null!=z){var l=this.style["symbol"+g+"Align"],k=this.style["symbol"+g+"VerticalAlign"],m=this.style["symbol"+g+"Width"],q=this.style["symbol"+g+"Height"],n=this.style["symbol"+g+"Spacing"]||0,Ga=this.style["symbol"+g+"VSpacing"]||n,la=this.style["symbol"+g+"ArcSpacing"];null!=la&&(la*=this.getArcSize(c+this.strokewidth,
+e+this.strokewidth),n+=la,Ga+=la);var la=d,F=f,la=l==mxConstants.ALIGN_CENTER?la+(c-m)/2:l==mxConstants.ALIGN_RIGHT?la+(c-m-n):la+n,F=k==mxConstants.ALIGN_MIDDLE?F+(e-q)/2:k==mxConstants.ALIGN_BOTTOM?F+(e-q-Ga):F+Ga;b.save();l=new z;l.style=this.style;z.prototype.paintVertexShape.call(l,b,la,F,m,q);b.restore()}g++}while(null!=z)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(b,d,f,
+c,e,g){g?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(F,mxShape);F.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();
+b.stroke()};mxCellRenderer.registerShape("umlActor",F);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};B.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(A,mxEllipse);A.prototype.paintVertexShape=function(b,
+d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/8,f+e);b.lineTo(d+7*c/8,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",A);mxUtils.extend(W,mxShape);W.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",W);mxUtils.extend(I,mxShape);I.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+
+b.height/8,b.width,7*b.height/8)};I.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};I.prototype.paintForeground=function(b,d,f,c,e){b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,e/4);b.end();b.stroke()};mxCellRenderer.registerShape("umlControl",I);mxUtils.extend(O,mxRectangleShape);O.prototype.size=40;O.prototype.isHtmlAllowed=function(){return!1};O.prototype.getLabelBounds=
+function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,d)};O.prototype.paintBackground=function(b,d,f,c,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),z=mxUtils.getValue(this.style,"participant");null==z||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,d,f,c,g):(z=this.state.view.graph.cellRenderer.getShape(z),null!=z&&z!=O&&(z=new z,
+z.apply(this.state),b.save(),z.paintVertexShape(b,d,f,c,g),b.restore()));g<e&&(b.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),b.begin(),b.moveTo(d+c/2,f+g),b.lineTo(d+c/2,f+e),b.end(),b.stroke())};O.prototype.paintForeground=function(b,d,f,c,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,b,d,f,c,Math.min(e,g))};mxCellRenderer.registerShape("umlLifeline",O);mxUtils.extend(aa,mxShape);
+aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.getLabelMargins=function(b){return new mxRectangle(0,0,b.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),b.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};aa.prototype.paintBackground=function(b,d,f,c,e){var g=this.corner,z=Math.min(c,Math.max(g,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(e,Math.max(1.5*g,parseFloat(mxUtils.getValue(this.style,
+"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(b.setFillColor(k),b.rect(d,f,c,e),b.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(b,d,f,c,e),b.setGradient(this.fill,this.gradient,d,f,c,e,this.gradientDirection)):b.setFillColor(this.fill);b.begin();b.moveTo(d,f);b.lineTo(d+z,f);b.lineTo(d+z,f+Math.max(0,l-1.5*g));b.lineTo(d+Math.max(0,z-
+g),f+l);b.lineTo(d,f+l);b.close();b.fillAndStroke();b.begin();b.moveTo(d+z,f);b.lineTo(d+c,f);b.lineTo(d+c,f+e);b.lineTo(d,f+e);b.lineTo(d,f+l);b.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(b,d,f,c){return new mxPoint(b.getCenterX(),b.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(b,d,f,c){c=O.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||
+1)*d.view.scale/2-1;f.x<b.getCenterX()&&(d=-1*(d+1));return new mxPoint(b.getCenterX()+d,Math.min(b.y+b.height,Math.max(b.y+c,f.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(b,d,f,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,d,f,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||
+1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return f.x<b.getCenterX()&&(c=-1*(c+1)),new mxPoint(b.getCenterX()+c,Math.min(b.y+b.height,Math.max(b.y,f.y)));f.y<b.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,f.x)),b.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=
+function(b,d,f,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(b,new mxRectangle(0,0,0,Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(d.style,"size",C.prototype.size))*d.view.scale))),d.style),d,f,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?H.prototype.fixedSize:H.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));
+e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]):(e=e?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),
+new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<l||f.x>l+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,b,f)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?D.prototype.fixedSize:D.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,
+z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z),new mxPoint(l+k-e,z+m),new mxPoint(l+
+e,z+m),new mxPoint(l,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<l||f.x>l+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,
+b,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?M.prototype.fixedSize:M.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?
+(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,b),new mxPoint(l,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),new mxPoint(l+k-e,b),new mxPoint(l+k,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,
+Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(q,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(q,z+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]);q=new mxPoint(q,b);c&&(f.x<l||f.x>l+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);
+mxPerimeter.HexagonPerimeter2=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?P.prototype.fixedSize:P.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,
+Math.min(1,g)),z=[new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e),new mxPoint(q,z)]):(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]);q=new mxPoint(q,b);c&&(f.x<l||f.x>l+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("hexagonPerimeter2",
+mxPerimeter.HexagonPerimeter2);mxUtils.extend(na,mxShape);na.prototype.size=10;na.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,f);b.ellipse((c-g)/2,0,g,g);b.fillAndStroke();b.begin();b.moveTo(c/2,g);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",na);mxUtils.extend(ga,mxShape);ga.prototype.size=10;ga.prototype.inset=2;ga.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,
+"size",this.size)),l=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.begin();b.moveTo(c/2,g+l);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-g)/2-l,g/2);b.quadTo((c-g)/2-l,g+l,c/2,g+l);b.quadTo((c+g)/2+l,g+l,(c+g)/2+l,g/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",ga);mxUtils.extend(ha,mxShape);ha.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);
+b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",ha);mxUtils.extend(oa,mxShape);oa.prototype.inset=2;oa.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.ellipse(0,g,c-2*g,e-2*g);b.fillAndStroke();b.begin();b.moveTo(c/2,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",oa);mxUtils.extend(X,mxCylinder);X.prototype.jettyWidth=
+20;X.prototype.jettyHeight=10;X.prototype.redrawPath=function(b,d,f,c,e,g){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=l/2;var l=f+l/2,z=Math.min(d,e-d),k=Math.min(z+2*d,e-d);g?(b.moveTo(f,z),b.lineTo(l,z),b.lineTo(l,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,
+k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("module",X);mxUtils.extend(ca,mxCylinder);ca.prototype.jettyWidth=32;ca.prototype.jettyHeight=12;ca.prototype.redrawPath=function(b,d,f,c,e,g){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=l/2;var l=f+l/2,z=.3*e-d/2,k=.7*e-d/2;g?(b.moveTo(f,z),b.lineTo(l,z),b.lineTo(l,
+z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("component",ca);mxUtils.extend(pa,mxRectangleShape);pa.prototype.paintForeground=function(b,d,f,c,e){var g=c/2,l=e/2,z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;b.begin();this.addPoints(b,[new mxPoint(d+g,f),new mxPoint(d+c,f+l),new mxPoint(d+g,f+e),new mxPoint(d,f+l)],this.isRounded,z,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",pa);mxUtils.extend(V,mxDoubleEllipse);V.prototype.outerStroke=!0;V.prototype.paintVertexShape=function(b,d,f,c,e){var g=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(d+g,f+g,c-2*g,e-2*g),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&
+(b.ellipse(d,f,c,e),b.stroke())};mxCellRenderer.registerShape("endState",V);mxUtils.extend(Q,V);Q.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Q);mxUtils.extend(ta,mxArrowConnector);ta.prototype.defaultWidth=4;ta.prototype.isOpenEnded=function(){return!0};ta.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ta.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
+ta);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=10;Y.prototype.defaultArrowWidth=20;Y.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Y.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
+Y);mxUtils.extend(fa,mxActor);fa.prototype.size=30;fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("manualInput",fa);mxUtils.extend(ia,mxRectangleShape);ia.prototype.dx=
+20;ia.prototype.dy=20;ia.prototype.isHtmlAllowed=function(){return!1};ia.prototype.paintForeground=function(b,d,f,c,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(c*l,e*l));l=Math.max(g,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
+b.begin();b.moveTo(d,f+g);b.lineTo(d+c,f+g);b.end();b.stroke();b.begin();b.moveTo(d+l,f);b.lineTo(d+l,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",ia);mxUtils.extend(ra,mxActor);ra.prototype.dx=20;ra.prototype.dy=20;ra.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));
+var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(d,f),new mxPoint(d,e),new mxPoint(0,e)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("corner",ra);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.lineTo(0,e);b.end();b.moveTo(c,0);b.lineTo(c,e);b.end();b.moveTo(0,e/2);b.lineTo(c,e/2);b.end()};mxCellRenderer.registerShape("crossbar",
+U);mxUtils.extend(ja,mxActor);ja.prototype.dx=20;ja.prototype.dy=20;ja.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint((c+
+d)/2,f),new mxPoint((c+d)/2,e),new mxPoint((c-d)/2,e),new mxPoint((c-d)/2,f),new mxPoint(0,f)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("tee",ja);mxUtils.extend(ba,mxActor);ba.prototype.arrowWidth=.3;ba.prototype.arrowSize=.2;ba.prototype.redrawPath=function(b,d,f,c,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));f=(e-g)/2;var g=
+f+g,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,f),new mxPoint(c-d,f),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,g),new mxPoint(0,g)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("singleArrow",ba);mxUtils.extend(ma,mxActor);ma.prototype.redrawPath=function(b,d,f,c,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ba.prototype.arrowWidth))));d=c*Math.max(0,
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ba.prototype.arrowSize))));f=(e-g)/2;var g=f+g,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e/2),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(c-d,f),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,g),new mxPoint(d,g),new mxPoint(d,e)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",ma);mxUtils.extend(da,mxActor);da.prototype.size=
+.1;da.prototype.fixedSize=20;da.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(d,0);b.lineTo(c,0);b.quadTo(c-2*d,e/2,c,e);b.lineTo(d,e);b.quadTo(d-2*d,e/2,d,0);b.close();b.end()};mxCellRenderer.registerShape("dataStorage",da);mxUtils.extend(qa,mxActor);qa.prototype.redrawPath=
+function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.registerShape("or",qa);mxUtils.extend(ya,mxActor);ya.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.registerShape("xor",ya);mxUtils.extend(ua,mxActor);ua.prototype.size=20;ua.prototype.isRoundable=function(){return!0};ua.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("loopLimit",ua);mxUtils.extend(sa,mxActor);sa.prototype.size=.375;sa.prototype.isRoundable=function(){return!0};sa.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-d),new mxPoint(c/2,e),new mxPoint(0,e-d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("offPageConnector",sa);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/2,f+e);b.lineTo(d+c,f+e);b.end();b.stroke()};
+mxCellRenderer.registerShape("tapeData",za);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke();b.begin();b.moveTo(d+c/2,f);b.lineTo(d+c/2,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("orEllipse",va);mxUtils.extend(T,mxEllipse);T.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);b.setShadow(!1);b.begin();b.moveTo(d+.145*c,f+.145*e);b.lineTo(d+.855*c,f+.855*e);b.end();b.stroke();b.begin();b.moveTo(d+.855*c,f+.145*e);b.lineTo(d+.145*c,f+.855*e);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",T);mxUtils.extend(Aa,mxRhombus);Aa.prototype.paintVertexShape=function(b,d,f,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",
+Aa);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(b,d,f,c,e){b.begin();b.moveTo(d,f);b.lineTo(d+c,f);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke();b.begin();b.moveTo(d,f+e);b.lineTo(d+c,f+e);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",ka);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(b,d,f,c,e){var g=f+e-5;b.begin();b.moveTo(d,f);b.lineTo(d,f+e);b.moveTo(d,g);b.lineTo(d+10,g-5);b.moveTo(d,g);b.lineTo(d+10,
+g+5);b.moveTo(d,g);b.lineTo(d+c,g);b.moveTo(d+c,f);b.lineTo(d+c,f+e);b.moveTo(d+c,g);b.lineTo(d+c-10,g-5);b.moveTo(d+c,g);b.lineTo(d+c-10,g+5);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(b,d,f,c,e){this.outline||b.setStrokeColor(null);if(null!=this.style){var g=b.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=
+!1);b.rect(d,f,c,e);b.fill();b.pointerEvents=g;b.setStrokeColor(this.stroke);b.begin();b.moveTo(d,f);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?b.lineTo(d+c,f):b.moveTo(d+c,f);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?b.lineTo(d+c,f+e):b.moveTo(d+c,f+e);this.outline||"1"==mxUtils.getValue(this.style,"bottom","1")?b.lineTo(d,f+e):b.moveTo(d,f+e);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&b.lineTo(d,f);b.end();b.stroke()}};mxCellRenderer.registerShape("partialRectangle",
+wa);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(d+c/2,f),b.lineTo(d+c/2,f+e)):(b.moveTo(d,f+e/2),b.lineTo(d+c,f+e/2));b.end();b.stroke()};mxCellRenderer.registerShape("lineEllipse",Ca);mxUtils.extend(Da,mxActor);Da.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);b.moveTo(0,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);
+b.quadTo(c,e,c-d,e);b.lineTo(0,e);b.close();b.end()};mxCellRenderer.registerShape("delay",Da);mxUtils.extend(xa,mxActor);xa.prototype.size=.2;xa.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,c);var g=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(e-g)/2;f=d+g;var l=(c-g)/2,g=l+g;b.moveTo(0,d);b.lineTo(l,d);b.lineTo(l,0);b.lineTo(g,0);b.lineTo(g,d);b.lineTo(c,d);b.lineTo(c,f);b.lineTo(g,f);b.lineTo(g,e);b.lineTo(l,e);b.lineTo(l,f);b.lineTo(0,f);b.close();
+b.end()};mxCellRenderer.registerShape("cross",xa);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.25;Ea.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);f=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);b.moveTo(0,e/2);b.lineTo(f,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c-d,e);b.lineTo(f,e);b.close();b.end()};mxCellRenderer.registerShape("display",Ea);mxUtils.extend(Z,mxActor);Z.prototype.cst={RECT2:"mxgraph.basic.rect"};Z.prototype.customProperties=
[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",
dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",
defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",
type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},
-{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Z.prototype.paintVertexShape=function(b,d,g,c,e){b.translate(d,g);this.strictDrawShape(b,0,0,c,e)};Z.prototype.strictDrawShape=function(b,d,g,c,e,f){var l=f&&f.rectStyle?f.rectStyle:
-mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=f&&f.absoluteCornerSize?f.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=f&&f.size?f.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),q=f&&f.rectOutline?f.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),p=f&&f.indent?f.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=f&&f.dashed?f.dashed:
-mxUtils.getValue(this.style,"dashed",!1),G=f&&f.dashPattern?f.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),u=f&&f.relIndent?f.relIndent:Math.max(0,Math.min(50,p)),y=f&&f.top?f.top:mxUtils.getValue(this.style,"top",!0),n=f&&f.right?f.right:mxUtils.getValue(this.style,"right",!0),D=f&&f.bottom?f.bottom:mxUtils.getValue(this.style,"bottom",!0),v=f&&f.left?f.left:mxUtils.getValue(this.style,"left",!0),x=f&&f.topLeftStyle?f.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),
-J=f&&f.topRightStyle?f.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),t=f&&f.bottomRightStyle?f.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),A=f&&f.bottomLeftStyle?f.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),B=f&&f.fillColor?f.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");f&&f.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var W=f&&f.strokeWidth?f.strokeWidth:mxUtils.getValue(this.style,
-"strokeWidth","1"),C=f&&f.fillColor2?f.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),O=f&&f.gradientColor2?f.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),sa=f&&f.gradientDirection2?f.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),M=f&&f.opacity?f.opacity:mxUtils.getValue(this.style,"opacity","100"),Fa=Math.max(0,Math.min(50,m));f=Z.prototype;b.setDashed(z);G&&""!=G&&b.setDashPattern(G);b.setStrokeWidth(W);m=Math.min(.5*e,.5*c,m);k||
-(m=Fa*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(p=Math.min(u*Math.min(c,e)/100));p=Math.min(p,.5*Math.min(c,e)-m);(y||n||D||v)&&"frame"!=q&&(b.begin(),y?f.moveNW(b,d,g,c,e,l,x,m,v):b.moveTo(0,0),y&&f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),n&&f.paintNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),D&&f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),v&&f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(C),
-z=k=M,"none"==C&&(k=0),"none"==O&&(z=0),b.setGradient(C,O,0,0,c,e,sa,k,z),b.begin(),y?f.moveNWInner(b,d,g,c,e,l,x,m,p,y,v):b.moveTo(p,0),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),v&&D&&f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),D&&n&&f.paintSEInner(b,d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),n&&y&&f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),y&&v&&f.paintNWInner(b,d,g,c,e,l,x,m,p),b.fill(),"none"==B&&(b.begin(),f.paintFolds(b,
-d,g,c,e,l,x,J,t,A,m,y,n,D,v),b.stroke()));y||n||D||!v?y||n||!D||v?!y&&!n&&D&&v?"frame"!=q?(b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),"double"==q&&(f.moveNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D)),b.stroke()):(b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,
-D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.lineNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),b.close(),b.fillAndStroke()):y||!n||D||v?!y&&n&&!D&&v?"frame"!=q?(b.begin(),f.moveSW(b,d,g,c,e,l,x,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),"double"==q&&(f.moveNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v)),b.stroke(),b.begin(),f.moveNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),"double"==
-q&&(f.moveSEInner(b,d,g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n)),b.stroke()):(b.begin(),f.moveSW(b,d,g,c,e,l,x,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.lineNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),b.close(),b.fillAndStroke(),b.begin(),f.moveNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.lineSEInner(b,d,g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),b.close(),b.fillAndStroke()):!y&&n&&D&&!v?"frame"!=q?(b.begin(),f.moveNE(b,d,g,c,e,l,J,
-m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),"double"==q&&(f.moveSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n)),b.stroke()):(b.begin(),f.moveNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.lineSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,
-d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),b.close(),b.fillAndStroke()):!y&&n&&D&&v?"frame"!=q?(b.begin(),f.moveNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),"double"==q&&(f.moveNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,d,g,c,e,l,t,
-m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n)),b.stroke()):(b.begin(),f.moveNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.lineNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),b.close(),b.fillAndStroke()):
-!y||n||D||v?y&&!n&&!D&&v?"frame"!=q?(b.begin(),f.moveSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),"double"==q&&(f.moveNEInner(b,d,g,c,e,l,J,m,p,n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v)),b.stroke()):(b.begin(),f.moveSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.lineNEInner(b,d,g,c,e,l,J,m,p,
-n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),b.close(),b.fillAndStroke()):y&&!n&&D&&!v?"frame"!=q?(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),"double"==q&&(f.moveNEInner(b,d,g,c,e,l,J,m,p,n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y)),b.stroke(),b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),"double"==q&&(f.moveSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D)),
-b.stroke()):(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.lineNEInner(b,d,g,c,e,l,J,m,p,n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),b.close(),b.fillAndStroke(),b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.lineSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),b.close(),b.fillAndStroke()):y&&!n&&D&&v?"frame"!=q?(b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,
-c,e,l,x,m,y),f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),"double"==q&&(f.moveNEInner(b,d,g,c,e,l,J,m,p,n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D)),b.stroke()):(b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,
-g,c,e,l,J,m,n),f.lineNEInner(b,d,g,c,e,l,J,m,p,n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),b.close(),b.fillAndStroke()):y&&n&&!D&&!v?"frame"!=q?(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),"double"==q&&(f.moveSEInner(b,d,g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,
-l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y)),b.stroke()):(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.lineSEInner(b,d,g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),b.close(),b.fillAndStroke()):y&&n&&!D&&v?"frame"!=q?(b.begin(),f.moveSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.paintNW(b,
-d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),"double"==q&&(f.moveSEInner(b,d,g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v)),b.stroke()):(b.begin(),f.moveSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,
-g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.lineSEInner(b,d,g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),b.close(),b.fillAndStroke()):y&&n&&D&&!v?"frame"!=q?(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,
-c,e,l,A,m,v),"double"==q&&(f.moveSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y)),b.stroke()):(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.lineSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,
-d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),b.close(),b.fillAndStroke()):y&&n&&D&&v&&("frame"!=q?(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),
-b.close(),"double"==q&&(f.moveSWInner(b,d,g,c,e,l,A,m,p,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),b.close()),b.stroke()):(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,g,c,e,l,
-J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),b.close(),f.moveSWInner(b,d,g,c,e,l,A,m,p,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,
-D,v),b.close(),b.fillAndStroke())):"frame"!=q?(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),"double"==q&&(f.moveNEInner(b,d,g,c,e,l,J,m,p,n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y)),b.stroke()):(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.lineNEInner(b,d,g,c,e,l,J,m,p,n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),f.moveNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),"double"==q&&(f.moveSEInner(b,d,
-g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n)),b.stroke()):(b.begin(),f.moveNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.lineSEInner(b,d,g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),"double"==q&&(f.moveSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D)),b.stroke()):(b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,
-m,v),f.lineSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),f.moveSW(b,d,g,c,e,l,x,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),"double"==q&&(f.moveNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v)),b.stroke()):(b.begin(),f.moveSW(b,d,g,c,e,l,x,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.lineNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),b.close(),b.fillAndStroke());b.begin();f.paintFolds(b,d,g,
-c,e,l,x,J,t,A,m,y,n,D,v);b.stroke()};Z.prototype.moveNW=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==f||!k?b.moveTo(0,0):b.moveTo(0,m)};Z.prototype.moveNE=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==f||!k?b.moveTo(c,0):b.moveTo(c-m,0)};Z.prototype.moveSE=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==f||!k?b.moveTo(c,e):b.moveTo(c,e-m)};Z.prototype.moveSW=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==f||!k?b.moveTo(0,e):
-b.moveTo(m,e)};Z.prototype.paintNW=function(b,d,g,c,e,f,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==f||"invRound"==l||"default"==l&&"invRound"==f){d=0;if("rounded"==l||"default"==l&&"rounded"==f)d=1;b.arcTo(m,m,0,0,d,m,0)}else("snip"==l||"default"==l&&"snip"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(m,0);else b.lineTo(0,0)};Z.prototype.paintTop=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==f||!k?b.lineTo(c,0):b.lineTo(c-m,0)};Z.prototype.paintNE=function(b,d,g,
-c,e,f,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==f||"invRound"==l||"default"==l&&"invRound"==f){d=0;if("rounded"==l||"default"==l&&"rounded"==f)d=1;b.arcTo(m,m,0,0,d,c,m)}else("snip"==l||"default"==l&&"snip"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(c,m);else b.lineTo(c,0)};Z.prototype.paintRight=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==f||!k?b.lineTo(c,e):b.lineTo(c,e-m)};Z.prototype.paintLeft=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==
-f||!k?b.lineTo(0,0):b.lineTo(0,m)};Z.prototype.paintSE=function(b,d,g,c,e,f,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==f||"invRound"==l||"default"==l&&"invRound"==f){d=0;if("rounded"==l||"default"==l&&"rounded"==f)d=1;b.arcTo(m,m,0,0,d,c-m,e)}else("snip"==l||"default"==l&&"snip"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(c-m,e);else b.lineTo(c,e)};Z.prototype.paintBottom=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==f||!k?b.lineTo(0,e):b.lineTo(m,e)};Z.prototype.paintSW=
-function(b,d,g,c,e,f,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==f||"invRound"==l||"default"==l&&"invRound"==f){d=0;if("rounded"==l||"default"==l&&"rounded"==f)d=1;b.arcTo(m,m,0,0,d,0,e-m)}else("snip"==l||"default"==l&&"snip"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(0,e-m);else b.lineTo(0,e)};Z.prototype.paintNWInner=function(b,d,g,c,e,f,l,m,k){if("rounded"==l||"default"==l&&"rounded"==f)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==l||"default"==l&&"invRound"==f)b.arcTo(m+
-k,m+k,0,0,1,k,k+m);else if("snip"==l||"default"==l&&"snip"==f)b.lineTo(k,.5*k+m);else if("fold"==l||"default"==l&&"fold"==f)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};Z.prototype.paintTopInner=function(b,d,g,c,e,f,l,m,k,p,q){p||q?!p&&q?b.lineTo(0,k):p&&!q?b.lineTo(k,0):p?"square"==l||"default"==l&&"square"==f?b.lineTo(k,k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(m+.5*k,k):b.lineTo(m+k,k):b.lineTo(0,k):b.lineTo(0,0)};Z.prototype.paintNEInner=function(b,d,g,c,e,
-f,l,m,k){if("rounded"==l||"default"==l&&"rounded"==f)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-m-.5*k,k);else if("invRound"==l||"default"==l&&"invRound"==f)b.arcTo(m+k,m+k,0,0,1,c-m-k,k);else if("snip"==l||"default"==l&&"snip"==f)b.lineTo(c-m-.5*k,k);else if("fold"==l||"default"==l&&"fold"==f)b.lineTo(c-m-k,m+k),b.lineTo(c-m-k,k)};Z.prototype.paintRightInner=function(b,d,g,c,e,f,l,m,k,p,q){p||q?!p&&q?b.lineTo(c-k,0):p&&!q?b.lineTo(c,k):p?"square"==l||"default"==l&&"square"==f?b.lineTo(c-k,k):"rounded"==l||"default"==
-l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};Z.prototype.paintLeftInner=function(b,d,g,c,e,f,l,m,k,p,q){p||q?!p&&q?b.lineTo(k,e):p&&!q?b.lineTo(0,e-k):p?"square"==l||"default"==l&&"square"==f?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,e)};Z.prototype.paintSEInner=function(b,d,g,c,e,f,l,m,k){if("rounded"==l||"default"==
-l&&"rounded"==f)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-k,e-m-.5*k);else if("invRound"==l||"default"==l&&"invRound"==f)b.arcTo(m+k,m+k,0,0,1,c-k,e-m-k);else if("snip"==l||"default"==l&&"snip"==f)b.lineTo(c-k,e-m-.5*k);else if("fold"==l||"default"==l&&"fold"==f)b.lineTo(c-m-k,e-m-k),b.lineTo(c-k,e-m-k)};Z.prototype.paintBottomInner=function(b,d,g,c,e,f,l,m,k,p,q){p||q?!p&&q?b.lineTo(c,e-k):p&&!q?b.lineTo(c-k,e):"square"==l||"default"==l&&"square"==f||!p?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==
-f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};Z.prototype.paintSWInner=function(b,d,g,c,e,f,l,m,k,p){if(!p)b.lineTo(k,e);else if("square"==l||"default"==l&&"square"==f)b.lineTo(k,e-k);else if("rounded"==l||"default"==l&&"rounded"==f)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==l||"default"==l&&"invRound"==f)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==l||"default"==l&&"snip"==f)b.lineTo(m+.5*k,e-k);else if("fold"==l||"default"==l&&
-"fold"==f)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};Z.prototype.moveSWInner=function(b,d,g,c,e,f,l,m,k,p){p?"square"==l||"default"==l&&"square"==f?b.moveTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.moveTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.moveTo(k,e-m-k):b.moveTo(0,e-k)};Z.prototype.lineSWInner=function(b,d,g,c,e,f,l,m,k,p){p?"square"==l||"default"==l&&"square"==f?b.lineTo(k,e-k):"rounded"==l||"default"==
-l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};Z.prototype.moveSEInner=function(b,d,g,c,e,f,l,m,k,p){p?"square"==l||"default"==l&&"square"==f?b.moveTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.moveTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.moveTo(c-k,e-m-
-k):b.moveTo(c-k,e)};Z.prototype.lineSEInner=function(b,d,g,c,e,f,l,m,k,p){p?"square"==l||"default"==l&&"square"==f?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(c-k,e-m-k):b.lineTo(c-k,e)};Z.prototype.moveNEInner=function(b,d,g,c,e,f,l,m,k,p){p?"square"==l||"default"==l&&"square"==f||p?b.moveTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==
-f||"snip"==l||"default"==l&&"snip"==f?b.moveTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};Z.prototype.lineNEInner=function(b,d,g,c,e,f,l,m,k,p){p?"square"==l||"default"==l&&"square"==f||p?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(c-k,m+k):b.lineTo(c,k)};
-Z.prototype.moveNWInner=function(b,d,g,c,e,f,l,m,k,p,q){p||q?!p&&q?b.moveTo(k,0):p&&!q?b.moveTo(0,k):"square"==l||"default"==l&&"square"==f?b.moveTo(k,k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.moveTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.moveTo(k,m+k):b.moveTo(0,0)};Z.prototype.lineNWInner=function(b,d,g,c,e,f,l,m,k,p,q){p||q?!p&&q?b.lineTo(k,0):p&&!q?b.lineTo(0,k):"square"==l||"default"==l&&"square"==
-f?b.lineTo(k,k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(k,m+k):b.lineTo(0,0)};Z.prototype.paintFolds=function(b,d,g,c,e,f,l,m,k,p,q,G,u,y,v){if("fold"==f||"fold"==l||"fold"==m||"fold"==k||"fold"==p)("fold"==l||"default"==l&&"fold"==f)&&G&&v&&(b.moveTo(0,q),b.lineTo(q,q),b.lineTo(q,0)),("fold"==m||"default"==m&&"fold"==f)&&G&&u&&(b.moveTo(c-q,0),b.lineTo(c-
-q,q),b.lineTo(c,q)),("fold"==k||"default"==k&&"fold"==f)&&y&&u&&(b.moveTo(c-q,e),b.lineTo(c-q,e-q),b.lineTo(c,e-q)),("fold"==p||"default"==p&&"fold"==f)&&y&&v&&(b.moveTo(0,e-q),b.lineTo(q,e-q),b.lineTo(q,e))};mxCellRenderer.registerShape(Z.prototype.cst.RECT2,Z);Z.prototype.constraints=null;mxUtils.extend(Ia,mxConnector);Ia.prototype.origPaintEdgeShape=Ia.prototype.paintEdgeShape;Ia.prototype.paintEdgeShape=function(b,d,g){for(var c=[],e=0;e<d.length;e++)c.push(mxUtils.clone(d[e]));var e=b.state.dashed,
-f=b.state.fixDash;Ia.prototype.origPaintEdgeShape.apply(this,[b,c,g]);3<=b.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(b.setStrokeColor(c),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(e,f),Ia.prototype.origPaintEdgeShape.apply(this,[b,d,g])))};mxCellRenderer.registerShape("filledEdge",Ia);"undefined"!==typeof StyleFormatPanel&&function(){var b=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),
-g=b.apply(this,arguments);"umlFrame"==d.style.shape&&g.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return g}}();mxMarker.addMarker("dash",function(b,d,g,c,e,f,l,m,k,p){var q=e*(l+k+1),G=f*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-G/2,c.y-G/2+q/2);b.lineTo(c.x+G/2-3*q/2,c.y-3*G/2-q/2);b.stroke()}});mxMarker.addMarker("box",function(b,d,g,c,e,f,l,m,k,p){var q=e*(l+k+1),G=f*(l+k+1),u=c.x+q/2,y=c.y+G/2;c.x-=q;c.y-=G;return function(){b.begin();
-b.moveTo(u-q/2-G/2,y-G/2+q/2);b.lineTo(u-q/2+G/2,y-G/2-q/2);b.lineTo(u+G/2-3*q/2,y-3*G/2-q/2);b.lineTo(u-G/2-3*q/2,y-3*G/2+q/2);b.close();p?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,g,c,e,f,l,m,k,p){var q=e*(l+k+1),G=f*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-G/2,c.y-G/2+q/2);b.lineTo(c.x+G/2-3*q/2,c.y-3*G/2-q/2);b.moveTo(c.x-q/2+G/2,c.y-G/2-q/2);b.lineTo(c.x-G/2-3*q/2,c.y-3*G/2+q/2);b.stroke()}});mxMarker.addMarker("circle",Va);mxMarker.addMarker("circlePlus",
-function(b,d,g,c,e,f,l,m,k,p){var q=c.clone(),G=Va.apply(this,arguments),u=e*(l+2*k),y=f*(l+2*k);return function(){G.apply(this,arguments);b.begin();b.moveTo(q.x-e*k,q.y-f*k);b.lineTo(q.x-2*u+e*k,q.y-2*y+f*k);b.moveTo(q.x-u-y+f*k,q.y-y+u-e*k);b.lineTo(q.x+y-u-f*k,q.y-y-u+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,g,c,e,f,l,m,k,p){var q=e*(l+k+1),G=f*(l+k+1),u=c.clone();c.x-=q;c.y-=G;return function(){b.begin();b.moveTo(u.x-G,u.y+q);b.quadTo(c.x-G,c.y+q,c.x,c.y);b.quadTo(c.x+G,
-c.y-q,u.x+G,u.y-q);b.stroke()}});mxMarker.addMarker("async",function(b,d,g,c,e,f,l,m,k,p){d=e*k*1.118;g=f*k*1.118;e*=l+k;f*=l+k;var q=c.clone();q.x-=d;q.y-=g;c.x+=1*-e-d;c.y+=1*-f-g;return function(){b.begin();b.moveTo(q.x,q.y);m?b.lineTo(q.x-e-f/2,q.y-f+e/2):b.lineTo(q.x+f/2-e,q.y-f-e/2);b.lineTo(q.x-e,q.y-f);b.close();p?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",function(b){b=null!=b?b:2;return function(d,g,c,e,f,l,m,k,q,p){f*=m+q;l*=m+q;var G=e.clone();return function(){d.begin();
-d.moveTo(G.x,G.y);k?d.lineTo(G.x-f-l/b,G.y-l+f/b):d.lineTo(G.x+l/b-f,G.y-l-f/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Za=function(b,d,g){return La(b,["width"],d,function(d,c,e,f,l){l=b.shape.getEdgeWidth()*b.view.scale+g;return new mxPoint(f.x+c*d/4+e*l/2,f.y+e*d/4-c*l/2)},function(d,c,e,f,l,m){d=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,l.x,l.y,m.x,m.y));b.style.width=Math.round(2*d)/b.view.scale-g})},La=function(b,d,g,c,e){return ea(b,d,function(d){var e=b.absolutePoints,f=
-e.length-1;d=b.view.translate;var l=b.view.scale,m=g?e[0]:e[f],e=g?e[1]:e[f-1],f=e.x-m.x,k=e.y-m.y,q=Math.sqrt(f*f+k*k),m=c.call(this,q,f/q,k/q,m,e);return new mxPoint(m.x/l-d.x,m.y/l-d.y)},function(d,c,f){var l=b.absolutePoints,m=l.length-1;d=b.view.translate;var k=b.view.scale,q=g?l[0]:l[m],l=g?l[1]:l[m-1],m=l.x-q.x,p=l.y-q.y,G=Math.sqrt(m*m+p*p);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,G,m/G,p/G,q,l,c,f)})},Ha=function(b){return function(d){return[ea(d,["arrowWidth","arrowSize"],function(d){var g=
-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ba.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ba.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-g)*d.height/2)},function(d,g){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-g.y)/d.height*2));this.state.style.arrowSize=Math.max(0,Math.min(b,(d.x+d.width-g.x)/d.width))})]}},Wa=function(b){return function(d){return[ea(d,["size"],function(d){var g=
-Math.max(0,Math.min(.5*d.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(d.x,d.y+g)},function(b,d){this.state.style.size=Math.max(0,d.y-b.y)},!0)]}},Ta=function(b,d,g){return function(c){var e=[ea(c,["size"],function(g){var c=Math.max(0,Math.min(g.width,Math.min(g.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*b;return new mxPoint(g.x+c,g.y+c)},function(d,g){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,g.x-d.x),Math.min(d.height,
-g.y-d.y)))/b)},!1)];g&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Ga(c));return e}},Ma=function(b,d,g,c,e){g=null!=g?g:.5;return function(f){var l=[ea(f,["size"],function(d){var g=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",g?e:b));return new mxPoint(d.x+Math.max(0,Math.min(.5*d.width,c*(g?1:d.width))),d.getCenterY())},function(b,d,c){b=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?
-d.x-b.x:Math.max(0,Math.min(g,(d.x-b.x)/b.width));this.state.style.size=b},!1,c)];d&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(Ga(f));return l}},Xa=function(b,d,g){b=null!=b?b:.5;return function(c){var e=[ea(c,["size"],function(c){var e=null!=g?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,f=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",e?g:d)));return new mxPoint(c.x+Math.min(.75*c.width*b,f*(e?.75:.75*c.width)),c.y+c.height/4)},function(d,c){var e=
-null!=g&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-d.x:Math.max(0,Math.min(b,(c.x-d.x)/d.width*.75));this.state.style.size=e},!1,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Ga(c));return e}},Ka=function(){return function(b){var d=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ga(b));return d}},Ga=function(b,d){return ea(b,[mxConstants.STYLE_ARCSIZE],function(g){var c=null!=d?d:g.height/8;if("1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
-0)){var e=mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(g.x+g.width-Math.min(g.width/2,e),g.y+c)}e=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(g.x+g.width-Math.min(Math.max(g.width/2,g.height/2),Math.min(g.width,g.height)*e),g.y+c)},function(d,g,c){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-g.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-g.x+d.x)/Math.min(d.width,d.height))))})},ea=function(b,d,g,c,e,f,l){var m=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);m.execute=function(b){for(var g=0;g<d.length;g++)this.copyStyle(d[g]);l&&l(b)};m.getPosition=g;m.setPosition=c;m.ignoreGrid=null!=e?e:!0;if(f){var k=m.positionChanged;m.positionChanged=function(){k.apply(this,
-arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return m},Na={link:function(b){return[Za(b,!0,10),Za(b,!1,10)]},flexArrow:function(b){var d=b.view.graph.gridSize/b.view.scale,g=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(g.push(La(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,g,c,e,f){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,
-mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+g*(f+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(f+b.shape.strokewidth*b.view.scale)-g*d/2)},function(g,c,e,f,l,m,k){g=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,l.x,l.y,m.x,m.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-c,m.x,m.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*g)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=
-b.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),g.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,g,c,e,f){d=(b.shape.getStartArrowWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*b.view.scale;return new mxPoint(e.x+g*(f+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(f+b.shape.strokewidth*b.view.scale)-g*d/2)},function(g,c,e,f,l,m,k){g=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,l.x,l.y,m.x,m.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-c,m.x,m.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.startWidth=Math.max(0,Math.round(2*g)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=
-b.style[mxConstants.STYLE_STARTSIZE],b.style.endWidth=b.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(b.style.startWidth)-parseFloat(b.style.endWidth))<d&&(b.style.startWidth=b.style.endWidth))})));mxUtils.getValue(b.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(g.push(La(b,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,g,c,e,f){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+g*(f+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(f+b.shape.strokewidth*b.view.scale)+g*d/2)},function(g,c,e,f,l,m,k){g=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,l.x,l.y,m.x,m.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=
-Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*g)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),g.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!1,function(d,g,c,e,f){d=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+g*(f+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(f+b.shape.strokewidth*b.view.scale)+g*d/2)},function(g,c,e,f,l,m,k){g=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,l.x,l.y,m.x,m.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-b.shape.strokewidth)/
-3)/100/b.view.scale;b.style.endWidth=Math.max(0,Math.round(2*g)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE],b.style.startWidth=b.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-
-parseFloat(b.style.startWidth))<d&&(b.style.endWidth=b.style.startWidth))})));return g},swimlane:function(b){var d=[];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var g=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(Ga(b,g/2))}d.push(ea(b,[mxConstants.STYLE_STARTSIZE],function(d){var g=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,
-1)?new mxPoint(d.getCenterX(),d.y+Math.max(0,Math.min(d.height,g))):new mxPoint(d.x+Math.max(0,Math.min(d.width,g)),d.getCenterY())},function(d,g){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,g.y-d.y))):Math.round(Math.max(0,Math.min(d.width,g.x-d.x)))},!1,null,function(d){if(mxEvent.isControlDown(d.getEvent())&&(d=b.view.graph,d.isTableRow(b.cell)||d.isTableCell(b.cell))){for(var g=d.getSwimlaneDirection(b.style),
-c=d.model.getParent(b.cell),c=d.model.getChildCells(c,!0),e=[],f=0;f<c.length;f++)c[f]!=b.cell&&d.isSwimlane(c[f])&&d.getSwimlaneDirection(d.getCurrentCellStyle(c[f]))==g&&e.push(c[f]);d.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],e)}}));return d},label:Ka(),ext:Ka(),rectangle:Ka(),triangle:Ka(),rhombus:Ka(),umlLifeline:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));
-return new mxPoint(b.getCenterX(),b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},umlFrame:function(b){return[ea(b,["width","height"],function(b){var d=Math.max(aa.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),g=Math.max(1.5*aa.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(b.x+d,b.y+g)},function(b,d){this.state.style.width=
-Math.round(Math.max(aa.prototype.corner,Math.min(b.width,d.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(b.height,d.y-b.y)))},!1)]},process:function(b){var d=[ea(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),g=parseFloat(mxUtils.getValue(this.state.style,"size",H.prototype.size));return d?new mxPoint(b.x+g,b.y+b.height/4):new mxPoint(b.x+b.width*g,b.y+b.height/4)},function(b,d){var g="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(.5*b.width,d.x-b.x)):Math.max(0,Math.min(.5,(d.x-b.x)/b.width));this.state.style.size=g},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ga(b));return d},cross:function(b){return[ea(b,["size"],function(b){var d=Math.min(b.width,b.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",xa.prototype.size)))*d/2;return new mxPoint(b.getCenterX()-d,b.getCenterY()-d)},function(b,d){var g=Math.min(b.width,b.height);this.state.style.size=
-Math.max(0,Math.min(1,Math.min(Math.max(0,b.getCenterY()-d.y)/g*2,Math.max(0,b.getCenterX()-d.x)/g*2)))})]},note:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size)))));return new mxPoint(b.x+b.width-d,b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},note2:function(b){return[ea(b,["size"],function(b){var g=
-Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(b.x+b.width-g,b.y+g)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},manualInput:function(b){var d=[ea(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*d/4)},function(b,
-d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(d.y-b.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ga(b));return d},dataStorage:function(b){return[ea(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),g=parseFloat(mxUtils.getValue(this.state.style,"size",d?da.prototype.fixedSize:da.prototype.size));return new mxPoint(b.x+b.width-g*(d?1:b.width),b.getCenterY())},function(b,d){var g="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(b.width,b.x+b.width-d.x)):Math.max(0,Math.min(1,(b.x+b.width-d.x)/b.width));this.state.style.size=g},!1)]},callout:function(b){var d=[ea(b,["size","position"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",C.prototype.size))),g=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position)));mxUtils.getValue(this.state.style,"base",C.prototype.base);return new mxPoint(b.x+g*b.width,b.y+b.height-
+{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Z.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);this.strictDrawShape(b,0,0,c,e)};Z.prototype.strictDrawShape=function(b,d,f,c,e,g){var l=g&&g.rectStyle?g.rectStyle:
+mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=g&&g.absoluteCornerSize?g.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=g&&g.size?g.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),q=g&&g.rectOutline?g.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),n=g&&g.indent?g.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=g&&g.dashed?g.dashed:
+mxUtils.getValue(this.style,"dashed",!1),F=g&&g.dashPattern?g.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),u=g&&g.relIndent?g.relIndent:Math.max(0,Math.min(50,n)),p=g&&g.top?g.top:mxUtils.getValue(this.style,"top",!0),v=g&&g.right?g.right:mxUtils.getValue(this.style,"right",!0),A=g&&g.bottom?g.bottom:mxUtils.getValue(this.style,"bottom",!0),B=g&&g.left?g.left:mxUtils.getValue(this.style,"left",!0),x=g&&g.topLeftStyle?g.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),
+I=g&&g.topRightStyle?g.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),t=g&&g.bottomRightStyle?g.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),y=g&&g.bottomLeftStyle?g.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),D=g&&g.fillColor?g.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");g&&g.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var W=g&&g.strokeWidth?g.strokeWidth:mxUtils.getValue(this.style,
+"strokeWidth","1"),C=g&&g.fillColor2?g.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),N=g&&g.gradientColor2?g.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),la=g&&g.gradientDirection2?g.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),O=g&&g.opacity?g.opacity:mxUtils.getValue(this.style,"opacity","100"),aa=Math.max(0,Math.min(50,m));g=Z.prototype;b.setDashed(z);F&&""!=F&&b.setDashPattern(F);b.setStrokeWidth(W);m=Math.min(.5*e,.5*c,m);k||
+(m=aa*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(n=Math.min(u*Math.min(c,e)/100));n=Math.min(n,.5*Math.min(c,e)-m);(p||v||A||B)&&"frame"!=q&&(b.begin(),p?g.moveNW(b,d,f,c,e,l,x,m,B):b.moveTo(0,0),p&&g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),v&&g.paintNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),A&&g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),B&&g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(C),
+z=k=O,"none"==C&&(k=0),"none"==N&&(z=0),b.setGradient(C,N,0,0,c,e,la,k,z),b.begin(),p?g.moveNWInner(b,d,f,c,e,l,x,m,n,p,B):b.moveTo(n,0),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),B&&A&&g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),A&&v&&g.paintSEInner(b,d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),v&&p&&g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),p&&B&&g.paintNWInner(b,d,f,c,e,l,x,m,n),b.fill(),"none"==D&&(b.begin(),g.paintFolds(b,
+d,f,c,e,l,x,I,t,y,m,p,v,A,B),b.stroke()));p||v||A||!B?p||v||!A||B?!p&&!v&&A&&B?"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,
+A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.lineNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),b.close(),b.fillAndStroke()):p||!v||A||B?!p&&v&&!A&&B?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B)),b.stroke(),b.begin(),g.moveNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),"double"==
+q&&(g.moveSEInner(b,d,f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.lineNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),b.close(),b.fillAndStroke(),b.begin(),g.moveNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.lineSEInner(b,d,f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),b.close(),b.fillAndStroke()):!p&&v&&A&&!B?"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,I,
+m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.lineSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,
+d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),b.close(),b.fillAndStroke()):!p&&v&&A&&B?"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,d,f,c,e,l,t,
+m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.lineNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),b.close(),b.fillAndStroke()):
+!p||v||A||B?p&&!v&&!A&&B?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,I,m,n,v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.lineNEInner(b,d,f,c,e,l,I,m,n,
+v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),b.close(),b.fillAndStroke()):p&&!v&&A&&!B?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,I,m,n,v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p)),b.stroke(),b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A)),
+b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.lineNEInner(b,d,f,c,e,l,I,m,n,v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),b.close(),b.fillAndStroke(),b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.lineSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),b.close(),b.fillAndStroke()):p&&!v&&A&&B?"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,
+c,e,l,x,m,p),g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,I,m,n,v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,
+f,c,e,l,I,m,v),g.lineNEInner(b,d,f,c,e,l,I,m,n,v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),b.close(),b.fillAndStroke()):p&&v&&!A&&!B?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,
+l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.lineSEInner(b,d,f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),b.close(),b.fillAndStroke()):p&&v&&!A&&B?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.paintNW(b,
+d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,
+f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.lineSEInner(b,d,f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),b.close(),b.fillAndStroke()):p&&v&&A&&!B?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,
+c,e,l,y,m,B),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.lineSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,
+d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),b.close(),b.fillAndStroke()):p&&v&&A&&B&&("frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),
+b.close(),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),b.close()),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,f,c,e,l,
+I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),b.close(),g.moveSWInner(b,d,f,c,e,l,y,m,n,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,
+A,B),b.close(),b.fillAndStroke())):"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,I,m,n,v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.lineNEInner(b,d,f,c,e,l,I,m,n,v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),"double"==q&&(g.moveSEInner(b,d,
+f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.lineSEInner(b,d,f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,
+m,B),g.lineSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.lineNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),b.close(),b.fillAndStroke());b.begin();g.paintFolds(b,d,f,
+c,e,l,x,I,t,y,m,p,v,A,B);b.stroke()};Z.prototype.moveNW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,0):b.moveTo(0,m)};Z.prototype.moveNE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(c,0):b.moveTo(c-m,0)};Z.prototype.moveSE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(c,e):b.moveTo(c,e-m)};Z.prototype.moveSW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,e):
+b.moveTo(m,e)};Z.prototype.paintNW=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,m,0)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(m,0);else b.lineTo(0,0)};Z.prototype.paintTop=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(c,0):b.lineTo(c-m,0)};Z.prototype.paintNE=function(b,d,f,
+c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c,m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c,m);else b.lineTo(c,0)};Z.prototype.paintRight=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(c,e):b.lineTo(c,e-m)};Z.prototype.paintLeft=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==
+g||!k?b.lineTo(0,0):b.lineTo(0,m)};Z.prototype.paintSE=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c-m,e)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-m,e);else b.lineTo(c,e)};Z.prototype.paintBottom=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(0,e):b.lineTo(m,e)};Z.prototype.paintSW=
+function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,0,e-m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(0,e-m);else b.lineTo(0,e)};Z.prototype.paintNWInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+
+k,m+k,0,0,1,k,k+m);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(k,.5*k+m);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};Z.prototype.paintTopInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(0,k):n&&!q?b.lineTo(k,0):n?"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(m+.5*k,k):b.lineTo(m+k,k):b.lineTo(0,k):b.lineTo(0,0)};Z.prototype.paintNEInner=function(b,d,f,c,e,
+g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-m-.5*k,k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-m-k,k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-m-.5*k,k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,m+k),b.lineTo(c-m-k,k)};Z.prototype.paintRightInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(c-k,0):n&&!q?b.lineTo(c,k):n?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,k):"rounded"==l||"default"==
+l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};Z.prototype.paintLeftInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(k,e):n&&!q?b.lineTo(0,e-k):n?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,e)};Z.prototype.paintSEInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==
+l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-k,e-m-.5*k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-k,e-m-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-k,e-m-.5*k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,e-m-k),b.lineTo(c-k,e-m-k)};Z.prototype.paintBottomInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(c,e-k):n&&!q?b.lineTo(c-k,e):"square"==l||"default"==l&&"square"==g||!n?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==
+g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};Z.prototype.paintSWInner=function(b,d,f,c,e,g,l,m,k,n){if(!n)b.lineTo(k,e);else if("square"==l||"default"==l&&"square"==g)b.lineTo(k,e-k);else if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(m+.5*k,e-k);else if("fold"==l||"default"==l&&
+"fold"==g)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};Z.prototype.moveSWInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g?b.moveTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,e-m-k):b.moveTo(0,e-k)};Z.prototype.lineSWInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==
+l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};Z.prototype.moveSEInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g?b.moveTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,e-m-
+k):b.moveTo(c-k,e)};Z.prototype.lineSEInner=function(b,d,f,c,e,g,l,k,m,n){n?"square"==l||"default"==l&&"square"==g?b.lineTo(c-m,e-m):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-m,e-k-.5*m):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-m,e-k-m):b.lineTo(c-m,e)};Z.prototype.moveNEInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g||n?b.moveTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==
+g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};Z.prototype.lineNEInner=function(b,d,f,c,e,g,l,k,m,n){n?"square"==l||"default"==l&&"square"==g||n?b.lineTo(c-m,m):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-m,k+.5*m):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-m,k+m):b.lineTo(c,m)};
+Z.prototype.moveNWInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.moveTo(k,0):n&&!q?b.moveTo(0,k):"square"==l||"default"==l&&"square"==g?b.moveTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,m+k):b.moveTo(0,0)};Z.prototype.lineNWInner=function(b,d,f,c,e,g,l,k,m,n,q){n||q?!n&&q?b.lineTo(m,0):n&&!q?b.lineTo(0,m):"square"==l||"default"==l&&"square"==
+g?b.lineTo(m,m):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(m,k+.5*m):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(m,k+m):b.lineTo(0,0)};Z.prototype.paintFolds=function(b,d,f,c,e,g,l,m,k,n,q,F,p,B,v){if("fold"==g||"fold"==l||"fold"==m||"fold"==k||"fold"==n)("fold"==l||"default"==l&&"fold"==g)&&F&&v&&(b.moveTo(0,q),b.lineTo(q,q),b.lineTo(q,0)),("fold"==m||"default"==m&&"fold"==g)&&F&&p&&(b.moveTo(c-q,0),b.lineTo(c-
+q,q),b.lineTo(c,q)),("fold"==k||"default"==k&&"fold"==g)&&B&&p&&(b.moveTo(c-q,e),b.lineTo(c-q,e-q),b.lineTo(c,e-q)),("fold"==n||"default"==n&&"fold"==g)&&B&&v&&(b.moveTo(0,e-q),b.lineTo(q,e-q),b.lineTo(q,e))};mxCellRenderer.registerShape(Z.prototype.cst.RECT2,Z);Z.prototype.constraints=null;mxUtils.extend(Ia,mxConnector);Ia.prototype.origPaintEdgeShape=Ia.prototype.paintEdgeShape;Ia.prototype.paintEdgeShape=function(b,d,f){for(var c=[],e=0;e<d.length;e++)c.push(mxUtils.clone(d[e]));var e=b.state.dashed,
+g=b.state.fixDash;Ia.prototype.origPaintEdgeShape.apply(this,[b,c,f]);3<=b.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(b.setStrokeColor(c),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(e,g),Ia.prototype.origPaintEdgeShape.apply(this,[b,d,f])))};mxCellRenderer.registerShape("filledEdge",Ia);"undefined"!==typeof StyleFormatPanel&&function(){var b=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),
+f=b.apply(this,arguments);"umlFrame"==d.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(b,d,f,c,e,g,l,m,k,n){var q=e*(l+k+1),F=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-F/2,c.y-F/2+q/2);b.lineTo(c.x+F/2-3*q/2,c.y-3*F/2-q/2);b.stroke()}});mxMarker.addMarker("box",function(b,d,f,c,e,g,l,m,k,n){var q=e*(l+k+1),F=g*(l+k+1),p=c.x+q/2,B=c.y+F/2;c.x-=q;c.y-=F;return function(){b.begin();
+b.moveTo(p-q/2-F/2,B-F/2+q/2);b.lineTo(p-q/2+F/2,B-F/2-q/2);b.lineTo(p+F/2-3*q/2,B-3*F/2-q/2);b.lineTo(p-F/2-3*q/2,B-3*F/2+q/2);b.close();n?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,f,c,e,g,l,k,m,n){var q=e*(l+m+1),F=g*(l+m+1);return function(){b.begin();b.moveTo(c.x-q/2-F/2,c.y-F/2+q/2);b.lineTo(c.x+F/2-3*q/2,c.y-3*F/2-q/2);b.moveTo(c.x-q/2+F/2,c.y-F/2-q/2);b.lineTo(c.x-F/2-3*q/2,c.y-3*F/2+q/2);b.stroke()}});mxMarker.addMarker("circle",Va);mxMarker.addMarker("circlePlus",
+function(b,d,f,c,e,g,l,m,k,n){var q=c.clone(),F=Va.apply(this,arguments),p=e*(l+2*k),B=g*(l+2*k);return function(){F.apply(this,arguments);b.begin();b.moveTo(q.x-e*k,q.y-g*k);b.lineTo(q.x-2*p+e*k,q.y-2*B+g*k);b.moveTo(q.x-p-B+g*k,q.y-B+p-e*k);b.lineTo(q.x+B-p-g*k,q.y-B-p+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,g,l,k,m,n){var q=e*(l+m+1),F=g*(l+m+1),p=c.clone();c.x-=q;c.y-=F;return function(){b.begin();b.moveTo(p.x-F,p.y+q);b.quadTo(c.x-F,c.y+q,c.x,c.y);b.quadTo(c.x+F,
+c.y-q,p.x+F,p.y-q);b.stroke()}});mxMarker.addMarker("async",function(b,d,f,c,e,g,l,k,m,n){d=e*m*1.118;f=g*m*1.118;e*=l+m;g*=l+m;var q=c.clone();q.x-=d;q.y-=f;c.x+=1*-e-d;c.y+=1*-g-f;return function(){b.begin();b.moveTo(q.x,q.y);k?b.lineTo(q.x-e-g/2,q.y-g+e/2):b.lineTo(q.x+g/2-e,q.y-g-e/2);b.lineTo(q.x-e,q.y-g);b.close();n?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",function(b){b=null!=b?b:2;return function(d,f,c,e,g,l,k,m,n,q){g*=k+n;l*=k+n;var F=e.clone();return function(){d.begin();
+d.moveTo(F.x,F.y);m?d.lineTo(F.x-g-l/b,F.y-l+g/b):d.lineTo(F.x+l/b-g,F.y-l-g/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Za=function(b,d,f){return La(b,["width"],d,function(d,c,e,g,l){l=b.shape.getEdgeWidth()*b.view.scale+f;return new mxPoint(g.x+c*d/4+e*l/2,g.y+e*d/4-c*l/2)},function(d,c,e,g,l,k){d=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,k.x,k.y));b.style.width=Math.round(2*d)/b.view.scale-f})},La=function(b,d,f,c,e){return ea(b,d,function(d){var e=b.absolutePoints,g=
+e.length-1;d=b.view.translate;var l=b.view.scale,k=f?e[0]:e[g],e=f?e[1]:e[g-1],g=e.x-k.x,m=e.y-k.y,n=Math.sqrt(g*g+m*m),k=c.call(this,n,g/n,m/n,k,e);return new mxPoint(k.x/l-d.x,k.y/l-d.y)},function(d,c,g){var l=b.absolutePoints,k=l.length-1;d=b.view.translate;var m=b.view.scale,n=f?l[0]:l[k],l=f?l[1]:l[k-1],k=l.x-n.x,q=l.y-n.y,F=Math.sqrt(k*k+q*q);c.x=(c.x+d.x)*m;c.y=(c.y+d.y)*m;e.call(this,F,k/F,q/F,n,l,c,g)})},Ha=function(b){return function(d){return[ea(d,["arrowWidth","arrowSize"],function(d){var f=
+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ba.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ba.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-f)*d.height/2)},function(d,f){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-f.y)/d.height*2));this.state.style.arrowSize=Math.max(0,Math.min(b,(d.x+d.width-f.x)/d.width))})]}},Wa=function(b){return function(d){return[ea(d,["size"],function(d){var f=
+Math.max(0,Math.min(.5*d.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(d.x,d.y+f)},function(b,d){this.state.style.size=Math.max(0,d.y-b.y)},!0)]}},Ta=function(b,d,f){return function(c){var e=[ea(c,["size"],function(f){var c=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*b;return new mxPoint(f.x+c,f.y+c)},function(d,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,f.x-d.x),Math.min(d.height,
+f.y-d.y)))/b)},!1)];f&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Fa(c));return e}},Ma=function(b,d,f,c,e){f=null!=f?f:.5;return function(g){var l=[ea(g,["size"],function(d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",f?e:b));return new mxPoint(d.x+Math.max(0,Math.min(.5*d.width,c*(f?1:d.width))),d.getCenterY())},function(b,d,c){b=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?
+d.x-b.x:Math.max(0,Math.min(f,(d.x-b.x)/b.width));this.state.style.size=b},!1,c)];d&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(Fa(g));return l}},Xa=function(b,d,f){b=null!=b?b:.5;return function(c){var e=[ea(c,["size"],function(c){var e=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,g=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",e?f:d)));return new mxPoint(c.x+Math.min(.75*c.width*b,g*(e?.75:.75*c.width)),c.y+c.height/4)},function(d,c){var e=
+null!=f&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-d.x:Math.max(0,Math.min(b,(c.x-d.x)/d.width*.75));this.state.style.size=e},!1,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Fa(c));return e}},Ka=function(){return function(b){var d=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Fa(b));return d}},Fa=function(b,d){return ea(b,[mxConstants.STYLE_ARCSIZE],function(f){var c=null!=d?d:f.height/8;if("1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
+0)){var e=mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(f.x+f.width-Math.min(f.width/2,e),f.y+c)}e=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(f.x+f.width-Math.min(Math.max(f.width/2,f.height/2),Math.min(f.width,f.height)*e),f.y+c)},function(d,f,c){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=
+Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-f.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-f.x+d.x)/Math.min(d.width,d.height))))})},ea=function(b,d,f,c,e,g,l){var k=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);k.execute=function(b){for(var f=0;f<d.length;f++)this.copyStyle(d[f]);l&&l(b)};k.getPosition=f;k.setPosition=c;k.ignoreGrid=null!=e?e:!0;if(g){var m=k.positionChanged;k.positionChanged=function(){m.apply(this,
+arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return k},Na={link:function(b){return[Za(b,!0,10),Za(b,!1,10)]},flexArrow:function(b){var d=b.view.graph.gridSize/b.view.scale,f=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(La(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,f,c,e,g){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;g=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,
+mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(g+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(g+b.shape.strokewidth*b.view.scale)-f*d/2)},function(f,c,e,g,l,k,m){f=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,k.x,k.y));c=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-c,k.x,k.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(m.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=
+b.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),f.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,f,c,e,g){d=(b.shape.getStartArrowWidth()-b.shape.strokewidth)*b.view.scale;g=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+5)*b.view.scale;return new mxPoint(e.x+f*(g+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(g+b.shape.strokewidth*b.view.scale)-f*d/2)},function(f,c,e,g,l,k,m){f=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,k.x,k.y));c=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-c,k.x,k.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.startWidth=Math.max(0,Math.round(2*f)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(m.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=
+b.style[mxConstants.STYLE_STARTSIZE],b.style.endWidth=b.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(b.style.startWidth)-parseFloat(b.style.endWidth))<d&&(b.style.startWidth=b.style.endWidth))})));mxUtils.getValue(b.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(La(b,
+["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,f,c,e,g){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;g=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(g+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(g+b.shape.strokewidth*b.view.scale)+f*d/2)},function(f,c,e,g,l,k,m){f=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,k.x,k.y));c=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-c,k.x,k.y);b.style[mxConstants.STYLE_ENDSIZE]=
+Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(m.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),f.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!1,function(d,f,c,e,g){d=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;g=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(g+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(g+b.shape.strokewidth*b.view.scale)+f*d/2)},function(f,c,e,g,l,k,m){f=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,k.x,k.y));c=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-c,k.x,k.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-b.shape.strokewidth)/
+3)/100/b.view.scale;b.style.endWidth=Math.max(0,Math.round(2*f)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(m.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE],b.style.startWidth=b.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-
+parseFloat(b.style.startWidth))<d&&(b.style.endWidth=b.style.startWidth))})));return f},swimlane:function(b){var d=[];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(Fa(b,f/2))}d.push(ea(b,[mxConstants.STYLE_STARTSIZE],function(d){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,
+1)?new mxPoint(d.getCenterX(),d.y+Math.max(0,Math.min(d.height,f))):new mxPoint(d.x+Math.max(0,Math.min(d.width,f)),d.getCenterY())},function(d,f){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,f.y-d.y))):Math.round(Math.max(0,Math.min(d.width,f.x-d.x)))},!1,null,function(d){if(mxEvent.isControlDown(d.getEvent())&&(d=b.view.graph,d.isTableRow(b.cell)||d.isTableCell(b.cell))){for(var f=d.getSwimlaneDirection(b.style),
+c=d.model.getParent(b.cell),c=d.model.getChildCells(c,!0),e=[],g=0;g<c.length;g++)c[g]!=b.cell&&d.isSwimlane(c[g])&&d.getSwimlaneDirection(d.getCurrentCellStyle(c[g]))==f&&e.push(c[g]);d.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],e)}}));return d},label:Ka(),ext:Ka(),rectangle:Ka(),triangle:Ka(),rhombus:Ka(),umlLifeline:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));
+return new mxPoint(b.getCenterX(),b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},umlFrame:function(b){return[ea(b,["width","height"],function(b){var d=Math.max(aa.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),f=Math.max(1.5*aa.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.width=
+Math.round(Math.max(aa.prototype.corner,Math.min(b.width,d.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(b.height,d.y-b.y)))},!1)]},process:function(b){var d=[ea(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size));return d?new mxPoint(b.x+f,b.y+b.height/4):new mxPoint(b.x+b.width*f,b.y+b.height/4)},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(.5*b.width,d.x-b.x)):Math.max(0,Math.min(.5,(d.x-b.x)/b.width));this.state.style.size=f},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Fa(b));return d},cross:function(b){return[ea(b,["size"],function(b){var d=Math.min(b.width,b.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",xa.prototype.size)))*d/2;return new mxPoint(b.getCenterX()-d,b.getCenterY()-d)},function(b,d){var f=Math.min(b.width,b.height);this.state.style.size=
+Math.max(0,Math.min(1,Math.min(Math.max(0,b.getCenterY()-d.y)/f*2,Math.max(0,b.getCenterX()-d.x)/f*2)))})]},note:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size)))));return new mxPoint(b.x+b.width-d,b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},note2:function(b){return[ea(b,["size"],function(b){var f=
+Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(b.x+b.width-f,b.y+f)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},manualInput:function(b){var d=[ea(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*d/4)},function(b,
+d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(d.y-b.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Fa(b));return d},dataStorage:function(b){return[ea(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",d?da.prototype.fixedSize:da.prototype.size));return new mxPoint(b.x+b.width-f*(d?1:b.width),b.getCenterY())},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(b.width,b.x+b.width-d.x)):Math.max(0,Math.min(1,(b.x+b.width-d.x)/b.width));this.state.style.size=f},!1)]},callout:function(b){var d=[ea(b,["size","position"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",C.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position)));mxUtils.getValue(this.state.style,"base",C.prototype.base);return new mxPoint(b.x+f*b.width,b.y+b.height-
d)},function(b,d){mxUtils.getValue(this.state.style,"base",C.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(b.height,b.y+b.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),ea(b,["position2"],function(b){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",C.prototype.position2)));return new mxPoint(b.x+d*b.width,b.y+b.height)},function(b,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(d.x-b.x)/b.width)))/100},!1),ea(b,["base"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",C.prototype.size))),g=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position))),c=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"base",C.prototype.base)));return new mxPoint(b.x+Math.min(b.width,g*b.width+c),b.y+b.height-d)},function(b,d){var g=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(b.width,d.x-b.x-g*b.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ga(b));return d},internalStorage:function(b){var d=[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ia.prototype.dx))),g=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ia.prototype.dy)));return new mxPoint(b.x+d,b.y+g)},function(b,d){this.state.style.dx=Math.round(Math.max(0,
-Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ga(b));return d},module:function(b){return[ea(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",X.prototype.jettyWidth))),g=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"jettyHeight",X.prototype.jettyHeight)));return new mxPoint(b.x+d/2,b.y+
-2*g)},function(b,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y))/2)})]},corner:function(b){return[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",pa.prototype.dx))),g=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",pa.prototype.dy)));return new mxPoint(b.x+d,b.y+g)},function(b,d){this.state.style.dx=Math.round(Math.max(0,
-Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},tee:function(b){return[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ja.prototype.dx))),g=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ja.prototype.dy)));return new mxPoint(b.x+(b.width+d)/2,b.y+g)},function(b,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=
-Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Ha(1),doubleArrow:Ha(.5),folder:function(b){return[ea(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",m.prototype.tabWidth))),g=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",m.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",m.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+
-d,b.y+g)},function(b,d){var g=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",m.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(g=b.width-g);this.state.style.tabWidth=Math.round(g);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-
-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},tape:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d*b.height/2)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-b.y)/b.height*2))},!1)]},isoCube2:function(b){return[ea(b,["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,
-"isoAngle",g.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Wa(l.prototype.size),cylinder3:Wa(q.prototype.size),offPageConnector:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",qa.prototype.size))));return new mxPoint(b.getCenterX(),b.y+(1-d)*b.height)},function(b,d){this.state.style.size=
+(d.x-b.x)/b.width)))/100},!1),ea(b,["base"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",C.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position))),c=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"base",C.prototype.base)));return new mxPoint(b.x+Math.min(b.width,f*b.width+c),b.y+b.height-d)},function(b,d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position)));
+this.state.style.base=Math.round(Math.max(0,Math.min(b.width,d.x-b.x-f*b.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Fa(b));return d},internalStorage:function(b){var d=[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ia.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ia.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,
+Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Fa(b));return d},module:function(b){return[ea(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",X.prototype.jettyWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"jettyHeight",X.prototype.jettyHeight)));return new mxPoint(b.x+d/2,b.y+
+2*f)},function(b,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y))/2)})]},corner:function(b){return[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ra.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ra.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,
+Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},tee:function(b){return[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ja.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ja.prototype.dy)));return new mxPoint(b.x+(b.width+d)/2,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=
+Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Ha(1),doubleArrow:Ha(.5),folder:function(b){return[ea(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",n.prototype.tabWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",n.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+
+d,b.y+f)},function(b,d){var f=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=b.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-
+d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},tape:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d*b.height/2)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-b.y)/b.height*2))},!1)]},isoCube2:function(b){return[ea(b,["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,
+"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Wa(l.prototype.size),cylinder3:Wa(m.prototype.size),offPageConnector:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",sa.prototype.size))));return new mxPoint(b.getCenterX(),b.y+(1-d)*b.height)},function(b,d){this.state.style.size=
Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},"mxgraph.basic.rect":function(b){var d=[Graph.createHandle(b,["size"],function(b){var d=Math.max(0,Math.min(b.width/2,b.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(b.x+d,b.y+d)},function(b,d){this.state.style.size=Math.round(100*Math.max(0,Math.min(b.height/2,b.width/2,d.x-b.x)))/100})];b=Graph.createHandle(b,["indent"],function(b){var d=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,
-"indent",this.dx2))));return new mxPoint(b.x+.75*b.width,b.y+d*b.height/200)},function(b,d){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(d.y-b.y)/b.height)))/100});d.push(b);return d},step:Ma(N.prototype.size,!0,null,!0,N.prototype.fixedSize),hexagon:Ma(S.prototype.size,!0,.5,!0,S.prototype.fixedSize),curlyBracket:Ma(F.prototype.size,!1),display:Ma(Ea.prototype.size,!1),cube:Ta(1,c.prototype.size,!1),card:Ta(.5,u.prototype.size,!0),loopLimit:Ta(.5,ta.prototype.size,!0),trapezoid:Xa(.5,
-A.prototype.size,A.prototype.fixedSize),parallelogram:Xa(1,E.prototype.size,E.prototype.fixedSize)};Graph.createHandle=ea;Graph.handleFactory=Na;var db=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=db.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)?d=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&
+"indent",this.dx2))));return new mxPoint(b.x+.75*b.width,b.y+d*b.height/200)},function(b,d){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(d.y-b.y)/b.height)))/100});d.push(b);return d},step:Ma(M.prototype.size,!0,null,!0,M.prototype.fixedSize),hexagon:Ma(P.prototype.size,!0,.5,!0,P.prototype.fixedSize),curlyBracket:Ma(E.prototype.size,!1),display:Ma(Ea.prototype.size,!1),cube:Ta(1,c.prototype.size,!1),card:Ta(.5,u.prototype.size,!0),loopLimit:Ta(.5,ua.prototype.size,!0),trapezoid:Xa(.5,
+D.prototype.size,D.prototype.fixedSize),parallelogram:Xa(1,H.prototype.size,H.prototype.fixedSize)};Graph.createHandle=ea;Graph.handleFactory=Na;var db=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=db.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)?d=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&
(d=mxConstants.SHAPE_SWIMLANE);d=Na[d];null==d&&null!=this.state.shape&&this.state.shape.isRoundable()&&(d=Na[mxConstants.SHAPE_RECTANGLE]);null!=d&&(d=d(this.state),null!=d&&(b=null==b?d:b.concat(d)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);b=Na[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory=
-{};var Oa=new mxPoint(1,0),Pa=new mxPoint(1,0),Ha=mxUtils.toRadians(-30),Oa=mxUtils.getRotatedPoint(Oa,Math.cos(Ha),Math.sin(Ha)),Ha=mxUtils.toRadians(-150),Pa=mxUtils.getRotatedPoint(Pa,Math.cos(Ha),Math.sin(Ha));mxEdgeStyle.IsometricConnector=function(b,d,g,c,e){var f=b.view;c=null!=c&&0<c.length?c[0]:null;var l=b.absolutePoints,m=l[0],l=l[l.length-1];null!=c&&(c=f.transformControlPoint(b,c));null==m&&null!=d&&(m=new mxPoint(d.getCenterX(),d.getCenterY()));null==l&&null!=g&&(l=new mxPoint(g.getCenterX(),
-g.getCenterY()));var k=Oa.x,q=Oa.y,p=Pa.x,G=Pa.y,u="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=l&&null!=m){b=function(b,d,g){b-=y.x;var c=d-y.y;d=(G*b-p*c)/(k*G-q*p);b=(q*b-k*c)/(q*p-k*G);u?(g&&(y=new mxPoint(y.x+k*d,y.y+q*d),e.push(y)),y=new mxPoint(y.x+p*b,y.y+G*b)):(g&&(y=new mxPoint(y.x+p*b,y.y+G*b),e.push(y)),y=new mxPoint(y.x+k*d,y.y+q*d));e.push(y)};var y=m;null==c&&(c=new mxPoint(m.x+(l.x-m.x)/2,m.y+(l.y-m.y)/2));b(c.x,c.y,!0);b(l.x,l.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
-mxEdgeStyle.IsometricConnector);var eb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,d){if(d==mxEdgeStyle.IsometricConnector){var g=new mxElbowEdgeHandler(b);g.snapToTerminals=!1;return g}return eb.apply(this,arguments)};k.prototype.constraints=[];f.prototype.getConstraints=function(b,d,g){b=[];var c=Math.tan(mxUtils.toRadians(30)),e=(.5-c)/2,c=Math.min(d,g/(.5+c));d=(d-c)/2;g=(g-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d+.5*c,g+c*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,g+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,g+.75*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,g+(1-e)*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g+.75*c));return b};g.prototype.getConstraints=function(b,d,g){b=[];var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,c=Math.min(d*
-Math.tan(c),.5*g);b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g-c));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g-c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-0,c));return b};C.prototype.getConstraints=function(b,d,g){b=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1));b.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(g-c)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
-g-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(g-c)));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
+{};var Oa=new mxPoint(1,0),Pa=new mxPoint(1,0),Ha=mxUtils.toRadians(-30),Oa=mxUtils.getRotatedPoint(Oa,Math.cos(Ha),Math.sin(Ha)),Ha=mxUtils.toRadians(-150),Pa=mxUtils.getRotatedPoint(Pa,Math.cos(Ha),Math.sin(Ha));mxEdgeStyle.IsometricConnector=function(b,d,f,c,e){var g=b.view;c=null!=c&&0<c.length?c[0]:null;var l=b.absolutePoints,k=l[0],l=l[l.length-1];null!=c&&(c=g.transformControlPoint(b,c));null==k&&null!=d&&(k=new mxPoint(d.getCenterX(),d.getCenterY()));null==l&&null!=f&&(l=new mxPoint(f.getCenterX(),
+f.getCenterY()));var m=Oa.x,n=Oa.y,q=Pa.x,F=Pa.y,p="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=l&&null!=k){b=function(b,d,f){b-=B.x;var c=d-B.y;d=(F*b-q*c)/(m*F-n*q);b=(n*b-m*c)/(n*q-m*F);p?(f&&(B=new mxPoint(B.x+m*d,B.y+n*d),e.push(B)),B=new mxPoint(B.x+q*b,B.y+F*b)):(f&&(B=new mxPoint(B.x+q*b,B.y+F*b),e.push(B)),B=new mxPoint(B.x+m*d,B.y+n*d));e.push(B)};var B=k;null==c&&(c=new mxPoint(k.x+(l.x-k.x)/2,k.y+(l.y-k.y)/2));b(c.x,c.y,!0);b(l.x,l.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
+mxEdgeStyle.IsometricConnector);var eb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,d){if(d==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(b);f.snapToTerminals=!1;return f}return eb.apply(this,arguments)};k.prototype.constraints=[];g.prototype.getConstraints=function(b,d,f){b=[];var c=Math.tan(mxUtils.toRadians(30)),e=(.5-c)/2,c=Math.min(d,f/(.5+c));d=(d-c)/2;f=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d+.5*c,f+c*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.75*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+(1-e)*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.75*c));return b};f.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,c=Math.min(d*
+Math.tan(c),.5*f);b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-c));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+0,c));return b};C.prototype.getConstraints=function(b,d,f){b=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1));b.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f-c)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
+f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];wa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
-mxRectangleShape.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(b,d,g){b=[];var c=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
-null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(g+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,
-0),!1));return b};u.prototype.getConstraints=function(b,d,g){b=[];var c=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.5*(g+c)));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};c.prototype.getConstraints=function(b,d,g){b=[];var c=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(g+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),g));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,g-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(g-c)));return b};q.prototype.getConstraints=function(b,d,g){b=[];d=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d+.5*(.5*g-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d+.5*(.5*g-d)));b.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,g-d-.5*(.5*g-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g-d-.5*(.5*g-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};m.prototype.getConstraints=function(b,d,g){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(b.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-.5*(d+c),e))):(b.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.25*(g-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,.5*(g-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(g-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(g-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(g-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(g-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,g));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};ia.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;va.prototype.constraints=mxEllipse.prototype.constraints;T.prototype.constraints=mxEllipse.prototype.constraints;Ca.prototype.constraints=
-mxEllipse.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.getConstraints=function(b,d,g){b=[];var c=Math.min(d,g/2),e=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-.5*(e+d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));return b};X.prototype.getConstraints=function(b,d,g){d=parseFloat(mxUtils.getValue(b,"jettyWidth",X.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,
+mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,
+0),!1));return b};u.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};c.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));return b};m.prototype.getConstraints=function(b,d,f){b=[];d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};n.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
+"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(b.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+.5*(d+c),e))):(b.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,f));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};ia.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;va.prototype.constraints=mxEllipse.prototype.constraints;T.prototype.constraints=mxEllipse.prototype.constraints;Ca.prototype.constraints=
+mxEllipse.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.getConstraints=function(b,d,f){b=[];var c=Math.min(d,f/2),e=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+.5*(e+d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};X.prototype.getConstraints=function(b,d,f){d=parseFloat(mxUtils.getValue(b,"jettyWidth",X.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,
"jettyHeight",X.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,d),
-new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(g-.5*b,1.5*b)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(g-.5*b,3.5*b))];g>5*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,d));g>8*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,d));g>15*
-b&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};ta.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];G.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,
+new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,1.5*b)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,3.5*b))];f>5*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,d));f>8*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,d));f>15*
+b&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};ua.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
+.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];F.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,
1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,
-.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];p.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
-.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,
-1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
+.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
+.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,
+1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
+.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),
new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];E.prototype.constraints=mxRectangleShape.prototype.constraints;A.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ja.prototype.getConstraints=function(b,d,g){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];H.prototype.constraints=mxRectangleShape.prototype.constraints;D.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ja.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d+.25*c,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(d+c),.5*(g+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),g));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),.5*(g+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d-.25*c,e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return b};pa.prototype.getConstraints=function(b,d,g){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,.5*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(g+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,g));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(d+c),.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d-.25*c,e));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return b};ra.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,.5*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
1),!1));return b};U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];ba.prototype.getConstraints=
-function(b,d,g){b=[];var c=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),c=(g-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),g-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g-c));return b};la.prototype.getConstraints=function(b,d,g){b=[];var c=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ba.prototype.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ba.prototype.arrowSize)))),c=(g-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,g-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));return b};xa.prototype.getConstraints=
-function(b,d,g){b=[];var c=Math.min(g,d),e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),c=(g-e)/2,f=c+e,l=(d-e)/2,e=l+e;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,e,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,g-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,g));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),c));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,c));return b};O.prototype.constraints=null;ua.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+function(b,d,f){b=[];var c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),c=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));return b};ma.prototype.getConstraints=function(b,d,f){b=[];var c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ba.prototype.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ba.prototype.arrowSize)))),c=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};xa.prototype.getConstraints=
+function(b,d,f){b=[];var c=Math.min(f,d),e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),c=(f-e)/2,g=c+e,l=(d-e)/2,e=l+e;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,f));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),c));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,c));return b};O.prototype.constraints=null;qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+.9),!1)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(b){f.escape();b=f.deleteCells(f.getDeletableCells(f.getSelectionCells()),b);null!=b&&f.setSelectionCells(b)}function c(){if(!f.isSelectionEmpty()){f.getModel().beginUpdate();try{for(var b=f.getSelectionCells(),d=0;d<b.length;d++)f.cellLabelChanged(b[d],"")}finally{f.getModel().endUpdate()}}}var e=this.editorUi,k=e.editor,f=k.graph,n=function(){return Action.prototype.isEnabled.apply(this,arguments)&&f.isEnabled()};this.addAction("new...",function(){f.openLink(e.getUrl())});
-this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.openFile()});this.addAction("smartFit",function(){f.popupMenuHandler.hideMenu();var b=f.view.scale,d=f.view.translate.x,c=f.view.translate.y;e.actions.get("resetView").funct();1E-5>Math.abs(b-f.view.scale)&&d==f.view.translate.x&&c==f.view.translate.y&&e.actions.get(f.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){f.isEnabled()&&(f.isSelectionEmpty()?e.actions.get("smartFit").funct():
-f.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var g=mxUtils.parseXml(b);k.graph.setSelectionCells(k.graph.importGraphModel(g.documentElement))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+p.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
-null})}).isEnabled=n;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=n;this.addAction("saveAs...",function(){e.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=n;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,304,!0,!0)});this.addAction("editDiagram...",function(){var b=new EditDiagramDialog(e);e.showDialog(b.container,620,420,!0,!1);b.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,
-320,240,!0,!0)}).isEnabled=n;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(f,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var b=null;try{b=e.copyXml(),
-null!=b&&f.removeCells(b,!1)}catch(l){}null==b&&mxClipboard.cut(f)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(g){}try{mxClipboard.copy(f)}catch(g){e.handleError(g)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){var b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){f.getModel().beginUpdate();try{e.pasteXml(b,!0)}finally{f.getModel().endUpdate()}}else mxClipboard.paste(f)}),
-b=!0)}catch(l){}b||mxClipboard.paste(f)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(b){function d(b){if(null!=b){for(var d=!0,g=0;g<b.length&&d;g++)d=d&&f.model.isEdge(b[g]);var c=f.view.translate,g=f.view.scale,e=c.x,l=c.y,c=null;if(1==b.length&&d){var k=f.getCellGeometry(b[0]);null!=k&&(c=k.getTerminalPoint(!0))}c=null!=c?c:f.getBoundingBoxFromGeometry(b,d);null!=c&&(d=Math.round(f.snap(f.popupMenuHandler.triggerX/g-e)),g=Math.round(f.snap(f.popupMenuHandler.triggerY/
-g-l)),f.cellsMoved(b,d-c.x,g-c.y))}}function g(){f.getModel().beginUpdate();try{d(mxClipboard.paste(f))}finally{f.getModel().endUpdate()}}if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){f.getModel().beginUpdate();try{d(e.pasteXml(b,!0))}finally{f.getModel().endUpdate()}}else g()}),b=!0)}catch(p){}b||g()}});this.addAction("copySize",function(){var b=f.getSelectionCell();f.isEnabled()&&null!=b&&f.getModel().isVertex(b)&&
-(b=f.getCellGeometry(b),null!=b&&(e.copiedSize=new mxRectangle(b.x,b.y,b.width,b.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(){if(f.isEnabled()&&!f.isSelectionEmpty()&&null!=e.copiedSize){f.getModel().beginUpdate();try{for(var b=f.getResizableCells(f.getSelectionCells()),d=0;d<b.length;d++)if(f.getModel().isVertex(b[d])){var c=f.getCellGeometry(b[d]);null!=c&&(c=c.clone(),c.width=e.copiedSize.width,c.height=e.copiedSize.height,f.getModel().setGeometry(b[d],c))}}finally{f.getModel().endUpdate()}}},
-null,null,"Alt+Shift+V");this.addAction("copyData",function(){var b=f.getSelectionCell()||f.getModel().getRoot();f.isEnabled()&&null!=b&&(b=b.cloneValue(),null==b||isNaN(b.nodeType)||(e.copiedValue=b))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(b,d){function g(d,g){var e=c.getValue(d);g=d.cloneValue(g);g.removeAttribute("placeholders");null==e||isNaN(e.nodeType)||g.setAttribute("placeholders",e.getAttribute("placeholders"));null!=b&&mxEvent.isShiftDown(b)||g.setAttribute("label",
-f.convertValueToString(d));c.setValue(d,g)}b=null!=d?d:b;var c=f.getModel();if(f.isEnabled()&&!f.isSelectionEmpty()&&null!=e.copiedValue){c.beginUpdate();try{var l=f.getEditableCells(f.getSelectionCells());if(0==l.length)g(c.getRoot(),e.copiedValue);else for(var k=0;k<l.length;k++)g(l[k],e.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,e){d=null!=e?e:d;null!=d&&mxEvent.isShiftDown(d)?c():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||
-mxEvent.isAltDown(d)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){c()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{f.setSelectionCells(f.duplicateCells()),f.scrollCellToVisible(f.getSelectionCell())}catch(g){e.handleError(g)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(b,d){b=null!=d?d:b;f.turnShapes(f.getResizableCells(f.getSelectionCells()),
-null!=b?mxEvent.isShiftDown(b):!1)},null,null,Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(b){b=f.getSelectionCell();f.isEnabled()&&null!=b&&f.addSelectionCells(f.getEdges(b))}));this.addAction("selectVertices",function(){f.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){f.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){f.selectAll(null,!0)},null,
-null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){f.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!f.isSelectionEmpty()){f.getModel().beginUpdate();try{var b=f.getSelectionCells(),d=f.getCurrentCellStyle(f.getSelectionCell()),c=1==mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,1)?0:1;f.setCellStyles(mxConstants.STYLE_MOVABLE,c,b);f.setCellStyles(mxConstants.STYLE_RESIZABLE,c,b);f.setCellStyles(mxConstants.STYLE_ROTATABLE,c,b);f.setCellStyles(mxConstants.STYLE_DELETABLE,
-c,b);f.setCellStyles(mxConstants.STYLE_EDITABLE,c,b);f.setCellStyles("connectable",c,b)}finally{f.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){f.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){f.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){f.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){f.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",
-function(){f.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){f.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){f.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(b){f.orderCells(!1,null,!0)});this.addAction("sendBackward",function(b){f.orderCells(!0,null,!0)});this.addAction("group",function(){if(f.isEnabled()){var b=mxUtils.sortCells(f.getSelectionCells(),!0);1!=b.length||f.isTable(b[0])||
-f.isTableRow(b[0])?(b=f.getCellsForGroup(b),1<b.length&&f.setSelectionCell(f.groupCells(null,0,b))):f.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(f.isEnabled()){var b=f.getEditableCells(f.getSelectionCells());f.model.beginUpdate();try{var d=f.ungroupCells();if(null!=b)for(var c=0;c<b.length;c++)f.model.contains(b[c])&&(0==f.model.getChildCount(b[c])&&f.model.isVertex(b[c])&&f.setCellStyles("container","0",[b[c]]),d.push(b[c]))}finally{f.model.endUpdate()}0<
-d.length&&f.setSelectionCells(d)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(f.isEnabled()){var b=f.getSelectionCells();if(null!=b){for(var d=[],c=0;c<b.length;c++)f.isTableRow(b[c])||f.isTableCell(b[c])||d.push(b[c]);f.removeCellsFromParent(d)}}});this.addAction("edit",function(){f.isEnabled()&&f.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var b=f.getSelectionCell()||f.getModel().getRoot();e.showDataDialog(b)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var b=f.getSelectionCell();if(f.isEnabled()&&null!=b&&f.isCellEditable(b)){var d="";if(mxUtils.isNode(b.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&b.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==c&&(c=b.value.getAttribute("tooltip"));null!=c&&(d=c)}d=new TextareaDialog(e,mxResources.get("editTooltip")+":",d,function(d){f.setTooltipForCell(b,
-d)});e.showDialog(d.container,320,200,!0,!0);d.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var b=f.getLinkForCell(f.getSelectionCell());null!=b&&f.openLink(b)});this.addAction("editLink...",function(){var b=f.getSelectionCell();if(f.isEnabled()&&null!=b&&f.isCellEditable(b)){var d=f.getLinkForCell(b)||"";e.showLinkDialog(d,mxResources.get("apply"),function(d,c,g){d=mxUtils.trim(d);f.setLinkForCell(b,0<d.length?d:null);f.setAttributeForCell(b,"linkTarget",g)},!0,f.getLinkTargetForCell(b))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(f.clearSelection(),e.actions.get("image").funct())})).isEnabled=n;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(b,d,c){b=mxUtils.trim(b);if(0<b.length){var g=null,e=f.getLinkTitle(b);null!=d&&0<d.length&&(g=d[0].iconUrl,
-e=d[0].name||d[0].type,e=e.charAt(0).toUpperCase()+e.substring(1),30<e.length&&(e=e.substring(0,30)+"..."));d=new mxCell(e,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=g?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+g:"spacing=10;"));d.vertex=!0;g=f.getCenterInsertPoint(f.getBoundingBoxFromGeometry([d],!0));d.geometry.x=g.x;d.geometry.y=g.y;f.setAttributeForCell(d,"linkTarget",c);f.setLinkForCell(d,b);f.cellSizeUpdated(d,
-!0);f.getModel().beginUpdate();try{d=f.addCell(d),f.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{f.getModel().endUpdate()}f.setSelectionCell(d);f.scrollCellToVisible(f.getSelectionCell())}},!0)})).isEnabled=n;this.addAction("link...",mxUtils.bind(this,function(){if(f.isEnabled())if(f.cellEditor.isContentEditing()){var b=f.getSelectedElement(),d=f.getParentByName(b,"A",f.cellEditor.textarea),c="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var k=b.getElementsByTagName("a"),
-m=0;m<k.length&&null==d;m++)k[m].textContent==b.textContent&&(d=k[m]);null!=d&&"A"==d.nodeName&&(c=d.getAttribute("href")||"",f.selectNode(d));var v=f.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){f.cellEditor.restoreSelection(v);null!=b&&f.insertLink(b)}))}else f.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=n;this.addAction("autosize",function(){var b=f.getSelectionCells();if(null!=b){f.getModel().beginUpdate();
-try{for(var d=0;d<b.length;d++){var c=b[d];0<f.getModel().getChildCount(c)?f.updateGroupBounds([c],20):f.updateCellSize(c)}}finally{f.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){f.stopEditing();var b=f.getCommonStyle(f.getSelectionCells()),b="1"==mxUtils.getValue(b,"html","0")?null:"1";f.getModel().beginUpdate();try{for(var d=f.getEditableCells(f.getSelectionCells()),c=0;c<d.length;c++)if(state=f.getView().getState(d[c]),null!=state){var k=
-mxUtils.getValue(state.style,"html","0");if("1"==k&&null==b){var m=f.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(m=m.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var v=document.createElement("div");v.innerHTML=f.sanitizeHtml(m);m=mxUtils.extractTextWithWhitespace(v.childNodes);f.cellLabelChanged(state.cell,m);f.setCellStyles("html",b,[d[c]])}else"0"==k&&"1"==b&&(m=mxUtils.htmlEntities(f.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
-"1")&&(m=m.replace(/\n/g,"<br/>")),f.cellLabelChanged(state.cell,f.sanitizeHtml(m)),f.setCellStyles("html",b,[d[c]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=b?b:"0"],"cells",d))}finally{f.getModel().endUpdate()}});this.addAction("wordWrap",function(){var b=f.getView().getState(f.getSelectionCell()),d="wrap";f.stopEditing();null!=b&&"wrap"==b.style[mxConstants.STYLE_WHITE_SPACE]&&(d=null);f.setCellStyles(mxConstants.STYLE_WHITE_SPACE,d)});this.addAction("rotation",
-function(){var b="0",d=f.getView().getState(f.getSelectionCell());null!=d&&(b=d.style[mxConstants.STYLE_ROTATION]||b);b=new FilenameDialog(e,b,mxResources.get("apply"),function(b){null!=b&&0<b.length&&f.setCellStyles(mxConstants.STYLE_ROTATION,b)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(b.container,375,80,!0,!0);b.init()});this.addAction("resetView",function(){f.zoomTo(1);e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(b){f.isFastZoomEnabled()?
-f.lazyZoom(!0,!0,e.buttonZoomDelay):f.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(b){f.isFastZoomEnabled()?f.lazyZoom(!1,!0,e.buttonZoomDelay):f.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var b=f.isSelectionEmpty()?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells()),d=f.view.translate,c=f.view.scale;b.x=b.x/c-d.x;b.y=b.y/c-d.y;b.width/=c;b.height/=c;null!=f.backgroundImage&&
-b.add(new mxRectangle(0,0,f.backgroundImage.width,f.backgroundImage.height));0==b.width||0==b.height?(f.zoomTo(1),e.resetScrollbars()):(d=Editor.fitWindowBorders,null!=d&&(b.x-=d.x,b.y-=d.y,b.width+=d.width+d.x,b.height+=d.height+d.y),f.fitWindow(b))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){f.pageVisible||this.get("pageView").funct();var b=f.pageFormat,d=f.pageScale;f.zoomTo(Math.floor(20*Math.min((f.container.clientWidth-10)/b.width/d,(f.container.clientHeight-
-10)/b.height/d))/20);mxUtils.hasScrollbars(f.container)&&(b=f.getPagePadding(),f.container.scrollTop=b.y*f.view.scale-1,f.container.scrollLeft=Math.min(b.x*f.view.scale,(f.container.scrollWidth-f.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){f.pageVisible||this.get("pageView").funct();var b=f.pageFormat,d=f.pageScale;f.zoomTo(Math.floor(20*Math.min((f.container.clientWidth-10)/(2*b.width)/d,(f.container.clientHeight-10)/b.height/
-d))/20);mxUtils.hasScrollbars(f.container)&&(b=f.getPagePadding(),f.container.scrollTop=Math.min(b.y,(f.container.scrollHeight-f.container.clientHeight)/2),f.container.scrollLeft=Math.min(b.x,(f.container.scrollWidth-f.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){f.pageVisible||this.get("pageView").funct();f.zoomTo(Math.floor(20*(f.container.clientWidth-10)/f.pageFormat.width/f.pageScale)/20);if(mxUtils.hasScrollbars(f.container)){var b=
-f.getPagePadding();f.container.scrollLeft=Math.min(b.x*f.view.scale,(f.container.scrollWidth-f.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.editorUi,parseInt(100*f.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(b){b=parseInt(b);!isNaN(b)&&0<b&&f.zoomTo(b/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(b.container,300,80,!0,!0);b.init()}),null,null,
-Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.editorUi,parseInt(100*f.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(b){b=parseInt(b);!isNaN(b)&&0<b&&(b=new ChangePageSetup(e,null,null,null,b/100),b.ignoreColor=!0,b.ignoreImage=!0,f.model.execute(b))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(b.container,300,80,!0,!0);b.init()}));var t=null,t=this.addAction("grid",function(){f.setGridEnabled(!f.isGridEnabled());
-e.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");t.setToggleAction(!0);t.setSelectedCallback(function(){return f.isGridEnabled()});t.setEnabled(!1);t=this.addAction("guides",function(){f.graphHandler.guidesEnabled=!f.graphHandler.guidesEnabled;e.fireEvent(new mxEventObject("guidesEnabledChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return f.graphHandler.guidesEnabled});t.setEnabled(!1);t=this.addAction("tooltips",function(){f.tooltipHandler.setEnabled(!f.tooltipHandler.isEnabled());
-e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return f.tooltipHandler.isEnabled()});t=this.addAction("collapseExpand",function(){var b=new ChangePageSetup(e);b.ignoreColor=!0;b.ignoreImage=!0;b.foldingEnabled=!f.foldingEnabled;f.model.execute(b)});t.setToggleAction(!0);t.setSelectedCallback(function(){return f.foldingEnabled});t.isEnabled=n;t=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});t.setToggleAction(!0);
-t.setSelectedCallback(function(){return f.scrollbars});t=this.addAction("pageView",mxUtils.bind(this,function(){e.setPageVisible(!f.pageVisible)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return f.pageVisible});t=this.addAction("connectionArrows",function(){f.connectionArrowsEnabled=!f.connectionArrowsEnabled;e.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");t.setToggleAction(!0);t.setSelectedCallback(function(){return f.connectionArrowsEnabled});t=
-this.addAction("connectionPoints",function(){f.setConnectable(!f.connectionHandler.isEnabled());e.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");t.setToggleAction(!0);t.setSelectedCallback(function(){return f.connectionHandler.isEnabled()});t=this.addAction("copyConnect",function(){f.connectionHandler.setCreateTarget(!f.connectionHandler.isCreateTarget());e.fireEvent(new mxEventObject("copyConnectChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return f.connectionHandler.isCreateTarget()});
-t.isEnabled=n;t=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});t.setToggleAction(!0);t.setSelectedCallback(function(){return e.editor.autosave});t.isEnabled=n;t.visible=!1;this.addAction("help",function(){var b="";mxResources.isLanguageSupported(mxClient.language)&&(b="_"+mxClient.language);f.openLink(RESOURCES_PATH+"/help"+b+".html")});var d=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){d||(e.showDialog((new AboutDialog(e)).container,
-320,280,!0,!0,function(){d=!1}),d=!0)}));t=mxUtils.bind(this,function(b,d,c,e){return this.addAction(b,function(){if(null!=c&&f.cellEditor.isContentEditing())c();else{f.stopEditing(!1);f.getModel().beginUpdate();try{var b=f.getEditableCells(f.getSelectionCells());f.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,d,b);(d&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?f.updateLabelElements(b,function(b){b.style.fontWeight=null;"B"==b.nodeName&&f.replaceElement(b)}):(d&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?
-f.updateLabelElements(b,function(b){b.style.fontStyle=null;"I"==b.nodeName&&f.replaceElement(b)}):(d&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&f.updateLabelElements(b,function(b){b.style.textDecoration=null;"U"==b.nodeName&&f.replaceElement(b)});for(var g=0;g<b.length;g++)0==f.model.getChildCount(b[g])&&f.autoSizeCell(b[g],!1)}finally{f.getModel().endUpdate()}}},null,null,e)});t("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");t("italic",
+Actions.prototype.init=function(){function b(b){g.escape();b=g.deleteCells(g.getDeletableCells(g.getSelectionCells()),b);null!=b&&g.setSelectionCells(b)}function c(){if(!g.isSelectionEmpty()){g.getModel().beginUpdate();try{for(var b=g.getSelectionCells(),d=0;d<b.length;d++)g.cellLabelChanged(b[d],"")}finally{g.getModel().endUpdate()}}}var e=this.editorUi,k=e.editor,g=k.graph,p=function(){return Action.prototype.isEnabled.apply(this,arguments)&&g.isEnabled()};this.addAction("new...",function(){g.openLink(e.getUrl())});
+this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.openFile()});this.addAction("smartFit",function(){g.popupMenuHandler.hideMenu();var b=g.view.scale,d=g.view.translate.x,c=g.view.translate.y;e.actions.get("resetView").funct();1E-5>Math.abs(b-g.view.scale)&&d==g.view.translate.x&&c==g.view.translate.y&&e.actions.get(g.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){g.isEnabled()&&(g.isSelectionEmpty()?e.actions.get("smartFit").funct():
+g.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var f=mxUtils.parseXml(b);k.graph.setSelectionCells(k.graph.importGraphModel(f.documentElement))}catch(q){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+q.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
+null})}).isEnabled=p;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=p;this.addAction("saveAs...",function(){e.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=p;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,304,!0,!0)});this.addAction("editDiagram...",function(){var b=new EditDiagramDialog(e);e.showDialog(b.container,620,420,!0,!1);b.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,
+320,240,!0,!0)}).isEnabled=p;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(g,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var b=null;try{b=e.copyXml(),
+null!=b&&g.removeCells(b,!1)}catch(l){}null==b&&mxClipboard.cut(g)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(f){}try{mxClipboard.copy(g)}catch(f){e.handleError(f)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{e.pasteXml(b,!0)}finally{g.getModel().endUpdate()}}else mxClipboard.paste(g)}),
+b=!0)}catch(l){}b||mxClipboard.paste(g)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(b){function d(b){if(null!=b){for(var d=!0,f=0;f<b.length&&d;f++)d=d&&g.model.isEdge(b[f]);var c=g.view.translate,f=g.view.scale,e=c.x,l=c.y,c=null;if(1==b.length&&d){var k=g.getCellGeometry(b[0]);null!=k&&(c=k.getTerminalPoint(!0))}c=null!=c?c:g.getBoundingBoxFromGeometry(b,d);null!=c&&(d=Math.round(g.snap(g.popupMenuHandler.triggerX/f-e)),f=Math.round(g.snap(g.popupMenuHandler.triggerY/
+f-l)),g.cellsMoved(b,d-c.x,f-c.y))}}function f(){g.getModel().beginUpdate();try{d(mxClipboard.paste(g))}finally{g.getModel().endUpdate()}}if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{d(e.pasteXml(b,!0))}finally{g.getModel().endUpdate()}}else f()}),b=!0)}catch(q){}b||f()}});this.addAction("copySize",function(){var b=g.getSelectionCell();g.isEnabled()&&null!=b&&g.getModel().isVertex(b)&&
+(b=g.getCellGeometry(b),null!=b&&(e.copiedSize=new mxRectangle(b.x,b.y,b.width,b.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(){if(g.isEnabled()&&!g.isSelectionEmpty()&&null!=e.copiedSize){g.getModel().beginUpdate();try{for(var b=g.getResizableCells(g.getSelectionCells()),d=0;d<b.length;d++)if(g.getModel().isVertex(b[d])){var c=g.getCellGeometry(b[d]);null!=c&&(c=c.clone(),c.width=e.copiedSize.width,c.height=e.copiedSize.height,g.getModel().setGeometry(b[d],c))}}finally{g.getModel().endUpdate()}}},
+null,null,"Alt+Shift+V");this.addAction("copyData",function(){var b=g.getSelectionCell()||g.getModel().getRoot();g.isEnabled()&&null!=b&&(b=b.cloneValue(),null==b||isNaN(b.nodeType)||(e.copiedValue=b))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(b,d){function f(d,f){var e=c.getValue(d);f=d.cloneValue(f);f.removeAttribute("placeholders");null==e||isNaN(e.nodeType)||f.setAttribute("placeholders",e.getAttribute("placeholders"));null!=b&&mxEvent.isShiftDown(b)||f.setAttribute("label",
+g.convertValueToString(d));c.setValue(d,f)}b=null!=d?d:b;var c=g.getModel();if(g.isEnabled()&&!g.isSelectionEmpty()&&null!=e.copiedValue){c.beginUpdate();try{var l=g.getEditableCells(g.getSelectionCells());if(0==l.length)f(c.getRoot(),e.copiedValue);else for(var k=0;k<l.length;k++)f(l[k],e.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,e){d=null!=e?e:d;null!=d&&mxEvent.isShiftDown(d)?c():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||
+mxEvent.isAltDown(d)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){c()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{g.setSelectionCells(g.duplicateCells()),g.scrollCellToVisible(g.getSelectionCell())}catch(f){e.handleError(f)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(b,d){b=null!=d?d:b;g.turnShapes(g.getResizableCells(g.getSelectionCells()),
+null!=b?mxEvent.isShiftDown(b):!1)},null,null,Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(b){b=g.getSelectionCell();g.isEnabled()&&null!=b&&g.addSelectionCells(g.getEdges(b))}));this.addAction("selectVertices",function(){g.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){g.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){g.selectAll(null,!0)},null,
+null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){g.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!g.isSelectionEmpty()){g.getModel().beginUpdate();try{var b=g.getSelectionCells(),d=g.getCurrentCellStyle(g.getSelectionCell()),c=1==mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,1)?0:1;g.setCellStyles(mxConstants.STYLE_MOVABLE,c,b);g.setCellStyles(mxConstants.STYLE_RESIZABLE,c,b);g.setCellStyles(mxConstants.STYLE_ROTATABLE,c,b);g.setCellStyles(mxConstants.STYLE_DELETABLE,
+c,b);g.setCellStyles(mxConstants.STYLE_EDITABLE,c,b);g.setCellStyles("connectable",c,b)}finally{g.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){g.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){g.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){g.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){g.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",
+function(){g.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){g.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){g.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(b){g.orderCells(!1,null,!0)});this.addAction("sendBackward",function(b){g.orderCells(!0,null,!0)});this.addAction("group",function(){if(g.isEnabled()){var b=mxUtils.sortCells(g.getSelectionCells(),!0);1!=b.length||g.isTable(b[0])||
+g.isTableRow(b[0])?(b=g.getCellsForGroup(b),1<b.length&&g.setSelectionCell(g.groupCells(null,0,b))):g.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(g.isEnabled()){var b=g.getEditableCells(g.getSelectionCells());g.model.beginUpdate();try{var d=g.ungroupCells();if(null!=b)for(var c=0;c<b.length;c++)g.model.contains(b[c])&&(0==g.model.getChildCount(b[c])&&g.model.isVertex(b[c])&&g.setCellStyles("container","0",[b[c]]),d.push(b[c]))}finally{g.model.endUpdate()}0<
+d.length&&g.setSelectionCells(d)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(g.isEnabled()){var b=g.getSelectionCells();if(null!=b){for(var d=[],c=0;c<b.length;c++)g.isTableRow(b[c])||g.isTableCell(b[c])||d.push(b[c]);g.removeCellsFromParent(d)}}});this.addAction("edit",function(){g.isEnabled()&&g.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var b=g.getSelectionCell()||g.getModel().getRoot();e.showDataDialog(b)},null,
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var b=g.getSelectionCell();if(g.isEnabled()&&null!=b&&g.isCellEditable(b)){var d="";if(mxUtils.isNode(b.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&b.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==c&&(c=b.value.getAttribute("tooltip"));null!=c&&(d=c)}d=new TextareaDialog(e,mxResources.get("editTooltip")+":",d,function(d){g.setTooltipForCell(b,
+d)});e.showDialog(d.container,320,200,!0,!0);d.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var b=g.getLinkForCell(g.getSelectionCell());null!=b&&g.openLink(b)});this.addAction("editLink...",function(){var b=g.getSelectionCell();if(g.isEnabled()&&null!=b&&g.isCellEditable(b)){var d=g.getLinkForCell(b)||"";e.showLinkDialog(d,mxResources.get("apply"),function(d,c,f){d=mxUtils.trim(d);g.setLinkForCell(b,0<d.length?d:null);g.setAttributeForCell(b,"linkTarget",f)},!0,g.getLinkTargetForCell(b))}},
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(g.clearSelection(),e.actions.get("image").funct())})).isEnabled=p;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(b,d,c){b=mxUtils.trim(b);if(0<b.length){var f=null,e=g.getLinkTitle(b);null!=d&&0<d.length&&(f=d[0].iconUrl,
+e=d[0].name||d[0].type,e=e.charAt(0).toUpperCase()+e.substring(1),30<e.length&&(e=e.substring(0,30)+"..."));d=new mxCell(e,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=f?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+f:"spacing=10;"));d.vertex=!0;f=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry([d],!0));d.geometry.x=f.x;d.geometry.y=f.y;g.setAttributeForCell(d,"linkTarget",c);g.setLinkForCell(d,b);g.cellSizeUpdated(d,
+!0);g.getModel().beginUpdate();try{d=g.addCell(d),g.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{g.getModel().endUpdate()}g.setSelectionCell(d);g.scrollCellToVisible(g.getSelectionCell())}},!0)})).isEnabled=p;this.addAction("link...",mxUtils.bind(this,function(){if(g.isEnabled())if(g.cellEditor.isContentEditing()){var b=g.getSelectedElement(),d=g.getParentByName(b,"A",g.cellEditor.textarea),c="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var k=b.getElementsByTagName("a"),
+n=0;n<k.length&&null==d;n++)k[n].textContent==b.textContent&&(d=k[n]);null!=d&&"A"==d.nodeName&&(c=d.getAttribute("href")||"",g.selectNode(d));var p=g.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){g.cellEditor.restoreSelection(p);null!=b&&g.insertLink(b)}))}else g.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=p;this.addAction("autosize",function(){var b=g.getSelectionCells();if(null!=b){g.getModel().beginUpdate();
+try{for(var d=0;d<b.length;d++){var c=b[d];0<g.getModel().getChildCount(c)?g.updateGroupBounds([c],20):g.updateCellSize(c)}}finally{g.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){g.stopEditing();var b=g.getCommonStyle(g.getSelectionCells()),b="1"==mxUtils.getValue(b,"html","0")?null:"1";g.getModel().beginUpdate();try{for(var d=g.getEditableCells(g.getSelectionCells()),c=0;c<d.length;c++)if(state=g.getView().getState(d[c]),null!=state){var k=
+mxUtils.getValue(state.style,"html","0");if("1"==k&&null==b){var n=g.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(n=n.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var p=document.createElement("div");p.innerHTML=g.sanitizeHtml(n);n=mxUtils.extractTextWithWhitespace(p.childNodes);g.cellLabelChanged(state.cell,n);g.setCellStyles("html",b,[d[c]])}else"0"==k&&"1"==b&&(n=mxUtils.htmlEntities(g.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
+"1")&&(n=n.replace(/\n/g,"<br/>")),g.cellLabelChanged(state.cell,g.sanitizeHtml(n)),g.setCellStyles("html",b,[d[c]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=b?b:"0"],"cells",d))}finally{g.getModel().endUpdate()}});this.addAction("wordWrap",function(){var b=g.getView().getState(g.getSelectionCell()),d="wrap";g.stopEditing();null!=b&&"wrap"==b.style[mxConstants.STYLE_WHITE_SPACE]&&(d=null);g.setCellStyles(mxConstants.STYLE_WHITE_SPACE,d)});this.addAction("rotation",
+function(){var b="0",d=g.getView().getState(g.getSelectionCell());null!=d&&(b=d.style[mxConstants.STYLE_ROTATION]||b);b=new FilenameDialog(e,b,mxResources.get("apply"),function(b){null!=b&&0<b.length&&g.setCellStyles(mxConstants.STYLE_ROTATION,b)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(b.container,375,80,!0,!0);b.init()});this.addAction("resetView",function(){g.zoomTo(1);e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(b){g.isFastZoomEnabled()?
+g.lazyZoom(!0,!0,e.buttonZoomDelay):g.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(b){g.isFastZoomEnabled()?g.lazyZoom(!1,!0,e.buttonZoomDelay):g.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var b=g.isSelectionEmpty()?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells()),d=g.view.translate,c=g.view.scale;b.x=b.x/c-d.x;b.y=b.y/c-d.y;b.width/=c;b.height/=c;null!=g.backgroundImage&&
+b.add(new mxRectangle(0,0,g.backgroundImage.width,g.backgroundImage.height));0==b.width||0==b.height?(g.zoomTo(1),e.resetScrollbars()):(d=Editor.fitWindowBorders,null!=d&&(b.x-=d.x,b.y-=d.y,b.width+=d.width+d.x,b.height+=d.height+d.y),g.fitWindow(b))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){g.pageVisible||this.get("pageView").funct();var b=g.pageFormat,d=g.pageScale;g.zoomTo(Math.floor(20*Math.min((g.container.clientWidth-10)/b.width/d,(g.container.clientHeight-
+10)/b.height/d))/20);mxUtils.hasScrollbars(g.container)&&(b=g.getPagePadding(),g.container.scrollTop=b.y*g.view.scale-1,g.container.scrollLeft=Math.min(b.x*g.view.scale,(g.container.scrollWidth-g.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){g.pageVisible||this.get("pageView").funct();var b=g.pageFormat,d=g.pageScale;g.zoomTo(Math.floor(20*Math.min((g.container.clientWidth-10)/(2*b.width)/d,(g.container.clientHeight-10)/b.height/
+d))/20);mxUtils.hasScrollbars(g.container)&&(b=g.getPagePadding(),g.container.scrollTop=Math.min(b.y,(g.container.scrollHeight-g.container.clientHeight)/2),g.container.scrollLeft=Math.min(b.x,(g.container.scrollWidth-g.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){g.pageVisible||this.get("pageView").funct();g.zoomTo(Math.floor(20*(g.container.clientWidth-10)/g.pageFormat.width/g.pageScale)/20);if(mxUtils.hasScrollbars(g.container)){var b=
+g.getPagePadding();g.container.scrollLeft=Math.min(b.x*g.view.scale,(g.container.scrollWidth-g.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.editorUi,parseInt(100*g.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(b){b=parseInt(b);!isNaN(b)&&0<b&&g.zoomTo(b/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(b.container,300,80,!0,!0);b.init()}),null,null,
+Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.editorUi,parseInt(100*g.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(b){b=parseInt(b);!isNaN(b)&&0<b&&(b=new ChangePageSetup(e,null,null,null,b/100),b.ignoreColor=!0,b.ignoreImage=!0,g.model.execute(b))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(b.container,300,80,!0,!0);b.init()}));var t=null,t=this.addAction("grid",function(){g.setGridEnabled(!g.isGridEnabled());
+e.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");t.setToggleAction(!0);t.setSelectedCallback(function(){return g.isGridEnabled()});t.setEnabled(!1);t=this.addAction("guides",function(){g.graphHandler.guidesEnabled=!g.graphHandler.guidesEnabled;e.fireEvent(new mxEventObject("guidesEnabledChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.graphHandler.guidesEnabled});t.setEnabled(!1);t=this.addAction("tooltips",function(){g.tooltipHandler.setEnabled(!g.tooltipHandler.isEnabled());
+e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.tooltipHandler.isEnabled()});t=this.addAction("collapseExpand",function(){var b=new ChangePageSetup(e);b.ignoreColor=!0;b.ignoreImage=!0;b.foldingEnabled=!g.foldingEnabled;g.model.execute(b)});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.foldingEnabled});t.isEnabled=p;t=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});t.setToggleAction(!0);
+t.setSelectedCallback(function(){return g.scrollbars});t=this.addAction("pageView",mxUtils.bind(this,function(){e.setPageVisible(!g.pageVisible)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return g.pageVisible});t=this.addAction("connectionArrows",function(){g.connectionArrowsEnabled=!g.connectionArrowsEnabled;e.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");t.setToggleAction(!0);t.setSelectedCallback(function(){return g.connectionArrowsEnabled});t=
+this.addAction("connectionPoints",function(){g.setConnectable(!g.connectionHandler.isEnabled());e.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");t.setToggleAction(!0);t.setSelectedCallback(function(){return g.connectionHandler.isEnabled()});t=this.addAction("copyConnect",function(){g.connectionHandler.setCreateTarget(!g.connectionHandler.isCreateTarget());e.fireEvent(new mxEventObject("copyConnectChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.connectionHandler.isCreateTarget()});
+t.isEnabled=p;t=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});t.setToggleAction(!0);t.setSelectedCallback(function(){return e.editor.autosave});t.isEnabled=p;t.visible=!1;this.addAction("help",function(){var b="";mxResources.isLanguageSupported(mxClient.language)&&(b="_"+mxClient.language);g.openLink(RESOURCES_PATH+"/help"+b+".html")});var d=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){d||(e.showDialog((new AboutDialog(e)).container,
+320,280,!0,!0,function(){d=!1}),d=!0)}));t=mxUtils.bind(this,function(b,d,c,e){return this.addAction(b,function(){if(null!=c&&g.cellEditor.isContentEditing())c();else{g.stopEditing(!1);g.getModel().beginUpdate();try{var b=g.getEditableCells(g.getSelectionCells());g.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,d,b);(d&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?g.updateLabelElements(b,function(b){b.style.fontWeight=null;"B"==b.nodeName&&g.replaceElement(b)}):(d&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?
+g.updateLabelElements(b,function(b){b.style.fontStyle=null;"I"==b.nodeName&&g.replaceElement(b)}):(d&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&g.updateLabelElements(b,function(b){b.style.textDecoration=null;"U"==b.nodeName&&g.replaceElement(b)});for(var f=0;f<b.length;f++)0==g.model.getChildCount(b[f])&&g.autoSizeCell(b[f],!1)}finally{g.getModel().endUpdate()}}},null,null,e)});t("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");t("italic",
mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");t("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){e.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){e.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){e.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});
this.addAction("gradientColor...",function(){e.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){e.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){e.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",
-function(){f.getModel().beginUpdate();try{f.setCellStyles(mxConstants.STYLE_DASHED,null),f.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("dashed",function(){f.getModel().beginUpdate();try{f.setCellStyles(mxConstants.STYLE_DASHED,"1"),f.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),
-e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("dotted",function(){f.getModel().beginUpdate();try{f.setCellStyles(mxConstants.STYLE_DASHED,"1"),f.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",
-f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("sharp",function(){f.getModel().beginUpdate();try{f.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),f.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("rounded",function(){f.getModel().beginUpdate();try{f.setCellStyles(mxConstants.STYLE_ROUNDED,
-"1"),f.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!f.isSelectionEmpty()&&f.isEnabled()){f.getModel().beginUpdate();try{var b=f.getSelectionCells(),d=f.getCurrentCellStyle(b[0]),c="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")?"0":"1";f.setCellStyles(mxConstants.STYLE_ROUNDED,
-c);f.setCellStyles(mxConstants.STYLE_CURVED,null);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}}});this.addAction("curved",function(){f.getModel().beginUpdate();try{f.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),f.setCellStyles(mxConstants.STYLE_CURVED,"1"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
-"values",["0","1"],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("collapsible",function(){var b=f.view.getState(f.getSelectionCell()),d="1";null!=b&&null!=f.getFoldingImage(b)&&(d="0");f.setCellStyles("collapsible",d);e.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[d],"cells",f.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var b=f.getEditableCells(f.getSelectionCells());if(null!=b&&0<b.length){var d=
-f.getModel(),d=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",d.getStyle(b[0])||"",function(d){null!=d&&f.setCellStyle(mxUtils.trim(d),b)},null,null,400,220);this.editorUi.showDialog(d.container,420,300,!0,!0);d.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){f.isEnabled()&&!f.isSelectionEmpty()&&e.setDefaultStyle(f.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){f.isEnabled()&&e.clearDefaultStyle()},
-null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var b=f.getSelectionCell();if(null!=b&&f.getModel().isEdge(b)){var d=k.graph.selectionCellsHandler.getHandler(b);if(d instanceof mxEdgeHandler){for(var c=f.view.translate,e=f.view.scale,m=c.x,c=c.y,b=f.getModel().getParent(b),n=f.getCellGeometry(b);f.getModel().isVertex(b)&&null!=n;)m+=n.x,c+=n.y,b=f.getModel().getParent(b),n=f.getCellGeometry(b);m=Math.round(f.snap(f.popupMenuHandler.triggerX/e-m));e=Math.round(f.snap(f.popupMenuHandler.triggerY/
-e-c));d.addPointAt(d.state,m,e)}}});this.addAction("removeWaypoint",function(){var b=e.actions.get("removeWaypoint");null!=b.handler&&b.handler.removePoint(b.handler.state,b.index)});this.addAction("clearWaypoints",function(b,d){b=null!=d?d:b;var c=f.getSelectionCells();if(null!=c){c=f.getEditableCells(f.addAllEdges(c));f.getModel().beginUpdate();try{for(var g=0;g<c.length;g++){var e=c[g];if(f.getModel().isEdge(e)){var l=f.getCellGeometry(e);mxEvent.isShiftDown(b)?(f.setCellStyles(mxConstants.STYLE_EXIT_X,
-null,[e]),f.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[e]),f.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[e]),f.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[e])):null!=l&&(l=l.clone(),l.points=null,l.x=0,l.y=0,l.offset=null,f.getModel().setGeometry(e,l))}}}finally{f.getModel().endUpdate()}}},null,null,"Alt+Shift+C");t=this.addAction("subscript",mxUtils.bind(this,function(){f.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");t=this.addAction("superscript",
-mxUtils.bind(this,function(){f.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){var b=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=f.getView().getState(f.getSelectionCell()),c="";null!=d&&(c=d.style[mxConstants.STYLE_IMAGE]||c);var k=f.cellEditor.saveSelection();e.showImageDialog(b,c,function(b,d,c){if(f.cellEditor.isContentEditing())f.cellEditor.restoreSelection(k),
-f.insertImage(b,d,c);else{var g=f.getSelectionCells();if(null!=b&&(0<b.length||0<g.length)){var e=null;f.getModel().beginUpdate();try{if(0==g.length){var g=[f.insertVertex(f.getDefaultParent(),null,"",0,0,d,c,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],l=f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(g,!0));g[0].geometry.x=l.x;g[0].geometry.y=l.y;e=g;f.fireEvent(new mxEventObject("cellsInserted","cells",e))}f.setCellStyles(mxConstants.STYLE_IMAGE,
-0<b.length?b:null,g);var m=f.getCurrentCellStyle(g[0]);"image"!=m[mxConstants.STYLE_SHAPE]&&"label"!=m[mxConstants.STYLE_SHAPE]?f.setCellStyles(mxConstants.STYLE_SHAPE,"image",g):0==b.length&&f.setCellStyles(mxConstants.STYLE_SHAPE,null,g);if(1==f.getSelectionCount()&&null!=d&&null!=c){var p=g[0],q=f.getModel().getGeometry(p);null!=q&&(q=q.clone(),q.width=d,q.height=c,f.getModel().setGeometry(p,q))}}finally{f.getModel().endUpdate()}null!=e&&(f.setSelectionCells(e),f.scrollCellToVisible(e[0]))}}},
-f.cellEditor.isContentEditing(),!f.cellEditor.isContentEditing())}}).isEnabled=n;t=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),
+function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_DASHED,null),g.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("dashed",function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_DASHED,"1"),g.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),
+e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("dotted",function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_DASHED,"1"),g.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",
+g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("sharp",function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),g.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("rounded",function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_ROUNDED,
+"1"),g.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!g.isSelectionEmpty()&&g.isEnabled()){g.getModel().beginUpdate();try{var b=g.getSelectionCells(),d=g.getCurrentCellStyle(b[0]),c="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")?"0":"1";g.setCellStyles(mxConstants.STYLE_ROUNDED,
+c);g.setCellStyles(mxConstants.STYLE_CURVED,null);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}}});this.addAction("curved",function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),g.setCellStyles(mxConstants.STYLE_CURVED,"1"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
+"values",["0","1"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("collapsible",function(){var b=g.view.getState(g.getSelectionCell()),d="1";null!=b&&null!=g.getFoldingImage(b)&&(d="0");g.setCellStyles("collapsible",d);e.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[d],"cells",g.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var b=g.getEditableCells(g.getSelectionCells());if(null!=b&&0<b.length){var d=
+g.getModel(),d=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",d.getStyle(b[0])||"",function(d){null!=d&&g.setCellStyle(mxUtils.trim(d),b)},null,null,400,220);this.editorUi.showDialog(d.container,420,300,!0,!0);d.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){g.isEnabled()&&!g.isSelectionEmpty()&&e.setDefaultStyle(g.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){g.isEnabled()&&e.clearDefaultStyle()},
+null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var b=g.getSelectionCell();if(null!=b&&g.getModel().isEdge(b)){var d=k.graph.selectionCellsHandler.getHandler(b);if(d instanceof mxEdgeHandler){for(var c=g.view.translate,e=g.view.scale,n=c.x,c=c.y,b=g.getModel().getParent(b),p=g.getCellGeometry(b);g.getModel().isVertex(b)&&null!=p;)n+=p.x,c+=p.y,b=g.getModel().getParent(b),p=g.getCellGeometry(b);n=Math.round(g.snap(g.popupMenuHandler.triggerX/e-n));e=Math.round(g.snap(g.popupMenuHandler.triggerY/
+e-c));d.addPointAt(d.state,n,e)}}});this.addAction("removeWaypoint",function(){var b=e.actions.get("removeWaypoint");null!=b.handler&&b.handler.removePoint(b.handler.state,b.index)});this.addAction("clearWaypoints",function(b,d){b=null!=d?d:b;var c=g.getSelectionCells();if(null!=c){c=g.getEditableCells(g.addAllEdges(c));g.getModel().beginUpdate();try{for(var f=0;f<c.length;f++){var e=c[f];if(g.getModel().isEdge(e)){var l=g.getCellGeometry(e);mxEvent.isShiftDown(b)?(g.setCellStyles(mxConstants.STYLE_EXIT_X,
+null,[e]),g.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[e]),g.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[e]),g.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[e])):null!=l&&(l=l.clone(),l.points=null,l.x=0,l.y=0,l.offset=null,g.getModel().setGeometry(e,l))}}}finally{g.getModel().endUpdate()}}},null,null,"Alt+Shift+C");t=this.addAction("subscript",mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");t=this.addAction("superscript",
+mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=g.getView().getState(g.getSelectionCell()),c="";null!=d&&(c=d.style[mxConstants.STYLE_IMAGE]||c);var k=g.cellEditor.saveSelection();e.showImageDialog(b,c,function(b,d,c){if(g.cellEditor.isContentEditing())g.cellEditor.restoreSelection(k),
+g.insertImage(b,d,c);else{var f=g.getSelectionCells();if(null!=b&&(0<b.length||0<f.length)){var e=null;g.getModel().beginUpdate();try{if(0==f.length){var f=[g.insertVertex(g.getDefaultParent(),null,"",0,0,d,c,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],l=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry(f,!0));f[0].geometry.x=l.x;f[0].geometry.y=l.y;e=f;g.fireEvent(new mxEventObject("cellsInserted","cells",e))}g.setCellStyles(mxConstants.STYLE_IMAGE,
+0<b.length?b:null,f);var m=g.getCurrentCellStyle(f[0]);"image"!=m[mxConstants.STYLE_SHAPE]&&"label"!=m[mxConstants.STYLE_SHAPE]?g.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==b.length&&g.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==g.getSelectionCount()&&null!=d&&null!=c){var n=f[0],q=g.getModel().getGeometry(n);null!=q&&(q=q.clone(),q.width=d,q.height=c,g.getModel().setGeometry(n,q))}}finally{g.getModel().endUpdate()}null!=e&&(g.setSelectionCells(e),g.scrollCellToVisible(e[0]))}}},
+g.cellEditor.isContentEditing(),!g.cellEditor.isContentEditing())}}).isEnabled=p;t=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),
this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));t=this.addAction("formatPanel",mxUtils.bind(this,function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return 0<e.formatWidth}));
t=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(e,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
-null,null,Editor.ctrlKey+"+Shift+O");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(b,c,e,k,f){var n;"..."==b.substring(b.length-3)?(b=b.substring(0,b.length-3),n=mxResources.get(b)+"..."):n=mxResources.get(b);return this.put(b,new Action(n,c,e,k,f))};Actions.prototype.put=function(b,c){return this.actions[b]=c};Actions.prototype.get=function(b){return this.actions[b]};
-function Action(b,c,e,k,f){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(c);this.enabled=null!=e?e:!0;this.iconCls=k;this.shortcut=f;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+null,null,Editor.ctrlKey+"+Shift+O");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(b,c,e,k,g){var p;"..."==b.substring(b.length-3)?(b=b.substring(0,b.length-3),p=mxResources.get(b)+"..."):p=mxResources.get(b);return this.put(b,new Action(p,c,e,k,g))};Actions.prototype.put=function(b,c){return this.actions[b]=c};Actions.prototype.get=function(b){return this.actions[b]};
+function Action(b,c,e,k,g){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(c);this.enabled=null!=e?e:!0;this.iconCls=k;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,c){mxEventSource.call(this);this.ui=b;this.shadowData=this.data=c||"";this.shadowPages=null;this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;
DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(b,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(b,c):this.updateFile(b,c)};
-DrawioFile.prototype.updateFile=function(b,c,e,k){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(f){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=f?this.mergeFile(f,b,c,k):this.reloadFile(b,c))}catch(n){null!=c&&c(n)}}),c))};
-DrawioFile.prototype.mergeFile=function(b,c,e,k){var f=!0;try{this.stats.fileMerged++;var n=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),t=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=t&&0<t.length){this.shadowPages=t;this.backupPatch=this.isModified()?this.ui.diffPages(n,this.ui.pages):null;var d=[this.ui.diffPages(null!=k?k:n,this.shadowPages)];if(!this.ignorePatches(d)){var g=this.ui.patchPages(n,
-d[0]);k={};var l=this.ui.getHashValueForPages(g,k),n={},q=this.ui.getHashValueForPages(this.shadowPages,n);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",q==l,l);if(null!=l&&l!=q){var p=this.compressReportData(this.getAnonymizedXmlForPages(t)),m=this.compressReportData(this.getAnonymizedXmlForPages(g)),v=this.ui.hashValue(b.getCurrentEtag()),u=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
-"\nChecksum: "+l+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(n)+"\nFrom: "+v+"\nTo: "+u+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+m,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw f=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(E){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=e&&e(E);try{if(f)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,E);else{var B=this.getCurrentUser(),x=null!=B?B.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,E)}}catch(A){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var c=new mxCodec(mxUtils.createXmlDocument()),e=c.document.createElement("mxfile");if(null!=b)for(var k=0;k<b.length;k++){var f=c.encode(new mxGraphModel(b[k].root));"1"!=urlParams.dev&&(f=this.ui.anonymizeNode(f,!0));f.setAttribute("id",b[k].getId());b[k].viewState&&this.ui.editor.graph.saveViewState(b[k].viewState,f,!0);e.appendChild(f)}return mxUtils.getPrettyXml(e)};
+DrawioFile.prototype.updateFile=function(b,c,e,k){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=g?this.mergeFile(g,b,c,k):this.reloadFile(b,c))}catch(p){null!=c&&c(p)}}),c))};
+DrawioFile.prototype.mergeFile=function(b,c,e,k){var g=!0;try{this.stats.fileMerged++;var p=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),t=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=t&&0<t.length){this.shadowPages=t;this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;var d=[this.ui.diffPages(null!=k?k:p,this.shadowPages)];if(!this.ignorePatches(d)){var f=this.ui.patchPages(p,
+d[0]);k={};var l=this.ui.getHashValueForPages(f,k),p={},m=this.ui.getHashValueForPages(this.shadowPages,p);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",m==l,l);if(null!=l&&l!=m){var q=this.compressReportData(this.getAnonymizedXmlForPages(t)),n=this.compressReportData(this.getAnonymizedXmlForPages(f)),v=this.ui.hashValue(b.getCurrentEtag()),u=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
+"\nChecksum: "+l+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(p)+"\nFrom: "+v+"\nTo: "+u+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+n,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(H){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=e&&e(H);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,H);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,H)}}catch(D){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var c=new mxCodec(mxUtils.createXmlDocument()),e=c.document.createElement("mxfile");if(null!=b)for(var k=0;k<b.length;k++){var g=c.encode(new mxGraphModel(b[k].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",b[k].getId());b[k].viewState&&this.ui.editor.graph.saveViewState(b[k].viewState,g,!0);e.appendChild(g)}return mxUtils.getPrettyXml(e)};
DrawioFile.prototype.compressReportData=function(b,c,e){c=null!=c?c:1E4;null!=e&&null!=b&&b.length>e?b=b.substring(0,e)+"[...]":null!=b&&b.length>c&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,c,e,k,f){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=c)for(b=0;b<c.length;b++)this.ui.anonymizePatch(c[b]);var n=mxUtils.bind(this,function(b){var d=this.compressReportData(JSON.stringify(c,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+f+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=b?"\n\nRemote:\n"+b:""),null,7E4)});null==k?n(null):this.getLatestVersion(mxUtils.bind(this,function(b){null!=b&&b.getCurrentEtag()==k?n(b):n(null)}),function(){})}else{var t=this.getCurrentUser(),d=null!=t?t.id:"unknown";EditorUi.logError("Checksum Error in "+f+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
-try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:f,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(g){}}}catch(g){}};
-DrawioFile.prototype.sendErrorReport=function(b,c,e,k){try{var f=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),d=null!=t?this.ui.hashValue(t.id):"unknown",g=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",l=this.getTitle(),q=l.lastIndexOf("."),t="xml";0<q&&(t=l.substring(q));var p=null!=e?e.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+t+")\nUser="+d+g+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:
-"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+f+"\n\nData:\n"+n,k)}catch(m){}};
-DrawioFile.prototype.reloadFile=function(b,c){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),n=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(n,c,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var f=this.ui.getCurrentFile();null!=f&&(f.stats=this.stats);null!=b&&
+DrawioFile.prototype.checksumError=function(b,c,e,k,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=c)for(b=0;b<c.length;b++)this.ui.anonymizePatch(c[b]);var p=mxUtils.bind(this,function(b){var d=this.compressReportData(JSON.stringify(c,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=b?"\n\nRemote:\n"+b:""),null,7E4)});null==k?p(null):this.getLatestVersion(mxUtils.bind(this,function(b){null!=b&&b.getCurrentEtag()==k?p(b):p(null)}),function(){})}else{var t=this.getCurrentUser(),d=null!=t?t.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(f){}}}catch(f){}};
+DrawioFile.prototype.sendErrorReport=function(b,c,e,k){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),d=null!=t?this.ui.hashValue(t.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",l=this.getTitle(),m=l.lastIndexOf("."),t="xml";0<m&&(t=l.substring(m));var q=null!=e?e.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+t+")\nUser="+d+f+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:
+"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+q+"\n\nShadow:\n"+g+"\n\nData:\n"+p,k)}catch(n){}};
+DrawioFile.prototype.reloadFile=function(b,c){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),p=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(p,c,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var g=this.ui.getCurrentFile();null!=g&&(g.stats=this.stats);null!=b&&
b()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(k){null!=c&&c(k)}};DrawioFile.prototype.copyFile=function(b,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(b){for(var c=!0,e=0;e<b.length&&c;e++)c=c&&0==Object.keys(b[e]).length;return c};
-DrawioFile.prototype.patch=function(b,c,e){var k=this.ui.editor.undoManager,f=k.history.slice(),n=k.indexOfNextAdd,t=this.ui.editor.graph;t.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=e;var g=t.foldingEnabled,l=t.mathEnabled,q=t.cellRenderer.redraw;t.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());q.apply(this,arguments)};t.model.beginUpdate();try{for(var p=
-0;p<b.length;p++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[p],!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{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=q;this.changeListenerEnabled=d;e||(k.history=f,k.indexOfNextAdd=n,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)l!=
-t.mathEnabled?(this.ui.editor.updateGraphComponents(),t.refresh()):(g!=t.foldingEnabled?t.view.revalidate():t.view.validate(),t.sizeDidChange());this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}};
-DrawioFile.prototype.save=function(b,c,e,k,f,n){try{if(this.isEditable())if(!f&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=e)e(t);else throw t;}};
+DrawioFile.prototype.patch=function(b,c,e){var k=this.ui.editor.undoManager,g=k.history.slice(),p=k.indexOfNextAdd,t=this.ui.editor.graph;t.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=e;var f=t.foldingEnabled,l=t.mathEnabled,m=t.cellRenderer.redraw;t.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());m.apply(this,arguments)};t.model.beginUpdate();try{for(var q=
+0;q<b.length;q++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[q],!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{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=m;this.changeListenerEnabled=d;e||(k.history=g,k.indexOfNextAdd=p,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)l!=
+t.mathEnabled?(this.ui.editor.updateGraphComponents(),t.refresh()):(f!=t.foldingEnabled?t.view.revalidate():t.view.validate(),t.sizeDidChange());this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}};
+DrawioFile.prototype.save=function(b,c,e,k,g,p){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=e)e(t);else throw t;}};
DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,c,e){};DrawioFile.prototype.saveFile=function(b,c,e,k){};
DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};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(b,c,e){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,c,e){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -3033,32 +3036,32 @@ DrawioFile.prototype.showRefreshDialog=function(b,c,e){null==e&&(e=mxResources.g
c)}),null,mxResources.get("synchronize"),mxUtils.bind(this,function(){this.reloadFile(b,c)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150))};
DrawioFile.prototype.showCopyDialog=function(b,c,e){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,c)}),null,mxResources.get("overwrite"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150)};
DrawioFile.prototype.showConflictDialog=function(b,c){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("synchronize"),c,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),340,150)};
-DrawioFile.prototype.redirectToNewApp=function(b,c){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var e=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),k=mxResources.get("redirectToNewApp");null!=c&&(k+=" ("+c+")");var f=mxUtils.bind(this,function(){var c=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==e?window.location.reload():
-window.location.href=e});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()});null!=b?this.isModified()?this.ui.confirm(k,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(k,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-f)}};DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
+DrawioFile.prototype.redirectToNewApp=function(b,c){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var e=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),k=mxResources.get("redirectToNewApp");null!=c&&(k+=" ("+c+")");var g=mxUtils.bind(this,function(){var c=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==e?window.location.reload():
+window.location.href=e});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()});null!=b?this.isModified()?this.ui.confirm(k,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),g,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(k,g,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+g)}};DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(b,c){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(b,c);else if(this.isModified()&&this.addUnsavedStatus(b),c)this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var e=this.getErrorMessage(b);null!=e&&60<e.length&&(e=e.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("error"))+
(null!=e?" ("+mxUtils.htmlEntities(e)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(b,c){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),k=mxUtils.bind(this,function(b){this.handleFileError(b,!0)}),f=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,e,k,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),n=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,
-mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,e,k,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),k)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,k,f):this.invalidChecksum?this.showRefreshDialog(e,k,this.getErrorMessage(b)):c?this.showConflictDialog(f,n):this.addConflictStatus(mxUtils.bind(this,
+DrawioFile.prototype.handleConflictError=function(b,c){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),k=mxUtils.bind(this,function(b){this.handleFileError(b,!0)}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,e,k,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,
+mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,e,k,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),k)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,k,g):this.invalidChecksum?this.showRefreshDialog(e,k,this.getErrorMessage(b)):c?this.showConflictDialog(g,p):this.addConflictStatus(mxUtils.bind(this,
function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(e,k)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var c=null!=b?null!=b.error?b.error.message:b.message:null;null==c&&null!=b&&b.code==App.ERROR_TIMEOUT&&(c=mxResources.get("timeout"));return c};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.sendFileChanges(),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(b){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=
null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(b){this.handleFileError(b)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.isOptimisticSync=function(){return!1};
DrawioFile.prototype.createSecret=function(b){var c=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(c):this.sync.createToken(c,mxUtils.bind(this,function(e){b(c,e)}),mxUtils.bind(this,function(){b(c)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.isOptimisticSync()&&this.sync.fileSaving();"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaving",[this])};
DrawioFile.prototype.sendFileChanges=function(){try{null!=this.p2pCollab&&null!=this.sync&&(this.updateFileData(),this.sync.sendFileChanges(this.ui.getPagesForNode(mxUtils.parseXml(this.getData()).documentElement),this.desc),"1"==urlParams.test&&EditorUi.debug("DrawioFile.sendFileChanges",[this]))}catch(b){console.log(b)}};
-DrawioFile.prototype.fileSaved=function(b,c,e,k,f){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=b,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(b).documentElement),c,e,k,f)}catch(d){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=k&&k(d);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,d);else{var n=this.getCurrentUser(),t=null!=n?n.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),t,d)}}catch(g){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
-DrawioFile.prototype.autosave=function(b,c,e,k){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<c?b:0;this.clearAutosave();var f=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==f&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var b=this.isAutosaveRevision();b&&(this.lastAutosaveRevision=(new Date).getTime());this.save(b,mxUtils.bind(this,function(b){this.autosaveCompleted();null!=e&&e(b)}),mxUtils.bind(this,
-function(b){null!=k&&k(b)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),b);this.autosaveThread=f};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
+DrawioFile.prototype.fileSaved=function(b,c,e,k,g){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=b,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(b).documentElement),c,e,k,g)}catch(d){this.invalidChecksum=this.inConflictState=
+!0;this.descriptorChanged();null!=k&&k(d);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,d);else{var p=this.getCurrentUser(),t=null!=p?p.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),t,d)}}catch(f){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
+DrawioFile.prototype.autosave=function(b,c,e,k){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<c?b:0;this.clearAutosave();var g=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==g&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var b=this.isAutosaveRevision();b&&(this.lastAutosaveRevision=(new Date).getTime());this.save(b,mxUtils.bind(this,function(b){this.autosaveCompleted();null!=e&&e(b)}),mxUtils.bind(this,
+function(b){null!=k&&k(b)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),b);this.autosaveThread=g};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,c){if(null!=b&&null!=c){var e=b.lastIndexOf("."),k=0<e?b.substring(e):"",e=c.lastIndexOf(".");return k===(0<e?c.substring(e):"")}return b==c};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,c){b([])};DrawioFile.prototype.addComment=function(b,c,e){c(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,c){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};LocalFile=function(b,c,e,k,f,n){DrawioFile.call(this,b,c);this.title=e;this.mode=k?null:App.MODE_DEVICE;this.fileHandle=f;this.desc=n};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,c){b([])};DrawioFile.prototype.addComment=function(b,c,e){c(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,c){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};LocalFile=function(b,c,e,k,g,p){DrawioFile.call(this,b,c);this.title=e;this.mode=k?null:App.MODE_DEVICE;this.fileHandle=g;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,c,e){this.saveAs(this.title,c,e)};LocalFile.prototype.saveAs=function(b,c,e){this.saveFile(b,!1,c,e)};LocalFile.prototype.saveAs=function(b,c,e){this.saveFile(b,!1,c,e)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,c){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,c)};
-LocalFile.prototype.saveFile=function(b,c,e,k,f){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;f||this.updateFileData();var n=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var t=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),g=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var g=mxUtils.bind(this,
-function(b){this.savingFile=!1;null!=k&&k({error:b})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(b){this.fileHandle.getFile().then(mxUtils.bind(this,function(e){this.invalidFileHandle=null;this.desc.lastModified==e.lastModified?b.write(n?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){b.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){try{var c=this.desc;this.savingFile=!1;this.desc=
-b;this.fileSaved(t,c,d,g);this.removeDraft()}catch(x){g(x)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(b){this.invalidFileHandle=!0;g(b)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,n?"image/png":"text/xml",n);else if(c.length<MAX_REQUEST_SIZE){var e=b.lastIndexOf("."),e=0<e?b.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(n?"&binary=1":""))).simulate(document,
-"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));d()}});n?(c=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){g(b)}),k,this.ui.getCurrentFile()!=this?t:null,c.scale,c.border)):g(t)};LocalFile.prototype.rename=function(b,c,e){this.title=b;this.descriptorChanged();null!=c&&c()};
+LocalFile.prototype.saveFile=function(b,c,e,k,g){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;g||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var t=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),f=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
+function(b){this.savingFile=!1;null!=k&&k({error:b})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(b){this.fileHandle.getFile().then(mxUtils.bind(this,function(e){this.invalidFileHandle=null;this.desc.lastModified==e.lastModified?b.write(p?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){b.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){try{var c=this.desc;this.savingFile=!1;this.desc=
+b;this.fileSaved(t,c,d,f);this.removeDraft()}catch(x){f(x)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(b){this.invalidFileHandle=!0;f(b)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,p?"image/png":"text/xml",p);else if(c.length<MAX_REQUEST_SIZE){var e=b.lastIndexOf("."),e=0<e?b.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,
+"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));d()}});p?(c=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){f(b)}),k,this.ui.getCurrentFile()!=this?t:null,c.scale,c.border)):f(t)};LocalFile.prototype.rename=function(b,c,e){this.title=b;this.descriptorChanged();null!=c&&c()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
@@ -3066,8 +3069,8 @@ graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFA
edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",
fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},
edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTkgMTJ2N0g1di03SDN2N2MwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0yem0tNiAuNjdsMi41OS0yLjU4TDE3IDExLjVsLTUgNS01LTUgMS40MS0xLjQxTDExIDEyLjY3VjNoMnoiLz48L3N2Zz4=";
-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=":
+Editor.closeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjZweCI+PGVsbGlwc2UgY3g9IjEyIiBjeT0iMTIiIHJ4PSI5IiByeT0iOSIgc3Ryb2tlPSJub25lIiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE0LjU5IDhMMTIgMTAuNTkgOS40MSA4IDggOS40MSAxMC41OSAxMiA4IDE0LjU5IDkuNDEgMTYgMTIgMTMuNDEgMTQuNTkgMTYgMTYgMTQuNTkgMTMuNDEgMTIgMTYgOS40MSAxNC41OSA4ek0xMiAyQzYuNDcgMiAyIDYuNDcgMiAxMnM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTBTMTcuNTMgMiAxMiAyem0wIDE4Yy00LjQxIDAtOC0zLjU5LTgtOHMzLjU5LTggOC04IDggMy41OSA4IDgtMy41OSA4LTggOHoiLz48L3N2Zz4=";
+Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
IMAGE_PATH+"/spin.gif";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMjEuOTkgNGMwLTEuMS0uODktMi0xLjk5LTJINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNGw0IDQtLjAxLTE4ek0xOCAxNEg2di0yaDEydjJ6bTAtM0g2VjloMTJ2MnptMC0zSDZWNmgxMnYyeiIvPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4=";Editor.commentImageInverted="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABLElEQVRYR+2Wvy4FQRjFf4dINAq9XqtSaVRqXArPINEodUqlhxC5/pU6nYdQSHQeQTRHNtmVuXuXrIxv1k1sN5vMOb85c75kxMCfBvZnCsD2ErAGzAfAvUt6THUnAGwfAWfAQoB5I3kh6aBZfALYXgGeg80b31VJT9UiBRgB48CTp9Lbku7aAPvAZSGAHUm3swEgKWtUbbsj1f4JDA4AbGb24iErgUzzr7bvSrrpVcKgK5ghgKAO9E/gvwNBJRxJuu41BUEd+BFARA3+JsAWcB9x3A7NzgSqt+ALsFwAYhqgMrW9Ub8J14G5QJBugAhD2yfAaUt7T9LVxBhGmDeato/rZJtfZQHq600hygPUEIfAOTAMQALxWrQD7X7ZXpT0VqyE3xU868n9G5PzASPvpiHavBAUAAAAAElFTkSuQmCC";
@@ -3079,10 +3082,8 @@ Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/face
IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE0LjEyIDRsMS44MyAySDIwdjEySDRWNmg0LjA1bDEuODMtMmg0LjI0TTE1IDJIOUw3LjE3IDRINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNmMxLjEgMCAyLS45IDItMlY2YzAtMS4xLS45LTItMi0yaC0zLjE3TDE1IDJ6bS0zIDdjMS42NSAwIDMgMS4zNSAzIDNzLTEuMzUgMy0zIDMtMy0xLjM1LTMtMyAxLjM1LTMgMy0zbTAtMmMtMi43NiAwLTUgMi4yNC01IDVzMi4yNCA1IDUgNSA1LTIuMjQgNS01LTIuMjQtNS01LTV6Ii8+PC9zdmc+";
Editor.tagsLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjM2cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjM2cHgiIGZpbGw9IiNGRkZGRkYiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
-Editor.visibleImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNUMxOS4xNyAxNC44NyAxNS43OSAxNyAxMiAxN3MtNy4xNy0yLjEzLTguODItNS41QzQuODMgOC4xMyA4LjIxIDYgMTIgNm0wLTJDNyA0IDIuNzMgNy4xMSAxIDExLjUgMi43MyAxNS44OSA3IDE5IDEyIDE5czkuMjctMy4xMSAxMS03LjVDMjEuMjcgNy4xMSAxNyA0IDEyIDR6bTAgNWMxLjM4IDAgMi41IDEuMTIgMi41IDIuNVMxMy4zOCAxNCAxMiAxNHMtMi41LTEuMTItMi41LTIuNVMxMC42MiA5IDEyIDltMC0yYy0yLjQ4IDAtNC41IDIuMDItNC41IDQuNVM5LjUyIDE2IDEyIDE2czQuNS0yLjAyIDQuNS00LjVTMTQuNDggNyAxMiA3eiIvPjwvc3ZnPg==";
-Editor.hiddenImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNS0uNTkgMS4yMi0xLjQyIDIuMjctMi40MSAzLjEybDEuNDEgMS40MWMxLjM5LTEuMjMgMi40OS0yLjc3IDMuMTgtNC41M0MyMS4yNyA3LjExIDE3IDQgMTIgNGMtMS4yNyAwLTIuNDkuMi0zLjY0LjU3bDEuNjUgMS42NUMxMC42NiA2LjA5IDExLjMyIDYgMTIgNnptLTEuMDcgMS4xNEwxMyA5LjIxYy41Ny4yNSAxLjAzLjcxIDEuMjggMS4yOGwyLjA3IDIuMDdjLjA4LS4zNC4xNC0uNy4xNC0xLjA3QzE2LjUgOS4wMSAxNC40OCA3IDEyIDdjLS4zNyAwLS43Mi4wNS0xLjA3LjE0ek0yLjAxIDMuODdsMi42OCAyLjY4QzMuMDYgNy44MyAxLjc3IDkuNTMgMSAxMS41IDIuNzMgMTUuODkgNyAxOSAxMiAxOWMxLjUyIDAgMi45OC0uMjkgNC4zMi0uODJsMy40MiAzLjQyIDEuNDEtMS40MUwzLjQyIDIuNDUgMi4wMSAzLjg3em03LjUgNy41bDIuNjEgMi42MWMtLjA0LjAxLS4wOC4wMi0uMTIuMDItMS4zOCAwLTIuNS0xLjEyLTIuNS0yLjUgMC0uMDUuMDEtLjA4LjAxLS4xM3ptLTMuNC0zLjRsMS43NSAxLjc1Yy0uMjMuNTUtLjM2IDEuMTUtLjM2IDEuNzggMCAyLjQ4IDIuMDIgNC41IDQuNSA0LjUuNjMgMCAxLjIzLS4xMyAxLjc3LS4zNmwuOTguOThjLS44OC4yNC0xLjguMzgtMi43NS4zOC0zLjc5IDAtNy4xNy0yLjEzLTguODItNS41LjctMS40MyAxLjcyLTIuNjEgMi45My0zLjUzeiIvPjwvc3ZnPg==";
-Editor.clearImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDYuNDFMMTcuNTkgNSAxMiAxMC41OSA2LjQxIDUgNSA2LjQxIDEwLjU5IDEyIDUgMTcuNTkgNi40MSAxOSAxMiAxMy40MSAxNy41OSAxOSAxOSAxNy41OSAxMy40MSAxMiAxOSA2LjQxeiIvPjwvc3ZnPg==";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');
-Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
+Editor.tagsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE4cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
+Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=
null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(b,d){return"1"!=mxUtils.getValue(b.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"comic","0")||"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(b,d){return"1"==
mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(b,d){return"1"==
@@ -3099,90 +3100,90 @@ type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opac
dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",
dispName:"Connectable",type:"bool",getDefaultValue:function(b,d){return d.editorUi.editor.graph.isCellConnectable(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",
dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",
-dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,g=d.editorUi.editor.graph;return null!=
-c&&(g.isSwimlane(c)||0<g.model.getChildCount(c))},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,g=d.editorUi.editor.graph;return null!=c&&(g.isContainer(c)&&"0"!=b.style.collapsible||!g.isContainer(c)&&"1"==b.style.collapsible)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",
+dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=
+c&&(f.isSwimlane(c)||0<f.model.getChildCount(c))},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=c&&(f.isContainer(c)&&"0"!=b.style.collapsible||!f.isContainer(c)&&"1"==b.style.collapsible)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",
dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length&&!d.editorUi.editor.graph.isSwimlane(b.vertices[0])&&null==mxUtils.getValue(b.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(b,d){var c=d.editorUi.editor.graph.model;return 0<b.vertices.length?c.isVertex(c.getParent(b.vertices[0])):!1}},{name:"editable",dispName:"Editable",
type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(b,d){var c=0<b.vertices.length?d.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=c&&!c.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",
dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,
isVisible:function(b,d){var c=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return d.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==c||c==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(b,d){return 0<b.vertices.length&&d.editorUi.editor.graph.isContainer(b.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(b){var d=rough.canvas({getContext:function(){return b}});d.draw=function(d){var c=d.sets||[];d=d.options||this.getDefaultOptions();for(var g=0;g<c.length;g++){var e=c[g];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(b,e,d);break;case "fillPath":this._drawToContext(b,e,d);break;case "fillSketch":this.fillSketch(b,e,d)}}};d.fillSketch=function(d,c,g){var e=b.state.strokeColor,f=b.state.strokeWidth,l=b.state.strokeAlpha,k=b.state.dashed,m=g.fillWeight;
-0>m&&(m=g.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(g.fill||"");b.setStrokeWidth(m);b.setDashed(!1);this._drawToContext(d,c,g);b.setDashed(k);b.setStrokeWidth(f);b.setStrokeColor(e);b.setStrokeAlpha(l)};d._drawToContext=function(b,d,c){b.begin();for(var g=0;g<d.ops.length;g++){var e=d.ops[g],f=e.data;switch(e.op){case "move":b.moveTo(f[0],f[1]);break;case "bcurveTo":b.curveTo(f[0],f[1],f[2],f[3],f[4],f[5]);break;case "lineTo":b.lineTo(f[0],f[1])}}b.end();"fillPath"===d.type&&
-c.filled?b.fill():b.stroke()};return d};(function(){function b(d,c,g){this.canvas=d;this.rc=c;this.shape=g;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,b.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,b.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,b.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+Editor.createRoughCanvas=function(b){var d=rough.canvas({getContext:function(){return b}});d.draw=function(d){var c=d.sets||[];d=d.options||this.getDefaultOptions();for(var f=0;f<c.length;f++){var e=c[f];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(b,e,d);break;case "fillPath":this._drawToContext(b,e,d);break;case "fillSketch":this.fillSketch(b,e,d)}}};d.fillSketch=function(d,c,f){var e=b.state.strokeColor,g=b.state.strokeWidth,l=b.state.strokeAlpha,k=b.state.dashed,m=f.fillWeight;
+0>m&&(m=f.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(f.fill||"");b.setStrokeWidth(m);b.setDashed(!1);this._drawToContext(d,c,f);b.setDashed(k);b.setStrokeWidth(g);b.setStrokeColor(e);b.setStrokeAlpha(l)};d._drawToContext=function(b,d,c){b.begin();for(var f=0;f<d.ops.length;f++){var e=d.ops[f],g=e.data;switch(e.op){case "move":b.moveTo(g[0],g[1]);break;case "bcurveTo":b.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":b.lineTo(g[0],g[1])}}b.end();"fillPath"===d.type&&
+c.filled?b.fill():b.stroke()};return d};(function(){function b(d,c,f){this.canvas=d;this.rc=c;this.shape=f;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,b.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,b.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,b.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,b.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,b.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,b.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,b.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,b.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
b.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,b.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,b.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,b.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,b.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,b.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}b.prototype.moveOp="M";b.prototype.lineOp="L";b.prototype.quadOp="Q";b.prototype.curveOp="C";b.prototype.closeOp="Z";b.prototype.getStyle=function(b,d){var c=1;if(null!=this.shape.state){var g=this.shape.state.cell.id;if(null!=g)for(var e=0;e<g.length;e++)c=(c<<5)-c+g.charCodeAt(e)<<0}c={strokeWidth:this.canvas.state.strokeWidth,seed:c,preserveVertices:!0};g=this.rc.getDefaultOptions();b?c.stroke="none"===this.canvas.state.strokeColor?"transparent":this.canvas.state.strokeColor:
-delete c.stroke;e=null;(c.filled=d)?(c.fill="none"===this.canvas.state.fillColor?"":this.canvas.state.fillColor,e="none"===this.canvas.state.gradientColor?null:this.canvas.state.gradientColor):c.fill="";c.bowing=mxUtils.getValue(this.shape.style,"bowing",g.bowing);c.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",g.hachureAngle);c.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",g.curveFitting);c.roughness=mxUtils.getValue(this.shape.style,"jiggle",g.roughness);c.simplification=
-mxUtils.getValue(this.shape.style,"simplification",g.simplification);c.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",g.disableMultiStroke);c.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",g.disableMultiStrokeFill);var f=mxUtils.getValue(this.shape.style,"hachureGap",-1);c.hachureGap="auto"==f?-1:f;c.dashGap=mxUtils.getValue(this.shape.style,"dashGap",f);c.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",f);c.zigzagOffset=mxUtils.getValue(this.shape.style,
-"zigzagOffset",f);f=mxUtils.getValue(this.shape.style,"fillWeight",-1);c.fillWeight="auto"==f?-1:f;f=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==f&&(f=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",f=null!=c.fill&&(null!=e||null!=f&&c.fill.toLowerCase()==f.toLowerCase())?"solid":g.fillStyle);c.fillStyle=f;return c};b.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};b.prototype.end=function(){this.passThrough&&
+this.path=[];this.passThrough=!1}b.prototype.moveOp="M";b.prototype.lineOp="L";b.prototype.quadOp="Q";b.prototype.curveOp="C";b.prototype.closeOp="Z";b.prototype.getStyle=function(b,d){var c=1;if(null!=this.shape.state){var f=this.shape.state.cell.id;if(null!=f)for(var e=0;e<f.length;e++)c=(c<<5)-c+f.charCodeAt(e)<<0}c={strokeWidth:this.canvas.state.strokeWidth,seed:c,preserveVertices:!0};f=this.rc.getDefaultOptions();b?c.stroke="none"===this.canvas.state.strokeColor?"transparent":this.canvas.state.strokeColor:
+delete c.stroke;e=null;(c.filled=d)?(c.fill="none"===this.canvas.state.fillColor?"":this.canvas.state.fillColor,e="none"===this.canvas.state.gradientColor?null:this.canvas.state.gradientColor):c.fill="";c.bowing=mxUtils.getValue(this.shape.style,"bowing",f.bowing);c.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",f.hachureAngle);c.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",f.curveFitting);c.roughness=mxUtils.getValue(this.shape.style,"jiggle",f.roughness);c.simplification=
+mxUtils.getValue(this.shape.style,"simplification",f.simplification);c.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",f.disableMultiStroke);c.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",f.disableMultiStrokeFill);var g=mxUtils.getValue(this.shape.style,"hachureGap",-1);c.hachureGap="auto"==g?-1:g;c.dashGap=mxUtils.getValue(this.shape.style,"dashGap",g);c.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",g);c.zigzagOffset=mxUtils.getValue(this.shape.style,
+"zigzagOffset",g);g=mxUtils.getValue(this.shape.style,"fillWeight",-1);c.fillWeight="auto"==g?-1:g;g=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==g&&(g=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",g=null!=c.fill&&(null!=e||null!=g&&c.fill.toLowerCase()==g.toLowerCase())?"solid":f.fillStyle);c.fillStyle=g;return c};b.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};b.prototype.end=function(){this.passThrough&&
this.originalEnd.apply(this.canvas,arguments)};b.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};b.prototype.lineTo=function(b,d){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,b,d),this.lastX=b,this.lastY=d)};b.prototype.moveTo=
-function(b,d){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,d),this.lastX=b,this.lastY=d,this.firstX=b,this.firstY=d)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,d,c,g){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,b,d,c,g),this.lastX=c,this.lastY=g)};b.prototype.curveTo=function(b,d,c,g,e,f){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,d,c,g,e,f),this.lastX=e,this.lastY=f)};b.prototype.arcTo=function(b,d,c,g,e,f,l){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var k=mxUtils.arcToCurves(this.lastX,this.lastY,b,d,c,g,e,f,l);if(null!=k)for(var m=0;m<k.length;m+=6)this.curveTo(k[m],k[m+1],k[m+2],k[m+3],k[m+4],k[m+5]);this.lastX=f;this.lastY=l}};b.prototype.rect=function(b,d,c,g){this.passThrough?this.originalRect.apply(this.canvas,
-arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,d,c,g,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,d,c,g){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+c/2,d+g/2,c,g,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,d,c,g,e,f){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(b+e,d),this.lineTo(b+c-e,d),this.quadTo(b+c,d,b+c,d+f),this.lineTo(b+
-c,d+g-f),this.quadTo(b+c,d+g,b+c-e,d+g),this.lineTo(b+e,d+g),this.quadTo(b,d+g,b,d+g-f),this.lineTo(b,d+f),this.quadTo(b,d,b+e,d))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var d in b)this.nextShape.options[d]=b[d];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
+function(b,d){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,d),this.lastX=b,this.lastY=d,this.firstX=b,this.firstY=d)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,d,c,f){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,b,d,c,f),this.lastX=c,this.lastY=f)};b.prototype.curveTo=function(b,d,c,f,e,g){this.passThrough?
+this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,d,c,f,e,g),this.lastX=e,this.lastY=g)};b.prototype.arcTo=function(b,d,c,f,e,g,l){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var k=mxUtils.arcToCurves(this.lastX,this.lastY,b,d,c,f,e,g,l);if(null!=k)for(var m=0;m<k.length;m+=6)this.curveTo(k[m],k[m+1],k[m+2],k[m+3],k[m+4],k[m+5]);this.lastX=g;this.lastY=l}};b.prototype.rect=function(b,d,c,f){this.passThrough?this.originalRect.apply(this.canvas,
+arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,d,c,f,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,d,c,f){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+c/2,d+f/2,c,f,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,d,c,f,e,g){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(b+e,d),this.lineTo(b+c-e,d),this.quadTo(b+c,d,b+c,d+g),this.lineTo(b+
+c,d+f-g),this.quadTo(b+c,d+f,b+c-e,d+f),this.lineTo(b+e,d+f),this.quadTo(b,d+f,b,d+f-g),this.lineTo(b,d+g),this.quadTo(b,d,b+e,d))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var d in b)this.nextShape.options[d]=b[d];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};b.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};b.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};b.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};b.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;
this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;
this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(d){return new b(d,Editor.createRoughCanvas(d),this)};var d=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?d.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(b):this.createRoughCanvas(b)};var c=mxShape.prototype.paint;
-mxShape.prototype.paint=function(d){var g=d.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=d.handJiggle&&d.handJiggle.constructor==b&&!this.outline){d.save();var f=this.fill,l=this.stroke;this.stroke=this.fill=null;var k=this.configurePointerEvents,m=d.setStrokeColor;d.setStrokeColor=function(){};var p=d.setFillColor;d.setFillColor=function(){};e||null==f||(this.configurePointerEvents=function(){});d.handJiggle.passThrough=!0;
-c.apply(this,arguments);d.handJiggle.passThrough=!1;d.setFillColor=p;d.setStrokeColor=m;this.configurePointerEvents=k;this.stroke=l;this.fill=f;d.restore();e&&null!=f&&(d.addTolerance=function(){})}c.apply(this,arguments);d.addTolerance=g};var g=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(d,c,e,f,l,k){null!=d.handJiggle&&d.handJiggle.constructor==b?(d.handJiggle.passThrough=!0,g.apply(this,arguments),d.handJiggle.passThrough=!1):g.apply(this,arguments)}})();Editor.fastCompress=
-function(b){return null==b||0==b.length||"undefined"===typeof pako?b:Graph.arrayBufferToString(pako.deflateRaw(b))};Editor.fastDecompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:pako.inflateRaw(Graph.stringToArrayBuffer(atob(b)),{to:"string"})};Editor.extractGraphModel=function(b,d,c){if(null!=b&&"undefined"!==typeof pako){var g=b.ownerDocument.getElementsByTagName("div"),e=[];if(null!=g&&0<g.length)for(var f=0;f<g.length;f++)if("mxgraph"==g[f].getAttribute("class")){e.push(g[f]);
-break}0<e.length&&(g=e[0].getAttribute("data-mxgraph"),null!=g?(e=JSON.parse(g),null!=e&&null!=e.xml&&(b=mxUtils.parseXml(e.xml),b=b.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(g=mxUtils.getTextContent(e[0]),g=Graph.decompress(g,null,c),0<g.length&&(b=mxUtils.parseXml(g),b=b.documentElement))))}if(null!=b&&"svg"==b.nodeName)if(g=b.getAttribute("content"),null!=g&&"<"!=g.charAt(0)&&"%"!=g.charAt(0)&&(g=unescape(window.atob?atob(g):Base64.decode(cont,g))),null!=g&&"%"==g.charAt(0)&&
-(g=decodeURIComponent(g)),null!=g&&0<g.length)b=mxUtils.parseXml(g).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||d||(e=null,"diagram"==b.nodeName?e=b:"mxfile"==b.nodeName&&(g=b.getElementsByTagName("diagram"),0<g.length&&(e=g[Math.max(0,Math.min(g.length-1,urlParams.page||0))])),null!=e&&(b=Editor.parseDiagramNode(e,c)));null==b||"mxGraphModel"==b.nodeName||d&&"mxfile"==b.nodeName||(b=null);return b};Editor.parseDiagramNode=function(b,d){var c=mxUtils.trim(mxUtils.getTextContent(b)),
-g=null;0<c.length?(c=Graph.decompress(c,null,d),null!=c&&0<c.length&&(g=mxUtils.parseXml(c).documentElement)):(c=mxUtils.getChildNodes(b),0<c.length&&(g=mxUtils.createXmlDocument(),g.appendChild(g.importNode(c[0],!0)),g=g.documentElement));return g};Editor.getDiagramNodeXml=function(b){var d=mxUtils.getTextContent(b),c=null;0<d.length?c=Graph.decompress(d):null!=b.firstChild&&(c=mxUtils.getXml(b.firstChild));return c};Editor.extractGraphModelFromPdf=function(b){b=b.substring(b.indexOf(",")+1);b=window.atob&&
-!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var d=b.indexOf("EmbeddedFile");if(-1<d){var c=b.indexOf("stream",d)+9;if(0<b.substring(d,c).indexOf("application#2Fvnd.jgraph.mxfile"))return d=b.indexOf("endstream",c-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(c,d)),{to:"string"})}return null}for(var c=null,d="",g=0,e=0,f=[],l=null;e<b.length;){var k=b.charCodeAt(e),e=e+1;10!=k&&(d+=String.fromCharCode(k));k=="/Subject (%3Cmxfile".charCodeAt(g)?g++:g=0;if(19==
-g){var m=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(m>e){c=b.substring(e,m);break}}10==k&&("endobj"==d?l=null:"obj"==d.substring(d.length-3,d.length)||"xref"==d||"trailer"==d?(l=[],f[d.split(" ")[0]]=l):null!=l&&l.push(d),d="")}null==c&&(c=Editor.extractGraphModelFromXref(f));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(b){var d=b.trailer,c=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<
-d.length&&(d=b[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(b=b[d[1]],null!=b&&(b=b.join("\n"),c=b.substring(1,b.length-1))))));return c};Editor.extractGraphModelFromPng=function(b){var d=null;try{var c=b.substring(b.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(g,mxUtils.bind(this,function(b,c,e){b=g.substring(b+8,b+8+e);"zTXt"==c?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+
-2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(d=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(d=b[1]));if(null!=d||"IDAT"==c)return!0}))}catch(J){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(b,d){var c=null,g=null!=b?b.getElementsByTagName("parsererror"):null;null!=g&&0<g.length&&(c=d||mxResources.get("invalidChars"),g=g[0].getElementsByTagName("div"),
-0<g.length&&(c=mxUtils.getTextContent(g[0])));return null!=c?mxUtils.trim(c):c};Editor.addRetryToError=function(b,d){if(null!=b){var c=null!=b.error?b.error:b;null==c.retry&&(c.retry=d)}};Editor.configure=function(b,d){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;
+mxShape.prototype.paint=function(d){var f=d.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=d.handJiggle&&d.handJiggle.constructor==b&&!this.outline){d.save();var g=this.fill,l=this.stroke;this.stroke=this.fill=null;var k=this.configurePointerEvents,m=d.setStrokeColor;d.setStrokeColor=function(){};var n=d.setFillColor;d.setFillColor=function(){};e||null==g||(this.configurePointerEvents=function(){});d.handJiggle.passThrough=!0;
+c.apply(this,arguments);d.handJiggle.passThrough=!1;d.setFillColor=n;d.setStrokeColor=m;this.configurePointerEvents=k;this.stroke=l;this.fill=g;d.restore();e&&null!=g&&(d.addTolerance=function(){})}c.apply(this,arguments);d.addTolerance=f};var f=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(d,c,e,g,l,k){null!=d.handJiggle&&d.handJiggle.constructor==b?(d.handJiggle.passThrough=!0,f.apply(this,arguments),d.handJiggle.passThrough=!1):f.apply(this,arguments)}})();Editor.fastCompress=
+function(b){return null==b||0==b.length||"undefined"===typeof pako?b:Graph.arrayBufferToString(pako.deflateRaw(b))};Editor.fastDecompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:pako.inflateRaw(Graph.stringToArrayBuffer(atob(b)),{to:"string"})};Editor.extractGraphModel=function(b,d,c){if(null!=b&&"undefined"!==typeof pako){var f=b.ownerDocument.getElementsByTagName("div"),e=[];if(null!=f&&0<f.length)for(var g=0;g<f.length;g++)if("mxgraph"==f[g].getAttribute("class")){e.push(f[g]);
+break}0<e.length&&(f=e[0].getAttribute("data-mxgraph"),null!=f?(e=JSON.parse(f),null!=e&&null!=e.xml&&(b=mxUtils.parseXml(e.xml),b=b.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(f=mxUtils.getTextContent(e[0]),f=Graph.decompress(f,null,c),0<f.length&&(b=mxUtils.parseXml(f),b=b.documentElement))))}if(null!=b&&"svg"==b.nodeName)if(f=b.getAttribute("content"),null!=f&&"<"!=f.charAt(0)&&"%"!=f.charAt(0)&&(f=unescape(window.atob?atob(f):Base64.decode(cont,f))),null!=f&&"%"==f.charAt(0)&&
+(f=decodeURIComponent(f)),null!=f&&0<f.length)b=mxUtils.parseXml(f).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||d||(e=null,"diagram"==b.nodeName?e=b:"mxfile"==b.nodeName&&(f=b.getElementsByTagName("diagram"),0<f.length&&(e=f[Math.max(0,Math.min(f.length-1,urlParams.page||0))])),null!=e&&(b=Editor.parseDiagramNode(e,c)));null==b||"mxGraphModel"==b.nodeName||d&&"mxfile"==b.nodeName||(b=null);return b};Editor.parseDiagramNode=function(b,d){var c=mxUtils.trim(mxUtils.getTextContent(b)),
+f=null;0<c.length?(c=Graph.decompress(c,null,d),null!=c&&0<c.length&&(f=mxUtils.parseXml(c).documentElement)):(c=mxUtils.getChildNodes(b),0<c.length&&(f=mxUtils.createXmlDocument(),f.appendChild(f.importNode(c[0],!0)),f=f.documentElement));return f};Editor.getDiagramNodeXml=function(b){var d=mxUtils.getTextContent(b),c=null;0<d.length?c=Graph.decompress(d):null!=b.firstChild&&(c=mxUtils.getXml(b.firstChild));return c};Editor.extractGraphModelFromPdf=function(b){b=b.substring(b.indexOf(",")+1);b=window.atob&&
+!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var d=b.indexOf("EmbeddedFile");if(-1<d){var c=b.indexOf("stream",d)+9;if(0<b.substring(d,c).indexOf("application#2Fvnd.jgraph.mxfile"))return d=b.indexOf("endstream",c-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(c,d)),{to:"string"})}return null}for(var c=null,d="",f=0,e=0,g=[],l=null;e<b.length;){var k=b.charCodeAt(e),e=e+1;10!=k&&(d+=String.fromCharCode(k));k=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==
+f){var m=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(m>e){c=b.substring(e,m);break}}10==k&&("endobj"==d?l=null:"obj"==d.substring(d.length-3,d.length)||"xref"==d||"trailer"==d?(l=[],g[d.split(" ")[0]]=l):null!=l&&l.push(d),d="")}null==c&&(c=Editor.extractGraphModelFromXref(g));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(b){var d=b.trailer,c=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<
+d.length&&(d=b[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(b=b[d[1]],null!=b&&(b=b.join("\n"),c=b.substring(1,b.length-1))))));return c};Editor.extractGraphModelFromPng=function(b){var d=null;try{var c=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(b,c,e){b=f.substring(b+8,b+8+e);"zTXt"==c?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+
+2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(d=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(d=b[1]));if(null!=d||"IDAT"==c)return!0}))}catch(I){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(b,d){var c=null,f=null!=b?b.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(c=d||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),
+0<f.length&&(c=mxUtils.getTextContent(f[0])));return null!=c?mxUtils.trim(c):c};Editor.addRetryToError=function(b,d){if(null!=b){var c=null!=b.error?b.error:b;null==c.retry&&(c.retry=d)}};Editor.configure=function(b,d){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;
ColorDialog.prototype.colorNames=b.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=b.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=b.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=b.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=b.templateFile&&(EditorUi.templateFile=b.templateFile);null!=b.styles&&(Editor.styles=b.styles);null!=b.globalVars&&(Editor.globalVars=
b.globalVars);null!=b.compressXml&&(Editor.compressXml=b.compressXml);null!=b.includeDiagram&&(Editor.defaultIncludeDiagram=b.includeDiagram);null!=b.simpleLabels&&(Editor.simpleLabels=b.simpleLabels);b.customFonts&&(Menus.prototype.defaultFonts=b.customFonts.concat(Menus.prototype.defaultFonts));b.customPresetColors&&(ColorDialog.prototype.presetColors=b.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=b.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=b.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
-if(null!=b.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b.css));var g=document.getElementsByTagName("script")[0];g.parentNode.insertBefore(c,g)}null!=b.libraries&&(Sidebar.prototype.customEntries=b.libraries);null!=b.enabledLibraries&&(Sidebar.prototype.enabledLibraries=b.enabledLibraries);null!=b.defaultLibraries&&(Sidebar.prototype.defaultEntries=b.defaultLibraries);null!=b.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
+if(null!=b.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b.css));var f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(c,f)}null!=b.libraries&&(Sidebar.prototype.customEntries=b.libraries);null!=b.enabledLibraries&&(Sidebar.prototype.enabledLibraries=b.enabledLibraries);null!=b.defaultLibraries&&(Sidebar.prototype.defaultEntries=b.defaultLibraries);null!=b.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
b.defaultCustomLibraries);null!=b.enableCustomLibraries&&(Editor.enableCustomLibraries=b.enableCustomLibraries);null!=b.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=b.defaultVertexStyle);null!=b.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=b.defaultEdgeStyle);null!=b.zoomWheel&&(Graph.zoomWheel=b.zoomWheel);null!=b.zoomFactor&&(c=parseFloat(b.zoomFactor),!isNaN(c)&&1<c&&(Graph.prototype.zoomFactor=c));null!=b.gridSteps&&(c=parseInt(b.gridSteps),!isNaN(c)&&0<c&&(mxGraphView.prototype.gridSteps=
-c));null!=b.pageFormat&&(c=parseInt(b.pageFormat.width),g=parseInt(b.pageFormat.height),!isNaN(c)&&0<c&&!isNaN(g)&&0<g&&(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,c,g),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat));b.thumbWidth&&(Sidebar.prototype.thumbWidth=b.thumbWidth);b.thumbHeight&&(Sidebar.prototype.thumbHeight=b.thumbHeight);b.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=b.emptyLibraryXml);b.sidebarWidth&&(EditorUi.prototype.hsplitPosition=b.sidebarWidth);
+c));null!=b.pageFormat&&(c=parseInt(b.pageFormat.width),f=parseInt(b.pageFormat.height),!isNaN(c)&&0<c&&!isNaN(f)&&0<f&&(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,c,f),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat));b.thumbWidth&&(Sidebar.prototype.thumbWidth=b.thumbWidth);b.thumbHeight&&(Sidebar.prototype.thumbHeight=b.thumbHeight);b.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=b.emptyLibraryXml);b.sidebarWidth&&(EditorUi.prototype.hsplitPosition=b.sidebarWidth);
b.fontCss&&Editor.configureFontCss(b.fontCss);null!=b.autosaveDelay&&(c=parseInt(b.autosaveDelay),!isNaN(c)&&0<c?DrawioFile.prototype.autosaveDelay=c:EditorUi.debug("Invalid autosaveDelay: "+b.autosaveDelay));if(null!=b.plugins&&!d)for(App.initPluginCallback(),c=0;c<b.plugins.length;c++)mxscript(b.plugins[c]);null!=b.maxImageBytes&&(EditorUi.prototype.maxImageBytes=b.maxImageBytes);null!=b.maxImageSize&&(EditorUi.prototype.maxImageSize=b.maxImageSize)}};Editor.configureFontCss=function(b){if(null!=
-b){Editor.prototype.fontCss=b;var d=document.getElementsByTagName("script")[0];if(null!=d&&null!=d.parentNode){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b));d.parentNode.insertBefore(c,d);b=b.split("url(");for(c=1;c<b.length;c++){var g=b[c].indexOf(")"),g=Editor.trimCssUrl(b[c].substring(0,g)),e=document.createElement("link");e.setAttribute("rel","preload");e.setAttribute("href",g);e.setAttribute("as","font");e.setAttribute("crossorigin",
+b){Editor.prototype.fontCss=b;var d=document.getElementsByTagName("script")[0];if(null!=d&&null!=d.parentNode){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b));d.parentNode.insertBefore(c,d);b=b.split("url(");for(c=1;c<b.length;c++){var f=b[c].indexOf(")"),f=Editor.trimCssUrl(b[c].substring(0,f)),e=document.createElement("link");e.setAttribute("rel","preload");e.setAttribute("href",f);e.setAttribute("as","font");e.setAttribute("crossorigin",
"");d.parentNode.insertBefore(e,d)}}}};Editor.trimCssUrl=function(b){return b.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(b){b=null!=b?b:Editor.GUID_LENGTH;for(var d=[],c=0;c<b;c++)d.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return d.join("")};
-Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(d){d=null!=d&&"mxlibrary"!=d.nodeName?this.extractGraphModel(d):null;if(null!=d){var c=d.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],g=c.getElementsByTagName("div");null!=g&&0<g.length&&
-(c=g[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==d.nodeName){c=d.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(g=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=g&&(e=new mxCodec(g.ownerDocument),e.decode(g,this.graph.getStylesheet())));else if(g=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),
-null!=g){var e=new mxCodec(g.ownerDocument);e.decode(g,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");c=d.getAttribute("backgroundImage");null!=c?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(c)):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"==d.getAttribute("shadow"),!1);if(c=d.getAttribute("extFonts"))try{for(c=c.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}}),g=0;g<c.length;g++)this.graph.addExtFont(c[g].name,c[g].url)}catch(J){console.log("ExtFonts format error: "+J.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.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(b,d){b=null!=b?b:!0;var g=c.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&g.setAttribute("style",this.graph.currentStyle);var e=this.graph.getBackgroundImageObject(this.graph.backgroundImage,d);null!=e&&g.setAttribute("backgroundImage",JSON.stringify(e));g.setAttribute("math",this.graph.mathEnabled?"1":"0");g.setAttribute("shadow",this.graph.shadowVisible?
-"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(e=this.graph.extFonts.map(function(b){return b.name+"^"+b.url}),g.setAttribute("extFonts",e.join("|")));return g};Editor.prototype.isDataSvg=function(b){try{var d=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=d&&(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)){var c=mxUtils.parseXml(d).documentElement;
+Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(d){d=null!=d&&"mxlibrary"!=d.nodeName?this.extractGraphModel(d):null;if(null!=d){var c=d.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],f=c.getElementsByTagName("div");null!=f&&0<f.length&&
+(c=f[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==d.nodeName){c=d.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=f&&(e=new mxCodec(f.ownerDocument),e.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),
+null!=f){var e=new mxCodec(f.ownerDocument);e.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");c=d.getAttribute("backgroundImage");null!=c?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(c)):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"==d.getAttribute("shadow"),!1);if(c=d.getAttribute("extFonts"))try{for(c=c.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}}),f=0;f<c.length;f++)this.graph.addExtFont(c[f].name,c[f].url)}catch(I){console.log("ExtFonts format error: "+I.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.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(b,d){b=null!=b?b:!0;var f=c.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&f.setAttribute("style",this.graph.currentStyle);var e=this.graph.getBackgroundImageObject(this.graph.backgroundImage,d);null!=e&&f.setAttribute("backgroundImage",JSON.stringify(e));f.setAttribute("math",this.graph.mathEnabled?"1":"0");f.setAttribute("shadow",this.graph.shadowVisible?
+"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(e=this.graph.extFonts.map(function(b){return b.name+"^"+b.url}),f.setAttribute("extFonts",e.join("|")));return f};Editor.prototype.isDataSvg=function(b){try{var d=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=d&&(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)){var c=mxUtils.parseXml(d).documentElement;
return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(W){}return!1};Editor.prototype.extractGraphModel=function(b,d,c){return Editor.extractGraphModel.apply(this,arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&
this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var k=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){k.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss=
"div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(b,d){if("undefined"===typeof window.MathJax){b=(null!=b?b:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(b){window.setTimeout(function(){"hidden"!=b.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,b])},0)};var c=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):
"TeX";d=null!=d?d:{"HTML-CSS":{availableFonts:[c],imageFont:null},SVG:{font:c,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d);MathJax.Hub.Register.StartupHook("Begin",function(){for(var b=0;b<Editor.mathJaxQueue.length;b++)Editor.doMathJaxRender(Editor.mathJaxQueue[b])})}};Editor.MathJaxRender=function(b){"undefined"!==typeof MathJax&&
-"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var g=Editor.prototype.init;Editor.prototype.init=function(){g.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var e=document.createElement("script");
-e.setAttribute("type","text/javascript");e.setAttribute("src",b);c[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var f=document.createElement("style");f.type="text/css";f.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(f)}}catch(aa){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;
-var d=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(b,c,g,e){void 0!==c?d.push(c.replace(/\\'/g,"'")):void 0!==g?d.push(g.replace(/\\"/g,'"')):void 0!==e&&d.push(e);return""});/,\s*$/.test(b)&&d.push("");return d};Editor.prototype.isCorsEnabledForUrl=function(b){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
-return null!=this.corsRegExp&&this.corsRegExp.test(b)||"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var d=b.convert,c=this;b.convert=function(g){if(null!=g){var e="http://"==g.substring(0,7)||"https://"==g.substring(0,8);e&&!navigator.onLine?g=Editor.svgBrokenImage.src:!e||g.substring(0,b.baseUrl.length)==b.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(g)?"chrome-extension://"==g.substring(0,
-19)||mxClient.IS_CHROMEAPP||(g=d.apply(this,arguments)):g=PROXY_URL+"?url="+encodeURIComponent(g)}return g};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,d){try{var c=!0,g=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,mxUtils.bind(this,function(b){window.clearTimeout(g);c&&d(Editor.createSvgDataUri(b.getText()))}),
-function(){window.clearTimeout(g);c&&d(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(g);if(c)try{var b=document.createElement("canvas"),f=b.getContext("2d");b.height=e.height;b.width=e.width;f.drawImage(e,0,0);d(b.toDataURL())}catch(ma){d(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(g);c&&d(Editor.svgBrokenImage.src)};e.src=b}}catch(O){d(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
-function(b,d,c,g){null==g&&(g=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,l){for(var k=b.getElementsByTagName(c),m=0;m<k.length;m++)mxUtils.bind(this,function(c){try{if(null!=c){var k=g.convert(c.getAttribute(l));if(null!=k&&"data:"!=k.substring(0,5)){var m=f[k];null==m?(e++,this.convertImageToDataUri(k,function(g){null!=g&&(f[k]=g,c.setAttribute(l,g));e--;0==e&&d(b)})):c.setAttribute(l,m)}else null!=k&&c.setAttribute(l,k)}}catch(oa){}})(k[m])});c("image","xlink:href");
-c("img","src");0==e&&d(b)};Editor.base64Encode=function(b){for(var d="",c=0,g=b.length,e,f,l;c<g;){e=b.charCodeAt(c++)&255;if(c==g){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}f=b.charCodeAt(c++);if(c==g){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
-3)<<4|(f&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);d+="=";break}l=b.charCodeAt(c++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(l&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return d};
-Editor.prototype.loadUrl=function(b,d,c,g,e,f,l,k){try{var m=!l&&(g||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=d){var g=b.getText();if(m){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();
-for(var g=Array(b.length),e=0;e<b.length;e++)g[e]=String.fromCharCode(b[e]);g=g.join("")}f=null!=f?f:"data:image/png;base64,";g=f+Editor.base64Encode(g)}d(g)}}else null!=c&&(0==b.getStatus()?c({message:mxResources.get("accessDenied")},b):c({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=c&&c({message:mxResources.get("error")+" "+b.getStatus()})},m,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:p})},k)});p()}catch(na){null!=c&&c(na)}};Editor.prototype.absoluteCssFonts=
-function(b){var d=null;if(null!=b){var c=b.split("url(");if(0<c.length){d=[c[0]];b=window.location.pathname;var g=null!=b?b.lastIndexOf("/"):-1;0<=g&&(b=b.substring(0,g+1));var g=document.getElementsByTagName("base"),e=null;null!=g&&0<g.length&&(e=g[0].getAttribute("href"));for(var f=1;f<c.length;f++)if(g=c[f].indexOf(")"),0<g){var l=Editor.trimCssUrl(c[f].substring(0,g));this.graph.isRelativeUrl(l)&&(l=null!=e?e+l:window.location.protocol+"//"+window.location.hostname+("/"==l.charAt(0)?"":b)+l);
-d.push('url("'+l+'"'+c[f].substring(g))}else d.push(c[f])}else d=[b]}return null!=d?d.join(""):null};Editor.prototype.embedCssFonts=function(b,d){var c=b.split("url("),g=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==g){for(var b=[c[0]],e=1;e<c.length;e++){var f=c[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(c[e].substring(0,f))]);b.push('"'+c[e].substring(f))}d(b.join(""))}});if(0<c.length){for(var f=1;f<c.length;f++){var l=c[f].indexOf(")"),
-k=null,m=c[f].indexOf("format(",l);0<m&&(k=Editor.trimCssUrl(c[f].substring(m+7,c[f].indexOf(")",m))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;g++;var d="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(b))d="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(b))d="application/x-font-opentype";else if("woff"==k||/(\.woff)($|\?)/i.test(b))d="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(b))d="application/font-woff2";
-else if("eot"==k||/(\.eot)($|\?)/i.test(b))d="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(b))d="application/font-sfnt";var c=b;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(c,mxUtils.bind(this,function(d){this.cachedFonts[b]=d;g--;e()}),mxUtils.bind(this,function(b){g--;e()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(Editor.trimCssUrl(c[f].substring(0,l)),k)}e()}else d(b)};Editor.prototype.loadFonts=
-function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;b()})):b()};Editor.prototype.embedExtFonts=function(b){var d=this.graph.getCustomFonts();if(0<d.length){var c="",g=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==g&&this.embedCssFonts(c,b)}),f=0;f<d.length;f++)mxUtils.bind(this,function(b,d){Graph.isCssFontUrl(d)?null==this.cachedGoogleFonts[d]?(g++,this.loadUrl(d,
-mxUtils.bind(this,function(b){this.cachedGoogleFonts[d]=b;c+=b;g--;e()}),mxUtils.bind(this,function(b){g--;c+="@import url("+d+");";e()}))):c+=this.cachedGoogleFonts[d]:c+='@font-face {font-family: "'+b+'";src: url("'+d+'")}'})(d[f].name,d[f].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&0<b.length)for(var d=document.getElementsByTagName("style"),c=0;c<d.length;c++)0<mxUtils.getTextContent(d[c]).indexOf("MathJax")&&b[0].appendChild(d[c].cloneNode(!0))};
-Editor.prototype.addFontCss=function(b,d){d=null!=d?d:this.absoluteCssFonts(this.fontCss);if(null!=d){var c=b.getElementsByTagName("defs"),g=b.ownerDocument;0==c.length?(c=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"defs"):g.createElement("defs"),null!=b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)):c=c[0];g=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"style"):g.createElement("style");g.setAttribute("type","text/css");mxUtils.setTextContent(g,d);c.appendChild(g)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var g=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(g/b,g/d))};Editor.prototype.exportToCanvas=function(b,d,c,g,e,f,l,k,m,p,q,u,n,v,x,t,A,B){try{f=null!=f?f:!0;l=null!=l?l:!0;u=null!=u?u:this.graph;n=null!=n?n:0;var y=m?null:u.background;y==mxConstants.NONE&&(y=null);null==y&&(y=g);null==y&&0==m&&(y=t?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(u.getSvg(null,null,n,v,null,l,null,null,null,p,null,t,A,B),mxUtils.bind(this,function(c){try{var g=new Image;g.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){v.drawImage(g,0,0);b(m,c)},0):(v.drawImage(g,0,0),b(m,c))},m=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=d&&(k=f?Math.min(1,Math.min(3*d/(4*q),d/p)):d/p);k=this.getMaxCanvasScale(p,q,k);p=
-Math.ceil(k*p);q=Math.ceil(k*q);m.setAttribute("width",p);m.setAttribute("height",q);var v=m.getContext("2d");null!=y&&(v.beginPath(),v.rect(0,0,p,q),v.fillStyle=y,v.fill());1!=k&&v.scale(k,k);if(x){var t=u.view,A=t.scale;t.scale=1;var G=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=A;var G="data:image/svg+xml;base64,"+G,D=u.gridSize*t.gridSteps*k,B=u.getGraphBounds(),C=t.translate.x*A,J=t.translate.y*A,M=C+(B.x-C)/A-n,F=J+(B.y-J)/A-n,E=new Image;E.onload=function(){try{for(var b=
--Math.round(D-mxUtils.mod((C-M)*k,D)),d=-Math.round(D-mxUtils.mod((J-F)*k,D));b<p;b+=D)for(var c=d;c<q;c+=D)v.drawImage(E,b/k,c/k);l()}catch(Ea){null!=e&&e(Ea)}};E.onerror=function(b){null!=e&&e(b)};E.src=G}else l()}catch(Ca){null!=e&&e(Ca)}});g.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);var l=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),g.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(ja){null!=
-e&&e(ja)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ba){null!=e&&e(ba)}}))}catch(ja){null!=e&&e(ja)}}),c,q)}catch(ia){null!=e&&e(ia)}};Editor.crcTable=[];for(var f=0;256>f;f++)for(var n=f,t=0;8>t;t++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[f]=n;Editor.updateCRC=function(b,d,c,g){for(var e=0;e<g;e++)b=Editor.crcTable[(b^d.charCodeAt(c+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c<b.length;c++)d=d>>>
-8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,g,e){function f(b,d){var c=m;m+=d;return b.substring(c,m)}function l(b){b=f(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function k(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var m=0;if(f(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
-10))null!=e&&e();else if(f(b,4),"IHDR"!=f(b,4))null!=e&&e();else{f(b,17);e=b.substring(0,m);do{var p=l(b);if("IDAT"==f(b,4)){e=b.substring(0,m-8);"pHYs"==d&&"dpi"==c?(c=Math.round(g/.0254),c=k(c)+k(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+g;g=4294967295;g=Editor.updateCRC(g,d,0,4);g=Editor.updateCRC(g,c,0,c.length);e+=k(c.length)+d+c+k(g^4294967295);e+=b.substring(m-8,b.length);break}e+=b.substring(m-8,m-4+p);f(b,p);f(b,4)}while(p);return"data:image/png;base64,"+
-(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&
-(EditDataDialog.getDisplayIdForCell=function(b,d){var c=null;null!=b.editor.graph.getModel().getParent(d)?c=d.getId():null!=b.currentPage&&(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
-q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=p.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,g=this.createOption(mxResources.get("shadow"),
-function(){return c.shadowVisible},function(b){var g=new ChangePageSetup(d);g.ignoreColor=!0;g.ignoreImage=!0;g.shadowVisible=b;c.model.execute(g)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.shadowOptionEnabled||(g.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(g,60));b.appendChild(g)}return b};var m=DiagramFormatPanel.prototype.addOptions;
-DiagramFormatPanel.prototype.addOptions=function(b){b=m.apply(this,arguments);var d=this.editorUi,c=d.editor.graph;if(c.isEnabled()){var g=d.getCurrentFile();if(null!=g&&g.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(b){d.editor.setAutosave(b);d.editor.autosave&&g.isModified()&&g.fileChanged()},{install:function(b){this.listener=function(){b(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});
-b.appendChild(e)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(b){d.actions.get("mathematicalTypesetting").funct()},{install:function(b){this.listener=function(){b(c.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});e.style.paddingTop="5px";b.appendChild(e);var f=d.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");
-f.style.position="relative";f.style.marginLeft="6px";f.style.top="2px";e.appendChild(f)}return b};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
+"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var f=Editor.prototype.init;Editor.prototype.init=function(){f.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var e=document.createElement("script");
+e.setAttribute("type","text/javascript");e.setAttribute("src",b);c[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var g=document.createElement("style");g.type="text/css";g.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(g)}}catch(aa){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;
+var d=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(b,c,f,e){void 0!==c?d.push(c.replace(/\\'/g,"'")):void 0!==f?d.push(f.replace(/\\"/g,'"')):void 0!==e&&d.push(e);return""});/,\s*$/.test(b)&&d.push("");return d};Editor.prototype.isCorsEnabledForUrl=function(b){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
+return null!=this.corsRegExp&&this.corsRegExp.test(b)||"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var d=b.convert,c=this;b.convert=function(f){if(null!=f){var e="http://"==f.substring(0,7)||"https://"==f.substring(0,8);e&&!navigator.onLine?f=Editor.svgBrokenImage.src:!e||f.substring(0,b.baseUrl.length)==b.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,
+19)||mxClient.IS_CHROMEAPP||(f=d.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,d){try{var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,mxUtils.bind(this,function(b){window.clearTimeout(f);c&&d(Editor.createSvgDataUri(b.getText()))}),
+function(){window.clearTimeout(f);c&&d(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(f);if(c)try{var b=document.createElement("canvas"),g=b.getContext("2d");b.height=e.height;b.width=e.width;g.drawImage(e,0,0);d(b.toDataURL())}catch(na){d(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(f);c&&d(Editor.svgBrokenImage.src)};e.src=b}}catch(O){d(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
+function(b,d,c,f){null==f&&(f=this.createImageUrlConverter());var e=0,g=c||{};c=mxUtils.bind(this,function(c,l){for(var k=b.getElementsByTagName(c),m=0;m<k.length;m++)mxUtils.bind(this,function(c){try{if(null!=c){var k=f.convert(c.getAttribute(l));if(null!=k&&"data:"!=k.substring(0,5)){var m=g[k];null==m?(e++,this.convertImageToDataUri(k,function(f){null!=f&&(g[k]=f,c.setAttribute(l,f));e--;0==e&&d(b)})):c.setAttribute(l,m)}else null!=k&&c.setAttribute(l,k)}}catch(pa){}})(k[m])});c("image","xlink:href");
+c("img","src");0==e&&d(b)};Editor.base64Encode=function(b){for(var d="",c=0,f=b.length,e,g,l;c<f;){e=b.charCodeAt(c++)&255;if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}g=b.charCodeAt(c++);if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);d+="=";break}l=b.charCodeAt(c++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(l&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return d};
+Editor.prototype.loadUrl=function(b,d,c,f,e,g,l,k){try{var m=!l&&(f||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var n=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=d){var f=b.getText();if(m){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();
+for(var f=Array(b.length),e=0;e<b.length;e++)f[e]=String.fromCharCode(b[e]);f=f.join("")}g=null!=g?g:"data:image/png;base64,";f=g+Editor.base64Encode(f)}d(f)}}else null!=c&&(0==b.getStatus()?c({message:mxResources.get("accessDenied")},b):c({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=c&&c({message:mxResources.get("error")+" "+b.getStatus()})},m,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:n})},k)});n()}catch(oa){null!=c&&c(oa)}};Editor.prototype.absoluteCssFonts=
+function(b){var d=null;if(null!=b){var c=b.split("url(");if(0<c.length){d=[c[0]];b=window.location.pathname;var f=null!=b?b.lastIndexOf("/"):-1;0<=f&&(b=b.substring(0,f+1));var f=document.getElementsByTagName("base"),e=null;null!=f&&0<f.length&&(e=f[0].getAttribute("href"));for(var g=1;g<c.length;g++)if(f=c[g].indexOf(")"),0<f){var l=Editor.trimCssUrl(c[g].substring(0,f));this.graph.isRelativeUrl(l)&&(l=null!=e?e+l:window.location.protocol+"//"+window.location.hostname+("/"==l.charAt(0)?"":b)+l);
+d.push('url("'+l+'"'+c[g].substring(f))}else d.push(c[g])}else d=[b]}return null!=d?d.join(""):null};Editor.prototype.embedCssFonts=function(b,d){var c=b.split("url("),f=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==f){for(var b=[c[0]],e=1;e<c.length;e++){var g=c[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(c[e].substring(0,g))]);b.push('"'+c[e].substring(g))}d(b.join(""))}});if(0<c.length){for(var g=1;g<c.length;g++){var l=c[g].indexOf(")"),
+k=null,m=c[g].indexOf("format(",l);0<m&&(k=Editor.trimCssUrl(c[g].substring(m+7,c[g].indexOf(")",m))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;f++;var d="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(b))d="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(b))d="application/x-font-opentype";else if("woff"==k||/(\.woff)($|\?)/i.test(b))d="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(b))d="application/font-woff2";
+else if("eot"==k||/(\.eot)($|\?)/i.test(b))d="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(b))d="application/font-sfnt";var c=b;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(c,mxUtils.bind(this,function(d){this.cachedFonts[b]=d;f--;e()}),mxUtils.bind(this,function(b){f--;e()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(Editor.trimCssUrl(c[g].substring(0,l)),k)}e()}else d(b)};Editor.prototype.loadFonts=
+function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;b()})):b()};Editor.prototype.embedExtFonts=function(b){var d=this.graph.getCustomFonts();if(0<d.length){var c="",f=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==f&&this.embedCssFonts(c,b)}),g=0;g<d.length;g++)mxUtils.bind(this,function(b,d){Graph.isCssFontUrl(d)?null==this.cachedGoogleFonts[d]?(f++,this.loadUrl(d,
+mxUtils.bind(this,function(b){this.cachedGoogleFonts[d]=b;c+=b;f--;e()}),mxUtils.bind(this,function(b){f--;c+="@import url("+d+");";e()}))):c+=this.cachedGoogleFonts[d]:c+='@font-face {font-family: "'+b+'";src: url("'+d+'")}'})(d[g].name,d[g].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&0<b.length)for(var d=document.getElementsByTagName("style"),c=0;c<d.length;c++)0<mxUtils.getTextContent(d[c]).indexOf("MathJax")&&b[0].appendChild(d[c].cloneNode(!0))};
+Editor.prototype.addFontCss=function(b,d){d=null!=d?d:this.absoluteCssFonts(this.fontCss);if(null!=d){var c=b.getElementsByTagName("defs"),f=b.ownerDocument;0==c.length?(c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)):c=c[0];f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,d);c.appendChild(f)}};
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var f=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(f/b,f/d))};Editor.prototype.exportToCanvas=function(b,d,c,f,e,g,l,k,m,n,q,p,v,u,x,t,y,D){try{g=null!=g?g:!0;l=null!=l?l:!0;p=null!=p?p:this.graph;v=null!=v?v:0;var B=m?null:p.background;B==mxConstants.NONE&&(B=null);null==B&&(B=f);null==B&&0==m&&(B=t?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(p.getSvg(null,null,v,u,null,l,null,null,null,n,null,t,y,D),mxUtils.bind(this,function(c){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){u.drawImage(f,0,0);b(m,c)},0):(u.drawImage(f,0,0),b(m,c))},m=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=d&&(k=g?Math.min(1,Math.min(3*d/(4*q),d/n)):d/n);k=this.getMaxCanvasScale(n,q,k);n=
+Math.ceil(k*n);q=Math.ceil(k*q);m.setAttribute("width",n);m.setAttribute("height",q);var u=m.getContext("2d");null!=B&&(u.beginPath(),u.rect(0,0,n,q),u.fillStyle=B,u.fill());1!=k&&u.scale(k,k);if(x){var t=p.view,y=t.scale;t.scale=1;var F=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var F="data:image/svg+xml;base64,"+F,A=p.gridSize*t.gridSteps*k,D=p.getGraphBounds(),C=t.translate.x*y,I=t.translate.y*y,N=C+(D.x-C)/y-v,E=I+(D.y-I)/y-v,H=new Image;H.onload=function(){try{for(var b=
+-Math.round(A-mxUtils.mod((C-N)*k,A)),d=-Math.round(A-mxUtils.mod((I-E)*k,A));b<n;b+=A)for(var c=d;c<q;c+=A)u.drawImage(H,b/k,c/k);l()}catch(Ea){null!=e&&e(Ea)}};H.onerror=function(b){null!=e&&e(b)};H.src=F}else l()}catch(Ca){null!=e&&e(Ca)}});f.onerror=function(b){null!=e&&e(b)};n&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);var l=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(ja){null!=
+e&&e(ja)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ba){null!=e&&e(ba)}}))}catch(ja){null!=e&&e(ja)}}),c,q)}catch(ia){null!=e&&e(ia)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var p=g,t=0;8>t;t++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[g]=p;Editor.updateCRC=function(b,d,c,f){for(var e=0;e<f;e++)b=Editor.crcTable[(b^d.charCodeAt(c+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c<b.length;c++)d=d>>>
+8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,f,e){function g(b,d){var c=m;m+=d;return b.substring(c,m)}function l(b){b=g(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function k(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var m=0;if(g(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
+10))null!=e&&e();else if(g(b,4),"IHDR"!=g(b,4))null!=e&&e();else{g(b,17);e=b.substring(0,m);do{var n=l(b);if("IDAT"==g(b,4)){e=b.substring(0,m-8);"pHYs"==d&&"dpi"==c?(c=Math.round(f/.0254),c=k(c)+k(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,d,0,4);f=Editor.updateCRC(f,c,0,c.length);e+=k(c.length)+d+c+k(f^4294967295);e+=b.substring(m-8,b.length);break}e+=b.substring(m-8,m-4+n);g(b,n);g(b,4)}while(n);return"data:image/png;base64,"+
+(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&
+(EditDataDialog.getDisplayIdForCell=function(b,d){var c=null;null!=b.editor.graph.getModel().getParent(d)?c=d.getId():null!=b.currentPage&&(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,f=this.createOption(mxResources.get("shadow"),
+function(){return c.shadowVisible},function(b){var f=new ChangePageSetup(d);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=b;c.model.execute(f)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));b.appendChild(f)}return b};var n=DiagramFormatPanel.prototype.addOptions;
+DiagramFormatPanel.prototype.addOptions=function(b){b=n.apply(this,arguments);var d=this.editorUi,c=d.editor.graph;if(c.isEnabled()){var f=d.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(b){d.editor.setAutosave(b);d.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(b){this.listener=function(){b(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});
+b.appendChild(e)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(b){d.actions.get("mathematicalTypesetting").funct()},{install:function(b){this.listener=function(){b(c.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});e.style.paddingTop="5px";b.appendChild(e);var g=d.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");
+g.style.position="relative";g.style.marginLeft="6px";g.style.top="2px";e.appendChild(g)}return b};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
@@ -3203,79 +3204,89 @@ type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.pro
stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},
{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",
stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",
-gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(b,d,c){if(null!=d){var g=function(b){if(null!=b)if(c)for(var g=
-0;g<b.length;g++)d[b[g].name]=b[g];else for(var e in d){for(var f=!1,g=0;g<b.length;g++)if(b[g].name==e&&b[g].type==d[e].type){f=!0;break}f||delete d[e]}},e=this.editorUi.editor.graph.view.getState(b);null!=e&&null!=e.shape&&(e.shape.commonCustomPropAdded||(e.shape.commonCustomPropAdded=!0,e.shape.customProperties=e.shape.customProperties||[],e.cell.vertex?Array.prototype.push.apply(e.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(e.shape.customProperties,Editor.commonEdgeProperties)),
-g(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{g(JSON.parse(b))}catch(O){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var d={},c=b.vertices,g=b.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],d,0==
-e);for(e=0;e<g.length;e++)this.findCommonProperties(g[e],d,0==c.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(d).length&&this.container.appendChild(this.addProperties(this.createPanel(),d,b))}};var u=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var d=this.format.getSelectionState(),c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",
+gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(b,d,c){if(null!=d){var f=function(b){if(null!=b)if(c)for(var f=
+0;f<b.length;f++)d[b[f].name]=b[f];else for(var e in d){for(var g=!1,f=0;f<b.length;f++)if(b[f].name==e&&b[f].type==d[e].type){g=!0;break}g||delete d[e]}},e=this.editorUi.editor.graph.view.getState(b);null!=e&&null!=e.shape&&(e.shape.commonCustomPropAdded||(e.shape.commonCustomPropAdded=!0,e.shape.customProperties=e.shape.customProperties||[],e.cell.vertex?Array.prototype.push.apply(e.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(e.shape.customProperties,Editor.commonEdgeProperties)),
+f(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{f(JSON.parse(b))}catch(O){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var d={},c=b.vertices,f=b.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],d,0==
+e);for(e=0;e<f.length;e++)this.findCommonProperties(f[e],d,0==c.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(d).length&&this.container.appendChild(this.addProperties(this.createPanel(),d,b))}};var u=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var d=this.format.getSelectionState(),c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",
mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";b.appendChild(c);0<d.cells.length?(c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("pasteStyle").funct()})),c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")"),c.style.marginBottom="2px",c.style.width="100px",b.appendChild(c)):
-c.style.width="202px";mxUtils.br(b);return u.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,d,c){function g(b,d,c,g){u.getModel().beginUpdate();try{var e=[],f=[];if(null!=c.index){for(var l=[],k=c.parentRow.nextSibling;k&&k.getAttribute("data-pName")==b;)l.push(k.getAttribute("data-pValue")),k=k.nextSibling;c.index<l.length?null!=g?l.splice(g,1):l[c.index]=d:l.push(d);null!=c.size&&l.length>c.size&&(l=l.slice(0,c.size));d=l.join(",");
-null!=c.countProperty&&(u.setCellStyles(c.countProperty,l.length,u.getSelectionCells()),e.push(c.countProperty),f.push(l.length))}u.setCellStyles(b,d,u.getSelectionCells());e.push(b);f.push(d);if(null!=c.dependentProps)for(b=0;b<c.dependentProps.length;b++){var m=c.dependentPropsDefVal[b],p=c.dependentPropsVals[b];if(p.length>d)p=p.slice(0,d);else for(var n=p.length;n<d;n++)p.push(m);p=p.join(",");u.setCellStyles(c.dependentProps[b],p,u.getSelectionCells());e.push(c.dependentProps[b]);f.push(p)}if("function"==
-typeof c.onChange)c.onChange(u,d);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",f,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function e(d,c,g){var e=mxUtils.getOffset(b,!0),f=mxUtils.getOffset(d,!0);c.style.position="absolute";c.style.left=f.x-e.x+"px";c.style.top=f.y-e.y+"px";c.style.width=d.offsetWidth+"px";c.style.height=d.offsetHeight-(g?4:0)+"px";c.style.zIndex=5}function f(b,d,c){var e=document.createElement("div");e.style.width="32px";e.style.height=
-"4px";e.style.margin="2px";e.style.border="1px solid black";e.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(f){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;g(b,d,c)});mxEvent.consume(f)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function l(b,d,c,e,f,l,k){null!=d&&(d=d.split(","),n.push({name:b,
-values:d,type:c,defVal:e,countProperty:f,parentRow:l,isDeletable:!0,flipBkg:k}));btn=mxUtils.button("+",mxUtils.bind(q,function(d){for(var m=l,q=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==b)m=m.nextSibling,q++;else break;var u={type:c,parentRow:l,index:q,isDeletable:!0,defVal:e,countProperty:f},q=p(b,"",u,0==q%2,k);g(b,e,u);m.parentNode.insertBefore(q,m.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function k(b,d,c,g,e,f,l){if(0<e){var k=Array(e);d=null!=d?d.split(","):[];for(var m=0;m<e;m++)k[m]=null!=d[m]?d[m]:null!=g?g:"";n.push({name:b,values:k,type:c,defVal:g,parentRow:f,flipBkg:l,size:e})}return document.createElement("div")}function m(b,d,c){var e=document.createElement("input");e.type="checkbox";e.checked="1"==d;mxEvent.addListener(e,"change",function(){g(b,e.checked?"1":"0",c)});return e}function p(d,c,p,u,n){var v=p.dispName,x=p.type,t=document.createElement("tr");t.className="gePropRow"+
-(n?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow";t.setAttribute("data-pName",d);t.setAttribute("data-pValue",c);u=!1;null!=p.index&&(t.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",u=!0);var A=document.createElement("td");A.className="gePropRowCell";A.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));u&&(A.style.textAlign="right");t.appendChild(A);A=document.createElement("td");A.className="gePropRowCell";if("color"==x)A.appendChild(f(d,c,p));else if("bool"==x||"boolean"==
-x)A.appendChild(m(d,c,p));else if("enum"==x){var y=p.enumList;for(n=0;n<y.length;n++)if(v=y[n],v.val==c){A.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(A,"click",mxUtils.bind(q,function(){var f=document.createElement("select");e(A,f);for(var l=0;l<y.length;l++){var k=y[l],m=document.createElement("option");m.value=mxUtils.htmlEntities(k.val);m.innerHTML=mxUtils.htmlEntities(mxResources.get(k.dispName,null,k.dispName));f.appendChild(m)}f.value=
-c;b.appendChild(f);mxEvent.addListener(f,"change",function(){var b=mxUtils.htmlEntities(f.value);g(d,b,p)});f.focus();mxEvent.addListener(f,"blur",function(){b.removeChild(f)})}))}else"dynamicArr"==x?A.appendChild(l(d,c,p.subType,p.subDefVal,p.countProperty,t,n)):"staticArr"==x?A.appendChild(k(d,c,p.subType,p.subDefVal,p.size,t,n)):"readOnly"==x?(n=document.createElement("input"),n.setAttribute("readonly",""),n.value=c,n.style.width="96px",n.style.borderWidth="0px",A.appendChild(n)):(A.innerHTML=
-c,mxEvent.addListener(A,"click",mxUtils.bind(q,function(){function f(){var b=l.value,b=0==b.length&&"string"!=x?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",x="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==x?parseInt(b):b)+"");g(d,b,p)}var l=document.createElement("input");e(A,l,!0);l.value=c;l.className="gePropEditor";"int"!=x&&"float"!=x||p.allowAuto||(l.type="number",l.step="int"==
-x?"1":"any",null!=p.min&&(l.min=parseFloat(p.min)),null!=p.max&&(l.max=parseFloat(p.max)));b.appendChild(l);mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&f()});l.focus();mxEvent.addListener(l,"blur",function(){f()})})));p.isDeletable&&(n=mxUtils.button("-",mxUtils.bind(q,function(b){g(d,"",p,p.index);mxEvent.consume(b)})),n.style.height="16px",n.style.width="25px",n.style["float"]="right",n.className="geColorBtn",A.appendChild(n));t.appendChild(A);return t}var q=this,u=this.editorUi.editor.graph,
-n=[];b.style.position="relative";b.style.padding="0";var v=document.createElement("table");v.className="geProperties";v.style.whiteSpace="nowrap";v.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";var t=document.createElement("th");t.className="gePropHeaderCell";var A=document.createElement("img");A.src=Sidebar.prototype.expandedImage;t.appendChild(A);mxUtils.write(t,mxResources.get("property"));x.style.cursor="pointer";var y=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),
-c;if(q.editorUi.propertiesCollapsed){A.src=Sidebar.prototype.collapsedImage;c="none";for(var g=b.childNodes.length-1;0<=g;g--)try{var e=b.childNodes[g],f=e.nodeName.toUpperCase();"INPUT"!=f&&"SELECT"!=f||b.removeChild(e)}catch(va){}}else A.src=Sidebar.prototype.expandedImage,c="";for(g=0;g<d.length;g++)d[g].style.display=c};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;y()});x.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";
-t.innerHTML=mxResources.get("value");x.appendChild(t);v.appendChild(x);var B=!1,D=!1,x=null;1==c.vertices.length&&0==c.edges.length?x=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(x=c.edges[0].id);null!=x&&v.appendChild(p("id",mxUtils.htmlEntities(x),{dispName:"ID",type:"readOnly"},!0,!1));for(var G in d)if(x=d[G],"function"!=typeof x.isVisible||x.isVisible(c,this)){var C=null!=c.style[G]?mxUtils.htmlEntities(c.style[G]+""):null!=x.getDefaultValue?x.getDefaultValue(c,this):x.defVal;if("separator"==
-x.type)D=!D;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var M=x.dependentProps,F=[],E=[],t=0;t<M.length;t++){var I=c.style[M[t]];E.push(d[M[t]].subDefVal);F.push(null!=I?I.split(","):[])}x.dependentPropsDefVal=E;x.dependentPropsVals=F}v.appendChild(p(G,C,x,B,D));B=!B}}for(t=0;t<n.length;t++)for(x=n[t],d=x.parentRow,c=0;c<x.values.length;c++)G=p(x.name,x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,
-index:c,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==c%2,x.flipBkg),d.parentNode.insertBefore(G,d.nextSibling),d=G;b.appendChild(v);y();return b};StyleFormatPanel.prototype.addStyles=function(b){function d(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var c=this.editorUi,g=c.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight=
-"20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var f="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";for(var k=[],m=0;m<this.defaultColorSchemes.length;m++){var p=document.createElement("div");p.style.display=
-"inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight="3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){q(b)}))})(m);k.push(p);l.appendChild(p)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(k[this.format.currentScheme].style.background="transparent");this.format.currentScheme=
-b;n(this.defaultColorSchemes[this.format.currentScheme]);k[this.format.currentScheme].style.background="#84d7ff"}),n=mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(b){var d=mxUtils.button("",mxUtils.bind(this,function(d){g.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,l=0;l<e.length;l++){for(var k=g.getModel().getStyle(e[l]),m=0;m<f.length;m++)k=mxUtils.removeStylename(k,f[m]);var p=g.getModel().isVertex(e[l])?c.initialDefaultVertexStyle:c.initialdefaultEdgeStyle;
-null!=b?(k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(d)||(k=""==b.fill?mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(d)||(k=""==b.stroke?mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,b.stroke||mxUtils.getValue(p,
-mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(d)||mxClient.IS_MAC&&mxEvent.isMetaDown(d)||!g.getModel().isVertex(e[l])||(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(k=mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),k=mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,
-mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),g.getModel().isVertex(e[l])&&(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));g.getModel().setStyle(e[l],k)}}finally{g.getModel().endUpdate()}}));d.className="geStyleButton";d.style.width="36px";d.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";d.style.margin="0px 6px 6px 0px";if(null!=b){var l="1"==urlParams.sketch?"2px solid":"1px solid";null!=b.gradient?mxClient.IS_IE&&
+c.style.width="202px";mxUtils.br(b);return u.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,d,c){function f(b,d,c,f){p.getModel().beginUpdate();try{var e=[],g=[];if(null!=c.index){for(var l=[],k=c.parentRow.nextSibling;k&&k.getAttribute("data-pName")==b;)l.push(k.getAttribute("data-pValue")),k=k.nextSibling;c.index<l.length?null!=f?l.splice(f,1):l[c.index]=d:l.push(d);null!=c.size&&l.length>c.size&&(l=l.slice(0,c.size));d=l.join(",");
+null!=c.countProperty&&(p.setCellStyles(c.countProperty,l.length,p.getSelectionCells()),e.push(c.countProperty),g.push(l.length))}p.setCellStyles(b,d,p.getSelectionCells());e.push(b);g.push(d);if(null!=c.dependentProps)for(b=0;b<c.dependentProps.length;b++){var m=c.dependentPropsDefVal[b],n=c.dependentPropsVals[b];if(n.length>d)n=n.slice(0,d);else for(var u=n.length;u<d;u++)n.push(m);n=n.join(",");p.setCellStyles(c.dependentProps[b],n,p.getSelectionCells());e.push(c.dependentProps[b]);g.push(n)}if("function"==
+typeof c.onChange)c.onChange(p,d);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",g,"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}function e(d,c,f){var e=mxUtils.getOffset(b,!0),g=mxUtils.getOffset(d,!0);c.style.position="absolute";c.style.left=g.x-e.x+"px";c.style.top=g.y-e.y+"px";c.style.width=d.offsetWidth+"px";c.style.height=d.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function g(b,d,c){var e=document.createElement("div");e.style.width="32px";e.style.height=
+"4px";e.style.margin="2px";e.style.border="1px solid black";e.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(g){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;f(b,d,c)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function l(b,d,c,e,g,l,k){null!=d&&(d=d.split(","),v.push({name:b,
+values:d,type:c,defVal:e,countProperty:g,parentRow:l,isDeletable:!0,flipBkg:k}));btn=mxUtils.button("+",mxUtils.bind(q,function(d){for(var m=l,q=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==b)m=m.nextSibling,q++;else break;var p={type:c,parentRow:l,index:q,isDeletable:!0,defVal:e,countProperty:g},q=n(b,"",p,0==q%2,k);f(b,e,p);m.parentNode.insertBefore(q,m.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function k(b,d,c,f,e,g,l){if(0<e){var k=Array(e);d=null!=d?d.split(","):[];for(var m=0;m<e;m++)k[m]=null!=d[m]?d[m]:null!=f?f:"";v.push({name:b,values:k,type:c,defVal:f,parentRow:g,flipBkg:l,size:e})}return document.createElement("div")}function m(b,d,c){var e=document.createElement("input");e.type="checkbox";e.checked="1"==d;mxEvent.addListener(e,"change",function(){f(b,e.checked?"1":"0",c)});return e}function n(d,c,n,p,u){var v=n.dispName,x=n.type,t=document.createElement("tr");t.className="gePropRow"+
+(u?"Dark":"")+(p?"Alt":"")+" gePropNonHeaderRow";t.setAttribute("data-pName",d);t.setAttribute("data-pValue",c);p=!1;null!=n.index&&(t.setAttribute("data-index",n.index),v=(null!=v?v:"")+"["+n.index+"]",p=!0);var y=document.createElement("td");y.className="gePropRowCell";y.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));p&&(y.style.textAlign="right");t.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==x)y.appendChild(g(d,c,n));else if("bool"==x||"boolean"==
+x)y.appendChild(m(d,c,n));else if("enum"==x){var B=n.enumList;for(u=0;u<B.length;u++)if(v=B[u],v.val==c){y.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(q,function(){var g=document.createElement("select");e(y,g);for(var l=0;l<B.length;l++){var k=B[l],m=document.createElement("option");m.value=mxUtils.htmlEntities(k.val);m.innerHTML=mxUtils.htmlEntities(mxResources.get(k.dispName,null,k.dispName));g.appendChild(m)}g.value=
+c;b.appendChild(g);mxEvent.addListener(g,"change",function(){var b=mxUtils.htmlEntities(g.value);f(d,b,n)});g.focus();mxEvent.addListener(g,"blur",function(){b.removeChild(g)})}))}else"dynamicArr"==x?y.appendChild(l(d,c,n.subType,n.subDefVal,n.countProperty,t,u)):"staticArr"==x?y.appendChild(k(d,c,n.subType,n.subDefVal,n.size,t,u)):"readOnly"==x?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=c,u.style.width="96px",u.style.borderWidth="0px",y.appendChild(u)):(y.innerHTML=
+c,mxEvent.addListener(y,"click",mxUtils.bind(q,function(){function g(){var b=l.value,b=0==b.length&&"string"!=x?0:b;n.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",x="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=n.min&&b<n.min?b=n.min:null!=n.max&&b>n.max&&(b=n.max);b=mxUtils.htmlEntities(("int"==x?parseInt(b):b)+"");f(d,b,n)}var l=document.createElement("input");e(y,l,!0);l.value=c;l.className="gePropEditor";"int"!=x&&"float"!=x||n.allowAuto||(l.type="number",l.step="int"==
+x?"1":"any",null!=n.min&&(l.min=parseFloat(n.min)),null!=n.max&&(l.max=parseFloat(n.max)));b.appendChild(l);mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&g()});l.focus();mxEvent.addListener(l,"blur",function(){g()})})));n.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(b){f(d,"",n,n.index);mxEvent.consume(b)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",y.appendChild(u));t.appendChild(y);return t}var q=this,p=this.editorUi.editor.graph,
+v=[];b.style.position="relative";b.style.padding="0";var u=document.createElement("table");u.className="geProperties";u.style.whiteSpace="nowrap";u.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";var t=document.createElement("th");t.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;t.appendChild(y);mxUtils.write(t,mxResources.get("property"));x.style.cursor="pointer";var B=function(){var d=u.querySelectorAll(".gePropNonHeaderRow"),
+c;if(q.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;c="none";for(var f=b.childNodes.length-1;0<=f;f--)try{var e=b.childNodes[f],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||b.removeChild(e)}catch(va){}}else y.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<d.length;f++)d[f].style.display=c};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;B()});x.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";
+t.innerHTML=mxResources.get("value");x.appendChild(t);u.appendChild(x);var D=!1,F=!1,x=null;1==c.vertices.length&&0==c.edges.length?x=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(x=c.edges[0].id);null!=x&&u.appendChild(n("id",mxUtils.htmlEntities(x),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(x=d[A],"function"!=typeof x.isVisible||x.isVisible(c,this)){var C=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=x.getDefaultValue?x.getDefaultValue(c,this):x.defVal;if("separator"==
+x.type)F=!F;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var N=x.dependentProps,E=[],H=[],t=0;t<N.length;t++){var P=c.style[N[t]];H.push(d[N[t]].subDefVal);E.push(null!=P?P.split(","):[])}x.dependentPropsDefVal=H;x.dependentPropsVals=E}u.appendChild(n(A,C,x,D,F));D=!D}}for(t=0;t<v.length;t++)for(x=v[t],d=x.parentRow,c=0;c<x.values.length;c++)A=n(x.name,x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,
+index:c,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==c%2,x.flipBkg),d.parentNode.insertBefore(A,d.nextSibling),d=A;b.appendChild(u);B();return b};StyleFormatPanel.prototype.addStyles=function(b){function d(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var c=this.editorUi,f=c.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight=
+"20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var g="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";for(var k=[],m=0;m<this.defaultColorSchemes.length;m++){var n=document.createElement("div");n.style.display=
+"inline-block";n.style.width="6px";n.style.height="6px";n.style.marginLeft="4px";n.style.marginRight="3px";n.style.borderRadius="3px";n.style.cursor="pointer";n.style.background="transparent";n.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(n,"click",mxUtils.bind(this,function(){q(b)}))})(m);k.push(n);l.appendChild(n)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(k[this.format.currentScheme].style.background="transparent");this.format.currentScheme=
+b;p(this.defaultColorSchemes[this.format.currentScheme]);k[this.format.currentScheme].style.background="#84d7ff"}),p=mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(b){var d=mxUtils.button("",mxUtils.bind(this,function(d){f.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,l=0;l<e.length;l++){for(var k=f.getModel().getStyle(e[l]),m=0;m<g.length;m++)k=mxUtils.removeStylename(k,g[m]);var n=f.getModel().isVertex(e[l])?c.initialDefaultVertexStyle:c.initialdefaultEdgeStyle;
+null!=b?(k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(d)||(k=""==b.fill?mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(d)||(k=""==b.stroke?mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,b.stroke||mxUtils.getValue(n,
+mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(d)||mxClient.IS_MAC&&mxEvent.isMetaDown(d)||!f.getModel().isVertex(e[l])||(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null)))):(k=mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,"#ffffff")),k=mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,"#000000")),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,
+mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(e[l])&&(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(e[l],k)}}finally{f.getModel().endUpdate()}}));d.className="geStyleButton";d.style.width="36px";d.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";d.style.margin="0px 6px 6px 0px";if(null!=b){var l="1"==urlParams.sketch?"2px solid":"1px solid";null!=b.gradient?mxClient.IS_IE&&
10>document.documentMode?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":b.fill==mxConstants.NONE?d.style.background="url('"+Dialog.prototype.noColorImage+"')":d.style.backgroundColor=""==b.fill?mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff"):b.fill||mxUtils.getValue(c.initialDefaultVertexStyle,
-mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");d.style.border=b.stroke==mxConstants.NONE?l+" transparent":""==b.stroke?l+" "+mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):l+" "+(b.stroke||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=b.title&&d.setAttribute("title",b.title)}else{var l=mxUtils.getValue(g.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,
-"#ffffff"),k=mxUtils.getValue(g.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=l;d.style.border="1px solid "+k}d.style.borderRadius="0";e.appendChild(d)});e.innerHTML="";for(var l=0;l<b.length;l++)0<l&&0==mxUtils.mod(l,4)&&mxUtils.br(e),d(b[l])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var m=10>=this.defaultColorSchemes.length?28:8,u=document.createElement("div");u.style.cssText="position:absolute;left:10px;top:8px;bottom:"+
+mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");d.style.border=b.stroke==mxConstants.NONE?l+" transparent":""==b.stroke?l+" "+mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):l+" "+(b.stroke||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=b.title&&d.setAttribute("title",b.title)}else{var l=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,
+"#ffffff"),k=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=l;d.style.border="1px solid "+k}d.style.borderRadius="0";e.appendChild(d)});e.innerHTML="";for(var l=0;l<b.length;l++)0<l&&0==mxUtils.mod(l,4)&&mxUtils.br(e),d(b[l])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var m=10>=this.defaultColorSchemes.length?28:8,u=document.createElement("div");u.style.cssText="position:absolute;left:10px;top:8px;bottom:"+
m+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";mxEvent.addListener(u,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));
var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+m+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";1<this.defaultColorSchemes.length&&
-(b.appendChild(u),b.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));d(u);d(v);n(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&b.appendChild(l);return b};StyleFormatPanel.prototype.addEditOps=function(b){var d=this.format.getSelectionState(),c=null;1==d.cells.length&&(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editStyle").funct()})),
-c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",b.appendChild(c));var g=this.editorUi.editor.graph,g=1==d.cells.length?g.view.getState(d.cells[0]):null;null!=g&&null!=g.shape&&null!=g.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editShape").funct()})),d.setAttribute("title",mxResources.get("editShape")),d.style.marginBottom=
+(b.appendChild(u),b.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));d(u);d(v);p(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&b.appendChild(l);return b};StyleFormatPanel.prototype.addEditOps=function(b){var d=this.format.getSelectionState(),c=null;1==d.cells.length&&(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editStyle").funct()})),
+c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",b.appendChild(c));var f=this.editorUi.editor.graph,f=1==d.cells.length?f.view.getState(d.cells[0]):null;null!=f&&null!=f.shape&&null!=f.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editShape").funct()})),d.setAttribute("title",mxResources.get("editShape")),d.style.marginBottom=
"2px",null==c?d.style.width="202px":(c.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),b.appendChild(d)):d.image&&0<d.cells.length&&(d=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(b){this.editorUi.actions.get("image").funct()})),d.setAttribute("title",mxResources.get("editImage")),d.style.marginBottom="2px",null==c?d.style.width="202px":(c.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),b.appendChild(d));return b}}Graph.customFontElements=
{};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(b){return b.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(b){return Graph.isGoogleFontUrl(b)};Graph.createFontElement=function(b,d){var c;Graph.isCssFontUrl(d)?(c=document.createElement("link"),c.setAttribute("rel","stylesheet"),c.setAttribute("type","text/css"),c.setAttribute("charset","UTF-8"),c.setAttribute("href",d)):(c=document.createElement("style"),mxUtils.write(c,'@font-face {\nfont-family: "'+
-b+'";\nsrc: url("'+d+'");\n}'));return c};Graph.addFont=function(b,d,c){if(null!=b&&0<b.length&&null!=d&&0<d.length){var g=b.toLowerCase();if("helvetica"!=g&&"arial"!=b&&"sans-serif"!=g){var e=Graph.customFontElements[g];null!=e&&e.url!=d&&(e.elt.parentNode.removeChild(e.elt),e=null);null==e?(e=d,"http:"==d.substring(0,5)&&(e=PROXY_URL+"?url="+encodeURIComponent(d)),e={name:b,url:d,elt:Graph.createFontElement(b,e)},Graph.customFontElements[g]=e,Graph.recentCustomFonts[g]=e,d=document.getElementsByTagName("head")[0],
-null!=c&&("link"==e.elt.nodeName.toLowerCase()?(e.elt.onload=c,e.elt.onerror=c):c()),null!=d&&d.appendChild(e.elt)):null!=c&&c()}else null!=c&&c()}else null!=c&&c();return b};Graph.getFontUrl=function(b,d){var c=Graph.customFontElements[b.toLowerCase()];null!=c&&(d=c.url);return d};Graph.processFontAttributes=function(b){b=b.getElementsByTagName("*");for(var d=0;d<b.length;d++){var c=b[d].getAttribute("data-font-src");if(null!=c){var g="FONT"==b[d].nodeName?b[d].getAttribute("face"):b[d].style.fontFamily;
-null!=g&&Graph.addFont(g,c)}}};Graph.processFontStyle=function(b){if(null!=b){var d=mxUtils.getValue(b,"fontSource",null);if(null!=d){var c=mxUtils.getValue(b,mxConstants.STYLE_FONTFAMILY,null);null!=c&&Graph.addFont(c,decodeURIComponent(d))}}return b};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";
-Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=urlParams.edge;Graph.prototype.hiddenTags=null;var B=Graph.prototype.init;Graph.prototype.init=function(){function b(b){d=b}B.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var d=null;mxEvent.addListener(this.container,"mouseenter",b);mxEvent.addListener(this.container,
-"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){d=null});this.isMouseInsertPoint=function(){return null!=d};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):c.apply(this,arguments)};var g=this.layoutManager.getLayout;this.layoutManager.getLayout=function(b){var d=this.graph.getCellStyle(b);if(null!=d){if("rack"==d.childLayout){var c=new mxStackLayout(this.graph,!1);c.gridSize=null!=d.rackUnitSize?parseFloat(d.rackUnitSize):
+b+'";\nsrc: url("'+d+'");\n}'));return c};Graph.addFont=function(b,d,c){if(null!=b&&0<b.length&&null!=d&&0<d.length){var f=b.toLowerCase();if("helvetica"!=f&&"arial"!=b&&"sans-serif"!=f){var e=Graph.customFontElements[f];null!=e&&e.url!=d&&(e.elt.parentNode.removeChild(e.elt),e=null);null==e?(e=d,"http:"==d.substring(0,5)&&(e=PROXY_URL+"?url="+encodeURIComponent(d)),e={name:b,url:d,elt:Graph.createFontElement(b,e)},Graph.customFontElements[f]=e,Graph.recentCustomFonts[f]=e,d=document.getElementsByTagName("head")[0],
+null!=c&&("link"==e.elt.nodeName.toLowerCase()?(e.elt.onload=c,e.elt.onerror=c):c()),null!=d&&d.appendChild(e.elt)):null!=c&&c()}else null!=c&&c()}else null!=c&&c();return b};Graph.getFontUrl=function(b,d){var c=Graph.customFontElements[b.toLowerCase()];null!=c&&(d=c.url);return d};Graph.processFontAttributes=function(b){b=b.getElementsByTagName("*");for(var d=0;d<b.length;d++){var c=b[d].getAttribute("data-font-src");if(null!=c){var f="FONT"==b[d].nodeName?b[d].getAttribute("face"):b[d].style.fontFamily;
+null!=f&&Graph.addFont(f,c)}}};Graph.processFontStyle=function(b){if(null!=b){var d=mxUtils.getValue(b,"fontSource",null);if(null!=d){var c=mxUtils.getValue(b,mxConstants.STYLE_FONTFAMILY,null);null!=c&&Graph.addFont(c,decodeURIComponent(d))}}return b};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";
+Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=urlParams.edge;Graph.prototype.hiddenTags=null;var y=Graph.prototype.init;Graph.prototype.init=function(){function b(b){d=b}y.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var d=null;mxEvent.addListener(this.container,"mouseenter",b);mxEvent.addListener(this.container,
+"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){d=null});this.isMouseInsertPoint=function(){return null!=d};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):c.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(b){var d=this.graph.getCellStyle(b);if(null!=d){if("rack"==d.childLayout){var c=new mxStackLayout(this.graph,!1);c.gridSize=null!=d.rackUnitSize?parseFloat(d.rackUnitSize):
"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;c.marginLeft=d.marginLeft||0;c.marginRight=d.marginRight||0;c.marginTop=d.marginTop||0;c.marginBottom=d.marginBottom||0;c.allowGaps=d.allowGaps||0;c.horizontal="1"==mxUtils.getValue(d,"horizontalRack","0");c.resizeParent=!1;c.fill=!0;return c}if("undefined"!==typeof mxTableLayout&&"tableLayout"==d.childLayout)return c=new mxTableLayout(this.graph),c.rows=d.tableRows||2,c.columns=d.tableColumns||2,c.colPercentages=d.colPercentages,c.rowPercentages=
d.rowPercentages,c.equalColumns="1"==mxUtils.getValue(d,"equalColumns",c.colPercentages?"0":"1"),c.equalRows="1"==mxUtils.getValue(d,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),c.border=d.tableBorder||c.border,c.marginLeft=d.marginLeft||0,c.marginRight=d.marginRight||0,c.marginTop=d.marginTop||0,c.marginBottom=d.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(d,"autoAddCol","0"),c.autoAddRow="1"==mxUtils.getValue(d,"autoAddRow",c.autoAddCol?
-"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return g.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var E=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,g,e,f,l,k,m,p,q){E.apply(this,arguments);Graph.processFontAttributes(q)};var A=mxText.prototype.redraw;mxText.prototype.redraw=
-function(){A.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],d;for(d in Graph.customFontElements){var c=Graph.customFontElements[d];b.push({name:c.name,url:c.url})}return b};Graph.prototype.setFont=function(b,d){Graph.addFont(b,d);document.execCommand("fontname",!1,b);if(null!=d){var c=this.cellEditor.textarea.getElementsByTagName("font");d=Graph.getFontUrl(b,
-d);for(var g=0;g<c.length;g++)c[g].getAttribute("face")==b&&c[g].getAttribute("data-font-src")!=d&&c[g].setAttribute("data-font-src",d)}};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var b=JSON.parse(decodeURIComponent(urlParams.vars));
-if(null!=b)for(var d in b)this.globalVars[d]=b[d]}catch(y){null!=window.console&&console.log("Error in vars URL parameter: "+y)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var I=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var d=I.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[b]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=function(b,d,c,g,e,f,l,k,m,p,q,u,n,v){var x=null,t=null;u||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=
-this.getDefaultStylesheet(),this.refresh());var A=L.apply(this,arguments),B=this.getCustomFonts();if(q&&0<B.length){var y=A.ownerDocument,C=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"style"):y.createElement("style");null!=y.setAttributeNS?C.setAttributeNS("type","text/css"):C.setAttribute("type","text/css");for(var D="",G="",M=0;M<B.length;M++){var F=B[M].name,J=B[M].url;Graph.isCssFontUrl(J)?D+="@import url("+J+");\n":G+='@font-face {\nfont-family: "'+F+'";\nsrc: url("'+J+'");\n}\n'}C.appendChild(y.createTextNode(D+
-G));A.getElementsByTagName("defs")[0].appendChild(C)}null!=x&&(this.defaultPageBackgroundColor=t,this.stylesheet=x,this.refresh());return A};var H=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var b=H.apply(this,arguments);if(this.mathEnabled){var d=b.drawText;b.drawText=function(b,c){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var g=b.text.getContentNode();if(null!=
-g){g=g.cloneNode(!0);if(g.getElementsByTagNameNS)for(var e=g.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=g.innerHTML&&(e=b.text.value,b.text.value=g.innerHTML,d.apply(this,arguments),b.text.value=e)}}else d.apply(this,arguments)}}return b};var K=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){K.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=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;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&this.setBackgroundImage(this.backgroundImage)};var C=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){C.apply(this,arguments);this.currentStyle="default-style2"};
-Graph.prototype.handleCustomLink=function(b){"data:action/json,"==b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=function(b,d){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=
-!0;var c=!1,g=0,e=0,f=mxUtils.bind(this,function(){c||(c=!0,this.model.beginUpdate())}),l=mxUtils.bind(this,function(){c&&(c=!1,this.model.endUpdate())}),k=mxUtils.bind(this,function(){0<g&&g--;0==g&&m()}),m=mxUtils.bind(this,function(){if(e<b.length){var c=this.stoppingCustomActions,p=b[e++],q=[];if(null!=p.open)if(l(),this.isCustomLink(p.open)){if(!this.customLinkClicked(p.open))return}else this.openLink(p.open);null==p.wait||c||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=
-this.pendingExecuteNextAction=null;k()}),g++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=p.wait?parseInt(p.wait):1E3),l());null!=p.opacity&&null!=p.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(p.opacity,!0)),p.opacity.value);null!=p.fadeIn&&(g++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeIn,!0)),0,1,k,c?0:p.fadeIn.delay));null!=p.fadeOut&&(g++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeOut,
-!0)),1,0,k,c?0:p.fadeOut.delay));null!=p.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeIn,!0),!0)));null!=p.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeOut,!0),!1)));null!=p.toggle&&(f(),this.toggleCells(this.getCellsForAction(p.toggle,!0)));if(null!=p.show){f();var u=this.getCellsForAction(p.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(u),1);this.setCellsVisible(u,!0)}null!=p.hide&&(f(),u=this.getCellsForAction(p.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(u),
-0),this.setCellsVisible(u,!1));null!=p.toggleStyle&&null!=p.toggleStyle.key&&(f(),this.toggleCellStyles(p.toggleStyle.key,null!=p.toggleStyle.defaultValue?p.toggleStyle.defaultValue:"0",this.getCellsForAction(p.toggleStyle,!0)));null!=p.style&&null!=p.style.key&&(f(),this.setCellStyles(p.style.key,p.style.value,this.getCellsForAction(p.style,!0)));u=[];null!=p.select&&this.isEnabled()&&(u=this.getCellsForAction(p.select),this.setSelectionCells(u));null!=p.highlight&&(u=this.getCellsForAction(p.highlight),
-this.highlightCells(u,p.highlight.color,p.highlight.duration,p.highlight.opacity));null!=p.scroll&&(u=this.getCellsForAction(p.scroll));null!=p.viewbox&&this.fitWindow(p.viewbox,p.viewbox.border);0<u.length&&this.scrollCellToVisible(u[0]);if(null!=p.tags){u=[];null!=p.tags.hidden&&(u=u.concat(p.tags.hidden));if(null!=p.tags.visible)for(var n=this.getAllTags(),v=0;v<n.length;v++)0>mxUtils.indexOf(p.tags.visible,n[v])&&0>mxUtils.indexOf(u,n[v])&&u.push(n[v]);this.hiddenTags=u;this.refresh()}0<q.length&&
-(g++,this.executeAnimations(q,k,c?1:p.steps,c?0:p.delay));0==g?m():l()}else this.stoppingCustomActions=this.executingCustomActions=!1,l(),null!=d&&d()});m()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,d){var c=this.getLinkForCell(d);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(b,c));if(this.isHtmlLabel(d)){var g=document.createElement("div");g.innerHTML=this.sanitizeHtml(this.getLabel(d));for(var e=g.getElementsByTagName("a"),f=!1,l=0;l<
-e.length;l++)c=e[l].getAttribute("href"),null!=c&&"data:action/json,"==c.substring(0,17)&&(e[l].setAttribute("href",this.updateCustomLink(b,c)),f=!0);f&&this.labelChanged(d,g.innerHTML)}};Graph.prototype.updateCustomLink=function(b,d){if("data:action/json,"==d.substring(0,17))try{var c=JSON.parse(d.substring(17));null!=c.actions&&(this.updateCustomLinkActions(b,c.actions),d="data:action/json,"+JSON.stringify(c))}catch(W){}return d};Graph.prototype.updateCustomLinkActions=function(b,d){for(var c=0;c<
-d.length;c++){var g=d[c],e;for(e in g)this.updateCustomLinkAction(b,g[e],"cells"),this.updateCustomLinkAction(b,g[e],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(b,d,c){if(null!=d&&null!=d[c]){for(var g=[],e=0;e<d[c].length;e++)if("*"==d[c][e])g.push(d[c][e]);else{var f=b[d[c][e]];null!=f?""!=f&&g.push(f):g.push(d[c][e])}d[c]=g}};Graph.prototype.getCellsForAction=function(b,d){var c=this.getCellsById(b.cells).concat(this.getCellsForTags(b.tags,null,d));if(null!=b.excludeCells){for(var g=
-[],e=0;e<c.length;e++)0>b.excludeCells.indexOf(c[e].id)&&g.push(c[e]);c=g}return c};Graph.prototype.getCellsById=function(b){var d=[];if(null!=b)for(var c=0;c<b.length;c++)if("*"==b[c])var g=this.model.getRoot(),d=d.concat(this.model.filterDescendants(function(b){return b!=g},g));else{var e=this.model.getCell(b[c]);null!=e&&d.push(e)}return d};var N=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(b){return N.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(b))};
-Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var d=0;d<b.length;d++)if(0>mxUtils.indexOf(this.hiddenTags,b[d]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,d,c,g){var e=[];if(null!=b){d=null!=d?d:this.model.getDescendants(this.model.getRoot());for(var f=0,l={},k=0;k<b.length;k++)0<b[k].length&&(l[b[k]]=!0,f++);for(k=0;k<d.length;k++)if(c&&this.model.getParent(d[k])==
-this.model.root||this.model.isVertex(d[k])||this.model.isEdge(d[k])){var m=this.getTagsForCell(d[k]),p=!1;if(0<m.length&&(m=m.split(" "),m.length>=b.length)){for(var q=p=0;q<m.length&&p<f;q++)null!=l[m[q]]&&p++;p=p==f}p&&(1!=g||this.isCellVisible(d[k]))&&e.push(d[k])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var d=null,c=[],g=0;g<b.length;g++){var e=this.getTagsForCell(b[g]),
-c=[];if(0<e.length){for(var e=e.split(" "),f={},l=0;l<e.length;l++)if(null==d||null!=d[e[l]])f[e[l]]=!0,c.push(e[l]);d=f}else return[]}return c};Graph.prototype.getTagsForCells=function(b){for(var d=[],c={},g=0;g<b.length;g++){var e=this.getTagsForCell(b[g]);if(0<e.length)for(var e=e.split(" "),f=0;f<e.length;f++)null==c[e[f]]&&(c[e[f]]=!0,d.push(e[f]))}return d};Graph.prototype.getTagsForCell=function(b){return this.getAttributeForCell(b,"tags","")};Graph.prototype.addTagsForCells=function(b,d){if(0<
-b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){for(var g=this.getTagsForCell(b[c]),e=g.split(" "),f=!1,l=0;l<d.length;l++){var k=mxUtils.trim(d[l]);""!=k&&0>mxUtils.indexOf(e,k)&&(g=0<g.length?g+" "+k:k,f=!0)}f&&this.setAttributeForCell(b[c],"tags",g)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,d){if(0<b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var g=this.getTagsForCell(b[c]);if(0<g.length){for(var e=
-g.split(" "),f=!1,l=0;l<d.length;l++){var k=mxUtils.indexOf(e,d[l]);0<=k&&(e.splice(k,1),f=!0)}f&&this.setAttributeForCell(b[c],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var d=0;d<b.length;d++)this.model.setVisible(b[d],!this.model.isVisible(b[d]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,d){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],d)}finally{this.model.endUpdate()}};
-Graph.prototype.highlightCells=function(b,d,c,g){for(var e=0;e<b.length;e++)this.highlightCell(b[e],d,c,g)};Graph.prototype.highlightCell=function(b,d,c,g){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;b=this.view.getState(b);if(null!=b){var e=Math.max(5,mxUtils.getValue(b.style,mxConstants.STYLE_STROKEWIDTH,1)+4),f=new mxCellHighlight(this,d,e,!1);null!=g&&(f.opacity=g);f.highlight(b);window.setTimeout(function(){null!=f.shape&&(mxUtils.setPrefixedStyle(f.shape.node.style,"transition",
-"all 1200ms ease-in-out"),f.shape.node.style.opacity=0);window.setTimeout(function(){f.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(b,d,c){c=null!=c?c:!1;var g=b.ownerDocument,e=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"filter"):g.createElement("filter");e.setAttribute("id",this.shadowId);var f=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):g.createElement("feGaussianBlur");f.setAttribute("in","SourceAlpha");f.setAttribute("stdDeviation",
-this.svgShadowBlur);f.setAttribute("result","blur");e.appendChild(f);f=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feOffset"):g.createElement("feOffset");f.setAttribute("in","blur");f.setAttribute("dx",this.svgShadowSize);f.setAttribute("dy",this.svgShadowSize);f.setAttribute("result","offsetBlur");e.appendChild(f);f=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feFlood"):g.createElement("feFlood");f.setAttribute("flood-color",this.svgShadowColor);f.setAttribute("flood-opacity",
-this.svgShadowOpacity);f.setAttribute("result","offsetColor");e.appendChild(f);f=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feComposite"):g.createElement("feComposite");f.setAttribute("in","offsetColor");f.setAttribute("in2","offsetBlur");f.setAttribute("operator","in");f.setAttribute("result","offsetBlur");e.appendChild(f);f=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feBlend"):g.createElement("feBlend");f.setAttribute("in","SourceGraphic");f.setAttribute("in2",
-"offsetBlur");e.appendChild(f);f=b.getElementsByTagName("defs");0==f.length?(g=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"defs"):g.createElement("defs"),null!=b.firstChild?b.insertBefore(g,b.firstChild):b.appendChild(g)):g=f[0];g.appendChild(e);c||(d=null!=d?d:b.getElementsByTagName("g")[0],null!=d&&(d.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(b.getAttribute("width")))||(b.setAttribute("width",parseInt(b.getAttribute("width"))+6),b.setAttribute("height",parseInt(b.getAttribute("height"))+
+"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var H=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,k,m,n,q){H.apply(this,arguments);Graph.processFontAttributes(q)};var D=mxText.prototype.redraw;mxText.prototype.redraw=
+function(){D.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,d,c){function f(){for(var b=l.getSelectionCells(),d=[],c=0;c<b.length;c++)l.isCellVisible(b[c])&&d.push(b[c]);l.setSelectionCells(d)}function e(b){l.hiddenTags=b?[]:k.slice();f();l.refresh()}function g(b,c){n.innerHTML="";if(0<b.length){var g=document.createElement("table");g.setAttribute("cellpadding","2");g.style.boxSizing="border-box";
+g.style.tableLayout="fixed";g.style.width="100%";var m=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){function g(){var d=k.slice(),c=mxUtils.indexOf(d,b);d.splice(c,1);l.hiddenTags=d;f();l.refresh()}function n(){var d=l.getCellsForTags([b],null,null,!0);l.isEnabled()?l.setSelectionCells(d):l.highlightCells(d)}var q=0>mxUtils.indexOf(l.hiddenTags,b),p=document.createElement("tr"),u=document.createElement("td");u.style.align="center";u.style.width="16px";
+var v=document.createElement("img");v.setAttribute("src",q?Editor.visibleImage:Editor.hiddenImage);v.setAttribute("title",mxResources.get(q?"hideIt":"show",[b]));mxUtils.setOpacity(v,q?75:25);v.style.verticalAlign="middle";v.style.cursor="pointer";v.style.width="16px";if(d||Editor.isDarkMode())v.style.filter="invert(100%)";u.appendChild(v);mxEvent.addListener(v,"click",function(d){var c=mxUtils.indexOf(l.hiddenTags,b);mxEvent.isShiftDown(d)?e(0<=mxUtils.indexOf(l.hiddenTags,b)):(0>c?l.hiddenTags.push(b):
+0<=c&&l.hiddenTags.splice(c,1),f(),l.refresh());mxEvent.consume(d)});mxEvent.addListener(v,"dblclick",function(b){mxEvent.isShiftDown(b)||(!q&&0<l.hiddenTags.length?e(!0):g());mxEvent.consume(b)});p.appendChild(u);u=document.createElement("td");u.style.overflow="hidden";u.style.whiteSpace="nowrap";u.style.textOverflow="ellipsis";u.style.verticalAlign="middle";u.style.cursor="pointer";u.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position=
+"relative";mxUtils.setOpacity(a,q?100:40);u.appendChild(a);mxEvent.addListener(u,"click",function(b){mxEvent.isShiftDown(b)?(e(!0),n()):q&&0<l.hiddenTags.length?e(!0):g();mxEvent.consume(b)});mxEvent.addListener(u,"dblclick",function(b){e(!0);n();mxEvent.consume(b)});p.appendChild(u);if(l.isEnabled()){u=document.createElement("td");u.style.verticalAlign="middle";u.style.textAlign="center";u.style.width="18px";if(null==c){u.style.align="center";u.style.width="16px";v=document.createElement("img");
+v.setAttribute("src",Editor.crossImage);v.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(v,q?75:25);v.style.verticalAlign="middle";v.style.cursor="pointer";v.style.width="16px";if(d||Editor.isDarkMode())v.style.filter="invert(100%)";mxEvent.addListener(v,"click",function(d){var c=mxUtils.indexOf(k,b);0<=c&&k.splice(c,1);l.removeTagsForCells(l.model.getDescendants(l.model.getRoot()),[b]);l.refresh();mxEvent.consume(d)});u.appendChild(v)}else{var x=document.createElement("input");
+x.setAttribute("type","checkbox");x.style.margin="0px";x.defaultChecked=null!=c&&0<=mxUtils.indexOf(c,b);x.checked=x.defaultChecked;x.style.background="transparent";x.setAttribute("title",mxResources.get(x.defaultChecked?"removeIt":"add",[b]));mxEvent.addListener(x,"change",function(d){x.checked?l.addTagsForCells(l.getSelectionCells(),[b]):l.removeTagsForCells(l.getSelectionCells(),[b]);mxEvent.consume(d)});u.appendChild(x)}p.appendChild(u)}m.appendChild(p)})(b[q]);g.appendChild(m);n.appendChild(g)}}
+var l=this,k=l.hiddenTags.slice(),m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.style.height="100%";var n=document.createElement("div");n.style.boxSizing="border-box";n.style.borderRadius="4px";n.style.userSelect="none";n.style.overflow="auto";n.style.position="absolute";n.style.left="10px";n.style.right="10px";n.style.top="10px";n.style.border=l.isEnabled()?"1px solid #808080":"none";n.style.bottom=l.isEnabled()?"48px":"10px";m.appendChild(n);
+var q=mxUtils.button(mxResources.get("reset"),function(b){l.hiddenTags=[];mxEvent.isShiftDown(b)||(k=l.hiddenTags.slice());f();l.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";q.style.margin="0 4px 0 0";var p=mxUtils.button(mxResources.get("add"),function(){null!=c&&c(k,function(b){k=b;u()})});p.setAttribute("title",mxResources.get("add"));p.className="geBtn";p.style.margin="0";l.addListener(mxEvent.ROOT,function(){k=l.hiddenTags.slice()});var u=mxUtils.bind(this,
+function(d,c){if(b()){for(var f=l.getAllTags(),e=0;e<f.length;e++)0>mxUtils.indexOf(k,f[e])&&k.push(f[e]);k.sort();l.isSelectionEmpty()?g(k):g(k,l.getCommonTagsForCells(l.getSelectionCells()))}});l.selectionModel.addListener(mxEvent.CHANGE,u);l.model.addListener(mxEvent.CHANGE,u);l.addListener(mxEvent.REFRESH,u);var v=document.createElement("div");v.style.boxSizing="border-box";v.style.whiteSpace="nowrap";v.style.position="absolute";v.style.overflow="hidden";v.style.bottom="0px";v.style.height="42px";
+v.style.right="10px";v.style.left="10px";l.isEnabled()&&(v.appendChild(q),v.appendChild(p),m.appendChild(v));return{div:m,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],d;for(d in Graph.customFontElements){var c=Graph.customFontElements[d];b.push({name:c.name,url:c.url})}return b};Graph.prototype.setFont=function(b,d){Graph.addFont(b,d);document.execCommand("fontname",!1,b);if(null!=d){var c=this.cellEditor.textarea.getElementsByTagName("font");d=
+Graph.getFontUrl(b,d);for(var f=0;f<c.length;f++)c[f].getAttribute("face")==b&&c[f].getAttribute("data-font-src")!=d&&c[f].setAttribute("data-font-src",d)}};var E=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return E.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var b=
+JSON.parse(decodeURIComponent(urlParams.vars));if(null!=b)for(var d in b)this.globalVars[d]=b[d]}catch(A){null!=window.console&&console.log("Error in vars URL parameter: "+A)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var J=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var d=J.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[b]);return d};Graph.prototype.getDefaultStylesheet=
+function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=function(b,d,c,f,e,g,l,k,m,n,q,p,u,v){var x=null,t=null;p||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?
+"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=L.apply(this,arguments),D=this.getCustomFonts();if(q&&0<D.length){var B=y.ownerDocument,C=null!=B.createElementNS?B.createElementNS(mxConstants.NS_SVG,"style"):B.createElement("style");null!=B.setAttributeNS?C.setAttributeNS("type","text/css"):C.setAttribute("type","text/css");for(var N="",A="",F=0;F<D.length;F++){var E=D[F].name,I=D[F].url;Graph.isCssFontUrl(I)?N+="@import url("+I+");\n":A+='@font-face {\nfont-family: "'+
+E+'";\nsrc: url("'+I+'");\n}\n'}C.appendChild(B.createTextNode(N+A));y.getElementsByTagName("defs")[0].appendChild(C)}null!=x&&(this.defaultPageBackgroundColor=t,this.stylesheet=x,this.refresh());return y};var G=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var b=G.apply(this,arguments);if(this.mathEnabled){var d=b.drawText;b.drawText=function(b,c){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var f=
+b.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var e=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=f.innerHTML&&(e=b.text.value,b.text.value=f.innerHTML,d.apply(this,arguments),b.text.value=e)}}else d.apply(this,arguments)}}return b};var K=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){K.apply(this,arguments);if(mxClient.IS_GC&&null!=
+this.getDrawPane()){var b=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;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&this.setBackgroundImage(this.backgroundImage)};var C=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){C.apply(this,
+arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=function(b,d){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));
+else{this.executingCustomActions=!0;var c=!1,f=0,e=0,g=mxUtils.bind(this,function(){c||(c=!0,this.model.beginUpdate())}),l=mxUtils.bind(this,function(){c&&(c=!1,this.model.endUpdate())}),k=mxUtils.bind(this,function(){0<f&&f--;0==f&&m()}),m=mxUtils.bind(this,function(){if(e<b.length){var c=this.stoppingCustomActions,n=b[e++],q=[];if(null!=n.open)if(l(),this.isCustomLink(n.open)){if(!this.customLinkClicked(n.open))return}else this.openLink(n.open);null==n.wait||c||(this.pendingExecuteNextAction=mxUtils.bind(this,
+function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;k()}),f++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=n.wait?parseInt(n.wait):1E3),l());null!=n.opacity&&null!=n.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(n.opacity,!0)),n.opacity.value);null!=n.fadeIn&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeIn,!0)),0,1,k,c?0:n.fadeIn.delay));null!=n.fadeOut&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeOut,
+!0)),1,0,k,c?0:n.fadeOut.delay));null!=n.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeIn,!0),!0)));null!=n.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeOut,!0),!1)));null!=n.toggle&&(g(),this.toggleCells(this.getCellsForAction(n.toggle,!0)));if(null!=n.show){g();var p=this.getCellsForAction(n.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(p),1);this.setCellsVisible(p,!0)}null!=n.hide&&(g(),p=this.getCellsForAction(n.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(p),
+0),this.setCellsVisible(p,!1));null!=n.toggleStyle&&null!=n.toggleStyle.key&&(g(),this.toggleCellStyles(n.toggleStyle.key,null!=n.toggleStyle.defaultValue?n.toggleStyle.defaultValue:"0",this.getCellsForAction(n.toggleStyle,!0)));null!=n.style&&null!=n.style.key&&(g(),this.setCellStyles(n.style.key,n.style.value,this.getCellsForAction(n.style,!0)));p=[];null!=n.select&&this.isEnabled()&&(p=this.getCellsForAction(n.select),this.setSelectionCells(p));null!=n.highlight&&(p=this.getCellsForAction(n.highlight),
+this.highlightCells(p,n.highlight.color,n.highlight.duration,n.highlight.opacity));null!=n.scroll&&(p=this.getCellsForAction(n.scroll));null!=n.viewbox&&this.fitWindow(n.viewbox,n.viewbox.border);0<p.length&&this.scrollCellToVisible(p[0]);if(null!=n.tags){p=[];null!=n.tags.hidden&&(p=p.concat(n.tags.hidden));if(null!=n.tags.visible)for(var u=this.getAllTags(),v=0;v<u.length;v++)0>mxUtils.indexOf(n.tags.visible,u[v])&&0>mxUtils.indexOf(p,u[v])&&p.push(u[v]);this.hiddenTags=p;this.refresh()}0<q.length&&
+(f++,this.executeAnimations(q,k,c?1:n.steps,c?0:n.delay));0==f?m():l()}else this.stoppingCustomActions=this.executingCustomActions=!1,l(),null!=d&&d()});m()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,d){var c=this.getLinkForCell(d);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(b,c));if(this.isHtmlLabel(d)){var f=document.createElement("div");f.innerHTML=this.sanitizeHtml(this.getLabel(d));for(var e=f.getElementsByTagName("a"),g=!1,l=0;l<
+e.length;l++)c=e[l].getAttribute("href"),null!=c&&"data:action/json,"==c.substring(0,17)&&(e[l].setAttribute("href",this.updateCustomLink(b,c)),g=!0);g&&this.labelChanged(d,f.innerHTML)}};Graph.prototype.updateCustomLink=function(b,d){if("data:action/json,"==d.substring(0,17))try{var c=JSON.parse(d.substring(17));null!=c.actions&&(this.updateCustomLinkActions(b,c.actions),d="data:action/json,"+JSON.stringify(c))}catch(W){}return d};Graph.prototype.updateCustomLinkActions=function(b,d){for(var c=0;c<
+d.length;c++){var f=d[c],e;for(e in f)this.updateCustomLinkAction(b,f[e],"cells"),this.updateCustomLinkAction(b,f[e],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(b,d,c){if(null!=d&&null!=d[c]){for(var f=[],e=0;e<d[c].length;e++)if("*"==d[c][e])f.push(d[c][e]);else{var g=b[d[c][e]];null!=g?""!=g&&f.push(g):f.push(d[c][e])}d[c]=f}};Graph.prototype.getCellsForAction=function(b,d){var c=this.getCellsById(b.cells).concat(this.getCellsForTags(b.tags,null,d));if(null!=b.excludeCells){for(var f=
+[],e=0;e<c.length;e++)0>b.excludeCells.indexOf(c[e].id)&&f.push(c[e]);c=f}return c};Graph.prototype.getCellsById=function(b){var d=[];if(null!=b)for(var c=0;c<b.length;c++)if("*"==b[c])var f=this.model.getRoot(),d=d.concat(this.model.filterDescendants(function(b){return b!=f},f));else{var e=this.model.getCell(b[c]);null!=e&&d.push(e)}return d};var M=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(b){return M.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(b))};
+Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var d=0;d<b.length;d++)if(0>mxUtils.indexOf(this.hiddenTags,b[d]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,d,c,f){var e=[];if(null!=b){d=null!=d?d:this.model.getDescendants(this.model.getRoot());for(var g=0,l={},k=0;k<b.length;k++)0<b[k].length&&(l[b[k]]=!0,g++);for(k=0;k<d.length;k++)if(c&&this.model.getParent(d[k])==
+this.model.root||this.model.isVertex(d[k])||this.model.isEdge(d[k])){var m=this.getTagsForCell(d[k]),n=!1;if(0<m.length&&(m=m.split(" "),m.length>=b.length)){for(var q=n=0;q<m.length&&n<g;q++)null!=l[m[q]]&&n++;n=n==g}n&&(1!=f||this.isCellVisible(d[k]))&&e.push(d[k])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var d=null,c=[],f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]),
+c=[];if(0<e.length){for(var e=e.split(" "),g={},l=0;l<e.length;l++)if(null==d||null!=d[e[l]])g[e[l]]=!0,c.push(e[l]);d=g}else return[]}return c};Graph.prototype.getTagsForCells=function(b){for(var d=[],c={},f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]);if(0<e.length)for(var e=e.split(" "),g=0;g<e.length;g++)null==c[e[g]]&&(c[e[g]]=!0,d.push(e[g]))}return d};Graph.prototype.getTagsForCell=function(b){return this.getAttributeForCell(b,"tags","")};Graph.prototype.addTagsForCells=function(b,d){if(0<
+b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){for(var f=this.getTagsForCell(b[c]),e=f.split(" "),g=!1,l=0;l<d.length;l++){var k=mxUtils.trim(d[l]);""!=k&&0>mxUtils.indexOf(e,k)&&(f=0<f.length?f+" "+k:k,g=!0)}g&&this.setAttributeForCell(b[c],"tags",f)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,d){if(0<b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var f=this.getTagsForCell(b[c]);if(0<f.length){for(var e=
+f.split(" "),g=!1,l=0;l<d.length;l++){var k=mxUtils.indexOf(e,d[l]);0<=k&&(e.splice(k,1),g=!0)}g&&this.setAttributeForCell(b[c],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var d=0;d<b.length;d++)this.model.setVisible(b[d],!this.model.isVisible(b[d]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,d){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],d)}finally{this.model.endUpdate()}};
+Graph.prototype.highlightCells=function(b,d,c,f){for(var e=0;e<b.length;e++)this.highlightCell(b[e],d,c,f)};Graph.prototype.highlightCell=function(b,d,c,f){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;b=this.view.getState(b);if(null!=b){var e=Math.max(5,mxUtils.getValue(b.style,mxConstants.STYLE_STROKEWIDTH,1)+4),g=new mxCellHighlight(this,d,e,!1);null!=f&&(g.opacity=f);g.highlight(b);window.setTimeout(function(){null!=g.shape&&(mxUtils.setPrefixedStyle(g.shape.node.style,"transition",
+"all 1200ms ease-in-out"),g.shape.node.style.opacity=0);window.setTimeout(function(){g.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(b,d,c){c=null!=c?c:!1;var f=b.ownerDocument,e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");e.setAttribute("id",this.shadowId);var g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");g.setAttribute("in","SourceAlpha");g.setAttribute("stdDeviation",
+this.svgShadowBlur);g.setAttribute("result","blur");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");g.setAttribute("in","blur");g.setAttribute("dx",this.svgShadowSize);g.setAttribute("dy",this.svgShadowSize);g.setAttribute("result","offsetBlur");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");g.setAttribute("flood-color",this.svgShadowColor);g.setAttribute("flood-opacity",
+this.svgShadowOpacity);g.setAttribute("result","offsetColor");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");g.setAttribute("in","offsetColor");g.setAttribute("in2","offsetBlur");g.setAttribute("operator","in");g.setAttribute("result","offsetBlur");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");g.setAttribute("in","SourceGraphic");g.setAttribute("in2",
+"offsetBlur");e.appendChild(g);g=b.getElementsByTagName("defs");0==g.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=b.firstChild?b.insertBefore(f,b.firstChild):b.appendChild(f)):f=g[0];f.appendChild(e);c||(d=null!=d?d:b.getElementsByTagName("g")[0],null!=d&&(d.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(b.getAttribute("width")))||(b.setAttribute("width",parseInt(b.getAttribute("width"))+6),b.setAttribute("height",parseInt(b.getAttribute("height"))+
6),d=b.getAttribute("viewBox"),null!=d&&0<d.length&&(d=d.split(" "),3<d.length&&(w=parseFloat(d[2])+6,h=parseFloat(d[3])+6,b.setAttribute("viewBox",d[0]+" "+d[1]+" "+w+" "+h))))));return e};Graph.prototype.setShadowVisible=function(b,d){mxClient.IS_SVG&&!mxClient.IS_SF&&(d=null!=d?d:!0,(this.shadowVisible=b)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),d&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
function(){if(null==this.defaultParent){var b=this.model.getChildCount(this.model.root),d,c=0;do d=this.model.getChildAt(this.model.root,c);while(c++<b&&"1"==mxUtils.getValue(this.getCellStyle(d),"locked","0"));null!=d&&this.setDefaultParent(d)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",
@@ -3288,308 +3299,299 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
"/mxBasic.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.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",
STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+
-"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(b){var d=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?d="mxgraph.er":"sysML"==b.substring(0,5)&&(d="mxgraph.sysml"));return d};var S=mxMarker.createMarker;mxMarker.createMarker=function(b,d,c,g,e,f,l,k,m,p){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&
-mxStencilRegistry.getStencil(q)}return S.apply(this,arguments)};PrintDialog.prototype.create=function(b,d){function c(){v.value=Math.max(1,Math.min(k,Math.max(parseInt(v.value),parseInt(n.value))));n.value=Math.max(1,Math.min(k,Math.min(parseInt(v.value),parseInt(n.value))))}function g(d){function c(d,c,f){var l=d.useCssTransforms,k=d.currentTranslate,m=d.currentScale,p=d.view.translate,q=d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,
-d.view.translate=new mxPoint(0,0),d.view.scale=1);var u=d.getGraphBounds(),n=0,v=0,x=R.get(),t=1/d.pageScale,C=B.checked;if(C)var t=parseInt(P.value),M=parseInt(N.value),t=Math.min(x.height*M/(u.height/d.view.scale),x.width*t/(u.width/d.view.scale));else t=parseInt(A.value)/(100*d.pageScale),isNaN(t)&&(g=1/d.pageScale,A.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*g);x.height=Math.ceil(x.height*g);t*=g;!C&&d.pageVisible?(u=d.getPageLayout(),n-=u.x*x.width,v-=u.y*x.height):
-C=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,n,v,C);c.pageSelector=!1;c.mathEnabled=!1;n=b.getCurrentFile();null!=n&&(c.title=n.getTitle());var y=c.writeHead;c.writeHead=function(c){y.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('<style type="text/css">'),c.writeln(Editor.mathJaxWebkitCss),c.writeln("</style>");mxClient.IS_GC&&(c.writeln('<style type="text/css">'),c.writeln("@media print {"),c.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),c.writeln("}"),
-c.writeln("</style>"));null!=b.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(b.editor.fontCss),c.writeln("</style>"));for(var g=d.getCustomFonts(),e=0;e<g.length;e++){var f=g[e].name,l=g[e].url;Graph.isCssFontUrl(l)?c.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(c.writeln('<style type="text/css">'),c.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(f)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),c.writeln("</style>"))}};
-if("undefined"!==typeof MathJax){var F=c.renderPage;c.renderPage=function(d,c,g,e,f,l){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var m=F.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}n=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(n=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
-e.refresh());c.open(null,null,f,!0);e.enableFlowAnimation=v;null!=n&&(e.stylesheet=n,e.refresh())}else{x=d.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=C;c.appendGraph(d,t,n,v,f,!0);f=d.getCustomFonts();if(null!=c.wnd)for(n=0;n<f.length;n++)v=f[n].name,C=f[n].url,Graph.isCssFontUrl(C)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(C)+'" charset="UTF-8" type="text/css">'):(c.wnd.document.writeln('<style type="text/css">'),
-c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(C)+'");\n}'),c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=k,d.currentScale=m,d.view.translate=p,d.view.scale=q);return c}var g=parseInt(H.value)/100;isNaN(g)&&(g=1,H.value="100 %");var g=.75*g,f=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(f=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=n.value,k=v.value,p=!q.checked,
-u=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,k,B.checked,P.value,N.value,parseInt(A.value)/100,parseInt(H.value)/100,R.get());else{p&&(p=l==m&&k==m);if(!p&&null!=b.pages&&b.pages.length){var x=0,p=b.pages.length-1;q.checked||(x=parseInt(l)-1,p=parseInt(k)-1);for(var t=x;t<=p;t++){var C=b.pages[t],l=C==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=!1,M=null,y=null;null==C.viewState&&null==C.root&&b.updatePageRoot(C);null!=C.viewState&&
-(k=C.viewState.pageVisible,x=C.viewState.mathEnabled,M=C.viewState.background,y=C.viewState.backgroundImage,l.extFonts=C.viewState.extFonts);l.background=M;l.backgroundImage=null!=y?new mxImage(y.src,y.width,y.height):null;l.pageVisible=k;l.mathEnabled=x;var F=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?C.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:F.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(C);l.model.setRoot(C.root)}u=
-c(l,u,t!=p);l!=e&&l.container.parentNode.removeChild(l.container)}}else u=c(e);null==u?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(u.mathEnabled&&(p=u.wnd.document,d&&(u.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),u.closeDocument(),!u.mathEnabled&&d&&PrintDialog.printPreview(u));null!=f&&(e.stylesheet=f,e.refresh())}}var e=b.editor.graph,f=document.createElement("div"),l=document.createElement("h3");
-l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,d||mxResources.get("print"));f.appendChild(l);var k=1,m=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");p.appendChild(q);l=document.createElement("span");
-mxUtils.write(l,mxResources.get("printAllPages"));p.appendChild(l);mxUtils.br(p);var u=q.cloneNode(!0);q.setAttribute("checked","checked");u.setAttribute("value","range");p.appendChild(u);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");p.appendChild(l);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.style.width="50px";p.appendChild(n);l=document.createElement("span");
-mxUtils.write(l,mxResources.get("to"));p.appendChild(l);var v=n.cloneNode(!0);p.appendChild(v);mxEvent.addListener(n,"focus",function(){u.checked=!0});mxEvent.addListener(v,"focus",function(){u.checked=!0});mxEvent.addListener(n,"change",c);mxEvent.addListener(v,"change",c);if(null!=b.pages&&(k=b.pages.length,null!=b.currentPage))for(l=0;l<b.pages.length;l++)if(b.currentPage==b.pages[l]){m=l+1;n.value=m;v.value=m;break}n.setAttribute("max",k);v.setAttribute("max",k);b.isPagesEnabled()?1<k&&(f.appendChild(p),
-u.checked=!0):u.checked=!0;var x=document.createElement("div");x.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");x.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));x.appendChild(l);var A=document.createElement("input");A.style.cssText="margin:0 8px 0 8px;";A.setAttribute("value","100 %");A.style.width="50px";x.appendChild(A);
-mxEvent.addListener(A,"focus",function(){t.checked=!0});f.appendChild(x);var p=p.cloneNode(!1),B=t.cloneNode(!0);B.setAttribute("value","fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(B);p.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var C=document.createElement("tbody"),M=document.createElement("tr"),F=M.cloneNode(!0),E=document.createElement("td"),
-D=E.cloneNode(!0),I=E.cloneNode(!0),S=E.cloneNode(!0),G=E.cloneNode(!0),K=E.cloneNode(!0);E.style.textAlign="right";S.style.textAlign="right";mxUtils.write(E,mxResources.get("fitTo"));var P=document.createElement("input");P.style.cssText="margin:0 8px 0 8px;";P.setAttribute("value","1");P.setAttribute("min","1");P.setAttribute("type","number");P.style.width="40px";D.appendChild(P);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));I.appendChild(l);mxUtils.write(S,
-mxResources.get("fitToBy"));var N=P.cloneNode(!0);G.appendChild(N);mxEvent.addListener(P,"focus",function(){B.checked=!0});mxEvent.addListener(N,"focus",function(){B.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));K.appendChild(l);M.appendChild(E);M.appendChild(D);M.appendChild(I);F.appendChild(S);F.appendChild(G);F.appendChild(K);C.appendChild(M);C.appendChild(F);x.appendChild(C);p.appendChild(x);f.appendChild(p);p=document.createElement("div");l=
-document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));p.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var R=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));p.appendChild(l);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";
-H.setAttribute("value","100 %");H.style.width="60px";p.appendChild(H);f.appendChild(p);l=document.createElement("div");l.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&l.appendChild(p);b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",l.appendChild(x));PrintDialog.previewEnabled&&(x=
-mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();g(!1)}),x.className="geBtn",l.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();g(!0)});x.className="geBtn gePrimaryBtn";l.appendChild(x);b.editor.cancelFirst||l.appendChild(p);f.appendChild(l);this.container=f};var R=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
-this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var b=this.image;null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&(b={originalSrc:b.src});this.page.viewState.backgroundImage=b}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)}}else R.apply(this,arguments),null!=this.mathEnabled&&
-this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var M=document.createElement("canvas"),P=new Image;P.onload=function(){try{M.getContext("2d").drawImage(P,0,0);var b=M.toDataURL("image/png");Editor.prototype.useCanvasForExport=
-null!=b&&6<b.length}catch(D){}};P.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(G){}})();
+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(b){var d=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?d="mxgraph.er":"sysML"==b.substring(0,5)&&(d="mxgraph.sysml"));return d};var P=mxMarker.createMarker;mxMarker.createMarker=function(b,d,c,f,e,g,l,k,m,n){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&
+mxStencilRegistry.getStencil(q)}return P.apply(this,arguments)};PrintDialog.prototype.create=function(b,d){function c(){v.value=Math.max(1,Math.min(k,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(k,Math.min(parseInt(v.value),parseInt(u.value))))}function f(d){function c(d,c,g){var l=d.useCssTransforms,k=d.currentTranslate,m=d.currentScale,n=d.view.translate,q=d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,
+d.view.translate=new mxPoint(0,0),d.view.scale=1);var p=d.getGraphBounds(),u=0,v=0,x=K.get(),t=1/d.pageScale,C=D.checked;if(C)var t=parseInt(M.value),N=parseInt(R.value),t=Math.min(x.height*N/(p.height/d.view.scale),x.width*t/(p.width/d.view.scale));else t=parseInt(y.value)/(100*d.pageScale),isNaN(t)&&(f=1/d.pageScale,y.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*f);x.height=Math.ceil(x.height*f);t*=f;!C&&d.pageVisible?(p=d.getPageLayout(),u-=p.x*x.width,v-=p.y*x.height):
+C=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,u,v,C);c.pageSelector=!1;c.mathEnabled=!1;u=b.getCurrentFile();null!=u&&(c.title=u.getTitle());var E=c.writeHead;c.writeHead=function(c){E.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('<style type="text/css">'),c.writeln(Editor.mathJaxWebkitCss),c.writeln("</style>");mxClient.IS_GC&&(c.writeln('<style type="text/css">'),c.writeln("@media print {"),c.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),c.writeln("}"),
+c.writeln("</style>"));null!=b.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(b.editor.fontCss),c.writeln("</style>"));for(var f=d.getCustomFonts(),e=0;e<f.length;e++){var g=f[e].name,l=f[e].url;Graph.isCssFontUrl(l)?c.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(c.writeln('<style type="text/css">'),c.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(g)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),c.writeln("</style>"))}};
+if("undefined"!==typeof MathJax){var B=c.renderPage;c.renderPage=function(d,c,f,e,g,l){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var m=B.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}u=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
+e.refresh());c.open(null,null,g,!0);e.enableFlowAnimation=v;null!=u&&(e.stylesheet=u,e.refresh())}else{x=d.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=C;c.appendGraph(d,t,u,v,g,!0);g=d.getCustomFonts();if(null!=c.wnd)for(u=0;u<g.length;u++)v=g[u].name,C=g[u].url,Graph.isCssFontUrl(C)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(C)+'" charset="UTF-8" type="text/css">'):(c.wnd.document.writeln('<style type="text/css">'),
+c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(C)+'");\n}'),c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=k,d.currentScale=m,d.view.translate=n,d.view.scale=q);return c}var f=parseInt(G.value)/100;isNaN(f)&&(f=1,G.value="100 %");var f=.75*f,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=u.value,k=v.value,n=!q.checked,
+p=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,k,D.checked,M.value,R.value,parseInt(y.value)/100,parseInt(G.value)/100,K.get());else{n&&(n=l==m&&k==m);if(!n&&null!=b.pages&&b.pages.length){var x=0,n=b.pages.length-1;q.checked||(x=parseInt(l)-1,n=parseInt(k)-1);for(var t=x;t<=n;t++){var C=b.pages[t],l=C==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=!1,N=null,E=null;null==C.viewState&&null==C.root&&b.updatePageRoot(C);null!=C.viewState&&
+(k=C.viewState.pageVisible,x=C.viewState.mathEnabled,N=C.viewState.background,E=C.viewState.backgroundImage,l.extFonts=C.viewState.extFonts);l.background=N;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=k;l.mathEnabled=x;var B=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?C.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:B.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(C);l.model.setRoot(C.root)}p=
+c(l,p,t!=n);l!=e&&l.container.parentNode.removeChild(l.container)}}else p=c(e);null==p?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(p.mathEnabled&&(n=p.wnd.document,d&&(p.wnd.IMMEDIATE_PRINT=!0),n.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),p.closeDocument(),!p.mathEnabled&&d&&PrintDialog.printPreview(p));null!=g&&(e.stylesheet=g,e.refresh())}}var e=b.editor.graph,g=document.createElement("div"),l=document.createElement("h3");
+l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,d||mxResources.get("print"));g.appendChild(l);var k=1,m=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");n.appendChild(q);l=document.createElement("span");
+mxUtils.write(l,mxResources.get("printAllPages"));n.appendChild(l);mxUtils.br(n);var p=q.cloneNode(!0);q.setAttribute("checked","checked");p.setAttribute("value","range");n.appendChild(p);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");n.appendChild(l);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";n.appendChild(u);l=document.createElement("span");
+mxUtils.write(l,mxResources.get("to"));n.appendChild(l);var v=u.cloneNode(!0);n.appendChild(v);mxEvent.addListener(u,"focus",function(){p.checked=!0});mxEvent.addListener(v,"focus",function(){p.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(v,"change",c);if(null!=b.pages&&(k=b.pages.length,null!=b.currentPage))for(l=0;l<b.pages.length;l++)if(b.currentPage==b.pages[l]){m=l+1;u.value=m;v.value=m;break}u.setAttribute("max",k);v.setAttribute("max",k);b.isPagesEnabled()?1<k&&(g.appendChild(n),
+p.checked=!0):p.checked=!0;var x=document.createElement("div");x.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");x.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));x.appendChild(l);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(){t.checked=!0});g.appendChild(x);var n=n.cloneNode(!1),D=t.cloneNode(!0);D.setAttribute("value","fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(D);n.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var C=document.createElement("tbody"),N=document.createElement("tr"),E=N.cloneNode(!0),B=document.createElement("td"),
+H=B.cloneNode(!0),P=B.cloneNode(!0),J=B.cloneNode(!0),S=B.cloneNode(!0),F=B.cloneNode(!0);B.style.textAlign="right";J.style.textAlign="right";mxUtils.write(B,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";H.appendChild(M);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));P.appendChild(l);mxUtils.write(J,
+mxResources.get("fitToBy"));var R=M.cloneNode(!0);S.appendChild(R);mxEvent.addListener(M,"focus",function(){D.checked=!0});mxEvent.addListener(R,"focus",function(){D.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));F.appendChild(l);N.appendChild(B);N.appendChild(H);N.appendChild(P);E.appendChild(J);E.appendChild(S);E.appendChild(F);C.appendChild(N);C.appendChild(E);x.appendChild(C);n.appendChild(x);g.appendChild(n);n=document.createElement("div");l=
+document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));n.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var K=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));n.appendChild(l);var G=document.createElement("input");G.style.cssText="margin:0 8px 0 8px;";
+G.setAttribute("value","100 %");G.style.width="60px";n.appendChild(G);g.appendChild(n);l=document.createElement("div");l.style.cssText="text-align:right;margin:48px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst&&l.appendChild(n);b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",l.appendChild(x));PrintDialog.previewEnabled&&(x=
+mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)}),x.className="geBtn",l.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});x.className="geBtn gePrimaryBtn";l.appendChild(x);b.editor.cancelFirst||l.appendChild(n);g.appendChild(l);this.container=g};var S=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
+this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var b=this.image;null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&(b={originalSrc:b.src});this.page.viewState.backgroundImage=b}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)}}else S.apply(this,arguments),null!=this.mathEnabled&&
+this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var N=document.createElement("canvas"),R=new Image;R.onload=function(){try{N.getContext("2d").drawImage(R,0,0);var b=N.toDataURL("image/png");Editor.prototype.useCanvasForExport=
+null!=b&&6<b.length}catch(B){}};R.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(F){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){k.previousColor=k.color;k.previousImage=k.image;k.previousFormat=k.format;null!=k.foldingEnabled&&(k.foldingEnabled=!k.foldingEnabled);null!=k.mathEnabled&&(k.mathEnabled=!k.mathEnabled);null!=k.shadowVisible&&(k.shadowVisible=!k.shadowVisible);return k};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.1.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.1.4";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=
!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,
-noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,e,f,k,m,n){m=null!=m?m:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
-"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(b!=EditorUi.lastErrorMessage&&(null==b||null==c||-1==b.indexOf("Script error")&&-1==b.indexOf("extension"))&&null!=b&&0>b.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=b;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";k=null!=k?k:Error(b);(new Image).src=d+"/log?severity="+m+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
-encodeURIComponent(e)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(B){}try{n||null==window.console||console.error(m,b,c,e,f,k)}catch(B){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
+noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,e,g,k,n,p){n=null!=n?n:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
+"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(b!=EditorUi.lastErrorMessage&&(null==b||null==c||-1==b.indexOf("Script error")&&-1==b.indexOf("extension"))&&null!=b&&0>b.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=b;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";k=null!=k?k:Error(b);(new Image).src=d+"/log?severity="+n+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
+encodeURIComponent(e)+(null!=g?":colno:"+encodeURIComponent(g):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(y){}try{p||null==window.console||console.error(n,b,c,e,g,k)}catch(y){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
"")}catch(l){}};EditorUi.sendReport=function(b,c){if("1"==urlParams.dev)EditorUi.debug("sendReport",b);else if(EditorUi.enableLogging)try{c=null!=c?c:5E4,b.length>c&&(b=b.substring(0,c)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(b))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var b=[(new Date).toISOString()],c=0;c<arguments.length;c++)null!=
-arguments[c]&&b.push(arguments[c]);console.log.apply(console,b)}}catch(l){}};EditorUi.parsePng=function(b,c,e){function d(b,d){var c=f;f+=d;return b.substring(c,f)}function g(b){b=d(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var f=0;if(d(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(d(b,4),"IHDR"!=d(b,4))null!=e&&e();else{d(b,17);do{e=g(b);var l=d(b,4);if(null!=c&&c(f-8,l,e))break;value=d(b,e);d(b,4);if("IEND"==
+arguments[c]&&b.push(arguments[c]);console.log.apply(console,b)}}catch(l){}};EditorUi.parsePng=function(b,c,e){function d(b,d){var c=g;g+=d;return b.substring(c,g)}function f(b){b=d(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var g=0;if(d(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(d(b,4),"IHDR"!=d(b,4))null!=e&&e();else{d(b,17);do{e=f(b);var l=d(b,4);if(null!=c&&c(g-8,l,e))break;value=d(b,e);d(b,4);if("IEND"==
l)break}while(e)}};EditorUi.removeChildNodes=function(b){for(;null!=b.firstChild;)b.removeChild(b.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var b=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!b.getContext||!b.getContext("2d"))}catch(p){}try{var c=document.createElement("canvas"),e=new Image;e.onload=function(){try{c.getContext("2d").drawImage(e,0,0);var b=c.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=b&&6<b.length}catch(m){}};e.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{c=
-document.createElement("canvas");c.width=c.height=1;var f=c.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==f.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(b,c,e){return this.editor.graph.openLink(b,c,e)};EditorUi.prototype.showSplash=function(b){};EditorUi.prototype.getLocalData=function(b,c){c(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,c,e){localStorage.setItem(b,c);null!=e&&e()};EditorUi.prototype.removeLocalData=function(b,c){localStorage.removeItem(b);
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var b=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!b.getContext||!b.getContext("2d"))}catch(q){}try{var c=document.createElement("canvas"),e=new Image;e.onload=function(){try{c.getContext("2d").drawImage(e,0,0);var b=c.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=b&&6<b.length}catch(n){}};e.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}try{c=
+document.createElement("canvas");c.width=c.height=1;var g=c.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==g.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(b,c,e){return this.editor.graph.openLink(b,c,e)};EditorUi.prototype.showSplash=function(b){};EditorUi.prototype.getLocalData=function(b,c){c(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,c,e){localStorage.setItem(b,c);null!=e&&e()};EditorUi.prototype.removeLocalData=function(b,c){localStorage.removeItem(b);
c()};EditorUi.prototype.setMathEnabled=function(b){this.editor.graph.mathEnabled=b;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(b){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(b){return this.isOfflineApp()||!navigator.onLine||!b&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};
-EditorUi.prototype.createSpinner=function(b,c,e){var d=null==b||null==c;e=null!=e?e:24;var g=new Spinner({lines:12,length:e,width:Math.round(e/3),radius:Math.round(e/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=g.spin;g.spin=function(e,l){var k=!1;this.active||(f.call(this,e),this.active=!0,null!=l&&(d&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),k=document.createElement("div"),
-k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,b)+"px",k.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(k.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&&(l+="..."),k.innerHTML=l,e.appendChild(k),g.status=k),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(e,l)}));this.stop();return b}),k=!0);return k};var l=g.stop;g.stop=function(){l.call(this);this.active=!1;null!=g.status&&null!=g.status.parentNode&&g.status.parentNode.removeChild(g.status);g.status=null};g.pause=function(){return function(){}};
-return g};EditorUi.prototype.isCompatibleString=function(b){try{var d=mxUtils.parseXml(b),c=this.editor.extractGraphModel(d.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&
+EditorUi.prototype.createSpinner=function(b,c,e){var d=null==b||null==c;e=null!=e?e:24;var f=new Spinner({lines:12,length:e,width:Math.round(e/3),radius:Math.round(e/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=f.spin;f.spin=function(e,l){var k=!1;this.active||(g.call(this,e),this.active=!0,null!=l&&(d&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),k=document.createElement("div"),
+k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily=Editor.defaultHtmlFont,k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,b)+"px",k.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(k.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&&(l+="..."),k.innerHTML=l,e.appendChild(k),f.status=k),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(e,l)}));this.stop();return b}),k=!0);return k};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=f.status&&null!=f.status.parentNode&&f.status.parentNode.removeChild(f.status);f.status=null};f.pause=function(){return function(){}};
+return f};EditorUi.prototype.isCompatibleString=function(b){try{var d=mxUtils.parseXml(b),c=this.editor.extractGraphModel(d.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&
3==b.charCodeAt(2)&&4==b.charCodeAt(3)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&3==b.charCodeAt(2)&&6==b.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||60==b.charCodeAt(0)&&63==b.charCodeAt(1)&&120==b.charCodeAt(2)&&109==b.charCodeAt(3)&&108==b.charCodeAt(3))};EditorUi.prototype.isPngData=
-function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var c=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var e=c.getFunction,f=this.editor.graph,k=this;c.getFunction=function(b){if(f.isSelectionEmpty()&&null!=k.pages&&0<k.pages.length){var d=
+function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var c=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var e=c.getFunction,g=this.editor.graph,k=this;c.getFunction=function(b){if(g.isSelectionEmpty()&&null!=k.pages&&0<k.pages.length){var d=
k.getSelectedPageIndex();if(mxEvent.isShiftDown(b)){if(37==b.keyCode)return function(){0<d&&k.movePage(d,d-1)};if(38==b.keyCode)return function(){0<d&&k.movePage(d,0)};if(39==b.keyCode)return function(){d<k.pages.length-1&&k.movePage(d,d+1)};if(40==b.keyCode)return function(){d<k.pages.length-1&&k.movePage(d,k.pages.length-1)}}else if(mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)){if(37==b.keyCode)return function(){0<d&&k.selectNextPage(!1)};if(38==b.keyCode)return function(){0<
-d&&k.selectPage(k.pages[0])};if(39==b.keyCode)return function(){d<k.pages.length-1&&k.selectNextPage(!0)};if(40==b.keyCode)return function(){d<k.pages.length-1&&k.selectPage(k.pages[k.pages.length-1])}}}return e.apply(this,arguments)}}return c};var c=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=c.apply(this,arguments);if(null==d)try{var e=b.indexOf("&lt;mxfile ");if(0<=e){var f=b.lastIndexOf("&lt;/mxfile&gt;");f>e&&(d=b.substring(e,f+
-15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var k=mxUtils.parseXml(b),m=this.editor.extractGraphModel(k.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),d=null!=m?mxUtils.getXml(m):""}catch(v){}return d};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var d=b.indexOf('<meta charset="utf-8">');0<=d&&(b=b.slice(0,d)+'<meta charset="utf-8"/>'+b.slice(d+23-1,b.length));b=Graph.zapGremlins(b)}return b};
-EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b){d=this.editor.graph;d.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,e=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var f=e.length-
-1;0<=f;f--){var k=this.updatePageRoot(new DiagramPage(e[f]));null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[f+1]));d.model.execute(new ChangePage(this,k,0==f?k:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
-this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)d.model.execute(new ChangePage(this,c[f],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,f,k,m,n,u,t,x,E){c=null!=c?c:this.editor.graph;k=null!=k?k:!1;t=null!=t?t:!0;var d,g=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":g=d=f;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(E){var p=
-b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(b)}else{p=Graph.zapGremlins(mxUtils.getXml(b));l=Graph.compress(p);if(Graph.decompress(l)!=p)return p;p=b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,l)}l=b.ownerDocument.createElement("mxfile");l.appendChild(p)}x?(l=l.cloneNode(!0),l.removeAttribute("modified"),l.removeAttribute("host"),l.removeAttribute("agent"),l.removeAttribute("etag"),l.removeAttribute("userAgent"),
+d&&k.selectPage(k.pages[0])};if(39==b.keyCode)return function(){d<k.pages.length-1&&k.selectNextPage(!0)};if(40==b.keyCode)return function(){d<k.pages.length-1&&k.selectPage(k.pages[k.pages.length-1])}}}return e.apply(this,arguments)}}return c};var c=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=c.apply(this,arguments);if(null==d)try{var e=b.indexOf("&lt;mxfile ");if(0<=e){var g=b.lastIndexOf("&lt;/mxfile&gt;");g>e&&(d=b.substring(e,g+
+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var k=mxUtils.parseXml(b),n=this.editor.extractGraphModel(k.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),d=null!=n?mxUtils.getXml(n):""}catch(v){}return d};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var d=b.indexOf('<meta charset="utf-8">');0<=d&&(b=b.slice(0,d)+'<meta charset="utf-8"/>'+b.slice(d+23-1,b.length));b=Graph.zapGremlins(b)}return b};
+EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b){d=this.editor.graph;d.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,e=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var g=e.length-
+1;0<=g;g--){var k=this.updatePageRoot(new DiagramPage(e[g]));null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[g+1]));d.model.execute(new ChangePage(this,k,0==g?k:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
+this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)d.model.execute(new ChangePage(this,c[g],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,g,k,n,p,u,t,x,H){c=null!=c?c:this.editor.graph;k=null!=k?k:!1;t=null!=t?t:!0;var d,f=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":f=d=g;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(H){var m=
+b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());m.appendChild(b)}else{m=Graph.zapGremlins(mxUtils.getXml(b));l=Graph.compress(m);if(Graph.decompress(l)!=m)return m;m=b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());mxUtils.setTextContent(m,l)}l=b.ownerDocument.createElement("mxfile");l.appendChild(m)}x?(l=l.cloneNode(!0),l.removeAttribute("modified"),l.removeAttribute("host"),l.removeAttribute("agent"),l.removeAttribute("etag"),l.removeAttribute("userAgent"),
l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("type")):(l.removeAttribute("userAgent"),l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("pages"),l.removeAttribute("type"),mxClient.IS_CHROMEAPP?l.setAttribute("host","Chrome"):EditorUi.isElectronApp?l.setAttribute("host","Electron"):l.setAttribute("host",window.location.hostname),l.setAttribute("modified",(new Date).toISOString()),l.setAttribute("agent",navigator.appVersion),l.setAttribute("version",
-EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));E=E?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!m&&!k&&(n||null!=e&&/(\.html)$/i.test(e.getTitle())))E=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,g);else if(m||!k&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
-App.MODE_BROWSER||(f=null),E=this.getEmbeddedSvg(E,c,f,null,u,t,g);return E};EditorUi.prototype.getXmlFileData=function(b,c,e,f){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,f);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
-null==c||e?b=b.cloneNode(!0):(b=b.cloneNode(!1),mxUtils.setTextContent(b,Graph.compressNode(c)));d.appendChild(b)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),c)b(this.currentPage.node);else for(c=0;c<this.pages.length;c++){var g=this.pages[c],l=g.node;if(g!=this.currentPage)if(g.needsUpdate){var k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(g.root));this.editor.graph.saveViewState(g.viewState,
-k,null,f);EditorUi.removeChildNodes(l);mxUtils.setTextContent(l,Graph.compressNode(k));delete g.needsUpdate}else f&&(this.updatePageRoot(g),null!=g.viewState.backgroundImage&&(null!=g.viewState.backgroundImage.originalSrc?g.viewState.backgroundImage=this.createImageForPageLink(g.viewState.backgroundImage.originalSrc,g):Graph.isPageLink(g.viewState.backgroundImage.src)&&(g.viewState.backgroundImage=this.createImageForPageLink(g.viewState.backgroundImage.src,g))),null!=g.viewState.backgroundImage&&
-null!=g.viewState.backgroundImage.originalSrc&&(k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(g.root)),this.editor.graph.saveViewState(g.viewState,k,null,f),l=l.cloneNode(!1),mxUtils.setTextContent(l,Graph.compressNode(k))));b(l)}return d};EditorUi.prototype.anonymizeString=function(b,c){for(var d=[],g=0;g<b.length;g++){var e=b.charAt(g);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?d.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?d.push(String.fromCharCode(65+Math.round(25*
+EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));H=H?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!n&&!k&&(p||null!=e&&/(\.html)$/i.test(e.getTitle())))H=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(n||!k&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
+App.MODE_BROWSER||(g=null),H=this.getEmbeddedSvg(H,c,g,null,u,t,f);return H};EditorUi.prototype.getXmlFileData=function(b,c,e,g){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,g);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
+null==c||e?b=b.cloneNode(!0):(b=b.cloneNode(!1),mxUtils.setTextContent(b,Graph.compressNode(c)));d.appendChild(b)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),c)b(this.currentPage.node);else for(c=0;c<this.pages.length;c++){var f=this.pages[c],l=f.node;if(f!=this.currentPage)if(f.needsUpdate){var k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root));this.editor.graph.saveViewState(f.viewState,
+k,null,g);EditorUi.removeChildNodes(l);mxUtils.setTextContent(l,Graph.compressNode(k));delete f.needsUpdate}else g&&(this.updatePageRoot(f),null!=f.viewState.backgroundImage&&(null!=f.viewState.backgroundImage.originalSrc?f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.originalSrc,f):Graph.isPageLink(f.viewState.backgroundImage.src)&&(f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.src,f))),null!=f.viewState.backgroundImage&&
+null!=f.viewState.backgroundImage.originalSrc&&(k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root)),this.editor.graph.saveViewState(f.viewState,k,null,g),l=l.cloneNode(!1),mxUtils.setTextContent(l,Graph.compressNode(k))));b(l)}return d};EditorUi.prototype.anonymizeString=function(b,c){for(var d=[],f=0;f<b.length;f++){var e=b.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?d.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?d.push(String.fromCharCode(65+Math.round(25*
Math.random()))):e.toUpperCase()!=e?d.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(e)?d.push(" "):d.push("?"):d.push(c?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(b){if(null!=b[EditorUi.DIFF_INSERT])for(var d=0;d<b[EditorUi.DIFF_INSERT].length;d++)try{var c=mxUtils.parseXml(b[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=c.getAttribute("name")&&c.setAttribute("name",this.anonymizeString(c.getAttribute("name")));
-b[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(c)}catch(m){b[EditorUi.DIFF_INSERT][d].data=m.message}if(null!=b[EditorUi.DIFF_UPDATE]){for(var e in b[EditorUi.DIFF_UPDATE]){var f=b[EditorUi.DIFF_UPDATE][e];null!=f.name&&(f.name=this.anonymizeString(f.name));null!=f.cells&&(d=mxUtils.bind(this,function(b){var d=f.cells[b];if(null!=d){for(var c in d)null!=d[c].value&&(d[c].value="["+d[c].value.length+"]"),null!=d[c].xmlValue&&(d[c].xmlValue="["+d[c].xmlValue.length+"]"),null!=d[c].style&&(d[c].style=
-"["+d[c].style.length+"]"),0==Object.keys(d[c]).length&&delete d[c];0==Object.keys(d).length&&delete f.cells[b]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete b[EditorUi.DIFF_UPDATE][e]}0==Object.keys(b[EditorUi.DIFF_UPDATE]).length&&delete b[EditorUi.DIFF_UPDATE]}return b};EditorUi.prototype.anonymizeAttributes=function(b,c){if(null!=b.attributes)for(var d=0;d<b.attributes.length;d++)"as"!=b.attributes[d].name&&
-b.setAttribute(b.attributes[d].name,this.anonymizeString(b.attributes[d].value,c));if(null!=b.childNodes)for(d=0;d<b.childNodes.length;d++)this.anonymizeAttributes(b.childNodes[d],c)};EditorUi.prototype.anonymizeNode=function(b,c){for(var d=b.getElementsByTagName("mxCell"),g=0;g<d.length;g++)null!=d[g].getAttribute("value")&&d[g].setAttribute("value","["+d[g].getAttribute("value").length+"]"),null!=d[g].getAttribute("xmlValue")&&d[g].setAttribute("xmlValue","["+d[g].getAttribute("xmlValue").length+
-"]"),null!=d[g].getAttribute("style")&&d[g].setAttribute("style","["+d[g].getAttribute("style").length+"]"),null!=d[g].parentNode&&"root"!=d[g].parentNode.nodeName&&null!=d[g].parentNode.parentNode&&(d[g].setAttribute("id",d[g].parentNode.getAttribute("id")),d[g].parentNode.parentNode.replaceChild(d[g],d[g].parentNode));return b};EditorUi.prototype.synchronizeCurrentFile=function(b){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!b&&d.invalidChecksum?
-d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),b?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,e,f,k,m,n,
-u,t,x,E){k=null!=k?k:!0;m=null!=m?m:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var g=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(g||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),p=this.pages[0];d.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(p.root)}}n=null!=n?n:this.getXmlFileData(k,
-m,x,E);t=null!=t?t:this.getCurrentFile();b=this.createFileData(n,d,t,window.location.href,b,c,e,f,k,u,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,f,k,m){m=null!=m?m:!0;var d=null,g=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=m?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;m=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==k&&
-(c=this.getBasenames().join(";"),0<c.length&&(g=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",m);b.setAttribute("y0",l)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit","0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=f&&b.setAttribute("edit",f));null!=k&&(k=k.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";f=Graph.compress(b);Graph.decompress(f)!=b&&(f=encodeURIComponent(b));return(null==
+b[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(c)}catch(n){b[EditorUi.DIFF_INSERT][d].data=n.message}if(null!=b[EditorUi.DIFF_UPDATE]){for(var e in b[EditorUi.DIFF_UPDATE]){var g=b[EditorUi.DIFF_UPDATE][e];null!=g.name&&(g.name=this.anonymizeString(g.name));null!=g.cells&&(d=mxUtils.bind(this,function(b){var d=g.cells[b];if(null!=d){for(var c in d)null!=d[c].value&&(d[c].value="["+d[c].value.length+"]"),null!=d[c].xmlValue&&(d[c].xmlValue="["+d[c].xmlValue.length+"]"),null!=d[c].style&&(d[c].style=
+"["+d[c].style.length+"]"),0==Object.keys(d[c]).length&&delete d[c];0==Object.keys(d).length&&delete g.cells[b]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),0==Object.keys(g.cells).length&&delete g.cells);0==Object.keys(g).length&&delete b[EditorUi.DIFF_UPDATE][e]}0==Object.keys(b[EditorUi.DIFF_UPDATE]).length&&delete b[EditorUi.DIFF_UPDATE]}return b};EditorUi.prototype.anonymizeAttributes=function(b,c){if(null!=b.attributes)for(var d=0;d<b.attributes.length;d++)"as"!=b.attributes[d].name&&
+b.setAttribute(b.attributes[d].name,this.anonymizeString(b.attributes[d].value,c));if(null!=b.childNodes)for(d=0;d<b.childNodes.length;d++)this.anonymizeAttributes(b.childNodes[d],c)};EditorUi.prototype.anonymizeNode=function(b,c){for(var d=b.getElementsByTagName("mxCell"),f=0;f<d.length;f++)null!=d[f].getAttribute("value")&&d[f].setAttribute("value","["+d[f].getAttribute("value").length+"]"),null!=d[f].getAttribute("xmlValue")&&d[f].setAttribute("xmlValue","["+d[f].getAttribute("xmlValue").length+
+"]"),null!=d[f].getAttribute("style")&&d[f].setAttribute("style","["+d[f].getAttribute("style").length+"]"),null!=d[f].parentNode&&"root"!=d[f].parentNode.nodeName&&null!=d[f].parentNode.parentNode&&(d[f].setAttribute("id",d[f].parentNode.getAttribute("id")),d[f].parentNode.parentNode.replaceChild(d[f],d[f].parentNode));return b};EditorUi.prototype.synchronizeCurrentFile=function(b){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!b&&d.invalidChecksum?
+d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),b?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,e,g,k,n,p,
+u,t,x,H){k=null!=k?k:!0;n=null!=n?n:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var f=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),m=this.pages[0];d.getGlobalVariable=function(b){return"page"==b?m.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(m.root)}}p=null!=p?p:this.getXmlFileData(k,
+n,x,H);t=null!=t?t:this.getCurrentFile();b=this.createFileData(p,d,t,window.location.href,b,c,e,g,k,u,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,k,n){n=null!=n?n:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=n?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;n=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==k&&
+(c=this.getBasenames().join(";"),0<c.length&&(f=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",n);b.setAttribute("y0",l)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit","0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=g&&b.setAttribute("edit",g));null!=k&&(k=k.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";g=Graph.compress(b);Graph.decompress(g)!=b&&(g=encodeURIComponent(b));return(null==
k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=e?"<title>"+mxUtils.htmlEntities(e)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+"</head>\n<body"+(null==k&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
-f+"</div>\n</div>\n"+(null==k?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,e,f,k){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=k&&(k=k.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
+g+"</div>\n</div>\n"+(null==k?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,e,g,k){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=k&&(k=k.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
resize:!0,xml:Graph.zapGremlins(b),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=e?"<title>"+mxUtils.htmlEntities(e)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+
k+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(b))+'"></div>\n'+(null==k?'<script type="text/javascript" src="'+c+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
function(b){b=this.validateFileData(b);this.pages=this.fileNode=this.currentPage=null;b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var d=Editor.extractParserError(b,mxResources.get("invalidOrMissingFile"));if(d)throw Error(mxResources.get("notADiagramFile")+" ("+d+")");d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b&&"mxfile"==b.nodeName&&(d=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){var c=
null;this.fileNode=b;this.pages=[];for(var e=0;e<d.length;e++)null==d[e].getAttribute("id")&&d[e].setAttribute("id",e),b=new DiagramPage(d[e]),null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[e+1])),this.pages.push(b),null!=urlParams["page-id"]&&b.getId()==urlParams["page-id"]&&(c=b);this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),
-this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var f=urlParams["layer-ids"].split(" ");b={};for(e=0;e<f.length;e++)b[f[e]]=!0;for(var k=this.editor.graph.getModel(),n=k.getChildren(k.root),e=0;e<n.length;e++){var u=n[e];k.setVisible(u,b[u.id]||
-!1)}}catch(B){}};EditorUi.prototype.getBaseFilename=function(b){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+
-this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(b,c,e,f,k,m,n,u,t,x,E,A){try{f=null!=f?f:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!k),g=d+("xml"==b||"pdf"==b&&E?".drawio":"")+"."+b;if("xml"==b){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,f,k,null,null,null,c);this.saveData(g,b,l,"text/xml")}else if("html"==b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(g,b,l,"text/html");else if("svg"!=
-b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?g=d+".png":"jpeg"==b&&(g=d+".jpg"),this.saveRequest(g,b,mxUtils.bind(this,function(d,c){try{var g=this.editor.graph.pageVisible;null!=m&&(this.editor.graph.pageVisible=m);var e=this.createDownloadRequest(d,b,f,c,n,k,u,t,x,E,A);this.editor.graph.pageVisible=g;return e}catch(G){this.handleError(G)}}));else{var p=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",b,"image/svg+xml"):
-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==b){var v=this.editor.graph.background;if(n||v==mxConstants.NONE)v=null;var B=this.editor.graph.getSvg(v,null,null,null,null,f);e&&this.editor.graph.addSvgShadow(B);this.editor.convertImages(B,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q('<?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))})))}else g=d+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),f)}}catch(S){this.handleError(S)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,f,k,m,n,u,t,x,E){var d=this.editor.graph,g=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==m?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",p="";if(g.width*g.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==
-c&&(null!=E?p="&from="+E.from+"&to="+E.to:0==m&&(p="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&null!=this.currentPage))for(m=0;m<this.pages.length;m++)if(this.pages[m]==this.currentPage){l="&from="+m;break}m=d.background;"png"!=c&&"pdf"!=c||!k?k||null!=m&&m!=mxConstants.NONE||(m="#ffffff"):m=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);
-return new mxXmlRequest(EXPORT_URL,"format="+c+l+p+"&bg="+(null!=m?m:mxConstants.NONE)+"&base64="+f+"&embedXml="+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+(null!=n?"&scale="+n:"")+(null!=u?"&border="+u:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,e){var d=window.location.hash,g=mxUtils.bind(this,function(g){var e=null!=b.data?b.data:"";null!=g&&0<g.length&&
-(0<e.length&&(e+="\n"),e+=g);g=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);g.getHash=function(){return d};this.fileLoaded(g);"csv"==b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var f=null!=b.interval?parseInt(b.interval):6E4,l=null,k=mxUtils.bind(this,function(){var d=this.currentPage;
-mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){d===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),m()):this.handleError({message:mxResources.get("error")+" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),m=mxUtils.bind(this,function(){window.clearTimeout(l);l=window.setTimeout(k,f)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();
-k()}));m();k()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){g(b)}),mxUtils.bind(this,function(b){null!=e&&e(b)})):g("")};EditorUi.prototype.updateDiagram=function(b){function d(b){var d=new mxCellOverlay(b.image||f.warningImage,b.tooltip,b.align,b.valign,b.offset);d.addListener(mxEvent.CLICK,function(d,c){e.alert(b.tooltip)});return d}var c=null,e=this;if(null!=b&&0<b.length&&(c=mxUtils.parseXml(b),b=null!=c?c.documentElement:null,null!=b&&"updates"==
-b.nodeName)){var f=this.editor.graph,k=f.getModel();k.beginUpdate();var n=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var u=k.getCell(b.getAttribute("id"));if(null!=u){try{var t=b.getAttribute("value");if(null!=t){var x=mxUtils.parseXml(t).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(u,x);else for(var E=x.attributes,A=0;A<E.length;A++)f.setAttributeForCell(u,E[A].nodeName,0<E[A].nodeValue.length?E[A].nodeValue:null)}}catch(S){null!=window.console&&
-console.log("Error in value for "+u.id+": "+S)}try{var F=b.getAttribute("style");null!=F&&f.model.setStyle(u,F)}catch(S){null!=window.console&&console.log("Error in style for "+u.id+": "+S)}try{var I=b.getAttribute("icon");if(null!=I){var L=0<I.length?JSON.parse(I):null;null!=L&&L.append||f.removeCellOverlays(u);null!=L&&f.addCellOverlay(u,d(L))}}catch(S){null!=window.console&&console.log("Error in icon for "+u.id+": "+S)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),K=f.getCellGeometry(u);
-if(null!=K){K=K.clone();for(key in H){var C=parseFloat(H[key]);"dx"==key?K.x+=C:"dy"==key?K.y+=C:"dw"==key?K.width+=C:"dh"==key?K.height+=C:K[key]=parseFloat(H[key])}f.model.setGeometry(u,K)}}}catch(S){null!=window.console&&console.log("Error in icon for "+u.id+": "+S)}}}else if("model"==b.nodeName){for(var N=b.firstChild;null!=N&&N.nodeType!=mxConstants.NODETYPE_ELEMENT;)N=N.nextSibling;null!=N&&(new mxCodec(b.firstChild)).decode(N,k)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(f.view.scale=
-parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(n=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):1);b=b.nextSibling}}finally{k.endUpdate()}null!=n&&this.chromelessResize&&this.chromelessResize(!0,n)}return c};EditorUi.prototype.getCopyFilename=function(b,c){var d=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,
-g="",e=d.lastIndexOf(".");0<=e&&(g=d.substring(e),d=d.substring(0,e));if(c)var f=new Date,e=f.getFullYear(),k=f.getMonth()+1,n=f.getDate(),t=f.getHours(),x=f.getMinutes(),f=f.getSeconds(),d=d+(" "+(e+"-"+k+"-"+n+"-"+t+"-"+x+"-"+f));return d=mxResources.get("copyOf",[d])+g};EditorUi.prototype.fileLoaded=function(b,c){var d=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var e=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),
-d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var g=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!c&&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.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var g=urlParams["layer-ids"].split(" ");b={};for(e=0;e<g.length;e++)b[g[e]]=!0;for(var k=this.editor.graph.getModel(),p=k.getChildren(k.root),e=0;e<p.length;e++){var u=p[e];k.setVisible(u,b[u.id]||
+!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(b){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+
+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(b,c,e,g,k,n,p,u,t,x,H,D){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&H?".drawio":"")+"."+b;if("xml"==b){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,g,k,null,null,null,c);this.saveData(f,b,l,"text/xml")}else if("html"==b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,b,l,"text/html");else if("svg"!=
+b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?f=d+".png":"jpeg"==b&&(f=d+".jpg"),this.saveRequest(f,b,mxUtils.bind(this,function(d,c){try{var f=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var e=this.createDownloadRequest(d,b,g,c,p,k,u,t,x,H,D);this.editor.graph.pageVisible=f;return e}catch(F){this.handleError(F)}}));else{var m=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",b,"image/svg+xml"):
+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==b){var v=this.editor.graph.background;if(p||v==mxConstants.NONE)v=null;var y=this.editor.graph.getSvg(v,null,null,null,null,g);e&&this.editor.graph.addSvgShadow(y);this.editor.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q('<?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))})))}else f=d+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),g)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,n,p,u,t,x,H){var d=this.editor.graph,f=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==n?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",m="";if(f.width*f.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==
+c&&(null!=H?m="&from="+H.from+"&to="+H.to:0==n&&(m="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&null!=this.currentPage))for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){l="&from="+n;break}n=d.background;"png"!=c&&"pdf"!=c||!k?k||null!=n&&n!=mxConstants.NONE||(n="#ffffff"):n=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);
+return new mxXmlRequest(EXPORT_URL,"format="+c+l+m+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+g+"&embedXml="+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+(null!=p?"&scale="+p:"")+(null!=u?"&border="+u:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,e){var d=window.location.hash,f=mxUtils.bind(this,function(f){var e=null!=b.data?b.data:"";null!=f&&0<f.length&&
+(0<e.length&&(e+="\n"),e+=f);f=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return d};this.fileLoaded(f);"csv"==b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var g=null!=b.interval?parseInt(b.interval):6E4,l=null,k=mxUtils.bind(this,function(){var d=this.currentPage;
+mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){d===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),m()):this.handleError({message:mxResources.get("error")+" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),m=mxUtils.bind(this,function(){window.clearTimeout(l);l=window.setTimeout(k,g)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();
+k()}));m();k()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){f(b)}),mxUtils.bind(this,function(b){null!=e&&e(b)})):f("")};EditorUi.prototype.updateDiagram=function(b){function d(b){var d=new mxCellOverlay(b.image||g.warningImage,b.tooltip,b.align,b.valign,b.offset);d.addListener(mxEvent.CLICK,function(d,c){e.alert(b.tooltip)});return d}var c=null,e=this;if(null!=b&&0<b.length&&(c=mxUtils.parseXml(b),b=null!=c?c.documentElement:null,null!=b&&"updates"==
+b.nodeName)){var g=this.editor.graph,k=g.getModel();k.beginUpdate();var p=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var u=k.getCell(b.getAttribute("id"));if(null!=u){try{var t=b.getAttribute("value");if(null!=t){var x=mxUtils.parseXml(t).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(u,x);else for(var H=x.attributes,D=0;D<H.length;D++)g.setAttributeForCell(u,H[D].nodeName,0<H[D].nodeValue.length?H[D].nodeValue:null)}}catch(P){null!=window.console&&
+console.log("Error in value for "+u.id+": "+P)}try{var E=b.getAttribute("style");null!=E&&g.model.setStyle(u,E)}catch(P){null!=window.console&&console.log("Error in style for "+u.id+": "+P)}try{var J=b.getAttribute("icon");if(null!=J){var L=0<J.length?JSON.parse(J):null;null!=L&&L.append||g.removeCellOverlays(u);null!=L&&g.addCellOverlay(u,d(L))}}catch(P){null!=window.console&&console.log("Error in icon for "+u.id+": "+P)}try{var G=b.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),K=g.getCellGeometry(u);
+if(null!=K){K=K.clone();for(key in G){var C=parseFloat(G[key]);"dx"==key?K.x+=C:"dy"==key?K.y+=C:"dw"==key?K.width+=C:"dh"==key?K.height+=C:K[key]=parseFloat(G[key])}g.model.setGeometry(u,K)}}}catch(P){null!=window.console&&console.log("Error in icon for "+u.id+": "+P)}}}else if("model"==b.nodeName){for(var M=b.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(b.firstChild)).decode(M,k)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(g.view.scale=
+parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))g.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(p=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):1);b=b.nextSibling}}finally{k.endUpdate()}null!=p&&this.chromelessResize&&this.chromelessResize(!0,p)}return c};EditorUi.prototype.getCopyFilename=function(b,c){var d=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,
+e="",f=d.lastIndexOf(".");0<=f&&(e=d.substring(f),d=d.substring(0,f));if(c)var g=new Date,f=g.getFullYear(),k=g.getMonth()+1,p=g.getDate(),t=g.getHours(),x=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(f+"-"+k+"-"+p+"-"+t+"-"+x+"-"+g));return d=mxResources.get("copyOf",[d])+e};EditorUi.prototype.fileLoaded=function(b,c){var d=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var e=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),
+d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var f=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!c&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));
this.editor.setStatus("");this.updateUi();c||this.showSplash()});if(null!=b)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(b);b.addListener("descriptorChanged",this.descriptorChangedListener);b.addListener("contentChanged",this.descriptorChangedListener);b.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
this.updateUi();b.isEditable()?b.isModified()?(b.addUnsavedStatus(),null!=b.backupPatch&&b.patch([b.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&
this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));e=!0;this.isOffline()||null==b.getMode()||EditorUi.logEvent({category:b.getMode().toUpperCase()+"-OPEN-FILE-"+b.getHash(),action:"size_"+b.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[b]);if(this.editor.editable&&this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),
-mode:b.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=b?b.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(u){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):
-null!=d?this.fileLoaded(d):g()});c?f():this.handleError(v,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else g();return e};EditorUi.prototype.getHashValueForPages=function(b,c){var d=0,e=new mxGraphModel,g=new mxCodec;null!=c&&(c.byteCount=0,c.attrCount=0,c.eltCount=0,c.nodeCount=0);for(var f=0;f<b.length;f++){this.updatePageRoot(b[f]);var k=b[f].node.cloneNode(!1);k.removeAttribute("name");e.root=b[f].root;var n=g.encode(e);this.editor.graph.saveViewState(b[f].viewState,n,!0);n.removeAttribute("pageWidth");
-n.removeAttribute("pageHeight");k.appendChild(n);null!=c&&(c.eltCount+=k.getElementsByTagName("*").length,c.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(b,d,c,e){return!e||"mxGeometry"!=b.nodeName&&"mxPoint"!=b.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?e&&"mxCell"==b.nodeName&&"previous"==d?null:c:Math.round(c)},c)<<0}return d};EditorUi.prototype.hashValue=function(b,c,e){var d=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===
-typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(d^=this.hashValue(b.nodeName,c,e));if(null!=b.attributes){null!=e&&(e.attrCount+=b.attributes.length);for(var g=0;g<b.attributes.length;g++){var f=b.attributes[g].name,l=null!=c?c(b,f,b.attributes[g].value,!0):b.attributes[g].value;null!=l&&(d^=this.hashValue(f,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(g=0;g<b.childNodes.length;g++)d=(d<<5)-d+this.hashValue(b.childNodes[g],c,e)<<0}else if(null!=b&&"function"!==
-typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(g=0;g<b.length;g++)c=(c<<5)-c+b.charCodeAt(g)<<0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,e,f,k,m,n){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,
+mode:b.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=b?b.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(u){}var g=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):
+null!=d?this.fileLoaded(d):f()});c?g():this.handleError(v,mxResources.get("errorLoadingFile"),g,!0,null,null,!0)}else f();return e};EditorUi.prototype.getHashValueForPages=function(b,c){var d=0,e=new mxGraphModel,f=new mxCodec;null!=c&&(c.byteCount=0,c.attrCount=0,c.eltCount=0,c.nodeCount=0);for(var g=0;g<b.length;g++){this.updatePageRoot(b[g]);var k=b[g].node.cloneNode(!1);k.removeAttribute("name");e.root=b[g].root;var p=f.encode(e);this.editor.graph.saveViewState(b[g].viewState,p,!0);p.removeAttribute("pageWidth");
+p.removeAttribute("pageHeight");k.appendChild(p);null!=c&&(c.eltCount+=k.getElementsByTagName("*").length,c.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(b,d,c,e){return!e||"mxGeometry"!=b.nodeName&&"mxPoint"!=b.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?e&&"mxCell"==b.nodeName&&"previous"==d?null:c:Math.round(c)},c)<<0}return d};EditorUi.prototype.hashValue=function(b,c,e){var d=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===
+typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(d^=this.hashValue(b.nodeName,c,e));if(null!=b.attributes){null!=e&&(e.attrCount+=b.attributes.length);for(var f=0;f<b.attributes.length;f++){var g=b.attributes[f].name,l=null!=c?c(b,g,b.attributes[f].value,!0):b.attributes[f].value;null!=l&&(d^=this.hashValue(g,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)d=(d<<5)-d+this.hashValue(b.childNodes[f],c,e)<<0}else if(null!=b&&"function"!==
+typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(f=0;f<b.length;f++)c=(c<<5)-c+b.charCodeAt(f)<<0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,e,g,k,n,p){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,
".scratchpad",mxUtils.bind(this,function(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var d=mxUtils.createXmlDocument(),c=d.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(b));d.appendChild(c);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&
mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var d=this.sidebar.palettes[b];if(null!=d){for(var c=0;c<d.length;c++)d[c].parentNode.removeChild(d[c]);delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=function(b){var d=this.sidebar.container;if(null==b){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(b=c[c.length-1].nextSibling)}b=null!=
b?b:d.firstChild.nextSibling.nextSibling;var c=d.lastChild,e=c.previousSibling;d.insertBefore(c,b);d.insertBefore(e,c)};EditorUi.prototype.loadLibrary=function(b,c){var d=mxUtils.parseXml(b.getData());if("mxlibrary"==d.documentElement.nodeName){var e=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(b,e,d.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=
-function(b,c,e,f){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var d=this.sidebar.palettes[b.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var g=null,l=mxUtils.bind(this,function(d,c){0==d.length&&b.isEditable()?(null==g&&(g=document.createElement("div"),g.className="geDropTarget",mxUtils.write(g,mxResources.get("dragElementsHere"))),c.appendChild(g)):this.addLibraryEntries(d,
-c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),e,null!=f?f:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var q=k.parentNode.previousSibling;f=q.getAttribute("title");null!=f&&0<f.length&&".scratchpad"!=b.title&&q.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+f);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding=
-"8px";n.style.backgroundColor="inherit";q.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.cursor="pointer";t.style.margin="0 3px";var A=null;if(".scratchpad"!=b.title||this.closableScratchpad)n.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,
-function(){this.closeLibrary(b)});null!=A?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));if(b.isEditable()){var F=this.editor.graph,I=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),H=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=I&&null!=I.parentNode&&I.parentNode.removeChild(I),I=t.cloneNode(!1),I.setAttribute("src",
-Editor.spinImage),I.setAttribute("title",mxResources.get("saving")),I.style.cursor="default",I.style.marginRight="2px",I.style.marginTop="-2px",n.insertBefore(I,n.firstChild),q.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=I&&null!=I.parentNode&&(I.parentNode.removeChild(I),q.style.paddingRight=18*n.childNodes.length+"px")})):null==A&&(A=t.cloneNode(!1),A.setAttribute("src",IMAGE_PATH+"/download.png"),A.setAttribute("title",mxResources.get("save")),
-n.insertBefore(A,n.firstChild),mxEvent.addListener(A,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==A||b.isModified()||(q.style.paddingRight=18*n.childNodes.length+"px",A.parentNode.removeChild(A),A=null)});mxEvent.consume(d)})),q.style.paddingRight=18*n.childNodes.length+"px")}),K=mxUtils.bind(this,function(b,d,e,f){b=F.cloneCells(mxUtils.sortCells(F.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=F.getCellGeometry(b[l]);
-null!=m&&m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,f||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),w:d.width,h:d.height};null!=f&&(b.title=f);c.push(b);H(e);null!=g&&null!=g.parentNode&&0<c.length&&(g.parentNode.removeChild(g),g=null)}),C=mxUtils.bind(this,function(b){if(F.isSelectionEmpty())F.getRubberband().isActive()?(F.getRubberband().execute(b),F.getRubberband().reset()):this.showError(mxResources.get("error"),
-mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=F.getSelectionCells(),c=F.view.getBounds(d),e=F.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=F.view.translate.x;c.y-=F.view.translate.y;K(d,c)}mxEvent.consume(b)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(b){F.isMouseDown&&null!=F.panningManager&&null!=F.graphHandler.first&&(F.graphHandler.suspend(),null!=F.graphHandler.hint&&(F.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor=
-"#f1f3f4",k.style.cursor="copy",F.panningManager.stop(),F.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){F.isMouseDown&&null!=F.panningManager&&null!=F.graphHandler&&(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,F.panningManager.stop(),F.graphHandler.reset(),F.isMouseDown=!1,F.autoScroll=!0,C(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){F.isMouseDown&&null!=F.graphHandler.first&&(F.graphHandler.resume(),
-null!=F.graphHandler.hint&&(F.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",F.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&
-this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,f,m,p,q,n,u,v){if(null!=d&&"image/"==e.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,p,q),d)],d[0].vertex=!0,K(d,new mxRectangle(0,0,p,q),b,mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<c.length&&(g.parentNode.removeChild(g),
-g=null);else{var t=!1,x=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var f=Editor.extractGraphModelFromPdf(d);null!=f&&0<f.length&&(d=f)}if(null!=d)if(f=mxUtils.parseXml(d),"mxlibrary"==f.documentElement.nodeName)try{var m=JSON.parse(mxUtils.getTextContent(f.documentElement));l(m,k);c=c.concat(m);H(b);this.spinner.stop();t=!0}catch(V){}else if("mxfile"==f.documentElement.nodeName)try{for(var p=f.documentElement.getElementsByTagName("diagram"),m=0;m<p.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(p[m])),
-n=this.editor.graph.getBoundingBoxFromGeometry(q);K(q,new mxRectangle(0,0,n.width,n.height),b)}t=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&null!=g.parentNode&&0<c.length&&(g.parentNode.removeChild(g),g=null)});null!=v&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?this.importVisio(v,function(b){x(b,"text/xml")},null,n):!this.isOffline()&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(d,n)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?x(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));
-t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));n.insertBefore(t,n.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==k&&L(b)});f=t.cloneNode(!1);f.setAttribute("src",Editor.plusImage);f.setAttribute("title",mxResources.get("add"));n.insertBefore(f,n.firstChild);mxEvent.addListener(f,"click",C);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(f=document.createElement("span"),
-f.setAttribute("title",mxResources.get("help")),f.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(f,"?"),mxEvent.addGestureListeners(f,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(b)})),n.insertBefore(f,n.firstChild))}q.appendChild(n);q.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],g=e.data;if(null!=g){var g=this.convertDataUri(g),
-f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(f+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(f+"image="+g,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(g=this.stringToCells(Graph.decompress(e.xml)),0<g.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(g,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.main:null};EditorUi.prototype.footerHeight=
+function(b,c,e,g){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var d=this.sidebar.palettes[b.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var f=null,l=mxUtils.bind(this,function(d,c){0==d.length&&b.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(d,
+c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),e,null!=g?g:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var m=k.parentNode.previousSibling;g=m.getAttribute("title");null!=g&&0<g.length&&".scratchpad"!=b.title&&m.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+g);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding=
+"8px";p.style.backgroundColor="inherit";m.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.cursor="pointer";t.style.margin="0 3px";var D=null;if(".scratchpad"!=b.title||this.closableScratchpad)p.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,
+function(){this.closeLibrary(b)});null!=D?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));if(b.isEditable()){var E=this.editor.graph,J=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),G=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=J&&null!=J.parentNode&&J.parentNode.removeChild(J),J=t.cloneNode(!1),J.setAttribute("src",
+Editor.spinImage),J.setAttribute("title",mxResources.get("saving")),J.style.cursor="default",J.style.marginRight="2px",J.style.marginTop="-2px",p.insertBefore(J,p.firstChild),m.style.paddingRight=18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=J&&null!=J.parentNode&&(J.parentNode.removeChild(J),m.style.paddingRight=18*p.childNodes.length+"px")})):null==D&&(D=t.cloneNode(!1),D.setAttribute("src",IMAGE_PATH+"/download.png"),D.setAttribute("title",mxResources.get("save")),
+p.insertBefore(D,p.firstChild),mxEvent.addListener(D,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==D||b.isModified()||(m.style.paddingRight=18*p.childNodes.length+"px",D.parentNode.removeChild(D),D=null)});mxEvent.consume(d)})),m.style.paddingRight=18*p.childNodes.length+"px")}),K=mxUtils.bind(this,function(b,d,e,g){b=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=E.getCellGeometry(b[l]);
+null!=m&&m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,g||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),w:d.width,h:d.height};null!=g&&(b.title=g);c.push(b);G(e);null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)}),C=mxUtils.bind(this,function(b){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(b),E.getRubberband().reset()):this.showError(mxResources.get("error"),
+mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=E.getSelectionCells(),c=E.view.getBounds(d),e=E.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=E.view.translate.x;c.y-=E.view.translate.y;K(d,c)}mxEvent.consume(b)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler.first&&(E.graphHandler.suspend(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor=
+"#f1f3f4",k.style.cursor="copy",E.panningManager.stop(),E.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler&&(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,C(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),
+null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&
+this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,g,m,n,q,p,u,v){if(null!=d&&"image/"==e.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,q),d)],d[0].vertex=!0,K(d,new mxRectangle(0,0,n,q),b,mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),
+f=null);else{var x=!1,t=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var g=Editor.extractGraphModelFromPdf(d);null!=g&&0<g.length&&(d=g)}if(null!=d)if(g=mxUtils.parseXml(d),"mxlibrary"==g.documentElement.nodeName)try{var m=JSON.parse(mxUtils.getTextContent(g.documentElement));l(m,k);c=c.concat(m);G(b);this.spinner.stop();x=!0}catch(V){}else if("mxfile"==g.documentElement.nodeName)try{for(var n=g.documentElement.getElementsByTagName("diagram"),m=0;m<n.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[m])),
+p=this.editor.graph.getBoundingBoxFromGeometry(q);K(q,new mxRectangle(0,0,p.width,p.height),b)}x=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}x||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?this.importVisio(v,function(b){t(b,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(d,p)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?t(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));
+t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));p.insertBefore(t,p.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==k&&L(b)});g=t.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));p.insertBefore(g,p.firstChild);mxEvent.addListener(g,"click",C);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),
+g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(b)})),p.insertBefore(g,p.firstChild))}m.appendChild(p);m.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.data;if(null!=f){var f=this.convertDataUri(f),
+g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(f=this.stringToCells(Graph.decompress(e.xml)),0<f.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(f,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.main:null};EditorUi.prototype.footerHeight=
0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):
Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily=
"Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.zoomWheel=!0,Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},"0"!=urlParams.rough&&(Graph.prototype.defaultVertexStyle.fontFamily=
Editor.sketchFontFamily,Graph.prototype.defaultVertexStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultVertexStyle.fontSize="20",Graph.prototype.defaultVertexStyle.sketch="1",Graph.prototype.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultEdgeStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultEdgeStyle.fontSize="20",Graph.prototype.defaultEdgeStyle.sketch="1",Menus.prototype.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},
{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(Menus.prototype.defaultFonts)),Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled=!1,Graph.prototype.defaultPageVisible=!1,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=
-function(b,c,e,f,k){b=new ImageDialog(this,b,c,e,f,k);this.showDialog(b.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,d){if(!d){var c=new ChangePageSetup(this,null,b);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var d=new BackgroundImageDialog(this,b,c);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(b,c,e,
-f,k){b=new LibraryDialog(this,b,c,e,f,k);this.showDialog(b.container,640,440,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var d=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var b=
+function(b,c,e,g,k){b=new ImageDialog(this,b,c,e,g,k);this.showDialog(b.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,d){if(!d){var c=new ChangePageSetup(this,null,b);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var d=new BackgroundImageDialog(this,b,c);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(b,c,e,
+g,k){b=new LibraryDialog(this,b,c,e,g,k);this.showDialog(b.container,640,440,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var d=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var b=
this.createDiv("geSidebarContainer geSidebarFooter");b.style.position="absolute";b.style.overflow="hidden";var c=document.createElement("a");c.className="geTitle";c.style.color="#DF6C0C";c.style.fontWeight="bold";c.style.height="100%";c.style.paddingTop="9px";c.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));
-mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,f,k,m,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{n?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,
-b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(I){}if(null!=g||null!=c){n=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),p=null;c=null!=c?c:mxResources.get("error");if(null!=g){null!=g.retry&&(l=mxResources.get("cancel"),p=function(){d();g.retry()});if(404==g.code||404==g.status||403==g.code){n=403==g.code?null!=g.message?mxUtils.htmlEntities(g.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
-(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=k?null:null!=m?m:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==g.code||404==g.status)){q="#U"==q.substring(0,
-2)?q.substring(45,q.lastIndexOf("%26ex")):q.substring(2);this.showError(c,n,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,e,f,k)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){g.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;g.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
-mxUtils.write(c,"<"+d[b].email+">");c.setAttribute("disabled","disabled");g.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=d.length;g.appendChild(c)}var d=this.drive.getUsersList(),c=document.createElement("div"),e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+": ");c.appendChild(e);var g=document.createElement("select");g.style.width="200px";b();mxEvent.addListener(g,"change",mxUtils.bind(this,
-function(){var c=g.value,e=d.length!=c;e&&this.drive.setUser(d[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(g);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=e&&e()}),480,150);return}}null!=g.message?
-n=""==g.message&&null!=g.name?mxUtils.htmlEntities(g.name):mxUtils.htmlEntities(g.message):null!=g.response&&null!=g.response.error?n=mxUtils.htmlEntities(g.response.error):"undefined"!==typeof window.App&&(g.code==App.ERROR_TIMEOUT?n=mxUtils.htmlEntities(mxResources.get("timeout")):g.code==App.ERROR_BUSY?n=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof g&&0<g.length&&(n=mxUtils.htmlEntities(g)))}var v=m=null;null!=g&&null!=g.helpLink&&(m=mxResources.get("help"),v=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(g.helpLink)}));this.showError(c,n,l,e,p,null,null,m,v,null,null,null,f?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,f,k,m){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();
-null!=c&&c()},function(){d();null!=e&&e()},f,k,null,null,null,null,g);this.showDialog(b.container,340,46+g,!0,m);b.init()};EditorUi.prototype.showBanner=function(b,c,e,f){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var g=document.createElement("div");g.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
-mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(g.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(g.style,"transition","all 1s ease");g.className="geBtn gePrimaryBtn";d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";g.appendChild(d);
-d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get(f?"doNotShowAgain":"close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";g.appendChild(d);mxUtils.write(g,c);document.body.appendChild(g);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var l=document.createElement("input");
-l.setAttribute("type","checkbox");l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!f){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);g.style.paddingBottom="30px";g.appendChild(c)}var q=mxUtils.bind(this,function(){null!=g.parentNode&&(g.parentNode.removeChild(g),this.bannerShowing=!1,l.checked||f)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);q()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){q()}),1E3)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),q(),mxEvent.consume(b)):n()}));window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(n,3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,e,f){b=b.toDataURL("image/"+e);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,
-"tEXt","mxfile",encodeURIComponent(c))),0<f&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",f));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,e,f,k){var d="jpeg"==e?"jpg":e;f=this.getBaseFilename(f)+(null!=c?".drawio":"")+"."+d;b=this.createImageDataUri(b,c,e,k);this.saveData(f,d,b.substring(b.lastIndexOf(",")+1),"image/"+e,!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||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var d=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,e,f,
-k,m){"text/xml"!=e||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=m?m:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=f?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank","_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
-null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewWindow(b,e,f);else{var d=document.createElement("a");m=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);m=65==(g?parseInt(g[2],10):!1)?!1:m}if(m||this.isOffline()){d.href=URL.createObjectURL(f?this.base64ToBlob(b,e):new Blob([b],{type:e}));m?d.download=c:d.setAttribute("target",
-"_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(B){}}else this.createEchoRequest(b,c,e,f,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,f,k,m){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=m?"&base64="+m:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
-function(b,c){c=c||"";for(var d=atob(b),e=d.length,g=Math.ceil(e/1024),f=Array(g),k=0;k<g;++k){for(var n=1024*k,t=Math.min(n+1024,e),x=Array(t-n),E=0;n<t;++E,++n)x[E]=d[n].charCodeAt(0);f[k]=new Uint8Array(x)}return new Blob(f,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,f,k,m,n,u){m=null!=m?m:!1;n=null!=n?n:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(m);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==
-c)if(null!=e&&"image/"==e.substring(0,6))this.openInNewWindow(b,e,f);else if(null!=e&&"text/html"==e.substring(0,9)){var g=new EmbedDialog(this,b);this.showDialog(g.container,440,240,!0,!0);g.init()}else{var l=window.open("about:blank");null==l?mxUtils.popup(b,!0):(l.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),l.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(b,d,e,f,null,u):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(g){try{this.exportFile(b,
-d,e,f,c,g)}catch(L){this.handleError(L)}}))}catch(I){this.handleError(I)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,m,n,null,1<k,d,b,e,f);m=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,400,m,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+
+mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,g,k,n,p){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{p?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,
+b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(J){}if(null!=f||null!=c){p=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),m=null;c=null!=c?c:mxResources.get("error");if(null!=f){null!=f.retry&&(l=mxResources.get("cancel"),m=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){p=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=k?null:null!=n?n:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==f.code||404==f.status)){q="#U"==q.substring(0,
+2)?q.substring(45,q.lastIndexOf("%26ex")):q.substring(2);this.showError(c,p,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,e,g,k)}),m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){f.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
+mxUtils.write(c,"<"+d[b].email+">");c.setAttribute("disabled","disabled");f.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=d.length;f.appendChild(c)}var d=this.drive.getUsersList(),c=document.createElement("div"),e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+": ");c.appendChild(e);var f=document.createElement("select");f.style.width="200px";b();mxEvent.addListener(f,"change",mxUtils.bind(this,
+function(){var c=f.value,e=d.length!=c;e&&this.drive.setUser(d[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=e&&e()}),480,150);return}}null!=f.message?
+p=""==f.message&&null!=f.name?mxUtils.htmlEntities(f.name):mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?p=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?p=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?p=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof f&&0<f.length&&(p=mxUtils.htmlEntities(f)))}var v=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),v=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(c,p,l,e,m,null,null,n,v,null,null,null,g?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,g,k,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();
+null!=c&&c()},function(){d();null!=e&&e()},g,k,null,null,null,null,f);this.showDialog(b.container,340,46+f,!0,n);b.init()};EditorUi.prototype.showBanner=function(b,c,e,g){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var f=document.createElement("div");f.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(f.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.className="geBtn gePrimaryBtn";d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";f.appendChild(d);
+d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get(g?"doNotShowAgain":"close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";f.appendChild(d);mxUtils.write(f,c);document.body.appendChild(f);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var l=document.createElement("input");
+l.setAttribute("type","checkbox");l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!g){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);f.style.paddingBottom="30px";f.appendChild(c)}var m=mxUtils.bind(this,function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,l.checked||g)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=
+mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));var p=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m()}),1E3)});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),m(),mxEvent.consume(b)):p()}));window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(p,3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,e,g){b=b.toDataURL("image/"+e);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,
+"tEXt","mxfile",encodeURIComponent(c))),0<g&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",g));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,e,g,k){var d="jpeg"==e?"jpg":e;g=this.getBaseFilename(g)+(null!=c?".drawio":"")+"."+d;b=this.createImageDataUri(b,c,e,k);this.saveData(g,d,b.substring(b.lastIndexOf(",")+1),"image/"+e,!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||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var d=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,e,g,
+k,n){"text/xml"!=e||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=n?n:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=g?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank","_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
+null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewWindow(b,e,g);else{var d=document.createElement("a");n=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);n=65==(f?parseInt(f[2],10):!1)?!1:n}if(n||this.isOffline()){d.href=URL.createObjectURL(g?this.base64ToBlob(b,e):new Blob([b],{type:e}));n?d.download=c:d.setAttribute("target",
+"_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(b,c,e,g,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,g,k,n){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=n?"&base64="+n:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(g?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
+function(b,c){c=c||"";for(var d=atob(b),e=d.length,f=Math.ceil(e/1024),g=Array(f),k=0;k<f;++k){for(var p=1024*k,t=Math.min(p+1024,e),x=Array(t-p),H=0;p<t;++H,++p)x[H]=d[p].charCodeAt(0);g[k]=new Uint8Array(x)}return new Blob(g,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,g,k,n,p,u){n=null!=n?n:!1;p=null!=p?p:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(n);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==
+c)if(null!=e&&"image/"==e.substring(0,6))this.openInNewWindow(b,e,g);else if(null!=e&&"text/html"==e.substring(0,9)){var f=new EmbedDialog(this,b);this.showDialog(f.container,440,240,!0,!0);f.init()}else{var l=window.open("about:blank");null==l?mxUtils.popup(b,!0):(l.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),l.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(b,d,e,g,null,u):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,
+d,e,g,c,f)}catch(L){this.handleError(L)}}))}catch(J){this.handleError(J)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,p,null,1<k,d,b,e,g);n=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,400,n,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+
b+"</html>"):(b=e?b:btoa(unescape(encodeURIComponent(b))),d.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+b+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(b,!1)+"</pre></html>"),d.document.close())};var k=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};
-EditorUi.prototype.createTagsDialog=function(b,c){function d(){for(var b=f.getSelectionCells(),d=[],c=0;c<b.length;c++)f.isCellVisible(b[c])&&d.push(b[c]);f.setSelectionCells(d)}function e(b){f.hiddenTags=b?[]:n.slice();d();f.refresh()}function g(b,g){x.innerHTML="";if(0<b.length){var l=document.createElement("table");l.setAttribute("cellpadding","2");l.style.boxSizing="border-box";l.style.tableLayout="fixed";l.style.width="100%";var k=document.createElement("tbody");if(null!=b&&0<b.length)for(var m=
-0;m<b.length;m++)(function(b){function l(){var c=n.slice(),e=mxUtils.indexOf(c,b);c.splice(e,1);f.hiddenTags=c;d();f.refresh()}function m(){var d=f.getCellsForTags([b],null,null,!0);f.isEnabled()?f.setSelectionCells(d):f.highlightCells(d)}var p=0>mxUtils.indexOf(f.hiddenTags,b),q=document.createElement("tr"),u=document.createElement("td");u.style.align="center";u.style.width="16px";var t=document.createElement("img");t.setAttribute("src",p?Editor.visibleImage:Editor.hiddenImage);t.setAttribute("title",
-mxResources.get(p?"hideIt":"show",[b]));mxUtils.setOpacity(t,p?75:25);t.style.verticalAlign="middle";t.style.cursor="pointer";t.style.width="16px";if(c||Editor.isDarkMode())t.style.filter="invert(100%)";u.appendChild(t);mxEvent.addListener(t,"click",function(c){var g=mxUtils.indexOf(f.hiddenTags,b);mxEvent.isShiftDown(c)?e(0<=mxUtils.indexOf(f.hiddenTags,b)):(0>g?f.hiddenTags.push(b):0<=g&&f.hiddenTags.splice(g,1),d(),f.refresh());mxEvent.consume(c)});mxEvent.addListener(t,"dblclick",function(b){mxEvent.isShiftDown(b)||
-(!p&&0<f.hiddenTags.length?e(!0):l());mxEvent.consume(b)});q.appendChild(u);u=document.createElement("td");u.style.overflow="hidden";u.style.whiteSpace="nowrap";u.style.textOverflow="ellipsis";u.style.verticalAlign="middle";u.style.cursor="pointer";u.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,p?100:40);u.appendChild(a);mxEvent.addListener(u,"click",function(b){mxEvent.isShiftDown(b)?(e(!0),
-m()):p&&0<f.hiddenTags.length?e(!0):l();mxEvent.consume(b)});mxEvent.addListener(u,"dblclick",function(b){e(!0);m();mxEvent.consume(b)});q.appendChild(u);if(f.isEnabled()){u=document.createElement("td");u.style.verticalAlign="middle";u.style.textAlign="center";u.style.width="18px";if(null==g){u.style.align="center";u.style.width="16px";t=document.createElement("img");t.setAttribute("src",Editor.clearImage);t.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(t,p?75:25);t.style.verticalAlign=
-"middle";t.style.cursor="pointer";t.style.width="16px";if(c||Editor.isDarkMode())t.style.filter="invert(100%)";mxEvent.addListener(t,"click",function(d){var c=mxUtils.indexOf(n,b);0<=c&&n.splice(c,1);f.removeTagsForCells(f.model.getDescendants(f.model.getRoot()),[b]);f.refresh();mxEvent.consume(d)});u.appendChild(t)}else{var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.margin="0px";x.defaultChecked=null!=g&&0<=mxUtils.indexOf(g,b);x.checked=x.defaultChecked;x.style.background=
-"transparent";x.setAttribute("title",mxResources.get(x.defaultChecked?"removeIt":"add",[b]));mxEvent.addListener(x,"change",function(d){x.checked?f.addTagsForCells(f.getSelectionCells(),[b]):f.removeTagsForCells(f.getSelectionCells(),[b]);mxEvent.consume(d)});u.appendChild(x)}q.appendChild(u)}k.appendChild(q)})(b[m]);l.appendChild(k);x.appendChild(l)}}var f=this.editor.graph,k=this,n=f.hiddenTags.slice(),t=document.createElement("div");t.style.userSelect="none";t.style.overflow="hidden";t.style.padding=
-"10px";t.style.height="100%";var x=document.createElement("div");x.style.boxSizing="border-box";x.style.borderRadius="4px";x.style.userSelect="none";x.style.overflow="auto";x.style.position="absolute";x.style.left="10px";x.style.right="10px";x.style.top="10px";x.style.border=f.isEnabled()?"1px solid #808080":"none";x.style.bottom=f.isEnabled()?"48px":"10px";t.appendChild(x);var E=mxUtils.button(mxResources.get("reset"),function(b){f.hiddenTags=[];mxEvent.isShiftDown(b)||(n=f.hiddenTags.slice());d();
-f.refresh()});E.setAttribute("title",mxResources.get("reset"));E.className="geBtn";E.style.marginRight="4px";E.marginTop="8px";var A=mxUtils.button(mxResources.get("add"),function(){if(f.isEnabled()){var b=new FilenameDialog(k,"",mxResources.get("add"),function(b){k.hideDialog();if(null!=b&&0<b.length){b=b.split(" ");for(var d=[],c=0;c<b.length;c++){var e=mxUtils.trim(b[c]);""!=e&&0>mxUtils.indexOf(n,e)&&d.push(e)}0<d.length&&(f.isSelectionEmpty()?(n=n.concat(d),F()):f.addTagsForCells(f.getSelectionCells(),
-d))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");k.showDialog(b.container,300,80,!0,!0);b.init()}});A.setAttribute("title",mxResources.get("add"));A.className="geBtn";A.marginTop="4px";f.addListener(mxEvent.ROOT,function(){n=f.hiddenTags.slice()});var F=mxUtils.bind(this,function(d,c){if(b()){for(var e=f.getAllTags(),l=0;l<e.length;l++)0>mxUtils.indexOf(n,e[l])&&n.push(e[l]);n.sort();f.isSelectionEmpty()?g(n):g(n,f.getCommonTagsForCells(f.getSelectionCells()))}});f.selectionModel.addListener(mxEvent.CHANGE,
-F);f.model.addListener(mxEvent.CHANGE,F);f.addListener(mxEvent.REFRESH,F);var I=document.createElement("div");I.style.boxSizing="border-box";I.style.whiteSpace="nowrap";I.style.position="absolute";I.style.overflow="hidden";I.style.bottom="0px";I.style.height="42px";I.style.right="10px";I.style.left="10px";f.isEnabled()&&(I.appendChild(E),I.appendChild(A),t.appendChild(I));return{div:t,refresh:F}};EditorUi.prototype.addChromelessToolbarItems=function(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=
-null;var d=b(mxUtils.bind(this,function(b){null==this.tagsComponent&&(this.tagsComponent=this.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height=
-"auto");if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var c=d.getBoundingClientRect();mxUtils.setPrefixedStyle(this.tagsDialog.style,"borderRadius","5px");this.tagsDialog.style.position="fixed";this.tagsDialog.style.fontFamily=
-"Helvetica,Arial";this.tagsDialog.style.backgroundColor="#000000";this.tagsDialog.style.color="#ffffff";mxUtils.setOpacity(this.tagsDialog,70);this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh()}mxEvent.consume(b)}),Editor.tagsLargeImage,
-mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();d.style.display=0<b.length?"":"none"}));k.apply(this,arguments)}if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=b(mxUtils.bind(this,function(b){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 e=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding=
-"4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.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.editor.exportToCanvas(mxUtils.bind(this,function(b){g.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(b,null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",c);this.exportDialog.appendChild(b);
-mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);d.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),Editor.cameraLargeImage,mxResources.get("export"))}};EditorUi.prototype.saveData=
-function(b,c,e,f,k){this.isLocalFileSave()?this.saveLocalFile(e,b,f,k,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,d){return this.createEchoRequest(e,b,f,k,c,d)}),e,k,f)};EditorUi.prototype.saveRequest=function(b,c,e,f,k,m,n){n=null!=n?n:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var g=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==d||null!=b&&0<b.length){var g=e("_blank"==d?null:b,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(e){m=null!=m?m:"pdf"==c?"application/pdf":"image/"+c;if(null!=f)try{this.exportFile(f,b,m,!0,d,e)}catch(I){this.handleError(I)}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(),b,m,!0,d,e)}catch(I){this.handleError(I)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,n,null,1<d,g,f,m,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,380,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,f,k,m){};EditorUi.prototype.pickFolder=function(b,
-c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,f,k,m,n,u,t,x,E,A){if(this.spinner.spin(document.body,mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var g=c?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&0==c&&(g=E?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(g,b,n,u,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,E,A);f&&this.editor.graph.addSvgShadow(l);var p=
-this.getBaseFilename()+(k?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",this.getFileData(!0,null,null,null,e,t,null,null,null,!1));var d='<?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);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(l);this.editor.graph.mathEnabled&&this.editor.addMathCss(l);m?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(l,q,this.thumbImageCache)):q(l)}catch(C){this.handleError(C)}};EditorUi.prototype.addRadiobox=function(b,c,e,f,k,m,n){return this.addCheckbox(b,e,f,k,m,n,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,f,k,m,n,u){m=null!=m?m:!0;var d=document.createElement("input");
-d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",n?"radio":"checkbox");n="geCheckbox-"+Editor.guid();d.id=n;null!=u&&d.setAttribute("name",u);e&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);f&&d.setAttribute("disabled","disabled");m&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,c),e.setAttribute("for",n),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+
-":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),g="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.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";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("makeCopy"));f.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,
-mxResources.get("custom")+"...");f.appendChild(e);b.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var b=new FilenameDialog(this,g,mxResources.get("ok"),function(b){null!=b?g=b:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==c||c.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled",
-"disabled")}));mxUtils.br(b);return{getLink:function(){return d.checked?"blank"===f.value?"_blank":g:null},getEditInput:function(){return d},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(b,c){function d(){k.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(b,mxResources.get("links")+":");var e=document.createElement("select");e.style.width="100px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";var g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));e.appendChild(g);g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));e.appendChild(g);g=document.createElement("option");
-g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));e.appendChild(g);c&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),e.appendChild(g));b.appendChild(e);mxUtils.write(b,mxResources.get("borderColor")+":");var f="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(f||"none",function(b){f=b;d()});mxEvent.consume(b)}));d();k.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";b.appendChild(k);mxUtils.br(b);return{getColor:function(){return f},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,e,f,k,m,n){n=null!=n?n:[];f&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&
-"1"!=urlParams.dev||n.push("lightbox=1"),"auto"!=b&&n.push("target="+b),null!=c&&c!=mxConstants.NONE&&n.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=k&&0<k.length&&n.push("edit="+encodeURIComponent(k)),m&&n.push("layers=1"),this.editor.graph.foldingEnabled&&n.push("nav=1"));e&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&n.push("page-id="+this.currentPage.getId());return n};EditorUi.prototype.createLink=function(b,c,e,f,k,m,n,u,t,x){t=this.createUrlParameters(b,
-c,e,f,k,m,t);b=this.getCurrentFile();c=!0;null!=n?e="#U"+encodeURIComponent(n):(b=this.getCurrentFile(),u||null==b||b.constructor!=window.DriveFile?e="#R"+encodeURIComponent(e?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(e="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=this.defaultFilename&&t.push("title="+encodeURIComponent(b.getTitle()));x&&1<e.length&&(t.push("open="+e.substring(1)),e="");return(f&&
-"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<t.length?"?"+t.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,f,k,m,n,u,t,x,E){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==f&&(d.target=f);t||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];n&&(e.push("pages"),
-d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),d.resize=!0);u&&e.push("layers");0<e.length&&(t&&e.push("lightbox"),d.toolbar=e.join(" "));null!=x&&0<x.length&&(d.edit=x);null!=b?d.url=b:d.xml=this.getFileData(!0,null,null,null,null,!n);c='<div class="mxgraph" style="'+(m?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+
-encodeURIComponent(b):"";E(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(b,c,e,f){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,
-mxResources.get("html"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");g=k.cloneNode(!0);g.setAttribute("value",
-"copy");l.appendChild(g);var q=document.createElement("span");mxUtils.write(q,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(q);mxUtils.br(l);l.appendChild(k);q=document.createElement("span");mxUtils.write(q,mxResources.get("publicDiagramUrl"));l.appendChild(q);var n=this.getCurrentFile();null==e&&null!=n&&n.constructor==window.DriveFile&&(q=document.createElement("a"),q.style.paddingLeft="12px",q.style.color="gray",q.style.cursor="pointer",mxUtils.write(q,mxResources.get("share")),l.appendChild(q),
-mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));g.setAttribute("checked","checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),A=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var F=document.createElement("input");F.setAttribute("type","text");F.style.marginRight="16px";F.style.width="60px";F.style.marginLeft="4px";F.style.marginRight="12px";F.value=
-"100%";d.appendChild(F);var I=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,L=L=this.addCheckbox(d,mxResources.get("allPages"),l,!l),H=this.addCheckbox(d,mxResources.get("layers"),!0),K=this.addCheckbox(d,mxResources.get("lightbox"),!0),C=this.addEditButton(d,K),N=C.getEditInput();N.style.marginBottom="16px";mxEvent.addListener(K,"change",function(){K.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");N.checked&&K.checked?C.getEditSelect().removeAttribute("disabled"):
-C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){f(k.checked?e:null,A.checked,F.value,t.getTarget(),t.getColor(),I.checked,L.checked,H.checked,K.checked,C.getLink())}),null,b,c);this.showDialog(b.container,340,380,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,f,k,m){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,b||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://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=l&&l.constructor==window.DriveFile&&!c){b=80;var g="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var q=document.createElement("div");
-q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));p.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));q.style.marginTop="12px";q.className="geBtn";p.appendChild(q);d.appendChild(p);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("check"));p.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(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var n=null,t=null;if(null!=e||null!=f)b+=30,mxUtils.write(d,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),
-n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",d.appendChild(n),mxUtils.write(d,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=f+"px",d.appendChild(t),mxUtils.br(d);var I=this.addLinkSection(d,m);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||
-c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var H=this.addCheckbox(d,mxResources.get("lightbox"),!0,null,null,!m),K=this.addEditButton(d,H),C=K.getEditInput();m&&(C.style.marginLeft=H.style.marginLeft,H.style.display="none",b-=30);var N=this.addCheckbox(d,mxResources.get("layers"),!0);N.style.marginLeft=C.style.marginLeft;N.style.marginTop="8px";var S=this.addCheckbox(d,mxResources.get("tags"),!0);S.style.marginLeft=C.style.marginLeft;S.style.marginBottom="16px";S.style.marginTop="16px";
-mxEvent.addListener(H,"change",function(){H.checked?(N.removeAttribute("disabled"),C.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"));C.checked&&H.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(I.getTarget(),I.getColor(),null==L?!0:L.checked,H.checked,K.getLink(),N.checked,null!=n?n.value:null,null!=t?t.value:null,S.checked)}),
-null,mxResources.get("create"),g);this.showDialog(c.container,340,300+b,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)):I.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,e,f,k){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:"+(k?
-"10":"4")+"px";d.appendChild(g);if(k){mxUtils.write(d,mxResources.get("zoom")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";d.appendChild(l);mxUtils.write(d,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=
-this.lastExportBorder||"0";d.appendChild(p);mxUtils.br(d)}var q=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=f?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),g=this.editor.graph,t=f?null:this.addCheckbox(d,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=t&&(t.style.marginBottom="16px");b=new CustomDialog(this,d,mxUtils.bind(this,function(){var b=parseInt(l.value)/
-100||1,d=parseInt(p.value)||0;e(!q.checked,null!=n?n.checked:!1,null!=t?t.checked:!1,b,d)}),null,b,c);this.showDialog(b.container,300,(k?25:0)+(f?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,e,f,k,m,n,t,B){n=null!=n?n:Editor.defaultIncludeDiagram;var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=this.editor.graph,l="jpeg"==t?200:280,p=document.createElement("h3");mxUtils.write(p,b);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-d.appendChild(p);mxUtils.write(d,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";d.appendChild(q);mxUtils.write(d,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||
-"0";d.appendChild(u);mxUtils.br(d);var v=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),K=document.createElement("input");K.style.marginTop="16px";K.style.marginRight="8px";K.style.marginLeft="24px";K.setAttribute("disabled","disabled");K.setAttribute("type","checkbox");var C=document.createElement("select");C.style.marginTop="16px";C.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(p=0;p<b.length;p++)if(!g.isSelectionEmpty()||"selectionOnly"!=b[p]){var N=
-document.createElement("option");mxUtils.write(N,mxResources.get(b[p]));N.setAttribute("value",b[p]);C.appendChild(N)}B?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(C),mxUtils.br(d),l+=26,mxEvent.addListener(C,"change",function(){"selectionOnly"==C.value&&(v.checked=!0)})):m&&(d.appendChild(K),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=26,mxEvent.addListener(v,"change",function(){v.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}));g.isSelectionEmpty()?
-B&&(v.style.display="none",v.nextSibling.style.display="none",v.nextSibling.nextSibling.style.display="none",l-=26):(C.value="diagram",K.setAttribute("checked","checked"),K.defaultChecked=!0,mxEvent.addListener(v,"change",function(){C.value=v.checked?"selectionOnly":"diagram"}));var S=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),R=null;Editor.isDarkMode()&&(R=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var M=this.addCheckbox(d,mxResources.get("shadow"),
-g.shadowVisible),P=document.createElement("input");P.style.marginTop="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||P.setAttribute("disabled","disabled");c&&(d.appendChild(P),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),l+=26);var G=null;if("png"==t||"jpeg"==t)G=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=26;var D=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
-n,null,null,"jpeg"!=t);D.style.marginBottom="16px";var y=document.createElement("select");y.style.maxWidth="260px";y.style.marginLeft="8px";y.style.marginRight="10px";y.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));y.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));y.appendChild(c);c=document.createElement("option");c.setAttribute("value",
-"self");mxUtils.write(c,mxResources.get("openInThisWindow"));y.appendChild(c);"svg"==t&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(y),mxUtils.br(d),mxUtils.br(d),l+=40);e=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=q.value;k(q.value,S.checked,!v.checked,M.checked,D.checked,P.checked,u.value,K.checked,!1,y.value,null!=G?G.checked:null,null!=R?R.checked:null,C.value)}),null,e,f);this.showDialog(e.container,340,l,!0,!0,null,
-null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,e,f,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=c){var l=document.createElement("h3");mxUtils.write(l,c);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(l)}var p=this.addCheckbox(d,mxResources.get("fit"),!0),
-q=this.addCheckbox(d,mxResources.get("shadow"),g.shadowVisible&&f,!f),n=this.addCheckbox(d,e),t=this.addCheckbox(d,mxResources.get("lightbox"),!0),F=this.addEditButton(d,t),I=F.getEditInput(),L=1<g.model.getChildCount(g.model.getRoot()),H=this.addCheckbox(d,mxResources.get("layers"),L,!L);H.style.marginLeft=I.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(L&&H.removeAttribute("disabled"),I.removeAttribute("disabled")):(H.setAttribute("disabled",
-"disabled"),I.setAttribute("disabled","disabled"));I.checked&&t.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(p.checked,q.checked,n.checked,t.checked,F.getLink(),H.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,290,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,c,e,f,k,m,n,t){function d(d){var c=" ",p="";f&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=l?"&page="+l:"")+(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");b&&(p+="max-width:100%;");var q="";e&&(q=' width="'+Math.round(g.width)+'" height="'+Math.round(g.height)+'"');n('<img src="'+d+'"'+q+(""!=p?' style="'+p+'"':"")+c+"/>")}var g=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=f?this.getFileData(!0):null;b=
-this.createImageDataUri(b,c,"png");d(b)}),null,null,null,mxUtils.bind(this,function(b){t({message:mxResources.get("unknownError")})}),null,!0,e?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),g.width*g.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var p="";e&&(p="&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")+p+"&xml="+encodeURIComponent(c));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&
-299>=q.getStatus()?d("data:image/png;base64,"+q.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(b,c,e,f,k,m,n){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!e),g=d.getElementsByTagName("a");if(null!=g)for(var l=0;l<g.length;l++){var p=g[l].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==g[l].getAttribute("target")&&g[l].removeAttribute("target")}f&&
-d.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(d);if(e){var q=" ",t="";f&&(q="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('"+EditorUi.lightboxHost+"/?client=1"+(k?"&edit=_blank":"")+(m?"&layers=1":
-"")+"');}})(this);\"",t+="cursor:pointer;");b&&(t+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(b){n('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=t?' style="'+t+'"':"")+q+"/>")}))}else t="",f&&(c=this.getSelectedPageIndex(),d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=c?"&page="+c:"")+(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),b&&(b=parseInt(d.getAttribute("width")),k=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+b+" "+k),t+="max-width:100%;max-height:"+k+"px;",d.removeAttribute("height")),""!=t&&d.setAttribute("style",t),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),n(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(b){b=
+EditorUi.prototype.addChromelessToolbarItems=function(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var d=b(mxUtils.bind(this,function(b){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",
+this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,70));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),
+this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var c=d.getBoundingClientRect();this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=
+c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(b)}),Editor.tagsLargeImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();d.style.display=0<b.length?"":"none"}));k.apply(this,arguments)}this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,
+"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=b(mxUtils.bind(this,function(b){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 e=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
+"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(b){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(b,null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));
+b.setAttribute("border","0");b.setAttribute("src",c);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);d.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),
+Editor.cameraLargeImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(b,c,e,g,k){this.isLocalFileSave()?this.saveLocalFile(e,b,g,k,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,d){return this.createEchoRequest(e,b,g,k,c,d)}),e,k,g)};EditorUi.prototype.saveRequest=function(b,c,e,g,k,n,p){p=null!=p?p:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==
+d||null!=b&&0<b.length){var f=e("_blank"==d?null:b,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(e){n=null!=n?n:"pdf"==c?"application/pdf":"image/"+c;if(null!=g)try{this.exportFile(g,b,n,!0,d,e)}catch(J){this.handleError(J)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=
+f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,n,!0,d,e)}catch(J){this.handleError(J)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,p,null,1<d,f,g,n,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,380,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=
+b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,g,k,n){};EditorUi.prototype.pickFolder=function(b,c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,g,k,n,p,u,t,x,H,D){if(this.spinner.spin(document.body,mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var f=c?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==c&&(f=H?this.editor.graph.defaultPageBackgroundColor:
+"#ffffff");var l=this.editor.graph.getSvg(f,b,p,u,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,H,D);g&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+(k?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",this.getFileData(!0,null,null,null,e,t,null,null,null,!1));var d='<?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);
+this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(l);this.editor.graph.mathEnabled&&this.editor.addMathCss(l);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(l,q,this.thumbImageCache)):q(l)}catch(C){this.handleError(C)}};EditorUi.prototype.addRadiobox=function(b,
+c,e,g,k,n,p){return this.addCheckbox(b,e,g,k,n,p,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,g,k,n,p,u){n=null!=n?n:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",p?"radio":"checkbox");p="geCheckbox-"+Editor.guid();d.id=p;null!=u&&d.setAttribute("name",u);e&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);g&&d.setAttribute("disabled","disabled");n&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,
+c),e.setAttribute("for",p),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),f="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";e=document.createElement("option");
+e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("makeCopy"));g.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,mxResources.get("custom")+"...");g.appendChild(e);b.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var b=new FilenameDialog(this,f,mxResources.get("ok"),function(b){null!=b?f=b:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(b.container,
+300,80,!0,!1);b.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==c||c.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return d.checked?"blank"===g.value?"_blank":f:null},getEditInput:function(){return d},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(b,c){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?
+"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var e=document.createElement("select");e.style.width="100px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));e.appendChild(f);f=document.createElement("option");
+f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));e.appendChild(f);c&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),e.appendChild(f));b.appendChild(e);mxUtils.write(b,mxResources.get("borderColor")+":");var g="#0000ff",k=
+null,k=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(g||"none",function(b){g=b;d()});mxEvent.consume(b)}));d();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";b.appendChild(k);mxUtils.br(b);return{getColor:function(){return g},getTarget:function(){return e.value},focus:function(){e.focus()}}};
+EditorUi.prototype.createUrlParameters=function(b,c,e,g,k,n,p){p=null!=p?p:[];g&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||p.push("lightbox=1"),"auto"!=b&&p.push("target="+b),null!=c&&c!=mxConstants.NONE&&p.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=k&&0<k.length&&p.push("edit="+encodeURIComponent(k)),n&&p.push("layers=1"),this.editor.graph.foldingEnabled&&p.push("nav=1"));e&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&
+p.push("page-id="+this.currentPage.getId());return p};EditorUi.prototype.createLink=function(b,c,e,g,k,n,p,u,t,x){t=this.createUrlParameters(b,c,e,g,k,n,t);b=this.getCurrentFile();c=!0;null!=p?e="#U"+encodeURIComponent(p):(b=this.getCurrentFile(),u||null==b||b.constructor!=window.DriveFile?e="#R"+encodeURIComponent(e?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(e="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=
+this.defaultFilename&&t.push("title="+encodeURIComponent(b.getTitle()));x&&1<e.length&&(t.push("open="+e.substring(1)),e="");return(g&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<t.length?"?"+t.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,g,k,n,p,u,t,x,H,D){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==
+g&&(d.target=g);x||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];p&&(e.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),d.resize=!0);u&&e.push("layers");t&&e.push("tags");0<e.length&&(x&&e.push("lightbox"),d.toolbar=e.join(" "));null!=H&&0<H.length&&(d.edit=H);null!=b?d.url=b:d.xml=this.getFileData(!0,null,null,null,null,!p);c='<div class="mxgraph" style="'+
+(n?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";D(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};
+EditorUi.prototype.showHtmlDialog=function(b,c,e,g){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
+k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");l.appendChild(f);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(m);mxUtils.br(l);l.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));l.appendChild(m);var p=this.getCurrentFile();null==e&&null!=p&&p.constructor==window.DriveFile&&(m=
+document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.style.cursor="pointer",mxUtils.write(m,mxResources.get("share")),l.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));f.setAttribute("checked","checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),D=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var E=document.createElement("input");
+E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value="100%";d.appendChild(E);var J=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,L=L=this.addCheckbox(d,mxResources.get("allPages"),l,!l),G=this.addCheckbox(d,mxResources.get("layers"),!0),K=this.addCheckbox(d,mxResources.get("tags"),!0),C=this.addCheckbox(d,mxResources.get("lightbox"),!0),M=this.addEditButton(d,C),P=M.getEditInput();
+P.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");P.checked&&C.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){g(k.checked?e:null,D.checked,E.value,t.getTarget(),t.getColor(),J.checked,L.checked,G.checked,K.checked,C.checked,M.getLink())}),null,b,c);this.showDialog(b.container,340,420,
+!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,g,k,n){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,b||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var l=this.getCurrentFile(),f="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=l&&l.constructor==window.DriveFile&&!c){b=80;var f="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",
+m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));m.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));p.style.marginTop="12px";p.className="geBtn";m.appendChild(p);d.appendChild(m);p=document.createElement("a");
+p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("check"));m.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,
+300,80,!0,!1);b.init()}))}))}var q=null,t=null;if(null!=e||null!=g)b+=30,mxUtils.write(d,mxResources.get("width")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",d.appendChild(q),mxUtils.write(d,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom=
+"10px",t.value=g+"px",d.appendChild(t),mxUtils.br(d);var J=this.addLinkSection(d,n);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var G=this.addCheckbox(d,mxResources.get("lightbox"),!0,null,null,!n),K=this.addEditButton(d,G),C=K.getEditInput();n&&(C.style.marginLeft=G.style.marginLeft,G.style.display="none",b-=30);var M=this.addCheckbox(d,mxResources.get("layers"),!0);M.style.marginLeft=C.style.marginLeft;
+M.style.marginTop="8px";var P=this.addCheckbox(d,mxResources.get("tags"),!0);P.style.marginLeft=C.style.marginLeft;P.style.marginBottom="16px";P.style.marginTop="16px";mxEvent.addListener(G,"change",function(){G.checked?(M.removeAttribute("disabled"),C.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"));C.checked&&G.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,
+d,mxUtils.bind(this,function(){k(J.getTarget(),J.getColor(),null==L?!0:L.checked,G.checked,K.getLink(),M.checked,null!=q?q.value:null,null!=t?t.value:null,P.checked)}),null,mxResources.get("create"),f);this.showDialog(c.container,340,300+b,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):J.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace=
+"nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(k?"10":"4")+"px";d.appendChild(f);if(k){mxUtils.write(d,mxResources.get("zoom")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";d.appendChild(l);mxUtils.write(d,mxResources.get("borderWidth")+
+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";d.appendChild(m);mxUtils.br(d)}var p=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),q=g?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),f=this.editor.graph,t=g?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==
+mxConstants.NONE||null==f.background);null!=t&&(t.style.marginBottom="16px");b=new CustomDialog(this,d,mxUtils.bind(this,function(){var b=parseInt(l.value)/100||1,d=parseInt(m.value)||0;e(!p.checked,null!=q?q.checked:!1,null!=t?t.checked:!1,b,d)}),null,b,c);this.showDialog(b.container,300,(k?25:0)+(g?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,e,g,k,n,p,t,y){p=null!=p?p:Editor.defaultIncludeDiagram;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,
+l="jpeg"==t?200:280,m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(m);mxUtils.write(d,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";d.appendChild(q);mxUtils.write(d,mxResources.get("borderWidth")+":");var u=document.createElement("input");
+u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||"0";d.appendChild(u);mxUtils.br(d);var v=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),K=document.createElement("input");K.style.marginTop="16px";K.style.marginRight="8px";K.style.marginLeft="24px";K.setAttribute("disabled","disabled");K.setAttribute("type","checkbox");var C=document.createElement("select");C.style.marginTop="16px";C.style.marginLeft=
+"8px";b=["selectionOnly","diagram","page"];for(m=0;m<b.length;m++)if(!f.isSelectionEmpty()||"selectionOnly"!=b[m]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(b[m]));M.setAttribute("value",b[m]);C.appendChild(M)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(C),mxUtils.br(d),l+=26,mxEvent.addListener(C,"change",function(){"selectionOnly"==C.value&&(v.checked=!0)})):n&&(d.appendChild(K),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=26,mxEvent.addListener(v,
+"change",function(){v.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}));f.isSelectionEmpty()?y&&(v.style.display="none",v.nextSibling.style.display="none",v.nextSibling.nextSibling.style.display="none",l-=26):(C.value="diagram",K.setAttribute("checked","checked"),K.defaultChecked=!0,mxEvent.addListener(v,"change",function(){C.value=v.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),S=null;Editor.isDarkMode()&&
+(S=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),R=document.createElement("input");R.style.marginTop="16px";R.style.marginRight="8px";R.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||R.setAttribute("disabled","disabled");c&&(d.appendChild(R),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),l+=26);var F=null;if("png"==t||"jpeg"==t)F=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||
+!this.canvasSupported,!1,!0),l+=26;var B=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=t);B.style.marginBottom="16px";var A=document.createElement("select");A.style.maxWidth="260px";A.style.marginLeft="8px";A.style.marginRight="10px";A.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));A.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,
+mxResources.get("openInNewWindow"));A.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));A.appendChild(c);"svg"==t&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(A),mxUtils.br(d),mxUtils.br(d),l+=40);e=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=q.value;k(q.value,P.checked,!v.checked,N.checked,B.checked,R.checked,u.value,K.checked,!1,A.value,
+null!=F?F.checked:null,null!=S?S.checked:null,C.value)}),null,e,g);this.showDialog(e.container,340,l,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=c){var l=document.createElement("h3");mxUtils.write(l,c);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+d.appendChild(l)}var m=this.addCheckbox(d,mxResources.get("fit"),!0),p=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&g,!g),q=this.addCheckbox(d,e),t=this.addCheckbox(d,mxResources.get("lightbox"),!0),E=this.addEditButton(d,t),J=E.getEditInput(),L=1<f.model.getChildCount(f.model.getRoot()),G=this.addCheckbox(d,mxResources.get("layers"),L,!L);G.style.marginLeft=J.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?
+(L&&G.removeAttribute("disabled"),J.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&t.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(m.checked,p.checked,q.checked,t.checked,E.getLink(),G.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,290,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(b,c,e,g,k,n,p,t){function d(d){var c=" ",m="";g&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=l?"&page="+l:"")+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",m+=
+"cursor:pointer;");b&&(m+="max-width:100%;");var q="";e&&(q=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');p('<img src="'+d+'"'+q+(""!=m?' style="'+m+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=g?this.getFileData(!0):null;b=this.createImageDataUri(b,c,"png");d(b)}),null,null,null,mxUtils.bind(this,function(b){t({message:mxResources.get("unknownError")})}),
+null,!0,e?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),f.width*f.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var m="";e&&(m="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(g?"1":"0")+m+"&xml="+encodeURIComponent(c));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?d("data:image/png;base64,"+q.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(b,c,e,g,k,n,p){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!e),f=d.getElementsByTagName("a");if(null!=f)for(var l=0;l<f.length;l++){var m=f[l].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[l].getAttribute("target")&&f[l].removeAttribute("target")}g&&d.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(d);if(e){var q=" ",t="";g&&(q="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('"+
+EditorUi.lightboxHost+"/?client=1"+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");b&&(t+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(b){p('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=t?' style="'+t+'"':"")+q+"/>")}))}else t="",g&&(c=this.getSelectedPageIndex(),d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=c?"&page="+c:"")+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),b&&(b=parseInt(d.getAttribute("width")),k=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+b+" "+k),t+="max-width:100%;max-height:"+k+"px;",d.removeAttribute("height")),""!=t&&d.setAttribute("style",t),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),p(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(b){b=
Math.floor((new Date-b)/1E3);var d=Math.floor(b/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(b/2592E3);if(1<d)return d+" "+mxResources.get("months");d=Math.floor(b/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(b/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(b/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(b,c){if(null!=b){var d=null;if("diagram"==b.nodeName)d=
-b;else if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var d=e[0],g=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:g.apply(this,arguments)}}}null!=d&&(b=Editor.parseDiagramNode(d))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(m){}finally{this.editor.graph=e}return b};EditorUi.prototype.getPngFileProperties=function(b){var d=1,c=0;if(null!=
-b){if(b.hasAttribute("scale")){var e=parseFloat(b.getAttribute("scale"));!isNaN(e)&&0<e&&(d=e)}b.hasAttribute("border")&&(e=parseInt(b.getAttribute("border")),!isNaN(e)&&0<e&&(c=e))}return{scale:d,border:c}};EditorUi.prototype.getEmbeddedPng=function(b,c,e,f,k){try{var d=this.editor.graph,g=null!=d.themes&&"darkTheme"==d.defaultThemeName,l=null;if(null!=e&&0<e.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(e).documentElement,
-!0),d),l=e;else if(g||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),p=d.getGlobalVariable,q=this.pages[0];d.getGlobalVariable=function(b){return"page"==b?q.getName():"pagenumber"==b?1:p.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(q.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==l&&(l=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var g=e.toDataURL("image/png"),g=Editor.writeGraphModelToPng(g,
-"tEXt","mxfile",encodeURIComponent(l));b(g.substring(g.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(F){null!=c&&c(F)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&c(b)}),null,null,f,null,d.shadowVisible,null,d,k)}catch(E){null!=c&&c(E)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,f,k,m,n,t,B,x,E,A,F){t=null!=t?t:!0;n=null!=B?B:c.background;n==mxConstants.NONE&&(n=null);m=c.getSvg(n,x,E,null,null,m,null,null,null,c.shadowVisible||
-A,null,F);(c.shadowVisible||A)&&c.addSvgShadow(m);null!=b&&m.setAttribute("content",b);null!=e&&m.setAttribute("resource",e);if(null!=k)this.embedFonts(m,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){k((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))})):k((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))}));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(m)};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(q){c(b)}}))}catch(l){c(b)}}))};
-EditorUi.prototype.exportImage=function(b,c,e,f,k,m,n,t,B,x,E,A,F){B=null!=B?B:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,t):null,B,null==this.pages||0==this.pages.length,E)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,
-null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,f,null,null,m,n,x,A,F)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,f,k,m,n){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var g=this.editor.graph;if(null!=b&&0<b.length){g.model.beginUpdate();try{var l=mxUtils.parseXml(b);b={};var p=this.editor.extractGraphModel(l.documentElement,
-null!=this.pages);if(null!=p&&"mxfile"==p.nodeName&&null!=this.pages){var q=p.getElementsByTagName("diagram");if(1==q.length&&!m){if(p=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<
-q.length){m=[];var v=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),p=Editor.parseDiagramNode(q[0]),f=!1,v=1);for(;v<q.length;v++){var L=q[v].getAttribute("id");q[v].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(q[v]));b[L]=q[v].getAttribute("id");var K=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[K+1]));g.model.execute(new ChangePage(this,H,H,K,!0));m.push(H)}this.updatePageLinks(b,
-m)}}if(null!=p&&"mxGraphModel"===p.nodeName&&(d=g.importGraphModel(p,c,e,f),null!=d))for(v=0;v<d.length;v++)this.updatePageLinksForCell(b,d[v]);n&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{g.model.endUpdate()}}}catch(C){if(k)throw C;this.handleError(C)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,
-c){var d=document.createElement("div"),e=this.editor.graph,g=e.getLinkForCell(c);null!=g&&e.setLinkForCell(c,this.updatePageLink(b,g));if(e.isHtmlLabel(c)){d.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var f=d.getElementsByTagName("a"),k=!1,n=0;n<f.length;n++)g=f[n].getAttribute("href"),null!=g&&(f[n].setAttribute("href",this.updatePageLink(b,g)),k=!0);k&&e.labelChanged(c,d.innerHTML)}for(n=0;n<e.model.getChildCount(c);n++)this.updatePageLinksForCell(b,e.model.getChildAt(c,n))};EditorUi.prototype.updatePageLink=
-function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var g=0;g<e.actions.length;g++){var f=e.actions[g];if(null!=f.open&&Graph.isPageLink(f.open)){var k=f.open.substring(f.open.indexOf(",")+1),d=b[k];null!=d?f.open="data:page/id,"+d:null==this.getPageById(k)&&delete f.open}}c="data:action/json,"+JSON.stringify(e)}}catch(u){}return c};
-EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,e,f,k){f=null!=f?f:b.name;e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(f);try{var g="UNKNOWN-VISIO",l=f.lastIndexOf(".");if(0<=l&&l<f.length)g=f.substring(l+1).toUpperCase();else{var m=f.lastIndexOf("/");0<=
-m&&m<f.length&&(f=f.substring(m+1))}EditorUi.logEvent({category:g+"-MS-IMPORT-FILE",action:"filename_"+f,label:d?"remote":"local"})}catch(A){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",b,f);var p=new XMLHttpRequest;p.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(f)?"?stencil=1":""));p.responseType="blob";this.addRemoteServiceSecurityCheck(p);
-null!=k&&p.setRequestHeader("x-convert-custom",k);p.onreadystatechange=mxUtils.bind(this,function(){if(4==p.readyState)if(200<=p.status&&299>=p.status)try{var b=p.response;if("text/xml"==b.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(L){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,f)}catch(I){e(I)}else try{""==p.responseType||"text"==p.responseType?e({message:p.responseText}):(d=new FileReader,d.onload=
-function(){e({message:JSON.parse(d.result).Message})},d.readAsText(p.response))}catch(I){e({})}});p.send(d)}else try{this.doImportVisio(b,c,e,f)}catch(A){e(A)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(b,c,e){e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});
-var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(p){e(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||
+b;else if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var d=e[0],f=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:f.apply(this,arguments)}}}null!=d&&(b=Editor.parseDiagramNode(d))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(n){}finally{this.editor.graph=e}return b};EditorUi.prototype.getPngFileProperties=function(b){var d=1,c=0;if(null!=
+b){if(b.hasAttribute("scale")){var e=parseFloat(b.getAttribute("scale"));!isNaN(e)&&0<e&&(d=e)}b.hasAttribute("border")&&(e=parseInt(b.getAttribute("border")),!isNaN(e)&&0<e&&(c=e))}return{scale:d,border:c}};EditorUi.prototype.getEmbeddedPng=function(b,c,e,g,k){try{var d=this.editor.graph,f=null!=d.themes&&"darkTheme"==d.defaultThemeName,l=null;if(null!=e&&0<e.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(e).documentElement,
+!0),d),l=e;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),m=d.getGlobalVariable,p=this.pages[0];d.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(p.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==l&&(l=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=e.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,
+"tEXt","mxfile",encodeURIComponent(l));b(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(E){null!=c&&c(E)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&c(b)}),null,null,g,null,d.shadowVisible,null,d,k)}catch(H){null!=c&&c(H)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,n,p,t,y,x,H,D,E){t=null!=t?t:!0;p=null!=y?y:c.background;p==mxConstants.NONE&&(p=null);n=c.getSvg(p,x,H,null,null,n,null,null,null,c.shadowVisible||
+D,null,E);(c.shadowVisible||D)&&c.addSvgShadow(n);null!=b&&n.setAttribute("content",b);null!=e&&n.setAttribute("resource",e);if(null!=k)this.embedFonts(n,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){k((g?"":'<?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))})):k((g?"":'<?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))}));else return(g?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(n)};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(m){c(b)}}))}catch(l){c(b)}}))};
+EditorUi.prototype.exportImage=function(b,c,e,g,k,n,p,t,y,x,H,D,E){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,t):null,y,null==this.pages||0==this.pages.length,H)}catch(G){this.handleError(G)}}),null,this.thumbImageCache,
+null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,n,p,x,D,E)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,g,k,n,p){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var f=this.editor.graph;if(null!=b&&0<b.length){f.model.beginUpdate();try{var l=mxUtils.parseXml(b);b={};var m=this.editor.extractGraphModel(l.documentElement,
+null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var q=m.getElementsByTagName("diagram");if(1==q.length&&!n){if(m=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<
+q.length){n=[];var v=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(q[0]),g=!1,v=1);for(;v<q.length;v++){var L=q[v].getAttribute("id");q[v].removeAttribute("id");var G=this.updatePageRoot(new DiagramPage(q[v]));b[L]=q[v].getAttribute("id");var K=this.pages.length;null==G.getName()&&G.setName(mxResources.get("pageWithNumber",[K+1]));f.model.execute(new ChangePage(this,G,G,K,!0));n.push(G)}this.updatePageLinks(b,
+n)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,c,e,g),null!=d))for(v=0;v<d.length;v++)this.updatePageLinksForCell(b,d[v]);p&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(C){if(k)throw C;this.handleError(C)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,
+c){var d=document.createElement("div"),e=this.editor.graph,f=e.getLinkForCell(c);null!=f&&e.setLinkForCell(c,this.updatePageLink(b,f));if(e.isHtmlLabel(c)){d.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var g=d.getElementsByTagName("a"),k=!1,p=0;p<g.length;p++)f=g[p].getAttribute("href"),null!=f&&(g[p].setAttribute("href",this.updatePageLink(b,f)),k=!0);k&&e.labelChanged(c,d.innerHTML)}for(p=0;p<e.model.getChildCount(c);p++)this.updatePageLinksForCell(b,e.model.getChildAt(c,p))};EditorUi.prototype.updatePageLink=
+function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var f=0;f<e.actions.length;f++){var g=e.actions[f];if(null!=g.open&&Graph.isPageLink(g.open)){var k=g.open.substring(g.open.indexOf(",")+1),d=b[k];null!=d?g.open="data:page/id,"+d:null==this.getPageById(k)&&delete g.open}}c="data:action/json,"+JSON.stringify(e)}}catch(u){}return c};
+EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,e,g,k){g=null!=g?g:b.name;e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(g);try{var f="UNKNOWN-VISIO",l=g.lastIndexOf(".");if(0<=l&&l<g.length)f=g.substring(l+1).toUpperCase();else{var m=g.lastIndexOf("/");0<=
+m&&m<g.length&&(g=g.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+g,label:d?"remote":"local"})}catch(D){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",b,g);var n=new XMLHttpRequest;n.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(g)?"?stencil=1":""));n.responseType="blob";this.addRemoteServiceSecurityCheck(n);
+null!=k&&n.setRequestHeader("x-convert-custom",k);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var b=n.response;if("text/xml"==b.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(L){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(J){e(J)}else try{""==n.responseType||"text"==n.responseType?e({message:n.responseText}):(d=new FileReader,d.onload=
+function(){e({message:JSON.parse(d.result).Message})},d.readAsText(n.response))}catch(J){e({})}});n.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(D){e(D)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(b,c,e){e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});
+var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(q){e(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||
this.handleError({message:mxResources.get("unknownError")})}catch(l){this.handleError(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.convertLucidChart=function(b,c,e){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
-action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(p){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(p){null!=window.console&&console.error(p),e(p)}}else e({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
-function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",d)})})})}):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(b,c,e,f){var d=this,g=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=
-b.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(b).getElementsByTagName("svg");if(0<c.length){var g=parseFloat(c[0].getAttribute("width")),k=parseFloat(c[0].getAttribute("height"));if(isNaN(g)||isNaN(k))try{var l=c[0].getAttribute("viewBox").split(/\s+/),g=parseFloat(l[2]),k=parseFloat(l[3])}catch(A){g=g||100,k=k||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),g,k)}else f({message:mxResources.get("invalidInput")})}catch(A){f(A)}})}catch(v){f(v)}};
-"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?g():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",g):mxscript("js/extensions.min.js",g))};EditorUi.prototype.generatePlantUmlImage=function(b,c,e,f){function d(b,d,c){c1=b>>2;c2=(b&3)<<4|d>>4;c3=(d&15)<<2|c>>6;c4=c&63;r="";r+=g(c1&63);r+=g(c2&63);r+=g(c3&63);return r+=g(c4&63)}function g(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+
+action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(q){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(q){null!=window.console&&console.error(q),e(q)}}else e({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
+function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",d)})})})}):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(b,c,e,g){var d=this,f=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=
+b.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(b).getElementsByTagName("svg");if(0<c.length){var f=parseFloat(c[0].getAttribute("width")),k=parseFloat(c[0].getAttribute("height"));if(isNaN(f)||isNaN(k))try{var l=c[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(l[2]),k=parseFloat(l[3])}catch(D){f=f||100,k=k||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,k)}else g({message:mxResources.get("invalidInput")})}catch(D){g(D)}})}catch(v){g(v)}};
+"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(b,c,e,g){function d(b,d,c){c1=b>>2;c2=(b&3)<<4|d>>4;c3=(d&15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+
b);b-=26;return 0==b?"-":1==b?"_":"?"}var k=new XMLHttpRequest;k.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(b){r="";for(i=0;i<b.length;i+=3)r=i+2==b.length?r+d(b.charCodeAt(i),b.charCodeAt(i+1),0):i+1==b.length?r+d(b.charCodeAt(i),0,0):r+d(b.charCodeAt(i),b.charCodeAt(i+1),b.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(b))),!0);"txt"!=c&&(k.responseType="blob");k.onload=function(b){if(200<=this.status&&300>this.status)if("txt"==
-c)e(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,g=c.height;if(0==b&&0==g){var k=d.result,l=k.indexOf(","),m=decodeURIComponent(escape(atob(k.substring(l+1)))),p=mxUtils.parseXml(m).getElementsByTagName("svg");0<p.length&&(b=parseFloat(p[0].getAttribute("width")),g=parseFloat(p[0].getAttribute("height")))}e(d.result,b,g)}catch(C){f(C)}};c.src=d.result};d.onerror=function(b){f(b)}}else f(b)};k.onerror=
-function(b){f(b)};k.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,g=null;d.getModel().beginUpdate();try{g=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(g,!0)}finally{d.getModel().endUpdate()}return g};EditorUi.prototype.insertTextAt=function(b,c,e,f,k,m,n,t){m=null!=m?m:!0;n=null!=n?n:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
-" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var g=Editor.extractGraphModelFromPdf(b);if(null!=g&&0<g.length)return this.importXml(g,c,e,m,!0,t)}if("data:image/png;base64,"==
-b.substring(0,22)&&(g=this.extractGraphModelFromPng(b),null!=g&&0<g.length))return this.importXml(g,c,e,m,!0,t);if("data:image/svg+xml;"==b.substring(0,19))try{g=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(g=b.substring(b.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0)):g=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(g,c,e,m,!0,t);if(0<l.length)return l}catch(F){}this.loadImage(b,mxUtils.bind(this,function(g){if("data:"==b.substring(0,
-5))this.resizeImage(g,b,mxUtils.bind(this,function(b,g,f){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),n,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/g.width,this.maxImageSize/g.height)),k=Math.round(g.width*f);g=Math.round(g.height*f);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),
-k,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var g=null;d.getModel().beginUpdate();try{g=d.insertVertex(d.getDefaultParent(),null,b,d.snap(c),d.snap(e),1,1,"text;"+(f?"html=1;":"")),d.updateCellSize(g),d.fireEvent(new mxEventObject("textInserted","cells",[g]))}finally{d.getModel().endUpdate()}d.setSelectionCell(g)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,
-c,e,m,null,t);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,m,null,t))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(c),d.snap(e),1,1,"text;whiteSpace=wrap;"+(f?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==b.charAt(0)&&b.indexOf(">")==
-b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");k.value=b;d.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var p=d.getPreferredSizeForCell(k,this.maxTextWidth);k.geometry.width=p.width;k.geometry.height=p.height}Graph.isLink(k.value)&&d.setLinkForCell(k,k.value);k.geometry.width+=d.gridSize;k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=
+c)e(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,f=c.height;if(0==b&&0==f){var k=d.result,l=k.indexOf(","),m=decodeURIComponent(escape(atob(k.substring(l+1)))),n=mxUtils.parseXml(m).getElementsByTagName("svg");0<n.length&&(b=parseFloat(n[0].getAttribute("width")),f=parseFloat(n[0].getAttribute("height")))}e(d.result,b,f)}catch(C){g(C)}};c.src=d.result};d.onerror=function(b){g(b)}}else g(b)};k.onerror=
+function(b){g(b)};k.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(b,c,e,g,k,n,p,t){n=null!=n?n:!0;p=null!=p?p:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
+" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var f=Editor.extractGraphModelFromPdf(b);if(null!=f&&0<f.length)return this.importXml(f,c,e,n,!0,t)}if("data:image/png;base64,"==
+b.substring(0,22)&&(f=this.extractGraphModelFromPng(b),null!=f&&0<f.length))return this.importXml(f,c,e,n,!0,t);if("data:image/svg+xml;"==b.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(f=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(f,c,e,n,!0,t);if(0<l.length)return l}catch(E){}this.loadImage(b,mxUtils.bind(this,function(f){if("data:"==b.substring(0,
+5))this.resizeImage(f,b,mxUtils.bind(this,function(b,f,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),p,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),k=Math.round(f.width*g);f=Math.round(f.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),
+k,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,b,d.snap(c),d.snap(e),1,1,"text;"+(g?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,
+c,e,n,null,t);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,n,null,t))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(c),d.snap(e),1,1,"text;whiteSpace=wrap;"+(g?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==b.charAt(0)&&b.indexOf(">")==
+b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");k.value=b;d.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var m=d.getPreferredSizeForCell(k,this.maxTextWidth);k.geometry.width=m.width;k.geometry.height=m.height}Graph.isLink(k.value)&&d.setLinkForCell(k,k.value);k.geometry.width+=d.gridSize;k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=
function(b){var d=-1;do b/=1024,d++;while(1024<b);return Math.max(b,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var d=b.indexOf(";");0<d&&(b=b.substring(0,d)+b.substring(b.indexOf(",",d+1)))}return b};EditorUi.prototype.isRemoteFileFormat=function(b,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)};EditorUi.prototype.isLucidChartData=function(b){return null!=b&&('{"state":"{\\"Properties\\":'==
b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.importLocalFile=function(b,c){if(b&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=
!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(b,d){StorageFile.listFiles(this,"F",b,d)});window.openBrowserFile=mxUtils.bind(this,function(b,d,c){StorageFile.getFileContent(this,b,d,c)});window.deleteBrowserFile=mxUtils.bind(this,function(b,d,c){StorageFile.deleteFile(this,b,d,c)});if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!b}window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,
-function(b,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var c=new Blob([b],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),null,d)}else this.editor.graph.setSelectionCells(this.importXml(b,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var g=this.dialog,f=g.close;this.dialog.close=mxUtils.bind(this,
-function(b){Editor.useLocalStorage=e;f.apply(g,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,e){var d=this,g=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(b).then(function(g){if(0==Object.keys(g.files).length)e();else{var f=0,k,l=!1;g.forEach(function(b,d){var g=d.name.toLowerCase();"diagram/diagram.xml"==g?(l=!0,d.async("string").then(function(b){0==b.indexOf("<mxfile ")?
-c(b):e()})):0==g.indexOf("versions/")&&(g=parseInt(g.substr(9)),g>f&&(f=g,k=d))});0<f?k.async("string").then(function(g){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(g,b.name)?d.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):e())}),b.name):e()}):l||e()}},function(b){e(b)}):e()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?g():(this.loadingExtensions=
-!0,mxscript("js/extensions.min.js",g))};EditorUi.prototype.importFile=function(b,c,e,f,k,m,n,t,B,x,E,A){x=null!=x?x:!0;var d=!1,g=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,n)):d=this.importXml(b,e,f,x,null,null!=A?mxEvent.isControlDown(A):null);null!=t&&t(d)});"image"==c.substring(0,5)?(B=!1,"image/png"==c.substring(0,9)&&(c=E?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(g=this.importXml(c,e,f,x,
-null,null!=A?mxEvent.isControlDown(A):null),B=!0)),B||(c=this.editor.graph,E=b.indexOf(";"),0<E&&(b=b.substring(0,E)+b.substring(b.indexOf(",",E+1))),x&&c.isGridEnabled()&&(e=c.snap(e),f=c.snap(f)),g=[c.insertVertex(null,null,"",e,f,k,m,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=B&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?
-(d=!0,this.importVisio(B,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,n)?(d=!0,this.parseFile(null!=B?B:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=t&&t(null))}),n)):0==b.indexOf("PK")&&null!=B?(d=!0,this.importZipFile(B,l,mxUtils.bind(this,function(){g=this.insertTextAt(this.validateFileData(b),e,f,!0,null,x);t(g)}))):/(\.v(sd|dx))($|\?)/i.test(n)||/(\.vs(s|x))($|\?)/i.test(n)||
-(g=this.insertTextAt(this.validateFileData(b),e,f,!0,null,x,null,null!=A?mxEvent.isControlDown(A):null));d||null==t||t(g);return g};EditorUi.prototype.importFiles=function(b,c,e,f,k,m,n,t,B,x,E,A,F){f=null!=f?f:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,g=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var p=E||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>p){l=!0;break}var u=mxUtils.bind(this,
-function(){var l=this.editor.graph,p=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,g,f,k,l,m,p){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,l)),null):this.importFile(b,c,e,g,f,k,l,m,p,d,A,F)}catch(ca){return this.handleError(ca),null}});m=null!=m?m:mxUtils.bind(this,function(b){l.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,u=q,v=[],C=mxUtils.bind(this,function(b,
-d){v[b]=d;if(0==--u){this.spinner.stop();if(null!=t)t(v);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<v.length;e++){var g=v[e]();null!=g&&(c=c.concat(g))}}finally{l.getModel().endUpdate()}}m(c)}}),y=0;y<q;y++)mxUtils.bind(this,function(d){var m=b[d];if(null!=m){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==n||n(m))if("image/"==m.type.substring(0,6))if("image/svg"==m.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+
-1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],M=A?null:u.getAttribute("content");null!=M&&"<"!=M.charAt(0)&&"%"!=M.charAt(0)&&(M=unescape(window.atob?atob(M):Base64.decode(M,!0)));null!=M&&"%"==M.charAt(0)&&(M=decodeURIComponent(M));null==M||"<mxfile "!==M.substring(0,8)&&"<mxGraphModel "!==M.substring(0,14)?C(d,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var g=b[0],n=g.getAttribute("width"),
-u=g.getAttribute("height"),n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN,u=null!=u&&"%"!=u.charAt(u.length-1)?parseFloat(u):NaN,x=g.getAttribute("viewBox");if(null==x||0==x.length)g.setAttribute("viewBox","0 0 "+n+" "+u);else if(isNaN(n)||isNaN(u)){var A=x.split(" ");3<A.length&&(n=parseFloat(A[2]),u=parseFloat(A[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(g));var C=Math.min(1,Math.min(f/Math.max(1,n)),f/Math.max(1,u)),M=k(q,m.type,c+d*p,e+d*p,Math.max(1,Math.round(n*C)),Math.max(1,Math.round(u*
-C)),m.name);if(isNaN(n)||isNaN(u)){var y=new Image;y.onload=mxUtils.bind(this,function(){n=Math.max(1,y.width);u=Math.max(1,y.height);M[0].geometry.width=n;M[0].geometry.height=u;g.setAttribute("viewBox","0 0 "+n+" "+u);q=Editor.createSvgDataUri(mxUtils.getXml(g));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));l.setCellStyles("image",q,[M[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(g))}return M}}}catch(ba){}return null})):C(d,mxUtils.bind(this,function(){return k(M,
-"text/xml",c+d*p,e+d*p,0,0,m.name)}))}else C(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==m.type){var y=A?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var D=new Image;D.src=b.target.result;C(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*p,e+d*p,D.width,D.height,m.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,b.target.result,mxUtils.bind(this,function(b,l,n){C(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=g&&this.isResampleImageSize(m.size,E)?Math.min(1,Math.min(f/l,f/n)):1;return k(b,m.type,c+d*p,e+d*p,Math.round(l*q),Math.round(n*q),m.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),g,f,E,m.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,k(q,m.type,c+d*p,e+d*p,240,160,m.name,function(b){C(d,function(){return b})},m)});/(\.v(dx|sdx?))($|\?)/i.test(m.name)||/(\.vs(x|sx?))($|\?)/i.test(m.name)?k(null,m.type,c+d*p,e+d*p,240,160,m.name,function(b){C(d,function(){return b})},m):"image"==m.type.substring(0,5)||"application/pdf"==m.type?q.readAsDataURL(m):q.readAsText(m)}})(y)});if(l){l=
-[];for(q=0;q<b.length;q++)l.push(b[q]);b=l;this.confirmImageResize(function(b){g=b;u()},B)}else u()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,g=function(e,g){if(e||c)mxSettings.setResizeImages(e?g:null),mxSettings.save();d();b(g)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
-function(b){g(b,!0)},function(b){g(b,!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):g(!1,e)};EditorUi.prototype.parseFile=function(b,c,e){e=null!=e?e:b.name;var d=new FormData;d.append("format","xml");d.append("upfile",b,e);var g=new XMLHttpRequest;g.open("POST",
-OPEN_URL);g.onreadystatechange=function(){c(g)};g.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(m){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,f,k,m,n){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),g=Math.max(1,b.height);if(f&&this.isResampleImageSize(null!=n?n:c.length,m))try{var l=Math.max(d/k,g/k);if(1<l){var p=Math.round(d/l),q=Math.round(g/
-l),t=document.createElement("canvas");t.width=p;t.height=q;t.getContext("2d").drawImage(b,0,0,p,q);var v=t.toDataURL();if(v.length<c.length){var L=document.createElement("canvas");L.width=p;L.height=q;var H=L.toDataURL();v!==H&&(c=v,d=p,g=q)}}}catch(K){}e(c,d,g)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:
-120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(p){if(null!=e)e(p);else throw p;}};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,g){var f=JSON.parse(g);e=
-new TextareaDialog(b,mxResources.get("plantUml")+":",f.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,f.format,function(g,k,l){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==f.format)c.labelChanged(d,"<pre>"+g+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(g),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=k,m.height=l,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",
-JSON.stringify({data:e,format:f.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(d,e,g){var f=JSON.parse(g);e=new TextareaDialog(b,mxResources.get("mermaid")+":",f.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(e,f.config,function(g,k,l){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",
-g,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,k),m.height=Math.max(m.height,l),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,config:f.config},null,2))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;c.cellEditor.startEditing=function(d,g){try{var f=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=
-f)this.editPlantUmlData(d,g,f);else if(f=this.graph.getAttributeForCell(d,"mermaidData"),null!=f)this.editMermaidData(d,g,f);else{var k=c.getCellStyle(d);"1"==mxUtils.getValue(k,"metaEdit","0")?b.showDataDialog(d):e.apply(this,arguments)}}catch(R){b.handleError(R)}};c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(N){b.handleError(N)}return c};var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,
+function(b,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var c=new Blob([b],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),null,d)}else this.editor.graph.setSelectionCells(this.importXml(b,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var f=this.dialog,g=f.close;this.dialog.close=mxUtils.bind(this,
+function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,e){var d=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(b).then(function(f){if(0==Object.keys(f.files).length)e();else{var g=0,k,l=!1;f.forEach(function(b,d){var f=d.name.toLowerCase();"diagram/diagram.xml"==f?(l=!0,d.async("string").then(function(b){0==b.indexOf("<mxfile ")?
+c(b):e()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>g&&(g=f,k=d))});0<g?k.async("string").then(function(f){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(f,b.name)?d.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):e())}),b.name):e()}):l||e()}},function(b){e(b)}):e()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=
+!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(b,c,e,g,k,n,p,t,y,x,H,D){x=null!=x?x:!0;var d=!1,f=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,p)):d=this.importXml(b,e,g,x,null,null!=D?mxEvent.isControlDown(D):null);null!=t&&t(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=H?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,
+null,null!=D?mxEvent.isControlDown(D):null),y=!0)),y||(c=this.editor.graph,H=b.indexOf(";"),0<H&&(b=b.substring(0,H)+b.substring(b.indexOf(",",H+1))),x&&c.isGridEnabled()&&(e=c.snap(e),g=c.snap(g)),f=[c.insertVertex(null,null,"",e,g,k,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=y&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?
+(d=!0,this.importVisio(y,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,p)?(d=!0,this.parseFile(null!=y?y:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=t&&t(null))}),p)):0==b.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,l,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x);t(f)}))):/(\.v(sd|dx))($|\?)/i.test(p)||/(\.vs(s|x))($|\?)/i.test(p)||
+(f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x,null,null!=D?mxEvent.isControlDown(D):null));d||null==t||t(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,p,t,y,x,H,D,E){g=null!=g?g:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,f=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var m=H||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>m){l=!0;break}var u=mxUtils.bind(this,
+function(){var l=this.editor.graph,m=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,f,g,k,l,m,n){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,l)),null):this.importFile(b,c,e,f,g,k,l,m,n,d,D,E)}catch(ca){return this.handleError(ca),null}});n=null!=n?n:mxUtils.bind(this,function(b){l.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,u=q,v=[],C=mxUtils.bind(this,function(b,
+d){v[b]=d;if(0==--u){this.spinner.stop();if(null!=t)t(v);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<v.length;e++){var f=v[e]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}n(c)}}),y=0;y<q;y++)mxUtils.bind(this,function(d){var n=b[d];if(null!=n){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==p||p(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+
+1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],N=D?null:u.getAttribute("content");null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(N,!0)));null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N));null==N||"<mxfile "!==N.substring(0,8)&&"<mxGraphModel "!==N.substring(0,14)?C(d,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var f=b[0],p=f.getAttribute("width"),
+x=f.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,u=f.getAttribute("viewBox");if(null==u||0==u.length)f.setAttribute("viewBox","0 0 "+p+" "+x);else if(isNaN(p)||isNaN(x)){var C=u.split(" ");3<C.length&&(p=parseFloat(C[2]),x=parseFloat(C[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(f));var N=Math.min(1,Math.min(g/Math.max(1,p)),g/Math.max(1,x)),D=k(q,n.type,c+d*m,e+d*m,Math.max(1,Math.round(p*N)),Math.max(1,Math.round(x*
+N)),n.name);if(isNaN(p)||isNaN(x)){var y=new Image;y.onload=mxUtils.bind(this,function(){p=Math.max(1,y.width);x=Math.max(1,y.height);D[0].geometry.width=p;D[0].geometry.height=x;f.setAttribute("viewBox","0 0 "+p+" "+x);q=Editor.createSvgDataUri(mxUtils.getXml(f));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));l.setCellStyles("image",q,[D[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return D}}}catch(ba){}return null})):C(d,mxUtils.bind(this,function(){return k(N,
+"text/xml",c+d*m,e+d*m,0,0,n.name)}))}else C(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==n.type){var y=D?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var B=new Image;B.src=b.target.result;C(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*m,e+d*m,B.width,B.height,n.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,b.target.result,mxUtils.bind(this,function(b,l,p){C(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(n.size,H)?Math.min(1,Math.min(g/l,g/p)):1;return k(b,n.type,c+d*m,e+d*m,Math.round(l*q),Math.round(p*q),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),f,g,H,n.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,k(q,n.type,c+d*m,e+d*m,240,160,n.name,function(b){C(d,function(){return b})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?k(null,n.type,c+d*m,e+d*m,240,160,n.name,function(b){C(d,function(){return b})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?q.readAsDataURL(n):q.readAsText(n)}})(y)});if(l){l=
+[];for(q=0;q<b.length;q++)l.push(b[q]);b=l;this.confirmImageResize(function(b){f=b;u()},y)}else u()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(e,f){if(e||c)mxSettings.setResizeImages(e?f:null),mxSettings.save();d();b(f)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
+function(b){f(b,!0)},function(b){f(b,!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,e)};EditorUi.prototype.parseFile=function(b,c,e){e=null!=e?e:b.name;var d=new FormData;d.append("format","xml");d.append("upfile",b,e);var f=new XMLHttpRequest;f.open("POST",
+OPEN_URL);f.onreadystatechange=function(){c(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(n){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,g,k,n,p){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),f=Math.max(1,b.height);if(g&&this.isResampleImageSize(null!=p?p:c.length,n))try{var l=Math.max(d/k,f/k);if(1<l){var m=Math.round(d/l),q=Math.round(f/
+l),t=document.createElement("canvas");t.width=m;t.height=q;t.getContext("2d").drawImage(b,0,0,m,q);var v=t.toDataURL();if(v.length<c.length){var L=document.createElement("canvas");L.width=m;L.height=q;var G=L.toDataURL();v!==G&&(c=v,d=m,f=q)}}}catch(K){}e(c,d,f)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:
+120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(q){if(null!=e)e(q);else throw q;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,f){var g=JSON.parse(f);e=
+new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,g.format,function(f,k,l){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(d,"<pre>"+f+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(f),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=k,m.height=l,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",
+JSON.stringify({data:e,format:g.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(e,g.config,function(f,k,l){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",
+f,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,k),m.height=Math.max(m.height,l),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;c.cellEditor.startEditing=function(d,f){try{var g=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=
+g)this.editPlantUmlData(d,f,g);else if(g=this.graph.getAttributeForCell(d,"mermaidData"),null!=g)this.editMermaidData(d,f,g);else{var k=c.getCellStyle(d);"1"==mxUtils.getValue(k,"metaEdit","0")?b.showDataDialog(d):e.apply(this,arguments)}}catch(S){b.handleError(S)}};c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(M){b.handleError(M)}return c};var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,
arguments);null!=d&&null!=d.src&&Graph.isPageLink(d.src)&&(d={originalSrc:d.src});return d};var p=c.setBackgroundImage;c.setBackgroundImage=function(d){null!=d&&null!=d.originalSrc&&(d=b.createImageForPageLink(d.originalSrc,b.currentPage));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,
-function(b,d){var e=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=e){var g=e.indexOf(",");if(0<g)for(var e=e.substring(g+1),g=d.getProperty("patches"),f=0;f<g.length;f++)if(null!=g[f][EditorUi.DIFF_UPDATE]&&null!=g[f][EditorUi.DIFF_UPDATE][e]){c.refreshBackgroundImage();c.view.validateBackgroundImage();break}}}));var m=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,d){var c=m.apply(this,arguments);null==c||null==c.originalSrc||d||(c={src:c.originalSrc});return c};
-var n=this.clearDefaultStyle;this.clearDefaultStyle=function(){n.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var t=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==
-urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return t.apply(this,arguments)};var B=c.addClickHandler;c.addClickHandler=function(b,d,e){var g=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=g&&g(b,d)};B.call(this,b,d,e)};f.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,
-null,!0);if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(d,c,e){b.editor.graph.isSelectionEmpty()?x.apply(this,arguments):b.menus.addMenuItems(d,"delete - cut copy copyAsImage - duplicate".split(" "),null,e)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var E=c.getExportVariables;c.getExportVariables=
-function(){var d=E.apply(this,arguments),c=b.getCurrentFile();null!=c&&(d.filename=c.getTitle());d.pagecount=null!=b.pages?b.pages.length:1;d.page=null!=b.currentPage?b.currentPage.getName():"";d.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return d};var A=c.getGlobalVariable;c.getGlobalVariable=function(d){var c=b.getCurrentFile();return"filename"==d&&null!=c?c.getTitle():"page"==d&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==d?null!=b.currentPage&&
-null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==d?null!=b.pages?b.pages.length:1:A.apply(this,arguments)};var F=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var g=d.getAttribute("href");if(null==g||!c.isCustomLink(g)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))F.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(g),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var d=b.defaultFilename,
-c=b.getCurrentFile();null!=c&&(d=null!=c.getTitle()?c.getTitle():d);return d};var I=this.actions.get("print");I.setEnabled(!mxClient.IS_IOS||!navigator.standalone);I.visible=I.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),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,
+function(b,d){var e=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=e){var f=e.indexOf(",");if(0<f)for(var e=e.substring(f+1),f=d.getProperty("patches"),g=0;g<f.length;g++)if(null!=f[g][EditorUi.DIFF_UPDATE]&&null!=f[g][EditorUi.DIFF_UPDATE][e]){c.refreshBackgroundImage();c.view.validateBackgroundImage();break}}}));var n=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,d){var c=n.apply(this,arguments);null==c||null==c.originalSrc||d||(c={src:c.originalSrc});return c};
+var t=this.clearDefaultStyle;this.clearDefaultStyle=function(){t.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var u=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==
+urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return u.apply(this,arguments)};var y=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=f&&f(b,d)};y.call(this,b,d,e)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,
+null,!0);if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(d,c,e){b.editor.graph.isSelectionEmpty()?x.apply(this,arguments):b.menus.addMenuItems(d,"delete - cut copy copyAsImage - duplicate".split(" "),null,e)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var H=c.getExportVariables;c.getExportVariables=
+function(){var d=H.apply(this,arguments),c=b.getCurrentFile();null!=c&&(d.filename=c.getTitle());d.pagecount=null!=b.pages?b.pages.length:1;d.page=null!=b.currentPage?b.currentPage.getName():"";d.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return d};var D=c.getGlobalVariable;c.getGlobalVariable=function(d){var c=b.getCurrentFile();return"filename"==d&&null!=c?c.getTitle():"page"==d&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==d?null!=b.currentPage&&
+null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==d?null!=b.pages?b.pages.length:1:D.apply(this,arguments)};var E=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isCustomLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))E.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var d=b.defaultFilename,
+c=b.getCurrentFile();null!=c&&(d=null!=c.getTitle()?c.getTitle():d);return d};var J=this.actions.get("print");J.setEnabled(!mxClient.IS_IOS||!navigator.standalone);J.visible=J.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),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),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&c.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(b){var d=c.cellEditor.text2,e=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(d,
-"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(d));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,g,f,k){c.insertImage(b,f,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},
-mxEvent.isControlDown(b));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)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var e=Math.max(1,b.width);b=Math.max(1,b.height);var g=this.maxImageSize,g=Math.min(1,Math.min(g/Math.max(1,e)),g/Math.max(1,b));c.insertImage(decodeURIComponent(d),e*g,b*g)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=
-mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(I=this.editor.graph.view,I.setUnit(mxSettings.getUnit()),I.addListener("unitChanged",function(b,d){mxSettings.setUnit(d.getProperty("unit"));mxSettings.save()}),
-this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,I.unit),this.refresh());if("1"==urlParams.styledev){I=document.getElementById("geFooter");null!=I&&(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)})),I.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,d){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 L=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:L.apply(this,arguments)}}I=document.getElementById("geInfo");null!=I&&I.parentNode.removeChild(I);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var H=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=H&&(H.parentNode.removeChild(H),
-H=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==H&&(!mxClient.IS_IE||10<document.documentMode)&&(H=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=H&&(H.parentNode.removeChild(H),H=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),
-e=c.view.translate,g=c.view.scale,f=d.x/g-e.x,k=d.y/g-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(k=f=null),this.importFiles(b.dataTransfer.files,f,k,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(k=f=0);var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,
-null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,f,k,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var p=null,e=d.getElementsByTagName("img");null!=e&&1==e.length?(m=e[0].getAttribute("src"),null==m&&(m=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(p=!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):
-(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var n=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,f,k,!0,p,null,n,mxEvent.isControlDown(b)))});p&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){n=b;q()},mxEvent.isControlDown(b)):q()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);
-var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",f,k,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(l,f,k,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,k,!0))}}b.stopPropagation();
-b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=d.clipboardData||d.originalEvent.clipboardData,e=!1,g=0;g<c.types.length;g++)if("text/"===c.types[g].substring(0,5)){e=!0;break}if(!e){var f=c.items;for(index in f){var k=
-f[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,g,f,k){b.insertImage(d,f,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var n=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],n.x,n.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(B){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){e.innerHTML=
+"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(d));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,f,g,k){c.insertImage(b,g,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},
+mxEvent.isControlDown(b));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)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var e=Math.max(1,b.width);b=Math.max(1,b.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,e)),f/Math.max(1,b));c.insertImage(decodeURIComponent(d),e*f,b*f)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=
+mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(J=this.editor.graph.view,J.setUnit(mxSettings.getUnit()),J.addListener("unitChanged",function(b,d){mxSettings.setUnit(d.getProperty("unit"));mxSettings.save()}),
+this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,J.unit),this.refresh());if("1"==urlParams.styledev){J=document.getElementById("geFooter");null!=J&&(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)})),J.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,d){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 L=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:L.apply(this,arguments)}}J=document.getElementById("geInfo");null!=J&&J.parentNode.removeChild(J);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var G=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=G&&(G.parentNode.removeChild(G),
+G=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=G&&(G.parentNode.removeChild(G),G=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),
+e=c.view.translate,f=c.view.scale,g=d.x/f-e.x,k=d.y/f-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(k=g=null),this.importFiles(b.dataTransfer.files,g,k,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(k=g=0);var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,
+null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,k,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var n=null,e=d.getElementsByTagName("img");null!=e&&1==e.length?(m=e[0].getAttribute("src"),null==m&&(m=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(n=!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):
+(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var p=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,k,!0,n,null,p,mxEvent.isControlDown(b)))});n&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){p=b;q()},mxEvent.isControlDown(b)):q()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);
+var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,k,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(l,g,k,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),g,k,!0))}}b.stopPropagation();
+b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=d.clipboardData||d.originalEvent.clipboardData,e=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){e=!0;break}if(!e){var g=c.items;for(index in g){var k=
+g[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,f,g,k){b.insertImage(d,g,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var p=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],p.x,p.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){e.innerHTML=
"&nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,e=document.createElement("div");e.setAttribute("autocomplete","off");e.setAttribute("autocorrect","off");e.setAttribute("autocapitalize","off");e.setAttribute("spellcheck","false");e.style.textRendering="optimizeSpeed";e.style.fontFamily="monospace";e.style.wordBreak="break-all";e.style.background="transparent";e.style.color="transparent";e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow=
-"hidden";e.style.display="block";e.style.fontSize="1";e.style.zIndex="-1";e.style.resize="none";e.style.outline="none";e.style.width="1px";e.style.height="1px";mxUtils.setOpacity(e,0);e.contentEditable=!0;e.innerHTML="&nbsp;";var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||
-c.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||f||(e.style.left=c.container.scrollLeft+10+"px",e.style.top=c.container.scrollTop+10+"px",c.container.appendChild(e),f=!0,e.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var d=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!f||224!=d&&17!=
-d&&91!=d&&93!=d||(f=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),e.parentNode.removeChild(e),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e),b()}catch(v){this.handleError(v)}}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e,!0),b()}catch(v){this.handleError(v)}}));mxEvent.addListener(e,
+"hidden";e.style.display="block";e.style.fontSize="1";e.style.zIndex="-1";e.style.resize="none";e.style.outline="none";e.style.width="1px";e.style.height="1px";mxUtils.setOpacity(e,0);e.contentEditable=!0;e.innerHTML="&nbsp;";var g=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||
+c.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||g||(e.style.left=c.container.scrollLeft+10+"px",e.style.top=c.container.scrollTop+10+"px",c.container.appendChild(e),g=!0,e.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var d=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!g||224!=d&&17!=
+d&&91!=d&&93!=d||(g=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),e.parentNode.removeChild(e),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e),b()}catch(v){this.handleError(v)}}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e,!0),b()}catch(v){this.handleError(v)}}));mxEvent.addListener(e,
"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(e.innerHTML="&nbsp;",e.focus(),null!=b.clipboardData&&this.pasteCells(b,e,!0,!0),mxEvent.isConsumed(b)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,e,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==e?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(b){var d=Graph.prototype.getLinkTitle.apply(this,arguments);
if(Graph.isPageLink(b)){var c=b.indexOf(",");0<c&&(d=this.getPageById(b.substring(c+1)),d=null!=d?d.getName():mxResources.get("pageNotFound"))}else"data:"==b.substring(0,5)&&(d=mxResources.get("action"));return d};EditorUi.prototype.handleCustomLink=function(b){if(Graph.isPageLink(b)){var d=b.indexOf(",");if(b=this.getPageById(b.substring(d+1)))this.selectPage(b);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(b)};EditorUi.prototype.isSettingsEnabled=
function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(b){b.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged",
@@ -3597,256 +3599,256 @@ function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClie
mxUtils.bind(this,function(b,c){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(b,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.addListener("gridColorChanged",
mxUtils.bind(this,function(b,c){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(b,c){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(b,c,e){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var e=this.createImageDataUri(b,c,"png"),g=parseInt(d.getAttribute("width")),f=parseInt(d.getAttribute("height"));this.writeImageToClipboard(e,g,f,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(B){this.handleError(B)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=e?e:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!0,null,0<b.length?b:null)}catch(q){this.handleError(q)}};EditorUi.prototype.writeImageToClipboard=function(b,c,e,f){var d=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](f)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=
-mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),g=mxUtils.getXml(d.encodeCells(e));mxUtils.setTextContent(b,encodeURIComponent(g));c?(d.removeCells(e,!1),d.lastPasteXml=null):(d.lastPasteXml=g,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),
-c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,e,f){var d=this.editor.graph,g=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var k=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))g=this.importXml(b,k,k),d.setSelectionCells(g);else if(c&&1==d.getSelectionCount()){k=d.getStartEditingCell(d.getSelectionCell(),f);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,
-b,[k]);else{d.model.beginUpdate();try{d.labelChanged(k,b),Graph.isLink(b)&&d.setLinkForCell(k,b)}finally{d.model.endUpdate()}}d.setSelectionCell(k)}else g=d.getInsertPoint(),d.isMouseInsertPoint()&&(k=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),g=this.insertTextAt(b,g.x+k,g.y+k,!0),d.setSelectionCells(g);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return g};EditorUi.prototype.pasteCells=
-function(b,c,e,f){if(!mxEvent.isConsumed(b)){var d=c,g=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var k=b.clipboardData.getData("text/plain"),l=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var n=decodeURIComponent(k);this.isCompatibleString(n)&&(l=!0,k=n)}l=l?null:b.clipboardData.getData("text/html");null!=l&&0<l.length?(d=this.parseHtmlData(l),g="text/plain"!=d.getAttribute("data-type")):null!=k&&0<k.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,
+this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var e=this.createImageDataUri(b,c,"png"),f=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));this.writeImageToClipboard(e,f,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=e?e:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+null,null,null,10,null,null,!0,null,0<b.length?b:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(b,c,e,g){var d=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](g)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=
+mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),f=mxUtils.getXml(d.encodeCells(e));mxUtils.setTextContent(b,encodeURIComponent(f));c?(d.removeCells(e,!1),d.lastPasteXml=null):(d.lastPasteXml=f,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),
+c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,e,g){var d=this.editor.graph,f=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var k=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))f=this.importXml(b,k,k),d.setSelectionCells(f);else if(c&&1==d.getSelectionCount()){k=d.getStartEditingCell(d.getSelectionCell(),g);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,
+b,[k]);else{d.model.beginUpdate();try{d.labelChanged(k,b),Graph.isLink(b)&&d.setLinkForCell(k,b)}finally{d.model.endUpdate()}}d.setSelectionCell(k)}else f=d.getInsertPoint(),d.isMouseInsertPoint()&&(k=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),f=this.insertTextAt(b,f.x+k,f.y+k,!0),d.setSelectionCells(f);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return f};EditorUi.prototype.pasteCells=
+function(b,c,e,g){if(!mxEvent.isConsumed(b)){var d=c,f=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var k=b.clipboardData.getData("text/plain"),l=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(l=!0,k=m)}l=l?null:b.clipboardData.getData("text/html");null!=l&&0<l.length?(d=this.parseHtmlData(l),f="text/plain"!=d.getAttribute("data-type")):null!=k&&0<k.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,
l))}k=d.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))e=k[0].getAttribute("data-lucid-content"),null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(b){var d=this.editor.graph;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var c=d.pasteCounter*d.gridSize;d.setSelectionCells(this.importXml(b,c,c));d.scrollCellToVisible(d.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),
-mxEvent.consume(b));else{g=g?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);l=!1;try{var q=g.lastIndexOf("%3E");0<=q&&q<g.length-3&&(g=g.substring(0,q+3))}catch(A){}try{k=d.getElementsByTagName("span"),n=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(g),this.isCompatibleString(n)&&(l=!0,g=n)}catch(A){}try{if(null!=g&&0<g.length){this.pasteXml(g,f,l,b);try{mxEvent.consume(b)}catch(A){}}else if(!e){var t=this.editor.graph;
-t.lastPasteXml=null;t.pasteCounter=0}}catch(A){this.handleError(A)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var d=null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10<document.documentMode&&
+mxEvent.consume(b));else{f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);l=!1;try{var p=f.lastIndexOf("%3E");0<=p&&p<f.length-3&&(f=f.substring(0,p+3))}catch(D){}try{k=d.getElementsByTagName("span"),m=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(f),this.isCompatibleString(m)&&(l=!0,f=m)}catch(D){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,l,b);try{mxEvent.consume(b)}catch(D){}}else if(!e){var t=this.editor.graph;
+t.lastPasteXml=null;t.pasteCounter=0}}catch(D){this.handleError(D)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var d=null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10<document.documentMode&&
12>document.documentMode)&&(d=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[c],"drop",mxUtils.bind(this,function(b){null!=d&&(d.parentNode.removeChild(d),d=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);
else{var c=this.extractGraphModelFromEvent(b);if(null==c){var e=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?e.getData("text/html"):null,null!=c&&0<c.length?(e=document.createElement("div"),e.innerHTML=this.editor.graph.sanitizeHtml(c),e=e.getElementsByTagName("img"),0<e.length&&
(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(c)&&
-(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var d=0,c=0,e,f;if(null==b){f=document.body;var k=document.documentElement;e=(f.clientWidth||k.clientWidth)-3;f=Math.max(f.clientHeight||0,k.clientHeight)-
-3}else d=b.offsetTop,c=b.offsetLeft,e=b.clientWidth,f=b.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=d+"px";k.style.left=c+"px";k.style.width=Math.max(0,e-3)+"px";k.style.height=Math.max(0,f-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=
-function(b){b=mxUtils.parseXml(b);var d=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=d){var c=new mxCodec(d.ownerDocument),e=new mxGraphModel;c.decode(d,e);d=e.getChildAt(e.getRoot(),0);for(c=0;c<e.getChildCount(d);c++)b.push(e.getChildAt(d,c))}return b};EditorUi.prototype.openFileHandle=function(b,c,e,f,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var d=
-mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,f)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(e,mxUtils.bind(this,
+(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var d=0,c=0,e,g;if(null==b){g=document.body;var k=document.documentElement;e=(g.clientWidth||k.clientWidth)-3;g=Math.max(g.clientHeight||0,k.clientHeight)-
+3}else d=b.offsetTop,c=b.offsetLeft,e=b.clientWidth,g=b.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=d+"px";k.style.left=c+"px";k.style.width=Math.max(0,e-3)+"px";k.style.height=Math.max(0,g-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=
+function(b){b=mxUtils.parseXml(b);var d=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=d){var c=new mxCodec(d.ownerDocument),e=new mxGraphModel;c.decode(d,e);d=e.getChildAt(e.getRoot(),0);for(c=0;c<e.getChildCount(d);c++)b.push(e.getChildAt(d,c))}return b};EditorUi.prototype.openFileHandle=function(b,c,e,g,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var d=
+mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,g)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(e,mxUtils.bind(this,
function(b){this.spinner.stop();d(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(e,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?d(b.responseText):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
-else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,f)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(u){this.handleError(u,
-mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,f)}));else{if("image/png"==e.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==e.type){var g=Editor.extractGraphModelFromPdf(b);null!=g&&(k=null,f=!0,b=g)}this.spinner.stop();this.openLocalFile(b,c,f,k,null!=k?e:null)}}};EditorUi.prototype.openFiles=function(b,
+else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,g)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(u){this.handleError(u,
+mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,g)}));else{if("image/png"==e.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==e.type){var f=Editor.extractGraphModelFromPdf(b);null!=f&&(k=null,g=!0,b=f)}this.spinner.stop();this.openLocalFile(b,c,g,k,null!=k?e:null)}}};EditorUi.prototype.openFiles=function(b,
c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(v){this.handleError(v)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};
-EditorUi.prototype.openLocalFile=function(b,c,e,f,k){var d=this.getCurrentFile(),g=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(b);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,e,f,k))});if(null!=b&&0<b.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=f)?g():(mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||null!=f)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()})));else throw Error(mxResources.get("notADiagramFile"));
-};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],e;for(e in b)c.push(e);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var e=this.editor.graph,g=e.getCellStyle(b);
-d(mxStencilRegistry.getBasenameForStencil(g[mxConstants.STYLE_SHAPE]));e.model.isEdge(b)&&(d(mxMarker.getPackageForType(g[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(g[mxConstants.STYLE_ENDARROW])));for(var g=e.model.getChildCount(b),f=0;f<g;f++)this.addBasenamesForCell(e.model.getChildAt(b,f),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=
+EditorUi.prototype.openLocalFile=function(b,c,e,g,k){var d=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(b);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,e,g,k))});if(null!=b&&0<b.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)?f():(mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp||null!=g)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));
+};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],e;for(e in b)c.push(e);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var e=this.editor.graph,f=e.getCellStyle(b);
+d(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));e.model.isEdge(b)&&(d(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=e.model.getChildCount(b),g=0;g<f;g++)this.addBasenamesForCell(e.model.getChildAt(b,g),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=
b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=b?"":"none";this.editor.graph.setEnabled(b);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=b?"":"hidden",this.ruler.vRuler.container.style.visibility=b?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden");b||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),
-null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(b,c,e,f){this.spinner.stop();
-this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,b,{}));this.mode=App.MODE_EMBED;this.setFileData(b);if(f)try{var d=this.editor.graph;d.setGridEnabled(!1);d.pageVisible=!1;var g=d.model.cells,k;for(k in g){var l=g[k];null!=l&&null!=l.style&&(l.style+=";sketch=1;"+(-1==l.style.indexOf("fontFamily=")||-1<l.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(B){console.log(B)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=e?e:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
+null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(b,c,e,g){this.spinner.stop();
+this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,b,{}));this.mode=App.MODE_EMBED;this.setFileData(b);if(g)try{var d=this.editor.graph;d.setGridEnabled(!1);d.pageVisible=!1;var f=d.model.cells,k;for(k in f){var l=f[k];null!=l&&null!=l.style&&(l.style+=";sketch=1;"+(-1==l.style.indexOf("fontFamily=")||-1<l.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=e?e:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var d=this.editor.graph;return{event:b,pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(b){var d=null,c=!1,
-e=!1,f=null,k=mxUtils.bind(this,function(b,d){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){if(g.source==(window.opener||window.parent)){var k=g.data,l=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==
-b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(ra){}return b});if("json"==urlParams.proto){var m=!1;try{k=JSON.parse(k)}catch(Q){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?
-mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var p=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):k.ok,function(b){null!=b?n.postMessage(JSON.stringify({event:"prompt",value:b,message:k}),"*"):n.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),
-"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(p.container,300,80,!0,!1);p.init();return}if("draft"==k.action){var q=l(k.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),
-"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{p.init()}catch(Q){n.postMessage(JSON.stringify({event:"draft",error:Q.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();
-var t=1==k.enableRecent,u=1==k.enableSearch,v=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var C=this.getCurrentUser(),B=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=C?C.id:
-null,t?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,u?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(B.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=
-new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,f){d=d||this.emptyDiagramXml;null!=k.callback?n.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:f,builtIn:!0,message:k}),"*"):(b(d,g,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,
-"Network Error!")})}):null,u?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){n.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(p.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();
-b&&this.actions.get("exit").funct()}));p.init();return}if("textContent"==k.action){var S=this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:S,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var R=null!=k.messageKey?mxResources.get(k.messageKey):
-k.message;null==k.show||k.show?this.spinner.spin(document.body,R):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var M=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var P=this.editor.graph,G=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var d=this.createLoadMessage("export");d.format=
-k.format;d.message=k;d.data=b;d.xml=M;n.postMessage(JSON.stringify(d),"*")}),D=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(M)));P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);G(b)}),y=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(M),c=!1);if(null!=
-this.pages&&this.currentPage.getId()!=y){for(var W=P.getGlobalVariable,P=this.createTemporaryGraph(P.getStylesheet()),J,O=0;O<this.pages.length;O++)if(this.pages[O].getId()==y){J=this.updatePageRoot(this.pages[O]);break}null==J&&(J=this.currentPage);P.getGlobalVariable=function(b){return"page"==b?J.getName():"pagenumber"==b?1:W.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(J.root)}if(null!=k.layerIds){for(var aa=P.model,ma=aa.getChildCells(aa.getRoot()),p={},O=0;O<
-k.layerIds.length;O++)p[k.layerIds[O]]=!0;for(O=0;O<ma.length;O++)aa.setVisible(ma[O],p[ma[O].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){D(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){D(null)}),null,null,k.scale,k.transparent,k.shadow,null,P,k.border,null,k.grid,k.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=y?"&pageId="+y:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):
-"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(M))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?G("data:image/png;base64,"+b.getText()):D(null)}),mxUtils.bind(this,function(){D(null)}))}}else{null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(k.xml),c=!1);R=this.createLoadMessage("export");R.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();R.xml=
-mxUtils.getXml(ga);R.data=this.getFileData(null,null,!0,null,null,null,ga);R.format=k.format}else if("html"==k.format)M=this.editor.getGraphXml(),R.data=this.getHtml(M,this.editor.graph),R.xml=mxUtils.getXml(M),R.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ha=null!=k.background?k.background:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);R.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);R.format="svg";var na=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);
-this.spinner.stop();R.data=Editor.createSvgDataUri(b);n.postMessage(JSON.stringify(R),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(R.xml,this.editor.graph,null,!0,na,null,null,k.embedImages,ha,k.scale,k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);
-var X=this.editor.graph.getSvg(ha,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme);(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(X);this.embedFonts(X,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){na(mxUtils.getXml(b))})):na(mxUtils.getXml(b))}))}return}n.postMessage(JSON.stringify(R),"*")}return}if("load"==k.action){m=k.toSketch;e=1==
+e=!1,g=null,k=mxUtils.bind(this,function(b,d){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,l=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==
+b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(ta){}return b});if("json"==urlParams.proto){var m=!1;try{k=JSON.parse(k)}catch(Q){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?
+mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var n=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):k.ok,function(b){null!=b?p.postMessage(JSON.stringify({event:"prompt",value:b,message:k}),"*"):p.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),
+"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(n.container,300,80,!0,!1);n.init();return}if("draft"==k.action){var q=l(k.xml);this.spinner.stop();n=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),
+"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(n.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{n.init()}catch(Q){p.postMessage(JSON.stringify({event:"draft",error:Q.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();
+var t=1==k.enableRecent,u=1==k.enableSearch,v=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var C=this.getCurrentUser(),y=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;p.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=C?C.id:
+null,t?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,u?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}n=
+new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,g){d=d||this.emptyDiagramXml;null!=k.callback?p.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:g,builtIn:!0,message:k}),"*"):(b(d,f,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,
+"Network Error!")})}):null,u?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){p.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(n.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();
+b&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==k.action){var P=this.getDiagramTextContent();p.postMessage(JSON.stringify({event:"textContent",data:P,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var S=null!=k.messageKey?mxResources.get(k.messageKey):
+k.message;null==k.show||k.show?this.spinner.spin(document.body,S):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var N=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var R=this.editor.graph,F=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var d=this.createLoadMessage("export");d.format=
+k.format;d.message=k;d.data=b;d.xml=N;p.postMessage(JSON.stringify(d),"*")}),B=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(N)));R!=this.editor.graph&&R.container.parentNode.removeChild(R.container);F(b)}),A=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(N),c=!1);if(null!=
+this.pages&&this.currentPage.getId()!=A){for(var W=R.getGlobalVariable,R=this.createTemporaryGraph(R.getStylesheet()),I,O=0;O<this.pages.length;O++)if(this.pages[O].getId()==A){I=this.updatePageRoot(this.pages[O]);break}null==I&&(I=this.currentPage);R.getGlobalVariable=function(b){return"page"==b?I.getName():"pagenumber"==b?1:W.apply(this,arguments)};document.body.appendChild(R.container);R.model.setRoot(I.root)}if(null!=k.layerIds){for(var aa=R.model,na=aa.getChildCells(aa.getRoot()),n={},O=0;O<
+k.layerIds.length;O++)n[k.layerIds[O]]=!0;for(O=0;O<na.length;O++)aa.setVisible(na[O],n[na[O].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){B(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){B(null)}),null,null,k.scale,k.transparent,k.shadow,null,R,k.border,null,k.grid,k.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=A?"&pageId="+A:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):
+"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?F("data:image/png;base64,"+b.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(k.xml),c=!1);S=this.createLoadMessage("export");S.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();S.xml=
+mxUtils.getXml(ga);S.data=this.getFileData(null,null,!0,null,null,null,ga);S.format=k.format}else if("html"==k.format)N=this.editor.getGraphXml(),S.data=this.getHtml(N,this.editor.graph),S.xml=mxUtils.getXml(N),S.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ha=null!=k.background?k.background:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);S.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);S.format="svg";var oa=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);
+this.spinner.stop();S.data=Editor.createSvgDataUri(b);p.postMessage(JSON.stringify(S),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(S.xml,this.editor.graph,null,!0,oa,null,null,k.embedImages,ha,k.scale,k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);
+var X=this.editor.graph.getSvg(ha,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme);(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(X);this.embedFonts(X,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){oa(mxUtils.getXml(b))})):oa(mxUtils.getXml(b))}))}return}p.postMessage(JSON.stringify(S),"*")}return}if("load"==k.action){m=k.toSketch;e=1==
k.autosave;this.hideDialog();null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified);null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit);null!=k.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=k.noSaveBtn);null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=k.noExitBtn);null!=k.title&&null!=this.buttonContainer&&(q=document.createElement("span"),mxUtils.write(q,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
"12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(q),this.embedFilenameSpan=q);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(Q){}k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):
-null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var ca=this.getCurrentFile();null!=ca&&(q=l(k.xml),null!=q&&""!=q&&ca.mergeFile(new LocalFile(this,q),function(){n.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){n.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(n):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,g.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):
-n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(Q){this.handleError(Q)}}var oa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),V=mxUtils.bind(this,function(g,k){c=!0;try{b(g,k,null,m)}catch(fa){this.handleError(fa)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");f=oa();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=oa();if(e!=
-f&&!c){var g=this.createLoadMessage("autosave");g.xml=e;(window.opener||window.parent).postMessage(JSON.stringify(g),"*")}f=e}),this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",d),this.addListener("backgroundImageChanged",d),this.addListener("foldingEnabledChanged",d),
-this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=g;n.postMessage(JSON.stringify(l),"*")}});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+
-1)),function(b){V(b,g)},mxUtils.bind(this,function(b){this.handleError(b)}),l)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&V(b.responseText,g)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,
-mxUtils.bind(this,function(b){V(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=l(k),V(k,g)):this.loadDescriptor(k,mxUtils.bind(this,function(b){V(oa(),g)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var n=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";n.postMessage(k,"*");if("json"==urlParams.proto){var t=
-this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,arguments);n.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";
-var e=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var f="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,f);c.setAttribute("title",f);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
+null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var ca=this.getCurrentFile();null!=ca&&(q=l(k.xml),null!=q&&""!=q&&ca.mergeFile(new LocalFile(this,q),function(){p.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){p.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(p):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):
+p.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(Q){this.handleError(Q)}}var pa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),V=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,m)}catch(fa){this.handleError(fa)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");g=pa();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=pa();if(e!=
+g&&!c){var f=this.createLoadMessage("autosave");f.xml=e;(window.opener||window.parent).postMessage(JSON.stringify(f),"*")}g=e}),this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",d),this.addListener("backgroundImageChanged",d),this.addListener("foldingEnabledChanged",d),
+this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;p.postMessage(JSON.stringify(l),"*")}});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+
+1)),function(b){V(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),l)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&V(b.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,
+mxUtils.bind(this,function(b){V(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=l(k),V(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){V(pa(),f)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var p=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";p.postMessage(k,"*");if("json"==urlParams.proto){var t=
+this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,arguments);p.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";
+var e=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,g);c.setAttribute("title",g);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),e=c);"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),e="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
mxUtils.write(c,e),c.setAttribute("title",e),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),e=c);e.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.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(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,e=d.getSelectionCells(),g=0;g<b.length;g++){var f=new window[b[g].layout](d);
-if(null!=b[g].config)for(var k in b[g].config)f[k]=b[g].config[k];this.executeLayout(function(){f.execute(d.getDefaultParent(),0==e.length?null:e)},g==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],g=[],f={};if(0<d.length){var k={},n=null,t=null,x=null,E=null,A=null,F=null,I=null,L=null,H=null,K="",C="auto",N="auto",S=null,R=null,M=40,P=40,G=100,D=0,y=this.editor.graph;y.getGraphBounds();for(var W=function(){null!=c?c(qa):(y.setSelectionCells(qa),y.scrollCellToVisible(y.getSelectionCell()))},
-J=y.getFreeInsertPoint(),O=J.x,aa=J.y,J=aa,ma=null,ga="auto",H=null,ha=[],na=null,X=null,ca=0;ca<d.length&&"#"==d[ca].charAt(0);){b=d[ca];for(ca++;ca<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[ca].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[ca].substring(1)),ca++;if("#"!=b.charAt(1)){var oa=b.indexOf(":");if(0<oa){var V=mxUtils.trim(b.substring(1,oa)),Q=mxUtils.trim(b.substring(oa+1));"label"==V?ma=y.sanitizeHtml(Q):"labelname"==V&&0<Q.length&&"-"!=Q?A=Q:"labels"==V&&0<Q.length&&"-"!=
-Q?F=JSON.parse(Q):"style"==V?t=Q:"parentstyle"==V?I=Q:"stylename"==V&&0<Q.length&&"-"!=Q?E=Q:"styles"==V&&0<Q.length&&"-"!=Q?x=JSON.parse(Q):"vars"==V&&0<Q.length&&"-"!=Q?n=JSON.parse(Q):"identity"==V&&0<Q.length&&"-"!=Q?L=Q:"parent"==V&&0<Q.length&&"-"!=Q?H=Q:"namespace"==V&&0<Q.length&&"-"!=Q?K=Q:"width"==V?C=Q:"height"==V?N=Q:"left"==V&&0<Q.length?S=Q:"top"==V&&0<Q.length?R=Q:"ignore"==V?X=Q.split(","):"connect"==V?ha.push(JSON.parse(Q)):"link"==V?na=Q:"padding"==V?D=parseFloat(Q):"edgespacing"==
-V?M=parseFloat(Q):"nodespacing"==V?P=parseFloat(Q):"levelspacing"==V?G=parseFloat(Q):"layout"==V&&(ga=Q)}}}if(null==d[ca])throw Error(mxResources.get("invalidOrMissingFile"));for(var ra=this.editor.csvToArray(d[ca]),V=oa=null,Q=[],Y=0;Y<ra.length;Y++)L==ra[Y]&&(oa=Y),H==ra[Y]&&(V=Y),Q.push(mxUtils.trim(ra[Y]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ma&&(ma="%"+Q[0]+"%");if(null!=ha)for(var fa=0;fa<ha.length;fa++)null==k[ha[fa].to]&&(k[ha[fa].to]={});L=[];for(Y=ca+1;Y<
-d.length;Y++){var ia=this.editor.csvToArray(d[Y]);if(null==ia){var pa=40<d[Y].length?d[Y].substring(0,40)+"...":d[Y];throw Error(pa+" ("+Y+"):\n"+mxResources.get("containsValidationErrors"));}0<ia.length&&L.push(ia)}y.model.beginUpdate();try{for(Y=0;Y<L.length;Y++){var ia=L[Y],U=null,ja=null!=oa?K+ia[oa]:null;null!=ja&&(U=y.model.getCell(ja));var d=null!=U,ba=new mxCell(ma,new mxGeometry(O,J,0,0),t||"whiteSpace=wrap;html=1;");ba.vertex=!0;ba.id=ja;for(var la=0;la<ia.length;la++)y.setAttributeForCell(ba,
-Q[la],ia[la]);if(null!=A&&null!=F){var da=F[ba.getAttribute(A)];null!=da&&y.labelChanged(ba,da)}if(null!=E&&null!=x){var ua=x[ba.getAttribute(E)];null!=ua&&(ba.style=ua)}y.setAttributeForCell(ba,"placeholders","1");ba.style=y.replacePlaceholders(ba,ba.style,n);d&&(y.model.setGeometry(U,ba.geometry),y.model.setStyle(U,ba.style),0>mxUtils.indexOf(g,U)&&g.push(U));U=ba;if(!d)for(fa=0;fa<ha.length;fa++)k[ha[fa].to][U.getAttribute(ha[fa].to)]=U;null!=na&&"link"!=na&&(y.setLinkForCell(U,U.getAttribute(na)),
-y.setAttributeForCell(U,na,null));y.fireEvent(new mxEventObject("cellsInserted","cells",[U]));var ya=this.editor.graph.getPreferredSizeForCell(U);U.vertex&&(null!=S&&null!=U.getAttribute(S)&&(U.geometry.x=O+parseFloat(U.getAttribute(S))),null!=R&&null!=U.getAttribute(R)&&(U.geometry.y=aa+parseFloat(U.getAttribute(R))),"@"==C.charAt(0)&&null!=U.getAttribute(C.substring(1))?U.geometry.width=parseFloat(U.getAttribute(C.substring(1))):U.geometry.width="auto"==C?ya.width+D:parseFloat(C),"@"==N.charAt(0)&&
-null!=U.getAttribute(N.substring(1))?U.geometry.height=parseFloat(U.getAttribute(N.substring(1))):U.geometry.height="auto"==N?ya.height+D:parseFloat(N),J+=U.geometry.height+P);d?(null==f[ja]&&(f[ja]=[]),f[ja].push(U)):(H=null!=V?y.model.getCell(K+ia[V]):null,e.push(U),null!=H?(H.style=y.replacePlaceholders(H,I,n),y.addCell(U,H)):g.push(y.addCell(U)))}for(var ta=g.slice(),qa=g.slice(),fa=0;fa<ha.length;fa++)for(var za=ha[fa],Y=0;Y<e.length;Y++){var U=e[Y],va=mxUtils.bind(this,function(b,d,c){var e=
-d.getAttribute(c.from);if(null!=e&&(y.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),g=0;g<e.length;g++){var f=k[c.to][e[g]];if(null!=f){var l=c.label;null!=c.fromlabel&&(l=(d.getAttribute(c.fromlabel)||"")+(l||""));null!=c.sourcelabel&&(l=y.replacePlaceholders(d,c.sourcelabel,n)+(l||""));null!=c.tolabel&&(l=(l||"")+(f.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(l=(l||"")+y.replacePlaceholders(f,c.targetlabel,n));var m="target"==c.placeholders==!c.invert?f:b,m=null!=c.style?
-y.replacePlaceholders(m,c.style,n):y.createCurrentEdgeStyle(),l=y.insertEdge(null,null,l||"",c.invert?f:b,c.invert?b:f,m);if(null!=c.labels)for(m=0;m<c.labels.length;m++){var p=c.labels[m],q=new mxCell(p.label||m,new mxGeometry(null!=p.x?p.x:0,null!=p.y?p.y:0,0,0),"resizable=0;html=1;");q.vertex=!0;q.connectable=!1;q.geometry.relative=!0;null!=p.placeholders&&(q.value=y.replacePlaceholders("target"==p.placeholders==!c.invert?f:b,q.value,n));if(null!=p.dx||null!=p.dy)q.geometry.offset=new mxPoint(null!=
-p.dx?p.dx:0,null!=p.dy?p.dy:0);l.insert(q)}qa.push(l);mxUtils.remove(c.invert?b:f,ta)}}});va(U,U,za);if(null!=f[U.id])for(la=0;la<f[U.id].length;la++)va(U,f[U.id][la],za)}if(null!=X)for(Y=0;Y<e.length;Y++)for(U=e[Y],la=0;la<X.length;la++)y.setAttributeForCell(U,mxUtils.trim(X[la]),null);if(0<g.length){var T=new mxParallelEdgeLayout(y);T.spacing=M;T.checkOverlap=!0;var Aa=function(){0<T.spacing&&T.execute(y.getDefaultParent());for(var b=0;b<g.length;b++){var d=y.getCellGeometry(g[b]);d.x=Math.round(y.snap(d.x));
-d.y=Math.round(y.snap(d.y));"auto"==C&&(d.width=Math.round(y.snap(d.width)));"auto"==N&&(d.height=Math.round(y.snap(d.height)))}};if("["==ga.charAt(0)){var ka=W;y.view.validate();this.executeLayoutList(JSON.parse(ga),function(){Aa();ka()});W=null}else if("circle"==ga){var Ba=new mxCircleLayout(y);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var wa=Ba.isVertexIgnored;Ba.isVertexIgnored=function(b){return wa.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){Ba.execute(y.getDefaultParent());
-Aa()},!0,W);W=null}else if("horizontaltree"==ga||"verticaltree"==ga||"auto"==ga&&qa.length==2*g.length-1&&1==ta.length){y.view.validate();var Ca=new mxCompactTreeLayout(y,"horizontaltree"==ga);Ca.levelDistance=P;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(y.getDefaultParent(),0<ta.length?ta[0]:null)},!0,W);W=null}else if("horizontalflow"==ga||"verticalflow"==ga||"auto"==ga&&1==ta.length){y.view.validate();var Da=new mxHierarchicalLayout(y,"horizontalflow"==ga?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);Da.intraCellSpacing=P;Da.parallelEdgeSpacing=M;Da.interRankCellSpacing=G;Da.disableEdgeStyle=!1;this.executeLayout(function(){Da.execute(y.getDefaultParent(),qa);y.moveCells(qa,O,aa)},!0,W);W=null}else if("organic"==ga||"auto"==ga&&qa.length>g.length){y.view.validate();var xa=new mxFastOrganicLayout(y);xa.forceConstant=3*P;xa.disableEdgeStyle=!1;xa.resetEdges=!1;var Ea=xa.isVertexIgnored;xa.isVertexIgnored=function(b){return Ea.apply(this,arguments)||0>mxUtils.indexOf(g,
-b)};this.executeLayout(function(){xa.execute(y.getDefaultParent());Aa()},!0,W);W=null}}this.hideDialog()}finally{y.model.endUpdate()}null!=W&&W()}}catch(Z){this.handleError(Z)}};EditorUi.prototype.getSearch=function(b){var d="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var c="?",e;for(e in urlParams)0>mxUtils.indexOf(b,e)&&null!=urlParams[e]&&(d+=c+e+"="+urlParams[e],c="&")}else d=window.location.search;return d};EditorUi.prototype.getUrl=function(b){b=
-null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(b=0==d?b+"?":b+"&",null!=urlParams[e]&&(b+=e+"="+urlParams[e],d++))}return b};EditorUi.prototype.showLinkDialog=function(b,c,e,f,k){b=new LinkDialog(this,b,c,e,!0,f,k);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prototype.getServiceCount=
+mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,e=d.getSelectionCells(),f=0;f<b.length;f++){var g=new window[b[f].layout](d);
+if(null!=b[f].config)for(var k in b[f].config)g[k]=b[f].config[k];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==e.length?null:e)},f==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],f=[],g={};if(0<d.length){var k={},p=null,t=null,x=null,H=null,D=null,E=null,J=null,L=null,G=null,K="",C="auto",M="auto",P=null,S=null,N=40,R=40,F=100,B=0,A=this.editor.graph;A.getGraphBounds();for(var W=function(){null!=c?c(sa):(A.setSelectionCells(sa),A.scrollCellToVisible(A.getSelectionCell()))},
+I=A.getFreeInsertPoint(),O=I.x,aa=I.y,I=aa,na=null,ga="auto",G=null,ha=[],oa=null,X=null,ca=0;ca<d.length&&"#"==d[ca].charAt(0);){b=d[ca];for(ca++;ca<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[ca].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[ca].substring(1)),ca++;if("#"!=b.charAt(1)){var pa=b.indexOf(":");if(0<pa){var V=mxUtils.trim(b.substring(1,pa)),Q=mxUtils.trim(b.substring(pa+1));"label"==V?na=A.sanitizeHtml(Q):"labelname"==V&&0<Q.length&&"-"!=Q?D=Q:"labels"==V&&0<Q.length&&"-"!=
+Q?E=JSON.parse(Q):"style"==V?t=Q:"parentstyle"==V?J=Q:"stylename"==V&&0<Q.length&&"-"!=Q?H=Q:"styles"==V&&0<Q.length&&"-"!=Q?x=JSON.parse(Q):"vars"==V&&0<Q.length&&"-"!=Q?p=JSON.parse(Q):"identity"==V&&0<Q.length&&"-"!=Q?L=Q:"parent"==V&&0<Q.length&&"-"!=Q?G=Q:"namespace"==V&&0<Q.length&&"-"!=Q?K=Q:"width"==V?C=Q:"height"==V?M=Q:"left"==V&&0<Q.length?P=Q:"top"==V&&0<Q.length?S=Q:"ignore"==V?X=Q.split(","):"connect"==V?ha.push(JSON.parse(Q)):"link"==V?oa=Q:"padding"==V?B=parseFloat(Q):"edgespacing"==
+V?N=parseFloat(Q):"nodespacing"==V?R=parseFloat(Q):"levelspacing"==V?F=parseFloat(Q):"layout"==V&&(ga=Q)}}}if(null==d[ca])throw Error(mxResources.get("invalidOrMissingFile"));for(var ta=this.editor.csvToArray(d[ca]),V=pa=null,Q=[],Y=0;Y<ta.length;Y++)L==ta[Y]&&(pa=Y),G==ta[Y]&&(V=Y),Q.push(mxUtils.trim(ta[Y]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==na&&(na="%"+Q[0]+"%");if(null!=ha)for(var fa=0;fa<ha.length;fa++)null==k[ha[fa].to]&&(k[ha[fa].to]={});L=[];for(Y=ca+1;Y<
+d.length;Y++){var ia=this.editor.csvToArray(d[Y]);if(null==ia){var ra=40<d[Y].length?d[Y].substring(0,40)+"...":d[Y];throw Error(ra+" ("+Y+"):\n"+mxResources.get("containsValidationErrors"));}0<ia.length&&L.push(ia)}A.model.beginUpdate();try{for(Y=0;Y<L.length;Y++){var ia=L[Y],U=null,ja=null!=pa?K+ia[pa]:null;null!=ja&&(U=A.model.getCell(ja));var d=null!=U,ba=new mxCell(na,new mxGeometry(O,I,0,0),t||"whiteSpace=wrap;html=1;");ba.vertex=!0;ba.id=ja;for(var ma=0;ma<ia.length;ma++)A.setAttributeForCell(ba,
+Q[ma],ia[ma]);if(null!=D&&null!=E){var da=E[ba.getAttribute(D)];null!=da&&A.labelChanged(ba,da)}if(null!=H&&null!=x){var qa=x[ba.getAttribute(H)];null!=qa&&(ba.style=qa)}A.setAttributeForCell(ba,"placeholders","1");ba.style=A.replacePlaceholders(ba,ba.style,p);d&&(A.model.setGeometry(U,ba.geometry),A.model.setStyle(U,ba.style),0>mxUtils.indexOf(f,U)&&f.push(U));U=ba;if(!d)for(fa=0;fa<ha.length;fa++)k[ha[fa].to][U.getAttribute(ha[fa].to)]=U;null!=oa&&"link"!=oa&&(A.setLinkForCell(U,U.getAttribute(oa)),
+A.setAttributeForCell(U,oa,null));A.fireEvent(new mxEventObject("cellsInserted","cells",[U]));var ya=this.editor.graph.getPreferredSizeForCell(U);U.vertex&&(null!=P&&null!=U.getAttribute(P)&&(U.geometry.x=O+parseFloat(U.getAttribute(P))),null!=S&&null!=U.getAttribute(S)&&(U.geometry.y=aa+parseFloat(U.getAttribute(S))),"@"==C.charAt(0)&&null!=U.getAttribute(C.substring(1))?U.geometry.width=parseFloat(U.getAttribute(C.substring(1))):U.geometry.width="auto"==C?ya.width+B:parseFloat(C),"@"==M.charAt(0)&&
+null!=U.getAttribute(M.substring(1))?U.geometry.height=parseFloat(U.getAttribute(M.substring(1))):U.geometry.height="auto"==M?ya.height+B:parseFloat(M),I+=U.geometry.height+R);d?(null==g[ja]&&(g[ja]=[]),g[ja].push(U)):(G=null!=V?A.model.getCell(K+ia[V]):null,e.push(U),null!=G?(G.style=A.replacePlaceholders(G,J,p),A.addCell(U,G)):f.push(A.addCell(U)))}for(var ua=f.slice(),sa=f.slice(),fa=0;fa<ha.length;fa++)for(var za=ha[fa],Y=0;Y<e.length;Y++){var U=e[Y],va=mxUtils.bind(this,function(b,d,c){var e=
+d.getAttribute(c.from);if(null!=e&&(A.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),f=0;f<e.length;f++){var g=k[c.to][e[f]];if(null!=g){var l=c.label;null!=c.fromlabel&&(l=(d.getAttribute(c.fromlabel)||"")+(l||""));null!=c.sourcelabel&&(l=A.replacePlaceholders(d,c.sourcelabel,p)+(l||""));null!=c.tolabel&&(l=(l||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(l=(l||"")+A.replacePlaceholders(g,c.targetlabel,p));var m="target"==c.placeholders==!c.invert?g:b,m=null!=c.style?
+A.replacePlaceholders(m,c.style,p):A.createCurrentEdgeStyle(),l=A.insertEdge(null,null,l||"",c.invert?g:b,c.invert?b:g,m);if(null!=c.labels)for(m=0;m<c.labels.length;m++){var n=c.labels[m],q=new mxCell(n.label||m,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");q.vertex=!0;q.connectable=!1;q.geometry.relative=!0;null!=n.placeholders&&(q.value=A.replacePlaceholders("target"==n.placeholders==!c.invert?g:b,q.value,p));if(null!=n.dx||null!=n.dy)q.geometry.offset=new mxPoint(null!=
+n.dx?n.dx:0,null!=n.dy?n.dy:0);l.insert(q)}sa.push(l);mxUtils.remove(c.invert?b:g,ua)}}});va(U,U,za);if(null!=g[U.id])for(ma=0;ma<g[U.id].length;ma++)va(U,g[U.id][ma],za)}if(null!=X)for(Y=0;Y<e.length;Y++)for(U=e[Y],ma=0;ma<X.length;ma++)A.setAttributeForCell(U,mxUtils.trim(X[ma]),null);if(0<f.length){var T=new mxParallelEdgeLayout(A);T.spacing=N;T.checkOverlap=!0;var Aa=function(){0<T.spacing&&T.execute(A.getDefaultParent());for(var b=0;b<f.length;b++){var d=A.getCellGeometry(f[b]);d.x=Math.round(A.snap(d.x));
+d.y=Math.round(A.snap(d.y));"auto"==C&&(d.width=Math.round(A.snap(d.width)));"auto"==M&&(d.height=Math.round(A.snap(d.height)))}};if("["==ga.charAt(0)){var ka=W;A.view.validate();this.executeLayoutList(JSON.parse(ga),function(){Aa();ka()});W=null}else if("circle"==ga){var Ba=new mxCircleLayout(A);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var wa=Ba.isVertexIgnored;Ba.isVertexIgnored=function(b){return wa.apply(this,arguments)||0>mxUtils.indexOf(f,b)};this.executeLayout(function(){Ba.execute(A.getDefaultParent());
+Aa()},!0,W);W=null}else if("horizontaltree"==ga||"verticaltree"==ga||"auto"==ga&&sa.length==2*f.length-1&&1==ua.length){A.view.validate();var Ca=new mxCompactTreeLayout(A,"horizontaltree"==ga);Ca.levelDistance=R;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(A.getDefaultParent(),0<ua.length?ua[0]:null)},!0,W);W=null}else if("horizontalflow"==ga||"verticalflow"==ga||"auto"==ga&&1==ua.length){A.view.validate();var Da=new mxHierarchicalLayout(A,"horizontalflow"==ga?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);Da.intraCellSpacing=R;Da.parallelEdgeSpacing=N;Da.interRankCellSpacing=F;Da.disableEdgeStyle=!1;this.executeLayout(function(){Da.execute(A.getDefaultParent(),sa);A.moveCells(sa,O,aa)},!0,W);W=null}else if("organic"==ga||"auto"==ga&&sa.length>f.length){A.view.validate();var xa=new mxFastOrganicLayout(A);xa.forceConstant=3*R;xa.disableEdgeStyle=!1;xa.resetEdges=!1;var Ea=xa.isVertexIgnored;xa.isVertexIgnored=function(b){return Ea.apply(this,arguments)||0>mxUtils.indexOf(f,
+b)};this.executeLayout(function(){xa.execute(A.getDefaultParent());Aa()},!0,W);W=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=W&&W()}}catch(Z){this.handleError(Z)}};EditorUi.prototype.getSearch=function(b){var d="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var c="?",e;for(e in urlParams)0>mxUtils.indexOf(b,e)&&null!=urlParams[e]&&(d+=c+e+"="+urlParams[e],c="&")}else d=window.location.search;return d};EditorUi.prototype.getUrl=function(b){b=
+null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(b=0==d?b+"?":b+"&",null!=urlParams[e]&&(b+=e+"="+urlParams[e],d++))}return b};EditorUi.prototype.showLinkDialog=function(b,c,e,g,k){b=new LinkDialog(this,b,c,e,!0,g,k);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prototype.getServiceCount=
function(b){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||d++;null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;null!=this.gitHub&&d++;null!=this.gitLab&&d++;null!=this.notion&&d++;b&&isLocalStorage&&"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var b=this.getCurrentFile(),c=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();
this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var e=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!e);this.actions.get("print").setEnabled(!e);this.menus.get("exportAs").setEnabled(!e);this.menus.get("embed").setEnabled(!e);e="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(e);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(e),
this.menus.get("newLibrary").setEnabled(e));b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);this.actions.get("undo").setEnabled(this.canUndo()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&b);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);
this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();
-return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),e=this.isDiagramActive(),f=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(e);this.actions.get("editData").setEnabled(0<
-f.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(e);this.actions.get("connectionArrows").setEnabled(e);this.actions.get("connectionPoints").setEnabled(e);this.actions.get("copyStyle").setEnabled(e&&!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(e&&0<f.length);this.actions.get("editGeometry").setEnabled(0<f.length&&b.getModel().isVertex(f[0]));this.actions.get("createShape").setEnabled(e);this.actions.get("createRevision").setEnabled(e);this.actions.get("moveToFolder").setEnabled(null!=
+return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),e=this.isDiagramActive(),g=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(e);this.actions.get("editData").setEnabled(0<
+g.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(e);this.actions.get("connectionArrows").setEnabled(e);this.actions.get("connectionPoints").setEnabled(e);this.actions.get("copyStyle").setEnabled(e&&!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(e&&0<g.length);this.actions.get("editGeometry").setEnabled(0<g.length&&b.getModel().isVertex(g[0]));this.actions.get("createShape").setEnabled(e);this.actions.get("createRevision").setEnabled(e);this.actions.get("moveToFolder").setEnabled(null!=
c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(e&&(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("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());c=this.actions.get("findReplace");c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());this.actions.get("editShape").setEnabled(e&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var t=EditorUi.prototype.destroy;
-EditorUi.prototype.destroy=function(){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(b,c,e,f,k,m,n,t){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(f,
-k,m)),"image/svg+xml");else{var g=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),p=Math.floor(l.width*k/d.view.scale),q=Math.floor(l.height*k/d.view.scale);if(g.length<=MAX_REQUEST_SIZE&&p*q<MAX_AREA)if(b.hideDialog(),"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var u={globalVars:d.getExportVariables()};t&&(u.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+
-(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(u))+(0<n?"&dpi="+n:"")+"&bg="+(null!=f?f:"none")+"&w="+p+"&h="+q+"&border="+m+"&xml="+encodeURIComponent(g))})}else"png"==e?b.exportImage(k,null==f||"none"==f,!0,!1,!1,m,!0,!1,null,t,n):b.exportImage(k,!1,!0,!1,!1,m,!0,!1,"jpeg",t);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=
-this.pages)for(var e=0;e<this.pages.length;e++){var f=b;this.currentPage!=this.pages[e]&&(f=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[e]),f.model.setRoot(this.pages[e].root));c+=this.pages[e].getName()+" "+f.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,
-mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var n=mxSettings.getCustomLibraries();for(b=0;b<n.length;b++){var t=n[b];if("R"==t.substring(0,1)){var B=JSON.parse(decodeURIComponent(t.substring(1)));k[B[0]]=
-{id:B[0],title:B[1],downloadUrl:B[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(b){f.innerHTML="";if(0==b.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<b.length;c++){var e=b[c];k[e.id]&&(d[e.id]=e);var g=this.addCheckbox(f,e.title,k[e.id]);(function(b,c){mxEvent.addListener(c,"change",function(){this.checked?d[b.id]=b:delete d[b.id]})})(e,g)}},mxUtils.bind(this,
-function(b){f.innerHTML="";var d=document.createElement("div");d.style.padding="8px";d.style.textAlign="center";mxUtils.write(d,mxResources.get("error")+": ");mxUtils.write(d,null!=b&&null!=b.message?b.message:mxResources.get("unknownError"));f.appendChild(d)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var b=0,c;for(c in d)null==k[c]&&(b++,mxUtils.bind(this,function(d){this.remoteInvoke("getFileContent",[d.downloadUrl],
-null,mxUtils.bind(this,function(c){b--;0==b&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,d))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(d[c]));for(c in k)d[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));0==b&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,
+EditorUi.prototype.destroy=function(){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(b,c,e,g,k,p,t,u){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(g,
+k,p)),"image/svg+xml");else{var f=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*k/d.view.scale),n=Math.floor(l.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA)if(b.hideDialog(),"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var q={globalVars:d.getExportVariables()};u&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+
+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<t?"&dpi="+t:"")+"&bg="+(null!=g?g:"none")+"&w="+m+"&h="+n+"&border="+p+"&xml="+encodeURIComponent(f))})}else"png"==e?b.exportImage(k,null==g||"none"==g,!0,!1,!1,p,!0,!1,null,u,t):b.exportImage(k,!1,!0,!1,!1,p,!0,!1,"jpeg",u);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=
+this.pages)for(var e=0;e<this.pages.length;e++){var g=b;this.currentPage!=this.pages[e]&&(g=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[e]),g.model.setRoot(this.pages[e].root));c+=this.pages[e].getName()+" "+g.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,
+mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";g.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var p=mxSettings.getCustomLibraries();for(b=0;b<p.length;b++){var t=p[b];if("R"==t.substring(0,1)){var y=JSON.parse(decodeURIComponent(t.substring(1)));k[y[0]]=
+{id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(b){g.innerHTML="";if(0==b.length)g.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<b.length;c++){var e=b[c];k[e.id]&&(d[e.id]=e);var f=this.addCheckbox(g,e.title,k[e.id]);(function(b,c){mxEvent.addListener(c,"change",function(){this.checked?d[b.id]=b:delete d[b.id]})})(e,f)}},mxUtils.bind(this,
+function(b){g.innerHTML="";var d=document.createElement("div");d.style.padding="8px";d.style.textAlign="center";mxUtils.write(d,mxResources.get("error")+": ");mxUtils.write(d,null!=b&&null!=b.message?b.message:mxResources.get("unknownError"));g.appendChild(d)}));c.appendChild(g);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var b=0,c;for(c in d)null==k[c]&&(b++,mxUtils.bind(this,function(d){this.remoteInvoke("getFileContent",[d.downloadUrl],
+null,mxUtils.bind(this,function(c){b--;0==b&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,d))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(d[c]));for(c in k)d[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));0==b&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,
340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(b){this.remoteWin=b;for(var d=0;d<this.remoteInvokeQueue.length;d++)b.postMessage(this.remoteInvokeQueue[d],
-"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(b){var d=b.msgMarkers,c=this.remoteInvokeCallbacks[d.callbackId];if(null==c)throw Error("No callback for "+(null!=d?d.callbackId:"null"));b.error?c.error&&c.error(b.error.errResp):c.callback&&c.callback.apply(this,b.resp);this.remoteInvokeCallbacks[d.callbackId]=null};EditorUi.prototype.remoteInvoke=function(b,c,e,f,k){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),l=mxUtils.bind(this,function(){window.clearTimeout(g);d&&f.apply(this,arguments)}),n=mxUtils.bind(this,function(){window.clearTimeout(g);d&&k.apply(this,arguments)});e=e||{};e.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:l,error:n});b=JSON.stringify({event:"remoteInvoke",funtionName:b,functionArgs:c,msgMarkers:e});null!=this.remoteWin?this.remoteWin.postMessage(b,"*"):this.remoteInvokeQueue.push(b)};EditorUi.prototype.handleRemoteInvoke=function(b,
-c){var d=mxUtils.bind(this,function(d,c){var e={event:"remoteInvokeResponse",msgMarkers:b.msgMarkers};null!=c?e.error={errResp:c}:null!=d&&(e.resp=d);this.remoteWin.postMessage(JSON.stringify(e),"*")});try{var e=b.funtionName,g=this.remoteInvokableFns[e];if(null!=g&&"function"===typeof this[e]){if(g.allowedDomains){for(var f=!1,k=0;k<g.allowedDomains.length;k++)if(c=="https://"+g.allowedDomains[k]){f=!0;break}if(!f){d(null,"Invalid Call: "+e+" is not allowed.");return}}var n=b.functionArgs;Array.isArray(n)||
-(n=[]);if(g.isAsync)n.push(function(){d(Array.prototype.slice.apply(arguments))}),n.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,n);else{var t=this[e].apply(this,n);d([t])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(x){d(null,"Invalid Call: An error occurred, "+x.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=
+"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(b){var d=b.msgMarkers,c=this.remoteInvokeCallbacks[d.callbackId];if(null==c)throw Error("No callback for "+(null!=d?d.callbackId:"null"));b.error?c.error&&c.error(b.error.errResp):c.callback&&c.callback.apply(this,b.resp);this.remoteInvokeCallbacks[d.callbackId]=null};EditorUi.prototype.remoteInvoke=function(b,c,e,g,k){var d=!0,f=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
+this.timeout),l=mxUtils.bind(this,function(){window.clearTimeout(f);d&&g.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(f);d&&k.apply(this,arguments)});e=e||{};e.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:l,error:m});b=JSON.stringify({event:"remoteInvoke",funtionName:b,functionArgs:c,msgMarkers:e});null!=this.remoteWin?this.remoteWin.postMessage(b,"*"):this.remoteInvokeQueue.push(b)};EditorUi.prototype.handleRemoteInvoke=function(b,
+c){var d=mxUtils.bind(this,function(d,c){var e={event:"remoteInvokeResponse",msgMarkers:b.msgMarkers};null!=c?e.error={errResp:c}:null!=d&&(e.resp=d);this.remoteWin.postMessage(JSON.stringify(e),"*")});try{var e=b.funtionName,f=this.remoteInvokableFns[e];if(null!=f&&"function"===typeof this[e]){if(f.allowedDomains){for(var g=!1,k=0;k<f.allowedDomains.length;k++)if(c=="https://"+f.allowedDomains[k]){g=!0;break}if(!g){d(null,"Invalid Call: "+e+" is not allowed.");return}}var p=b.functionArgs;Array.isArray(p)||
+(p=[]);if(f.isAsync)p.push(function(){d(Array.prototype.slice.apply(arguments))}),p.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,p);else{var t=this[e].apply(this,p);d([t])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(x){d(null,"Invalid Call: An error occurred, "+x.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=
function(b){try{var d=e.result;1>b.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>b.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),d.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(v){null!=c&&c(v)}};e.onsuccess=mxUtils.bind(this,function(d){var c=e.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
-(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(b){if(!b||"1"==urlParams.forceMigration){var c=document.createElement("iframe");c.style.display="none";c.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(c);var d=!0,e=!1,g,f=0,k=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){f++;m()}),m=mxUtils.bind(this,function(){try{if(f>=g.length)k();else{var b=g[f];StorageFile.getFileContent(this,b,mxUtils.bind(this,function(d){null==d||".scratchpad"==b&&d==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(C){console.log(C)}}),n=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,
-size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(C){console.log(C)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var f={};try{f=JSON.parse(b.data)}catch(N){}"init"==f.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||e||
-(d?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(g=f.resp[0],d=!1,m()):k():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?n(f.resp[0]):l())}}catch(N){console.log(N)}});window.addEventListener("message",b)}})));b(c);c.onversionchange=function(){c.close()}});e.onerror=c;e.onblocked=function(){}}catch(p){null!=c&&c(p)}else null!=c&&c()}else b(this.database)};EditorUi.prototype.setDatabaseItem=function(b,c,e,f,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=
-[k],b=[b],c=[c]);var g=d.transaction(k,"readwrite");g.oncomplete=e;g.onerror=f;for(d=0;d<k.length;d++)g.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(u){null!=f&&f(u)}}),f)};EditorUi.prototype.removeDatabaseItem=function(b,c,e,f){this.openDatabase(mxUtils.bind(this,function(d){f=f||"objects";Array.isArray(f)||(f=[f],b=[b]);d=d.transaction(f,"readwrite");d.oncomplete=c;d.onerror=e;for(var g=0;g<f.length;g++)d.objectStore(f[g])["delete"](b[g])}),e)};EditorUi.prototype.getDatabaseItem=
-function(b,c,e,f){this.openDatabase(mxUtils.bind(this,function(d){try{f=f||"objects";var g=d.transaction([f],"readonly").objectStore(f).get(b);g.onsuccess=function(){c(g.result)};g.onerror=e}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.getDatabaseItems=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var g=d.transaction([e],"readonly").objectStore(e).openCursor(IDBKeyRange.lowerBound(0)),f=[];g.onsuccess=function(c){null==c.target.result?b(f):(f.push(c.target.result.value),
-c.target.result["continue"]())};g.onerror=c}catch(v){null!=c&&c(v)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var g=d.transaction([e],"readonly").objectStore(e).getAllKeys();g.onsuccess=function(){b(g.result)};g.onerror=c}catch(m){null!=c&&c(m)}}),c)};EditorUi.prototype.commentsSupported=function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=
+(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(b){if(!b||"1"==urlParams.forceMigration){var c=document.createElement("iframe");c.style.display="none";c.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(c);var d=!0,e=!1,f,g=0,k=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){g++;m()}),m=mxUtils.bind(this,function(){try{if(g>=f.length)k();else{var b=f[g];StorageFile.getFileContent(this,b,mxUtils.bind(this,function(d){null==d||".scratchpad"==b&&d==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(C){console.log(C)}}),p=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,
+size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(C){console.log(C)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var g={};try{g=JSON.parse(b.data)}catch(M){}"init"==g.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||
+(d?null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?(f=g.resp[0],d=!1,m()):k():null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?p(g.resp[0]):l())}}catch(M){console.log(M)}});window.addEventListener("message",b)}})));b(c);c.onversionchange=function(){c.close()}});e.onerror=c;e.onblocked=function(){}}catch(q){null!=c&&c(q)}else null!=c&&c()}else b(this.database)};EditorUi.prototype.setDatabaseItem=function(b,c,e,g,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=
+[k],b=[b],c=[c]);var f=d.transaction(k,"readwrite");f.oncomplete=e;f.onerror=g;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(u){null!=g&&g(u)}}),g)};EditorUi.prototype.removeDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){g=g||"objects";Array.isArray(g)||(g=[g],b=[b]);d=d.transaction(g,"readwrite");d.oncomplete=c;d.onerror=e;for(var f=0;f<g.length;f++)d.objectStore(g[f])["delete"](b[f])}),e)};EditorUi.prototype.getDatabaseItem=
+function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){try{g=g||"objects";var f=d.transaction([g],"readonly").objectStore(g).get(b);f.onsuccess=function(){c(f.result)};f.onerror=e}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.getDatabaseItems=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).openCursor(IDBKeyRange.lowerBound(0)),g=[];f.onsuccess=function(c){null==c.target.result?b(g):(g.push(c.target.result.value),
+c.target.result["continue"]())};f.onerror=c}catch(v){null!=c&&c(v)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).getAllKeys();f.onsuccess=function(){b(f.result)};f.onerror=c}catch(n){null!=c&&c(n)}}),c)};EditorUi.prototype.commentsSupported=function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=
this.getCurrentFile();return null!=b?b.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(b,c){var d=this.getCurrentFile();null!=d?d.getComments(b,c):b([])};EditorUi.prototype.addComment=function(b,c,e){var d=this.getCurrentFile();null!=d?d.addComment(b,c,e):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var b=this.getCurrentFile();return null!=b?
b.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var b=this.getCurrentFile();return null!=b?b.canComment():!0};EditorUi.prototype.newComment=function(b,c){var d=this.getCurrentFile();return null!=d?d.newComment(b,c):new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var b=this.getCurrentFile();return null!=b&&b.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(b,c){var d=this.getCurrentFile();null!=
-d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,e,f,k,m,n,t){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(b,c,e,f,k,m,n,t)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,f,k,m,n,t,B,x,E,A,F,I,L,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,f,k,m,n,t,B,x,E,A,F,I,L,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
-return this.editor.convertImages(b,c,e,f)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=function(b,c,e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,e,f)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,e,f,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,c,e,f,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var e=localStorage.key(c),f=localStorage.getItem(e);if(0<e.length&&(".scratchpad"==e||"."!=e.charAt(0))&&0<f.length){var k=
-"<mxfile "===f.substring(0,8)||"<?xml"===f.substring(0,5)||"\x3c!--[if IE]>"===f.substring(0,12),f="<mxlibrary>"===f.substring(0,11);(k||f)&&b.push(e)}}return b};EditorUi.prototype.getLocalStorageFile=function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,c,e,k,f,n){function t(){for(var b=A.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==A&&c++;F.style.display=0==c?"block":"none"}function d(b,c,d,e){function g(){c.removeChild(l);c.removeChild(m);k.style.display="block";f.style.display="block"}B={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var f=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
-"geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=b.content;c.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),t()):g();B=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";b.content=l.value;mxUtils.write(f,b.content);g();d(b);B=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
-function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(p.click(),mxEvent.consume(b)):27==b.keyCode&&(n.click(),mxEvent.consume(b)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);c.insertBefore(m,f);k.style.display="none";f.style.display="none";l.focus()}function g(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),g=b.timeSince(e);null==g&&(g=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
-[g],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function l(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function q(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function p(b){b.style.border="";b.removeChild(b.busyImg)}function m(c,e,f,k,n){function x(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
-"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});E.appendChild(f);e&&(f.style.display="none")}function C(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=G;b(c);return{pdiv:e,replies:d}}function M(e,f,g,n,t){function u(){l(M);c.addReply(x,function(b){x.id=b;c.replies.push(x);p(M);g&&g()},function(c){A();q(M);b.handleError(c,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},n,t)}function A(){d(x,M,function(b){u()},!0)}var v=C().pdiv,x=b.newComment(e,b.getCurrentUser());x.pCommentId=c.id;null==c.replies&&(c.replies=[]);var M=m(x,c.replies,v,k+1);f?A():u()}if(n||!c.isResolved){F.style.display="none";var G=document.createElement("div");G.className="geCommentContainer";G.setAttribute("data-commentId",c.id);G.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(G.style.backgroundColor="ghostWhite");
-var P=document.createElement("div");P.className="geCommentHeader";var I=document.createElement("img");I.className="geCommentUserImg";I.src=c.user.pictureUrl||Editor.userImage;P.appendChild(I);I=document.createElement("div");I.className="geCommentHeaderTxt";P.appendChild(I);var R=document.createElement("div");R.className="geCommentUsername";mxUtils.write(R,c.user.displayName||"");I.appendChild(R);R=document.createElement("div");R.className="geCommentDate";R.setAttribute("data-commentId",c.id);g(c,
-R);I.appendChild(R);G.appendChild(P);P=document.createElement("div");P.className="geCommentTxt";mxUtils.write(P,c.content||"");G.appendChild(P);c.isLocked&&(G.style.opacity="0.5");P=document.createElement("div");P.className="geCommentActions";var E=document.createElement("ul");E.className="geCommentActionsList";P.appendChild(E);v||c.isLocked||0!=k&&!u||x(mxResources.get("reply"),function(){M("",!0)},c.isResolved);I=b.getCurrentUser();null==I||I.id!=c.user.id||v||c.isLocked||(x(mxResources.get("edit"),
-function(){function e(){d(c,G,function(){l(G);c.editComment(c.content,function(){p(G)},function(c){q(G);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),x(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(G);c.deleteComment(function(b){if(!0===b){b=G.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=G.querySelectorAll(".geCommentAction");for(b=
-0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);p(G);G.style.opacity="0.5"}else{d=C(c).replies;for(b=0;b<d.length;b++)A.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}F.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(c){q(G);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));v||c.isLocked||0!=k||x(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
-b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=C(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);H||(f[k].style.display="none")}t()}c.isResolved?M(mxResources.get("reOpened")+": ",!0,
-d,!1,!0):M(mxResources.get("markedAsResolved"),!1,d,!0)});G.appendChild(P);null!=f?A.insertBefore(G,f.nextSibling):A.appendChild(G);for(f=0;null!=c.replies&&f<c.replies.length;f++)P=c.replies[f],P.isResolved=c.isResolved,m(P,c.replies,null,k+1,n);null!=B&&(B.comment.id==c.id?(n=c.content,c.content=B.comment.content,d(c,G,B.saveCallback,B.deleteOnCancel),c.content=n):null==B.comment.id&&B.comment.pCommentId==c.id&&(A.appendChild(B.div),d(B.comment,B.div,B.saveCallback,B.deleteOnCancel)));return G}}
-var v=!b.canComment(),u=b.canReplyToReplies(),B=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var E=EditorUi.compactUi?"26px":"30px",A=document.createElement("div");A.className="geCommentsList";A.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";A.style.bottom=parseInt(E)+7+"px";x.appendChild(A);var F=document.createElement("span");F.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(F,mxResources.get("noCommentsFound"));var I=document.createElement("div");I.className="geToolbarContainer geCommentsToolbar";I.style.height=E;I.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";I.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";E=document.createElement("a");E.className="geButton";if(!v){var L=E.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;K.push(c);p(g)},function(c){q(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=m(f,K,null,0);e();c.preventDefault();mxEvent.consume(c)});I.appendChild(L)}L=E.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
-var H=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(b){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";C();b.preventDefault();mxEvent.consume(b)});I.appendChild(L);b.commentsRefreshNeeded()&&(L=E.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(b){C();
-b.preventDefault();mxEvent.consume(b)}),I.appendChild(L));b.commentsSaveNeeded()&&(E=E.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',E.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(b){n();b.preventDefault();mxEvent.consume(b)}),I.appendChild(E));x.appendChild(I);var K=[],C=mxUtils.bind(this,function(){this.hasError=!1;if(null!=B)try{B.div=B.div.cloneNode(!0);
-var c=B.div.querySelector(".geCommentEditTxtArea"),e=B.div.querySelector(".geCommentEditBtns");B.comment.content=c.value;c.parentNode.removeChild(c);e.parentNode.removeChild(e)}catch(M){b.handleError(M)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";u=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
-new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});A.innerHTML="";A.appendChild(F);F.style.display="block";K=b;for(b=0;b<K.length;b++)c(K[b].replies),m(K[b],K,null,0,H);null!=B&&null==B.comment.id&&null==B.comment.pCommentId&&(A.appendChild(B.div),d(B.comment,B.div,B.saveCallback,B.deleteOnCancel))},mxUtils.bind(this,function(b){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
-": "+b.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});C();this.refreshComments=C;I=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(g(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=A.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var f=c[e];d[f.getAttribute("data-commentId")]=f}for(e=0;e<K.length;e++)b(K[e])}});setInterval(I,6E4);this.refreshCommentsTime=I;this.window=
-new mxWindow(mxResources.get("comments"),x,c,e,k,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
-document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var N=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",N);this.destroy=function(){mxEvent.removeListener(window,"resize",N);this.window.destroy()}},ConfirmDialog=function(b,c,e,
-k,f,n,t,d,g,l,q){var p=document.createElement("div");p.style.textAlign="center";q=null!=q?q:44;var m=document.createElement("div");m.style.padding="6px";m.style.overflow="auto";m.style.maxHeight=q+"px";m.style.lineHeight="1.2em";mxUtils.write(m,c);p.appendChild(m);null!=l&&(m=document.createElement("div"),m.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",l),m.appendChild(c),p.appendChild(m));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
-"nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k(v.checked)});n.className="geBtn";null!=d&&(n.innerHTML=d+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");b.editor.cancelFirst&&l.appendChild(n);var u=mxUtils.button(f||mxResources.get("ok"),function(){b.hideDialog();null!=e&&e(v.checked)});l.appendChild(u);null!=t?(u.innerHTML=
-t+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(n);p.appendChild(l);g?(l.style.marginTop="10px",m=document.createElement("p"),m.style.marginTop="20px",m.style.marginBottom="0px",m.appendChild(v),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),m.appendChild(f),p.appendChild(m),mxEvent.addListener(f,
-"click",function(b){v.checked=!v.checked;mxEvent.consume(b)})):l.style.marginTop="12px";this.init=function(){u.focus()};this.container=p};function DiagramPage(b,c){this.node=b;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,e,g,k,p,t,u){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
+return this.editor.loadUrl(b,c,e,g,k,p,t,u)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
+return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,g,k,p,t,u,y,x,H,D,E,J,L,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,p,t,u,y,x,H,D,E,J,L,G)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+return this.editor.convertImages(b,c,e,g)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,e,g)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
+return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,c,e,g,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var e=localStorage.key(c),g=localStorage.getItem(e);if(0<e.length&&(".scratchpad"==e||"."!=e.charAt(0))&&0<g.length){var k=
+"<mxfile "===g.substring(0,8)||"<?xml"===g.substring(0,5)||"\x3c!--[if IE]>"===g.substring(0,12),g="<mxlibrary>"===g.substring(0,11);(k||g)&&b.push(e)}}return b};EditorUi.prototype.getLocalStorageFile=function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,c,e,k,g,p){function t(){for(var b=D.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==D&&c++;E.style.display=0==c?"block":"none"}function d(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}y={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var m=document.createElement("div");m.className="geCommentEditBtns";var p=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),t()):f();y=null});p.className="geCommentEditBtn";m.appendChild(p);var n=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);y=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
+function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(n.click(),mxEvent.consume(b)):27==b.keyCode&&(p.click(),mxEvent.consume(b)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";m.appendChild(n);c.insertBefore(m,g);k.style.display="none";g.style.display="none";l.focus()}function f(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
+[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function l(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function m(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function q(b){b.style.border="";b.removeChild(b.busyImg)}function n(c,e,g,k,p){function C(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
+"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});H.appendChild(f);e&&(f.style.display="none")}function x(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=F;b(c);return{pdiv:e,replies:d}}function N(e,f,g,p,t){function u(){l(D);c.addReply(N,function(b){N.id=b;c.replies.push(N);q(D);g&&g()},function(c){v();m(D);b.handleError(c,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},p,t)}function v(){d(N,D,function(b){u()},!0)}var C=x().pdiv,N=b.newComment(e,b.getCurrentUser());N.pCommentId=c.id;null==c.replies&&(c.replies=[]);var D=n(N,c.replies,C,k+1);f?v():u()}if(p||!c.isResolved){E.style.display="none";var F=document.createElement("div");F.className="geCommentContainer";F.setAttribute("data-commentId",c.id);F.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(F.style.backgroundColor="ghostWhite");
+var R=document.createElement("div");R.className="geCommentHeader";var S=document.createElement("img");S.className="geCommentUserImg";S.src=c.user.pictureUrl||Editor.userImage;R.appendChild(S);S=document.createElement("div");S.className="geCommentHeaderTxt";R.appendChild(S);var J=document.createElement("div");J.className="geCommentUsername";mxUtils.write(J,c.user.displayName||"");S.appendChild(J);J=document.createElement("div");J.className="geCommentDate";J.setAttribute("data-commentId",c.id);f(c,
+J);S.appendChild(J);F.appendChild(R);R=document.createElement("div");R.className="geCommentTxt";mxUtils.write(R,c.content||"");F.appendChild(R);c.isLocked&&(F.style.opacity="0.5");R=document.createElement("div");R.className="geCommentActions";var H=document.createElement("ul");H.className="geCommentActionsList";R.appendChild(H);v||c.isLocked||0!=k&&!u||C(mxResources.get("reply"),function(){N("",!0)},c.isResolved);S=b.getCurrentUser();null==S||S.id!=c.user.id||v||c.isLocked||(C(mxResources.get("edit"),
+function(){function e(){d(c,F,function(){l(F);c.editComment(c.content,function(){q(F)},function(c){m(F);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),C(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(F);c.deleteComment(function(b){if(!0===b){b=F.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=F.querySelectorAll(".geCommentAction");for(b=
+0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);q(F);F.style.opacity="0.5"}else{d=x(c).replies;for(b=0;b<d.length;b++)D.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}E.style.display=0==D.getElementsByTagName("div").length?"block":"none"}},function(c){m(F);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));v||c.isLocked||0!=k||C(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
+b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=x(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);G||(f[k].style.display="none")}t()}c.isResolved?N(mxResources.get("reOpened")+": ",!0,
+d,!1,!0):N(mxResources.get("markedAsResolved"),!1,d,!0)});F.appendChild(R);null!=g?D.insertBefore(F,g.nextSibling):D.appendChild(F);for(g=0;null!=c.replies&&g<c.replies.length;g++)R=c.replies[g],R.isResolved=c.isResolved,n(R,c.replies,null,k+1,p);null!=y&&(y.comment.id==c.id?(p=c.content,c.content=y.comment.content,d(c,F,y.saveCallback,y.deleteOnCancel),c.content=p):null==y.comment.id&&y.comment.pCommentId==c.id&&(D.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return F}}
+var v=!b.canComment(),u=b.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var H=EditorUi.compactUi?"26px":"30px",D=document.createElement("div");D.className="geCommentsList";D.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D.style.bottom=parseInt(H)+7+"px";x.appendChild(D);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(E,mxResources.get("noCommentsFound"));var J=document.createElement("div");J.className="geToolbarContainer geCommentsToolbar";J.style.height=H;J.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";J.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";H=document.createElement("a");H.className="geButton";if(!v){var L=H.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;K.push(c);q(g)},function(c){m(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=n(f,K,null,0);e();c.preventDefault();mxEvent.consume(c)});J.appendChild(L)}L=H.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
+var G=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(b){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";C();b.preventDefault();mxEvent.consume(b)});J.appendChild(L);b.commentsRefreshNeeded()&&(L=H.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(b){C();
+b.preventDefault();mxEvent.consume(b)}),J.appendChild(L));b.commentsSaveNeeded()&&(H=H.cloneNode(),H.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',H.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(H.style.filter="invert(100%)"),mxEvent.addListener(H,"click",function(b){p();b.preventDefault();mxEvent.consume(b)}),J.appendChild(H));x.appendChild(J);var K=[],C=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
+var c=y.div.querySelector(".geCommentEditTxtArea"),e=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);e.parentNode.removeChild(e)}catch(N){b.handleError(N)}D.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";u=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
+new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});D.innerHTML="";D.appendChild(E);E.style.display="block";K=b;for(b=0;b<K.length;b++)c(K[b].replies),n(K[b],K,null,0,G);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(D.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
+": "+b.message:""));this.hasError=!0})):D.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});C();this.refreshComments=C;J=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(f(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=D.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var g=c[e];d[g.getAttribute("data-commentId")]=g}for(e=0;e<K.length;e++)b(K[e])}});setInterval(J,6E4);this.refreshCommentsTime=J;this.window=
+new mxWindow(mxResources.get("comments"),x,c,e,k,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
+document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(b,c,e,
+k,g,p,t,d,f,l,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=m+"px";n.style.lineHeight="1.2em";mxUtils.write(n,c);q.appendChild(n);null!=l&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",l),n.appendChild(c),q.appendChild(n));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
+"nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k(v.checked)});p.className="geBtn";null!=d&&(p.innerHTML=d+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&l.appendChild(p);var u=mxUtils.button(g||mxResources.get("ok"),function(){b.hideDialog();null!=e&&e(v.checked)});l.appendChild(u);null!=t?(u.innerHTML=
+t+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(p);q.appendChild(l);f?(l.style.marginTop="10px",n=document.createElement("p"),n.style.marginTop="20px",n.style.marginBottom="0px",n.appendChild(v),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),n.appendChild(g),q.appendChild(n),mxEvent.addListener(g,
+"click",function(b){v.checked=!v.checked;mxEvent.consume(b)})):l.style.marginTop="12px";this.init=function(){u.focus()};this.container=q};function DiagramPage(b,c){this.node=b;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,c,e){this.ui=b;this.page=c;this.previous=this.name=e}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,c,e){this.ui=b;this.oldIndex=c;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,c,e){this.ui=b;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c),null!=e&&(c.viewState=e,this.neverShown=!1))}
SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){var b=this.ui.currentPage,c=this.ui.editor,e=c.graph,k=Graph.compressNode(c.getGraphXml(!0));mxUtils.setTextContent(b.node,k);b.viewState=e.getViewState();b.root=e.model.root;null!=b.model&&b.model.rootChanged(b.root);e.view.clear(b.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;e.model.prefix=Editor.guid()+"-";e.model.rootChanged(b.root);
e.setViewState(b.viewState);e.gridEnabled=e.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);c.updateGraphComponents();e.view.validate();e.blockMathRender=!0;e.sizeDidChange();e.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());c.graph.fireEvent(new mxEventObject(mxEvent.ROOT));c.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(b,c,e,k,f){SelectPage.call(this,b,e);this.relatedPage=c;this.index=k;this.previousIndex=null;this.noSelect=f}mxUtils.extend(ChangePage,SelectPage);
+function ChangePage(b,c,e,k,g){SelectPage.call(this,b,e);this.relatedPage=c;this.index=k;this.previousIndex=null;this.noSelect=g}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
EditorUi.prototype.getPageIndex=function(b){var c=null;if(null!=this.pages&&null!=b)for(var e=0;e<this.pages.length;e++)if(this.pages[e]==b){c=e;break}return c};EditorUi.prototype.getPageById=function(b){if(null!=this.pages)for(var c=0;c<this.pages.length;c++)if(this.pages[c].getId()==b)return this.pages[c];return null};
EditorUi.prototype.createImageForPageLink=function(b,c){var e=b.indexOf(","),k=null;0<e&&(e=this.getPageById(b.substring(e+1)),null!=e&&e!=c&&(k=this.getImageForPage(e,c),k.originalSrc=b));null==k&&(k={originalSrc:b});return k};
-EditorUi.prototype.getImageForPage=function(b,c){var e=this.editor.graph.getGlobalVariable,k=this.createTemporaryGraph(this.editor.graph.getStylesheet()),f=this.getPageIndex(null!=c?c:this.currentPage);k.getGlobalVariable=function(b){return"pagenumber"==b?f+1:"page"==b&&null!=c?c.getName():e.apply(this,arguments)};document.body.appendChild(k.container);this.updatePageRoot(b);k.model.setRoot(b.root);var n=k.getSvg(),t=k.getGraphBounds();document.body.removeChild(k.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(n)),
+EditorUi.prototype.getImageForPage=function(b,c){var e=this.editor.graph.getGlobalVariable,k=this.createTemporaryGraph(this.editor.graph.getStylesheet()),g=this.getPageIndex(null!=c?c:this.currentPage);k.getGlobalVariable=function(b){return"pagenumber"==b?g+1:"page"==b&&null!=c?c.getName():e.apply(this,arguments)};document.body.appendChild(k.container);this.updatePageRoot(b);k.model.setRoot(b.root);var p=k.getSvg(),t=k.getGraphBounds();document.body.removeChild(k.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(p)),
t.width,t.height,t.x,t.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,c=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var e=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";e!=this.tabContainer.style.height&&this.refresh(!1)}c.apply(b.view,arguments)});var e=null,k=mxUtils.bind(this,function(){this.updateTabContainer();var c=this.currentPage;null!=c&&c!=e&&(null==c.viewState||null==c.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+c.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+c.viewState.scrollTop),e=c);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=
this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,c){for(var e=c.getProperty("edit").changes,d=0;d<e.length;d++)if(e[d]instanceof SelectPage||e[d]instanceof RenamePage||e[d]instanceof MovePage||e[d]instanceof mxRootChange){k();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,c,e){b=null!=b?this.getPageById(b.getId()):null;var k=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,c):(k.setViewState(c),this.editor.updateGraphComponents(),k.view.revalidate(),k.sizeDidChange()),k.container.scrollLeft=k.view.translate.x*k.view.scale+c.scrollLeft,k.container.scrollTop=k.view.translate.y*k.view.scale+c.scrollTop,k.restoreSelection(e))};
-Graph.prototype.createViewState=function(b){var c=b.getAttribute("page"),e=parseFloat(b.getAttribute("pageScale")),k=parseFloat(b.getAttribute("pageWidth")),f=parseFloat(b.getAttribute("pageHeight")),n=b.getAttribute("background"),t=this.parseBackgroundImage(b.getAttribute("backgroundImage")),d=b.getAttribute("extFonts");if(d)try{d=d.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}})}catch(g){console.log("ExtFonts format error: "+g.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:t,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(k)||isNaN(f)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,k,f),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:d||[]}};
+Graph.prototype.createViewState=function(b){var c=b.getAttribute("page"),e=parseFloat(b.getAttribute("pageScale")),k=parseFloat(b.getAttribute("pageWidth")),g=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),t=this.parseBackgroundImage(b.getAttribute("backgroundImage")),d=b.getAttribute("extFonts");if(d)try{d=d.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}})}catch(f){console.log("ExtFonts format error: "+f.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:t,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(k)||isNaN(g)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,k,g),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:d||[]}};
Graph.prototype.saveViewState=function(b,c,e,k){e||(c.setAttribute("grid",null==b||b.gridEnabled?"1":"0"),c.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),c.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),c.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),c.setAttribute("connect",null==b||b.connect?"1":"0"),c.setAttribute("arrows",null==b||b.arrows?"1":"0"),c.setAttribute("page",null==b&&this.defaultPageVisible||null!=b&&b.pageVisible?"1":"0"),c.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));c.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);e=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=e&&(c.setAttribute("pageWidth",e.width),c.setAttribute("pageHeight",e.height));null!=b&&(null!=b.background&&c.setAttribute("background",b.background),k=this.getBackgroundImageObject(b.backgroundImage,k),null!=k&&c.setAttribute("backgroundImage",
JSON.stringify(k)));c.setAttribute("math",null!=b&&b.mathEnabled?"1":"0");c.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&c.setAttribute("extFonts",b.extFonts.map(function(b){return b.name+"^"+b.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
Graph.prototype.setViewState=function(b,c){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
-this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var e=this.extFonts;this.extFonts=b.extFonts||[];if(c&&null!=e)for(var k=0;k<e.length;k++){var f=document.getElementById("extFont_"+e[k].name);null!=f&&f.parentNode.removeChild(f)}for(k=0;k<this.extFonts.length;k++)this.addExtFont(this.extFonts[k].name,this.extFonts[k].url,
+this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var e=this.extFonts;this.extFonts=b.extFonts||[];if(c&&null!=e)for(var k=0;k<e.length;k++){var g=document.getElementById("extFont_"+e[k].name);null!=g&&g.parentNode.removeChild(g)}for(k=0;k<this.extFonts.length;k++)this.addExtFont(this.extFonts[k].name,this.extFonts[k].url,
!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=
"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0,this.hiddenTags=
[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};
-Graph.prototype.addExtFont=function(b,c,e){if(b&&c){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:c});var k="extFont_"+b;if(null==document.getElementById(k))if(0==c.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",c,null,k);else{document.getElementsByTagName("head");var f=document.createElement("style");f.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+c+'");\n}'));f.setAttribute("id",k);document.getElementsByTagName("head")[0].appendChild(f)}if(!e){null==
-this.extFonts&&(this.extFonts=[]);e=this.extFonts;k=!0;for(f=0;f<e.length;f++)if(e[f].name==b){k=!1;break}k&&this.extFonts.push({name:b,url:c})}}};
+Graph.prototype.addExtFont=function(b,c,e){if(b&&c){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:c});var k="extFont_"+b;if(null==document.getElementById(k))if(0==c.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",c,null,k);else{document.getElementsByTagName("head");var g=document.createElement("style");g.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+c+'");\n}'));g.setAttribute("id",k);document.getElementsByTagName("head")[0].appendChild(g)}if(!e){null==
+this.extFonts&&(this.extFonts=[]);e=this.extFonts;k=!0;for(g=0;g<e.length;g++)if(e[g].name==b){k=!1;break}k&&this.extFonts.push({name:b,url:c})}}};
EditorUi.prototype.updatePageRoot=function(b,c){if(null==b.root){var e=this.editor.extractGraphModel(b.node,null,c),k=Editor.extractParserError(e);if(k)throw Error(k);null!=e?(b.graphModelNode=e,b.viewState=this.editor.graph.createViewState(e),k=new mxCodec(e.ownerDocument),b.root=k.decode(e).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){e=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(e))throw Error(k);null!=e&&(b.graphModelNode=
e)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,c,e){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c=null!=c?c:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var k=this.editor.graph.model.createUndoableEdit();k.ignoreEdit=!0;var f=new SelectPage(this,b,e);f.execute();k.add(f);k.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",k))}}catch(n){this.handleError(n)}};
+EditorUi.prototype.selectPage=function(b,c,e){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c=null!=c?c:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var k=this.editor.graph.model.createUndoableEdit();k.ignoreEdit=!0;var g=new SelectPage(this,b,e);g.execute();k.add(g);k.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",k))}}catch(p){this.handleError(p)}};
EditorUi.prototype.selectNextPage=function(b){var c=this.currentPage;null!=c&&null!=this.pages&&(c=mxUtils.indexOf(this.pages,c),b?this.selectPage(this.pages[mxUtils.mod(c+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(c-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(b,c){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:this.createPage(null,this.createPageId());c=null!=c?c:this.pages.length;var e=new ChangePage(this,b,b,c);this.editor.graph.model.execute(e)}return b};EditorUi.prototype.createPageId=function(){var b;do b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,c){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),c);e.setName(null!=b?b:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var b={},c=0;c<this.pages.length;c++){var e=this.pages[c].getName();null!=e&&0<e.length&&(b[e]=e)}c=this.pages.length;do e=mxResources.get("pageWithNumber",[++c]);while(null!=b[e]);return e};
-EditorUi.prototype.removePage=function(b){try{var c=this.editor.graph,e=mxUtils.indexOf(this.pages,b);if(c.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c.model.beginUpdate();try{var k=this.currentPage;k==b&&1<this.pages.length?(e==this.pages.length-1?e--:e++,k=this.pages[e]):1>=this.pages.length&&(k=this.insertPage(),c.model.execute(new RenamePage(this,k,mxResources.get("pageWithNumber",[1]))));c.model.execute(new ChangePage(this,b,k))}finally{c.model.endUpdate()}}}catch(f){this.handleError(f)}return b};
-EditorUi.prototype.duplicatePage=function(b,c){var e=null;try{var k=this.editor.graph;if(k.isEnabled()){k.isEditing()&&k.stopEditing();var f=b.node.cloneNode(!1);f.removeAttribute("id");var n={},t=k.createCellLookup([k.model.root]),e=new DiagramPage(f);e.root=k.cloneCell(k.model.root,null,n);e.viewState=k.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(c);e=this.insertPage(e,mxUtils.indexOf(this.pages,
-b)+1);k.updateCustomLinks(k.createCellMapping(n,t),[e.root])}}catch(d){this.handleError(d)}return e};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var c=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,b,c))}),mxResources.get("rename"));this.showDialog(c.container,300,80,!0,!0);c.init()}return b};
+EditorUi.prototype.removePage=function(b){try{var c=this.editor.graph,e=mxUtils.indexOf(this.pages,b);if(c.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c.model.beginUpdate();try{var k=this.currentPage;k==b&&1<this.pages.length?(e==this.pages.length-1?e--:e++,k=this.pages[e]):1>=this.pages.length&&(k=this.insertPage(),c.model.execute(new RenamePage(this,k,mxResources.get("pageWithNumber",[1]))));c.model.execute(new ChangePage(this,b,k))}finally{c.model.endUpdate()}}}catch(g){this.handleError(g)}return b};
+EditorUi.prototype.duplicatePage=function(b,c){var e=null;try{var k=this.editor.graph;if(k.isEnabled()){k.isEditing()&&k.stopEditing();var g=b.node.cloneNode(!1);g.removeAttribute("id");var p={},t=k.createCellLookup([k.model.root]),e=new DiagramPage(g);e.root=k.cloneCell(k.model.root,null,p);e.viewState=k.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(c);e=this.insertPage(e,mxUtils.indexOf(this.pages,
+b)+1);k.updateCustomLinks(k.createCellMapping(p,t),[e.root])}}catch(d){this.handleError(d)}return e};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var c=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,b,c))}),mxResources.get("rename"));this.showDialog(c.container,300,80,!0,!0);c.init()}return b};
EditorUi.prototype.movePage=function(b,c){this.editor.graph.model.execute(new MovePage(this,b,c))};EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,c=document.createElement("div");c.style.position="relative";c.style.display="inline-block";c.style.verticalAlign="top";c.style.height=this.tabContainer.style.height;c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.fontSize="13px";c.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,k=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-e)/this.pages.length)+
-1),f=null,n=0;n<this.pages.length;n++)mxUtils.bind(this,function(d,e){this.pages[d]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){b.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),f=d):mxEvent.consume(c)}));mxEvent.addListener(e,"dragend",mxUtils.bind(this,function(b){f=null;b.stopPropagation();
-b.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(b){null!=f&&(b.dataTransfer.dropEffect="move");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(b){null!=f&&d!=f&&this.movePage(f,d);b.stopPropagation();b.preventDefault()}));c.appendChild(e)})(n,this.createTabForPage(this.pages[n],k,this.pages[n]!=this.currentPage,n+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);k=this.createPageMenuTab();this.tabContainer.appendChild(k);
+1),g=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(d,e){this.pages[d]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){b.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=d):mxEvent.consume(c)}));mxEvent.addListener(e,"dragend",mxUtils.bind(this,function(b){g=null;b.stopPropagation();
+b.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(b){null!=g&&(b.dataTransfer.dropEffect="move");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(b){null!=g&&d!=g&&this.movePage(g,d);b.stopPropagation();b.preventDefault()}));c.appendChild(e)})(p,this.createTabForPage(this.pages[p],k,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);k=this.createPageMenuTab();this.tabContainer.appendChild(k);
k=null;this.isPageInsertTabVisible()&&(k=this.createPageInsertTab(),this.tabContainer.appendChild(k));if(c.clientWidth>this.tabContainer.clientWidth-e){null!=k&&(k.style.position="absolute",k.style.right="0px",c.style.marginRight="30px");var t=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");t.style.position="absolute";t.style.right=this.editor.chromeless?"29px":"55px";t.style.fontSize="13pt";this.tabContainer.appendChild(t);var d=this.createControlTab(4,"&nbsp;&#10095;");d.style.position="absolute";
-d.style.right=this.editor.chromeless?"0px":"29px";d.style.fontSize="13pt";this.tabContainer.appendChild(d);var g=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=g+"px";mxEvent.addListener(t,"click",mxUtils.bind(this,function(b){c.scrollLeft-=Math.max(20,g-20);mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(b)}));mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,
-c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){c.scrollLeft+=Math.max(20,g-20);mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(b)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+d.style.right=this.editor.chromeless?"0px":"29px";d.style.fontSize="13pt";this.tabContainer.appendChild(d);var f=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=f+"px";mxEvent.addListener(t,"click",mxUtils.bind(this,function(b){c.scrollLeft-=Math.max(20,f-20);mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(b)}));mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,
+c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){c.scrollLeft+=Math.max(20,f-20);mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(b)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var c=document.createElement("div");c.style.display="inline-block";c.style.whiteSpace="nowrap";c.style.boxSizing="border-box";c.style.position="relative";c.style.overflow="hidden";c.style.textAlign="center";c.style.marginLeft="-1px";c.style.height=this.tabContainer.clientHeight+"px";c.style.padding="12px 4px 8px 4px";c.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";c.style.borderTopStyle="none";c.style.borderBottomStyle="none";c.style.backgroundColor=
this.tabContainer.style.backgroundColor;c.style.cursor="move";c.style.color="gray";b&&(mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(b){this.editor.graph.isMouseDown||(c.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(b))})),mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(b){c.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(b)})));return c};
EditorUi.prototype.createControlTab=function(b,c,e){e=this.createTab(null!=e?e:!0);e.style.lineHeight=this.tabContainerHeight+"px";e.style.paddingTop=b+"px";e.style.cursor="pointer";e.style.width="30px";e.innerHTML=c;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
EditorUi.prototype.createPageMenuTab=function(b){b=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;margin-top:5px;width:21px;height:21px;"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(mxUtils.bind(this,function(b,c){for(var d=0;d<
this.pages.length;d++)mxUtils.bind(this,function(d){var e=b.addItem(this.pages[d].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[d])}),c),f=this.pages[d].getId();e.setAttribute("title",this.pages[d].getName()+(null!=f?" ("+f+")":"")+" ["+(d+1)+"]");this.pages[d]==this.currentPage&&b.addCheckmark(e,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){b.addSeparator(c);b.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),c);var e=
this.currentPage;null!=e&&(b.addSeparator(c),d=e.getName(),b.addItem(mxResources.get("removeIt",[d]),null,mxUtils.bind(this,function(){this.removePage(e)}),c),b.addItem(mxResources.get("renameIt",[d]),null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),c),b.addSeparator(c),b.addItem(mxResources.get("duplicateIt",[d]),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),c))}}));c.div.className+=" geMenubarMenu";c.smartSeparators=!0;c.showDisabled=
-!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var k=mxEvent.getClientX(b),f=mxEvent.getClientY(b);c.popup(k,f,null,b);this.setCurrentMenu(c);mxEvent.consume(b)}));return b};
+!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var k=mxEvent.getClientX(b),g=mxEvent.getClientY(b);c.popup(k,g,null,b);this.setCurrentMenu(c);mxEvent.consume(b)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){this.insertPage();mxEvent.consume(b)}));return b};
-EditorUi.prototype.createTabForPage=function(b,c,e,k){e=this.createTab(e);var f=b.getName()||mxResources.get("untitled"),n=b.getId();e.setAttribute("title",f+(null!=n?" ("+n+")":"")+" ["+k+"]");mxUtils.write(e,f);e.style.maxWidth=c+"px";e.style.width=c+"px";this.addTabListeners(b,e);42<c&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(b,c){mxEvent.disableContextMenu(c);var e=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(c){this.renamePage(b);mxEvent.consume(c)}));var k=!1,f=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){k=null!=this.currentMenu;f=b==this.currentPage;e.isMouseDown||f||this.selectPage(b)}),null,mxUtils.bind(this,function(n){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(n)&&f||mxEvent.isPopupTrigger(n))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!k){var t=new mxPopupMenu(this.createPageMenu(b));t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);this.resetCurrentMenu();t.destroy()});var d=mxEvent.getClientX(n),g=mxEvent.getClientY(n);t.popup(d,g,null,n);this.setCurrentMenu(t,c)}mxEvent.consume(n)}}))};
-EditorUi.prototype.getLinkForPage=function(b,c,e){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var k=this.getCurrentFile();if(null!=k&&k.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var f=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),f=f+((0==f.length?"?":"&")+"page-id="+b.getId());null!=c&&(f+="&"+c.join("&"));return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+f+"#"+k.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(b,c){return mxUtils.bind(this,function(e,k){var f=this.editor.graph;e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),k);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),k);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,c)}),k);null!=this.getLinkForPage(b)&&(e.addSeparator(k),e.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,e,d,g,k,q){c=this.createUrlParameters(c,e,d,g,k,q);d||c.push("hide-pages=1");f.isSelectionEmpty()||(d=f.getBoundingBox(f.getSelectionCells()),e=f.view.translate,k=f.view.scale,d.width/=k,d.height/=k,d.x=d.x/k-e.x,d.y=d.y/k-e.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
-g=new EmbedDialog(this,this.getLinkForPage(b,c,g));this.showDialog(g.container,440,240,!0,!0);g.init()}))})));e.addSeparator(k);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),k);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(k),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
+EditorUi.prototype.createTabForPage=function(b,c,e,k){e=this.createTab(e);var g=b.getName()||mxResources.get("untitled"),p=b.getId();e.setAttribute("title",g+(null!=p?" ("+p+")":"")+" ["+k+"]");mxUtils.write(e,g);e.style.maxWidth=c+"px";e.style.width=c+"px";this.addTabListeners(b,e);42<c&&(e.style.textOverflow="ellipsis");return e};
+EditorUi.prototype.addTabListeners=function(b,c){mxEvent.disableContextMenu(c);var e=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(c){this.renamePage(b);mxEvent.consume(c)}));var k=!1,g=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){k=null!=this.currentMenu;g=b==this.currentPage;e.isMouseDown||g||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(p)&&g||mxEvent.isPopupTrigger(p))){e.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!k){var t=new mxPopupMenu(this.createPageMenu(b));t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);this.resetCurrentMenu();t.destroy()});var d=mxEvent.getClientX(p),f=mxEvent.getClientY(p);t.popup(d,f,null,p);this.setCurrentMenu(t,c)}mxEvent.consume(p)}}))};
+EditorUi.prototype.getLinkForPage=function(b,c,e){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var k=this.getCurrentFile();if(null!=k&&k.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var g=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),g=g+((0==g.length?"?":"&")+"page-id="+b.getId());null!=c&&(g+="&"+c.join("&"));return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+g+"#"+k.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(b,c){return mxUtils.bind(this,function(e,k){var g=this.editor.graph;e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),k);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),k);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,c)}),k);null!=this.getLinkForPage(b)&&(e.addSeparator(k),e.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,e,d,f,k,m){c=this.createUrlParameters(c,e,d,f,k,m);d||c.push("hide-pages=1");g.isSelectionEmpty()||(d=g.getBoundingBox(g.getSelectionCells()),e=g.view.translate,k=g.view.scale,d.width/=k,d.height/=k,d.x=d.x/k-e.x,d.y=d.y/k-e.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
+f=new EmbedDialog(this,this.getLinkForPage(b,c,f));this.showDialog(f.container,440,240,!0,!0);f.init()}))})));e.addSeparator(k);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),k);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(k),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),k))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){b=k.oldIndex;k.oldIndex=k.newIndex;k.newIndex=b;return k};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){b=k.previous;k.previous=k.name;k.name=b;return k};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),c="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");b.afterEncode=function(b,k,f){f.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(f.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&f.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(b,e){return 0>mxUtils.indexOf(c,
-b)?e:void 0})),null!=k.relatedPage.root&&b.encodeCell(k.relatedPage.root,f));return f};b.beforeDecode=function(b,c,f){f.ui=b.ui;f.relatedPage=f.ui.getPageById(c.getAttribute("relatedPage"));if(null==f.relatedPage){var e=c.ownerDocument.createElement("diagram");e.setAttribute("id",c.getAttribute("relatedPage"));e.setAttribute("name",c.getAttribute("name"));f.relatedPage=new DiagramPage(e);e=c.getAttribute("viewState");null!=e&&(f.relatedPage.viewState=JSON.parse(e),c.removeAttribute("viewState"));
-c=c.cloneNode(!0);e=c.firstChild;if(null!=e)for(f.relatedPage.root=b.decodeCell(e,!1),f=e.nextSibling,e.parentNode.removeChild(e),e=f;null!=e;){f=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var k=e.getAttribute("id");null==b.lookup(k)&&b.decodeCell(e)}e.parentNode.removeChild(e);e=f}}return c};b.afterDecode=function(b,c,f){f.index=f.previousIndex;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,e,n,t,d){e=null!=e?e:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var f=n.slice(),k=0;k<n.length;k++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[k]),"treeFolding","0")&&this.foldTreeCell(c,n[k]);n=f;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=
-function(b,c){this.model.beginUpdate();try{var e=[];this.traverse(c,!0,mxUtils.bind(this,function(b,f){var d=null!=f&&this.isTreeEdge(f);d&&e.push(f);b==c||null!=f&&!d||e.push(b);return(null==f||d)&&(b==c||!this.model.isCollapsed(b))}));this.model.setCollapsed(c,b);for(var f=0;f<e.length;f++)this.model.setVisible(e[f],!b)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(b){return!this.isEdgeIgnored(b)};Graph.prototype.getTreeEdges=function(b,c,e,t,d,g){return this.model.filterCells(this.getEdges(b,
-c,e,t,d,g),mxUtils.bind(this,function(b){return this.isTreeEdge(b)}))};Graph.prototype.getIncomingTreeEdges=function(b,c){return this.getTreeEdges(b,c,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(b,c){return this.getTreeEdges(b,c,!1,!0,!1)};var c=EditorUi.prototype.init;EditorUi.prototype.init=function(){c.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(b){return B.isVertex(b)&&e(b)}function c(b){var c=
-!1;null!=b&&(c="1"==u.getCurrentCellStyle(b).treeMoving);return c}function e(b){var c=!1;null!=b&&(b=B.getParent(b),c=u.view.getState(b),c="tree"==(null!=c?c.style:u.getCellStyle(b)).containerType);return c}function t(b){var c=!1;null!=b&&(b=B.getParent(b),c=u.view.getState(b),u.view.getState(b),c=null!=(null!=c?c.style:u.getCellStyle(b)).childLayout);return c}function d(b){b=u.view.getState(b);if(null!=b){var c=u.getIncomingTreeEdges(b.cell);if(0<c.length&&(c=u.view.getState(c[0]),null!=c&&(c=c.absolutePoints,
-null!=c&&0<c.length&&(c=c[c.length-1],null!=c)))){if(c.y==b.y&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_SOUTH;if(c.y==b.y+b.height&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_NORTH;if(c.x>b.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function g(b,c){c=null!=c?c:!0;u.model.beginUpdate();try{var e=u.model.getParent(b),f=u.getIncomingTreeEdges(b),g=u.cloneCells([f[0],b]);u.model.setTerminal(g[0],u.model.getTerminal(f[0],
-!0),!0);var k=d(b),l=e.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;u.view.currentRoot!=e&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var m=u.view.getState(b),n=u.view.scale;if(null!=m){var p=mxRectangle.fromRectangle(m);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?p.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*n:p.y+=(c?
-b.geometry.height+10:-g[1].geometry.height-10)*n;var t=u.getOutgoingTreeEdges(u.model.getTerminal(f[0],!0));if(null!=t){for(var q=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,A=l=f=0;A<t.length;A++){var v=u.model.getTerminal(t[A],!1);if(k==d(v)){var x=u.view.getState(v);v!=b&&null!=x&&(q&&c!=x.getCenterX()<m.getCenterX()||!q&&c!=x.getCenterY()<m.getCenterY())&&mxUtils.intersects(p,x)&&(f=10+Math.max(f,(Math.min(p.x+p.width,x.x+x.width)-Math.max(p.x,x.x))/n),l=10+Math.max(l,(Math.min(p.y+
-p.height,x.y+x.height)-Math.max(p.y,x.y))/n))}}q?l=0:f=0;for(A=0;A<t.length;A++)if(v=u.model.getTerminal(t[A],!1),k==d(v)&&(x=u.view.getState(v),v!=b&&null!=x&&(q&&c!=x.getCenterX()<m.getCenterX()||!q&&c!=x.getCenterY()<m.getCenterY()))){var C=[];u.traverse(x.cell,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&C.push(c);(null==c||d)&&C.push(b);return null==c||d});u.moveCells(C,(c?1:-1)*f,(c?1:-1)*l)}}}return u.addCells(g,e)}finally{u.model.endUpdate()}}function l(b){u.model.beginUpdate();try{var c=
-d(b),e=u.getIncomingTreeEdges(b),f=u.cloneCells([e[0],b]);u.model.setTerminal(e[0],f[1],!1);u.model.setTerminal(f[0],f[1],!0);u.model.setTerminal(f[0],b,!1);var g=u.model.getParent(b),k=g.geometry,l=[];u.view.currentRoot!=g&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);u.traverse(b,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var m=b.geometry.width+40,n=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?m=0:c==mxConstants.DIRECTION_NORTH?
-(m=0,n=-n):c==mxConstants.DIRECTION_WEST?(m=-m,n=0):c==mxConstants.DIRECTION_EAST&&(n=0);u.moveCells(l,m,n);return u.addCells(f,g)}finally{u.model.endUpdate()}}function q(b,c){u.model.beginUpdate();try{var e=u.model.getParent(b),f=u.getIncomingTreeEdges(b),g=d(b);0==f.length&&(f=[u.createEdge(e,null,"",null,null,u.createCurrentEdgeStyle())],g=c);var k=u.cloneCells([f[0],b]);u.model.setTerminal(k[0],b,!0);if(null==u.model.getTerminal(k[0],!1)){u.model.setTerminal(k[0],k[1],!1);var l=u.getCellStyle(k[1]).newEdgeStyle;
-if(null!=l)try{var m=JSON.parse(l),n;for(n in m)u.setCellStyles(n,m[n],[k[0]]),"edgeStyle"==n&&"elbowEdgeStyle"==m[n]&&u.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(ca){}}var f=u.getOutgoingTreeEdges(b),p=e.geometry,l=[];u.view.currentRoot==e&&(p=new mxRectangle);for(m=0;m<f.length;m++){var t=u.model.getTerminal(f[m],!1);null!=t&&l.push(t)}var q=u.view.getBounds(l),A=u.view.translate,v=u.view.scale;g==mxConstants.DIRECTION_SOUTH?
-(k[1].geometry.x=null==q?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(q.x+q.width)/v-A.x-p.x+10,k[1].geometry.y+=k[1].geometry.height-p.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==q?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(q.x+q.width)/v-A.x+-p.x+10,k[1].geometry.y-=k[1].geometry.height+p.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+p.x+40):k[1].geometry.x+(k[1].geometry.width-p.x+40),k[1].geometry.y=null==q?b.geometry.y+
-(b.geometry.height-k[1].geometry.height)/2:(q.y+q.height)/v-A.y+-p.y+10);return u.addCells(k,e)}finally{u.model.endUpdate()}}function p(b,c,d){b=u.getOutgoingTreeEdges(b);d=u.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=u.view.getState(u.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
-d.y-d.height})}return e}function m(b,c){var e=d(b),f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST)==f&&e!=c?v.actions.get("selectParent").funct():e==c?(f=u.getOutgoingTreeEdges(b),null!=f&&0<f.length&&u.setSelectionCell(u.model.getTerminal(f[0],!1))):(e=u.getIncomingTreeEdges(b),null!=e&&0<e.length&&(f=p(u.model.getTerminal(e[0],!0),f,b),e=u.view.getState(b),null!=e&&(e=mxUtils.indexOf(f,e),0<=e&&(e+=c==mxConstants.DIRECTION_NORTH||
-c==mxConstants.DIRECTION_WEST?-1:1,0<=e&&e<=f.length-1&&u.setSelectionCell(f[e].cell)))))}var v=this,u=v.editor.graph,B=u.getModel(),x=v.menus.createPopupMenu;v.menus.createPopupMenu=function(c,d,e){x.apply(this,arguments);if(1==u.getSelectionCount()){d=u.getSelectionCell();var f=u.getOutgoingTreeEdges(d);c.addSeparator();0<f.length&&(b(u.getSelectionCell())&&this.addMenuItems(c,["selectChildren"],null,e),this.addMenuItems(c,["selectDescendants"],null,e));b(u.getSelectionCell())?(c.addSeparator(),
+(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),c="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");b.afterEncode=function(b,k,g){g.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(g.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&g.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(b,e){return 0>mxUtils.indexOf(c,
+b)?e:void 0})),null!=k.relatedPage.root&&b.encodeCell(k.relatedPage.root,g));return g};b.beforeDecode=function(b,c,g){g.ui=b.ui;g.relatedPage=g.ui.getPageById(c.getAttribute("relatedPage"));if(null==g.relatedPage){var e=c.ownerDocument.createElement("diagram");e.setAttribute("id",c.getAttribute("relatedPage"));e.setAttribute("name",c.getAttribute("name"));g.relatedPage=new DiagramPage(e);e=c.getAttribute("viewState");null!=e&&(g.relatedPage.viewState=JSON.parse(e),c.removeAttribute("viewState"));
+c=c.cloneNode(!0);e=c.firstChild;if(null!=e)for(g.relatedPage.root=b.decodeCell(e,!1),g=e.nextSibling,e.parentNode.removeChild(e),e=g;null!=e;){g=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var k=e.getAttribute("id");null==b.lookup(k)&&b.decodeCell(e)}e.parentNode.removeChild(e);e=g}}return c};b.afterDecode=function(b,c,g){g.index=g.previousIndex;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,e,p,t,d){e=null!=e?e:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var f=p.slice(),g=0;g<p.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[g]),"treeFolding","0")&&this.foldTreeCell(c,p[g]);p=f;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
+function(b,c){this.model.beginUpdate();try{var e=[];this.traverse(c,!0,mxUtils.bind(this,function(b,f){var d=null!=f&&this.isTreeEdge(f);d&&e.push(f);b==c||null!=f&&!d||e.push(b);return(null==f||d)&&(b==c||!this.model.isCollapsed(b))}));this.model.setCollapsed(c,b);for(var g=0;g<e.length;g++)this.model.setVisible(e[g],!b)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(b){return!this.isEdgeIgnored(b)};Graph.prototype.getTreeEdges=function(b,c,e,t,d,f){return this.model.filterCells(this.getEdges(b,
+c,e,t,d,f),mxUtils.bind(this,function(b){return this.isTreeEdge(b)}))};Graph.prototype.getIncomingTreeEdges=function(b,c){return this.getTreeEdges(b,c,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(b,c){return this.getTreeEdges(b,c,!1,!0,!1)};var c=EditorUi.prototype.init;EditorUi.prototype.init=function(){c.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(b){return y.isVertex(b)&&e(b)}function c(b){var c=
+!1;null!=b&&(c="1"==u.getCurrentCellStyle(b).treeMoving);return c}function e(b){var c=!1;null!=b&&(b=y.getParent(b),c=u.view.getState(b),c="tree"==(null!=c?c.style:u.getCellStyle(b)).containerType);return c}function t(b){var c=!1;null!=b&&(b=y.getParent(b),c=u.view.getState(b),u.view.getState(b),c=null!=(null!=c?c.style:u.getCellStyle(b)).childLayout);return c}function d(b){b=u.view.getState(b);if(null!=b){var c=u.getIncomingTreeEdges(b.cell);if(0<c.length&&(c=u.view.getState(c[0]),null!=c&&(c=c.absolutePoints,
+null!=c&&0<c.length&&(c=c[c.length-1],null!=c)))){if(c.y==b.y&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_SOUTH;if(c.y==b.y+b.height&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_NORTH;if(c.x>b.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(b,c){c=null!=c?c:!0;u.model.beginUpdate();try{var e=u.model.getParent(b),f=u.getIncomingTreeEdges(b),g=u.cloneCells([f[0],b]);u.model.setTerminal(g[0],u.model.getTerminal(f[0],
+!0),!0);var k=d(b),l=e.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;u.view.currentRoot!=e&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var m=u.view.getState(b),p=u.view.scale;if(null!=m){var n=mxRectangle.fromRectangle(m);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?n.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*p:n.y+=(c?
+b.geometry.height+10:-g[1].geometry.height-10)*p;var q=u.getOutgoingTreeEdges(u.model.getTerminal(f[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,v=l=f=0;v<q.length;v++){var C=u.model.getTerminal(q[v],!1);if(k==d(C)){var x=u.view.getState(C);C!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY())&&mxUtils.intersects(n,x)&&(f=10+Math.max(f,(Math.min(n.x+n.width,x.x+x.width)-Math.max(n.x,x.x))/p),l=10+Math.max(l,(Math.min(n.y+
+n.height,x.y+x.height)-Math.max(n.y,x.y))/p))}}t?l=0:f=0;for(v=0;v<q.length;v++)if(C=u.model.getTerminal(q[v],!1),k==d(C)&&(x=u.view.getState(C),C!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY()))){var D=[];u.traverse(x.cell,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&D.push(c);(null==c||d)&&D.push(b);return null==c||d});u.moveCells(D,(c?1:-1)*f,(c?1:-1)*l)}}}return u.addCells(g,e)}finally{u.model.endUpdate()}}function l(b){u.model.beginUpdate();try{var c=
+d(b),e=u.getIncomingTreeEdges(b),f=u.cloneCells([e[0],b]);u.model.setTerminal(e[0],f[1],!1);u.model.setTerminal(f[0],f[1],!0);u.model.setTerminal(f[0],b,!1);var g=u.model.getParent(b),k=g.geometry,l=[];u.view.currentRoot!=g&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);u.traverse(b,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var m=b.geometry.width+40,p=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?m=0:c==mxConstants.DIRECTION_NORTH?
+(m=0,p=-p):c==mxConstants.DIRECTION_WEST?(m=-m,p=0):c==mxConstants.DIRECTION_EAST&&(p=0);u.moveCells(l,m,p);return u.addCells(f,g)}finally{u.model.endUpdate()}}function m(b,c){u.model.beginUpdate();try{var e=u.model.getParent(b),f=u.getIncomingTreeEdges(b),g=d(b);0==f.length&&(f=[u.createEdge(e,null,"",null,null,u.createCurrentEdgeStyle())],g=c);var k=u.cloneCells([f[0],b]);u.model.setTerminal(k[0],b,!0);if(null==u.model.getTerminal(k[0],!1)){u.model.setTerminal(k[0],k[1],!1);var l=u.getCellStyle(k[1]).newEdgeStyle;
+if(null!=l)try{var m=JSON.parse(l),p;for(p in m)u.setCellStyles(p,m[p],[k[0]]),"edgeStyle"==p&&"elbowEdgeStyle"==m[p]&&u.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(ca){}}var f=u.getOutgoingTreeEdges(b),n=e.geometry,l=[];u.view.currentRoot==e&&(n=new mxRectangle);for(m=0;m<f.length;m++){var q=u.model.getTerminal(f[m],!1);null!=q&&l.push(q)}var t=u.view.getBounds(l),v=u.view.translate,x=u.view.scale;g==mxConstants.DIRECTION_SOUTH?
+(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/x-v.x-n.x+10,k[1].geometry.y+=k[1].geometry.height-n.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/x-v.x+-n.x+10,k[1].geometry.y-=k[1].geometry.height+n.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+n.x+40):k[1].geometry.x+(k[1].geometry.width-n.x+40),k[1].geometry.y=null==t?b.geometry.y+
+(b.geometry.height-k[1].geometry.height)/2:(t.y+t.height)/x-v.y+-n.y+10);return u.addCells(k,e)}finally{u.model.endUpdate()}}function q(b,c,d){b=u.getOutgoingTreeEdges(b);d=u.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=u.view.getState(u.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
+d.y-d.height})}return e}function n(b,c){var e=d(b),f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST)==f&&e!=c?v.actions.get("selectParent").funct():e==c?(f=u.getOutgoingTreeEdges(b),null!=f&&0<f.length&&u.setSelectionCell(u.model.getTerminal(f[0],!1))):(e=u.getIncomingTreeEdges(b),null!=e&&0<e.length&&(f=q(u.model.getTerminal(e[0],!0),f,b),e=u.view.getState(b),null!=e&&(e=mxUtils.indexOf(f,e),0<=e&&(e+=c==mxConstants.DIRECTION_NORTH||
+c==mxConstants.DIRECTION_WEST?-1:1,0<=e&&e<=f.length-1&&u.setSelectionCell(f[e].cell)))))}var v=this,u=v.editor.graph,y=u.getModel(),x=v.menus.createPopupMenu;v.menus.createPopupMenu=function(c,d,e){x.apply(this,arguments);if(1==u.getSelectionCount()){d=u.getSelectionCell();var f=u.getOutgoingTreeEdges(d);c.addSeparator();0<f.length&&(b(u.getSelectionCell())&&this.addMenuItems(c,["selectChildren"],null,e),this.addMenuItems(c,["selectDescendants"],null,e));b(u.getSelectionCell())?(c.addSeparator(),
0<u.getIncomingTreeEdges(d).length&&this.addMenuItems(c,["selectSiblings","selectParent"],null,e)):0<u.model.getEdgeCount(d)&&this.addMenuItems(c,["selectConnections"],null,e)}};v.actions.addAction("selectChildren",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var b=u.getSelectionCell(),b=u.getOutgoingTreeEdges(b);if(null!=b){for(var c=[],d=0;d<b.length;d++)c.push(u.model.getTerminal(b[d],!1));u.setSelectionCells(c)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&
1==u.getSelectionCount()){var b=u.getSelectionCell(),b=u.getIncomingTreeEdges(b);if(null!=b&&0<b.length&&(b=u.getOutgoingTreeEdges(u.model.getTerminal(b[0],!0)),null!=b)){for(var c=[],d=0;d<b.length;d++)c.push(u.model.getTerminal(b[d],!1));u.setSelectionCells(c)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var b=u.getSelectionCell(),b=u.getIncomingTreeEdges(b);null!=b&&0<b.length&&u.setSelectionCell(u.model.getTerminal(b[0],
!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(b,c){var d=u.getSelectionCell();if(u.isEnabled()&&u.model.isVertex(d)){if(null!=c&&mxEvent.isAltDown(c))u.setSelectionCells(u.model.getTreeEdges(d,null==c||!mxEvent.isShiftDown(c),null==c||!mxEvent.isControlDown(c)));else{var e=[];u.traverse(d,!0,function(b,d){var f=null!=d&&u.isTreeEdge(d);f&&e.push(d);null!=d&&!f||null!=c&&mxEvent.isShiftDown(c)||e.push(b);return null==d||f})}u.setSelectionCells(e)}},null,null,"Alt+Shift+D");
-var E=u.removeCells;u.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];B.isEdge(k)&&e(k)&&(f.push(k),k=B.getTerminal(k,!1));if(b(k)){var l=[];u.traverse(k,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=u.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
-f;return E.apply(this,arguments)};v.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var A=u.duplicateCells;u.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=u.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=u.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=A.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
-u.getIncomingTreeEdges(l[f]),k=u.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var n=this.cloneCell(k[0]);this.addEdge(n,u.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var F=u.moveCells;u.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var n=g,p=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var t=0;t<c.length;t++)if(b(c[t])||u.model.isEdge(c[t])&&null==u.model.getTerminal(c[t],
-!0)){g=u.model.getParent(c[t]);break}if(null!=n&&g!=n&&null!=this.view.getState(c[0])){var q=u.getIncomingTreeEdges(c[0]);if(0<q.length){var A=u.view.getState(u.model.getTerminal(q[0],!0));if(null!=A){var v=u.view.getState(n);null!=v&&(d=(v.getCenterX()-A.getCenterX())/u.view.scale,e=(v.getCenterY()-A.getCenterY())/u.view.scale)}}}}m=F.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(t=0;t<m.length;t++)if(this.model.isEdge(m[t]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[t],
-!0))&&this.model.setTerminal(m[t],n,!0);else if(b(c[t])&&(q=u.getIncomingTreeEdges(c[t]),0<q.length))if(!f)b(n)&&0>mxUtils.indexOf(c,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],n,!0);else if(0==u.getIncomingTreeEdges(m[t]).length){p=n;if(null==p||p==u.model.getParent(c[t]))p=u.model.getTerminal(q[0],!0);f=this.cloneCell(q[0]);this.addEdge(f,u.getDefaultParent(),p,m[t])}}finally{this.model.endUpdate()}return m};if(null!=v.sidebar){var I=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=
-function(c,d,e,f){var g=u.model,k=null;g.beginUpdate();try{if(k=I.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=u.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var L={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},H=v.onKeyDown;v.onKeyDown=function(c){try{if(u.isEnabled()&&
-!u.isEditing()&&b(u.getSelectionCell())&&1==u.getSelectionCount()){var d=null;0<u.getIncomingTreeEdges(u.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?l(u.getSelectionCell()):q(u.getSelectionCell()):13==c.which&&(d=g(u.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&u.model.isEdge(d[0])?u.setSelectionCell(u.model.getTerminal(d[0],!1)):u.setSelectionCell(d[d.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(u.view.getState(u.getSelectionCell())),
-u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=L[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(m(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(m(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(m(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(m(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(c))}}catch(D){v.handleError(D)}mxEvent.isConsumed(c)||H.apply(this,arguments)};var K=u.connectVertex;u.connectVertex=function(c,e,f,k,m,n,p){var t=u.getIncomingTreeEdges(c);if(b(c)){var A=d(c),v=A==mxConstants.DIRECTION_EAST||A==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return A==e||0==t.length?q(c,e):v==x?l(c):g(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return K.apply(this,arguments)};u.getSubtree=function(d){var e=
+var H=u.removeCells;u.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];y.isEdge(k)&&e(k)&&(f.push(k),k=y.getTerminal(k,!1));if(b(k)){var l=[];u.traverse(k,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=u.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
+f;return H.apply(this,arguments)};v.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var D=u.duplicateCells;u.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=u.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=u.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=D.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
+u.getIncomingTreeEdges(l[f]),k=u.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var p=this.cloneCell(k[0]);this.addEdge(p,u.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var E=u.moveCells;u.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var p=g,n=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||u.model.isEdge(c[q])&&null==u.model.getTerminal(c[q],
+!0)){g=u.model.getParent(c[q]);break}if(null!=p&&g!=p&&null!=this.view.getState(c[0])){var t=u.getIncomingTreeEdges(c[0]);if(0<t.length){var v=u.view.getState(u.model.getTerminal(t[0],!0));if(null!=v){var x=u.view.getState(p);null!=x&&(d=(x.getCenterX()-v.getCenterX())/u.view.scale,e=(x.getCenterY()-v.getCenterY())/u.view.scale)}}}}m=E.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(p)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
+!0))&&this.model.setTerminal(m[q],p,!0);else if(b(c[q])&&(t=u.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(p)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],p,!0);else if(0==u.getIncomingTreeEdges(m[q]).length){n=p;if(null==n||n==u.model.getParent(c[q]))n=u.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,u.getDefaultParent(),n,m[q])}}finally{this.model.endUpdate()}return m};if(null!=v.sidebar){var J=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=
+function(c,d,e,f){var g=u.model,k=null;g.beginUpdate();try{if(k=J.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=u.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var L={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},G=v.onKeyDown;v.onKeyDown=function(c){try{if(u.isEnabled()&&
+!u.isEditing()&&b(u.getSelectionCell())&&1==u.getSelectionCount()){var d=null;0<u.getIncomingTreeEdges(u.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?l(u.getSelectionCell()):m(u.getSelectionCell()):13==c.which&&(d=f(u.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&u.model.isEdge(d[0])?u.setSelectionCell(u.model.getTerminal(d[0],!1)):u.setSelectionCell(d[d.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(u.view.getState(u.getSelectionCell())),
+u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=L[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(n(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(n(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(n(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(n(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(c))}}catch(B){v.handleError(B)}mxEvent.isConsumed(c)||G.apply(this,arguments)};var K=u.connectVertex;u.connectVertex=function(c,e,g,k,p,n,q){var t=u.getIncomingTreeEdges(c);if(b(c)){var v=d(c),x=v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST,C=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return v==e||0==t.length?m(c,e):x==C?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return K.apply(this,arguments)};u.getSubtree=function(d){var e=
[d];!c(d)&&!b(d)||t(d)||u.traverse(d,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);(c(this.state.cell)||b(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(b){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(b);
-this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(b)})))};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.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 S=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){S.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var R=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){R.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=e.apply(this,arguments),c=this.graph;return b.concat([this.addEntry("tree container",
+this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(b)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.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 P=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){P.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var S=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){S.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=e.apply(this,arguments),c=this.graph;return b.concat([this.addEntry("tree container",
function(){var b=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");b.vertex=!0;var c=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);b.insert(e);b.insert(c);b.insert(d);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var b=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
b.vertex=!0;var c=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');c.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);var f=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-f.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);f.insertEdge(k,!1);var p=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-p.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");m.geometry.relative=!0;m.edge=!0;c.insertEdge(m,!0);p.insertEdge(m,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-v.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;c.insertEdge(u,!0);v.insertEdge(u,!1);b.insert(e);b.insert(k);b.insert(m);b.insert(u);b.insert(c);b.insert(d);b.insert(f);b.insert(p);b.insert(v);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=new mxCell("Central Idea",
+d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);g.insertEdge(k,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+q.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");n.geometry.relative=!0;n.edge=!0;c.insertEdge(n,!0);q.insertEdge(n,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+v.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;c.insertEdge(u,!0);v.insertEdge(u,!1);b.insert(e);b.insert(k);b.insert(n);b.insert(u);b.insert(c);b.insert(d);b.insert(g);b.insert(q);b.insert(v);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=new mxCell("Central Idea",
new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');b.vertex=!0;return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var b=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var b=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree orgchart organization division",function(){var b=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
b.vertex=!0;var e=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.setAttributeForCell(e,"treeRoot","1");e.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;e.insertEdge(f,!0);d.insertEdge(f,!1);var k=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');k.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-q.geometry.relative=!0;q.edge=!0;e.insertEdge(q,!0);k.insertEdge(q,!1);b.insert(f);b.insert(q);b.insert(e);b.insert(d);b.insert(k);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree root",function(){var b=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.setAttributeForCell(b,"treeRoot",
+d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;e.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!0);g.insertEdge(k,!1);b.insert(f);b.insert(k);b.insert(e);b.insert(d);b.insert(g);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree root",function(){var b=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.setAttributeForCell(b,"treeRoot",
"1");b.vertex=!0;return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree division",function(){var b=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
c.geometry.setTerminalPoint(new mxPoint(0,0),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree sub sections",function(){var b=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");e.geometry.setTerminalPoint(new mxPoint(110,-40),!0);e.geometry.relative=
@@ -3863,32 +3865,32 @@ this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,argume
Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').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.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="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
-EditorUi.prototype.setDarkMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(b);mxSettings.settings.darkMode=b;mxSettings.save();this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var f=document.createElement("link");f.setAttribute("rel","stylesheet");f.setAttribute("href",STYLE_PATH+"/dark.css");f.setAttribute("charset","UTF-8");f.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=
+EditorUi.prototype.setDarkMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(b);mxSettings.settings.darkMode=b;mxSettings.save();this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var g=document.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("href",STYLE_PATH+"/dark.css");g.setAttribute("charset","UTF-8");g.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=
function(b){if(Editor.darkMode!=b){var c=this.editor.graph;Editor.darkMode=b;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";this.setGridColor(Editor.isDarkMode()?c.view.defaultDarkGridColor:c.view.defaultGridColor);c.defaultPageBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";c.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";c.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";c.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";c.loadStylesheet();
null!=this.actions.layersWindow&&(b=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,b&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Dialog.backdropColor=Editor.isDarkMode()?"#2a2a2a":"white";
StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;
-document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";n.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==f.parentNode&&document.getElementsByTagName("head")[0].appendChild(f):null!=f.parentNode&&f.parentNode.removeChild(f)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }":
+document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";p.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==g.parentNode&&document.getElementsByTagName("head")[0].appendChild(g):null!=g.parentNode&&g.parentNode.removeChild(g)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?"#2a2a2a":"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"html .geStatusAlertOrange, html .geStatusAlert { margin-top: -2px; }a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var n=document.createElement("style");n.type="text/css";n.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(n);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=
-function(){return!1};var t=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");t.apply(this,arguments)};var d=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){d.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var g=
-Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(b,c){null!=c.shortcut&&900>e&&!mxClient.IS_IOS?b.firstChild.nextSibling.setAttribute("title",c.shortcut):g.apply(this,arguments)};var l=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){l.apply(this,arguments);if(null!=this.userElement){var b=this.userElement;b.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+b.style.display;b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage=
-"url("+Editor.userImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";b.style.cssFloat="right";b.setAttribute("title",mxResources.get("changeUser"));"none"!=b.style.display&&(b.style.display="inline-block")}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText=
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"html .geStatusAlertOrange, html .geStatusAlert { margin-top: -2px; }a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var p=document.createElement("style");p.type="text/css";p.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(p);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=
+function(){return!1};var t=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");t.apply(this,arguments)};var d=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){d.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var f=
+Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(b,c){null!=c.shortcut&&900>e&&!mxClient.IS_IOS?b.firstChild.nextSibling.setAttribute("title",c.shortcut):f.apply(this,arguments)};var l=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){l.apply(this,arguments);if(null!=this.userElement){var b=this.userElement;b.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+b.style.display;b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage=
+"url("+Editor.userImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";b.style.cssFloat="right";b.setAttribute("title",mxResources.get("changeUser"));"none"!=b.style.display&&(b.style.display="inline-block")}};var m=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){m.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText=
"display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.shareImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop=
"4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var b=document.createElement("div");b.style.display="inline-block";b.style.position="relative";b.style.marginTop="6px";b.style.marginRight="4px";var c=document.createElement("a");c.className="geMenuItem gePrimaryBtn";c.style.marginLeft="8px";c.style.padding="6px";if("1"==urlParams.noSaveBtn){var d="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,d);c.setAttribute("title",
d);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),
c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,d),c.setAttribute("title",d),c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),
-b.appendChild(c));this.buttonContainer.appendChild(b);this.buttonContainer.style.top="6px"}};var p=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(b,c){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,b)){var d=mxUtils.getOffset(this.editorUi.picker);d.x+=this.editorUi.picker.offsetWidth+4;d.y+=b.offsetTop-c.height/2+16;return d}var e=p.apply(this,arguments),d=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);e.x+=d.x-16;e.y+=
-d.y;return e};var m=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(b,c,d){var e=this.editorUi.editor.graph;b.smartSeparators=!0;m.apply(this,arguments);"1"==urlParams.sketch?e.isEnabled()&&(b.addSeparator(),1==e.getSelectionCount()?this.addMenuItems(b,["-","lockUnlock"],null,d):this.addSubmenu("view",b,null,mxResources.get("options"))):1==e.getSelectionCount()?(e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(b,e.isCellCollapsed(c)?["expand"]:["collapse"],null,d),
+b.appendChild(c));this.buttonContainer.appendChild(b);this.buttonContainer.style.top="6px"}};var q=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(b,c){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,b)){var d=mxUtils.getOffset(this.editorUi.picker);d.x+=this.editorUi.picker.offsetWidth+4;d.y+=b.offsetTop-c.height/2+16;return d}var e=q.apply(this,arguments),d=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);e.x+=d.x-16;e.y+=
+d.y;return e};var n=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(b,c,d){var e=this.editorUi.editor.graph;b.smartSeparators=!0;n.apply(this,arguments);"1"==urlParams.sketch?e.isEnabled()&&(b.addSeparator(),1==e.getSelectionCount()?this.addMenuItems(b,["-","lockUnlock"],null,d):this.addSubmenu("view",b,null,mxResources.get("options"))):1==e.getSelectionCount()?(e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(b,e.isCellCollapsed(c)?["expand"]:["collapse"],null,d),
this.addMenuItems(b,["collapsible","-","lockUnlock","enterGroup"],null,d),b.addSeparator(),this.addSubmenu("layout",b)):e.isSelectionEmpty()&&e.isEnabled()?(b.addSeparator(),this.addMenuItems(b,["editData"],null,d),b.addSeparator(),this.addSubmenu("layout",b),this.addSubmenu("view",b,null,mxResources.get("options")),b.addSeparator(),this.addSubmenu("insert",b),this.addMenuItems(b,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(b,["-","lockUnlock"],null,d)};var v=Menus.prototype.addPopupMenuEditItems;
Menus.prototype.addPopupMenuEditItems=function(b,c,d){v.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(b,["copyAsImage"],null,d)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&
(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);u.apply(this,arguments)};
-var B=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(b){B.apply(this,arguments);if(b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=c||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};
+var y=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(b){y.apply(this,arguments);if(b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=c||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};
EditorUi.prototype.chromelessWindowResize=function(){};var x=Menus.prototype.init;Menus.prototype.init=function(){x.apply(this,arguments);var d=this.editorUi,e=d.editor.graph;d.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";d.actions.get("createShape").label=mxResources.get("shape")+"...";d.actions.get("outline").label=mxResources.get("outline")+"...";d.actions.get("layers").label=mxResources.get("layers")+"...";d.actions.get("tags").label=mxResources.get("tags")+"...";d.actions.get("forkme").visible=
"1"!=urlParams.sketch;d.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;var f=d.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(b){d.setDarkMode(!Editor.darkMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.isDarkMode()});d.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){e.popupMenuHandler.hideMenu();d.showImportCsvDialog()}));d.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var b=
new ParseDialog(d,"Insert from Text");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var b=new ParseDialog(d,"Insert from Text","formatSql");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){c(d)},null,null,Editor.ctrlKey+"+Shift+K"));d.actions.put("toggleFormat",new Action(mxResources.get("format")+
@@ -3905,7 +3907,7 @@ c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&d.menus.addMen
e){"1"==urlParams.sketch?(d.menus.addMenuItems(b,["insertFreehand"],e),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(b,["insertTemplate"],e)):(c.apply(this,arguments),d.menus.addSubmenu("table",b,e),b.addSeparator(e));d.menus.addMenuItems(b,["-","toggleShapes"],e)}})();var n="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,c,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(d,e,f);d.showDialog(b.container,
620,420,!0,!1);b.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,c){for(var d=0;d<n.length;d++)"-"==n[d]?b.addSeparator(c):p(b,c,mxResources.get(n[d])+"...",n[d])})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){d.menus.addMenuItems(b,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var e=d.menus.addMenuItem(b,"mathematicalTypesetting",c);d.menus.addLinkToItem(e,"https://www.diagrams.net/doc/faq/math-typesetting")}d.menus.addMenuItems(b,
["copyConnect","collapseExpand","-"],c);e=d.getCurrentFile();null!=e&&null!=d.fileNode&&(e=null!=e.getTitle()?e.getTitle():d.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["properties"],c));d.menus.addMenuItems(b,["pageScale"],c);"1"!=urlParams.sketch?d.menus.addMenuItems(b,["-","fullscreen","toggleDarkMode"],c):d.menus.addMenuItems(b,["pageSetup","-","layers","tags"],c)})))};EditorUi.prototype.installFormatToolbar=function(b){var c=this.editor.graph,d=document.createElement("div");
-d.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var E=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(b,
+d.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var H=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(b,
c,d){var e=n.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));n.menus.menuCreated(e,f,"geMenuItem");null!=d?(f.style.backgroundImage="url("+d+")",f.style.backgroundPosition=
"center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML=""):c||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function f(b,c,d,e,f,g){var k=document.createElement("a");k.className="geMenuItem";k.style.display="inline-block";k.style.boxSizing="border-box";k.style.height="30px";k.style.padding=
"6px";k.style.position="relative";k.style.verticalAlign="top";k.style.top="0px";"1"==urlParams.sketch&&(k.style.borderStyle="none",k.style.boxShadow="none",k.style.padding="6px",k.style.margin="0px");null!=n.statusContainer?q.insertBefore(k,n.statusContainer):q.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",k.style.backgroundSize="24px 24px",k.style.width="34px"):mxUtils.write(k,b);mxEvent.addListener(k,
@@ -3914,124 +3916,127 @@ b),b());return k}function g(b,c,d){d=document.createElement("div");d.className="
null!=c&&mxUtils.setOpacity(d,c);null!=n.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(d,n.statusContainer):q.appendChild(d);return d}function k(){for(var b=q.firstChild;null!=b;){var c=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=c}t=q.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>e||"1"==urlParams.sketch,k=null;b||(k=d("diagram"));if("1"==urlParams.sketch)aa.style.left=58>O.offsetTop-
O.offsetHeight/2?"70px":"10px";else if(c=b?d("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,null!=c&&(k=c),g([k,f(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),n.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":
null),f(mxResources.get("format"),n.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+n.actions.get("formatPanel").shortcut+")",n.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
-null)],b?60:null),c=d("insert",!0,b?W:null),g([c,f(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),b?qa:null)],b?60:null),411<=e&&(g([ua,ya],60),520<=e&&(g([ta,640<=e?f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Q,ra):null,640<=e?f("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Y,fa):null],60),720<=e))){var l=f("",U.funct,null,mxResources.get("dark"),U,Editor.isDarkMode()?ba:ja);l.style.opacity=
+null)],b?60:null),c=d("insert",!0,b?W:null),g([c,f(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),b?sa:null)],b?60:null),411<=e&&(g([qa,ya],60),520<=e&&(g([ua,640<=e?f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Q,ta):null,640<=e?f("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Y,fa):null],60),720<=e))){var l=f("",U.funct,null,mxResources.get("dark"),U,Editor.isDarkMode()?ba:ja);l.style.opacity=
"0.4";n.addListener("darkModeChanged",mxUtils.bind(this,function(){l.style.backgroundImage="url("+(Editor.isDarkMode()?ba:ja)+")"}));null!=n.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(l,n.statusContainer):q.appendChild(l)}null!=k&&(mxEvent.disableContextMenu(k),mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&n.appIconClicked(b)}),null,null));c=n.menus.get("language");
null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.sketch?(null==wa&&(c=u.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor="pointer",
-c.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(c),wa=c),n.buttonContainer.style.paddingRight="34px"):(n.buttonContainer.style.paddingRight="4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}E.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark:mxSettings.settings.darkMode);var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?
+c.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(c),wa=c),n.buttonContainer.style.paddingRight="34px"):(n.buttonContainer.style.paddingRight="4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}H.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark:mxSettings.settings.darkMode);var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?
"63px":"32px";this.sidebar=this.createSidebar(l);"1"==urlParams.sketch&&this.toggleScratchpad();if("1"!=urlParams.sketch&&1E3<=e||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])c(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==urlParams.sketch||1E3<=e)if(b(this,!0),"1"==
urlParams.sketch){this.formatWindow.window.setClosable(!1);var m=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){m.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=parseInt(this.div.style.left)-150+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",
mxUtils.bind(this,function(b){mxEvent.getSource(b)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var n=this,p=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));n.defaultLibraryName=mxResources.get("untitledLibrary");var q=document.createElement("div");q.className="geMenubarContainer";var t=null,u=new Menubar(n,q);n.statusContainer=n.createStatusContainer();n.statusContainer.style.position="relative";n.statusContainer.style.maxWidth=
"";n.statusContainer.style.marginTop="7px";n.statusContainer.style.marginLeft="6px";n.statusContainer.style.color="gray";n.statusContainer.style.cursor="default";var v=n.hideCurrentMenu;n.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var x=n.descriptorChanged;n.descriptorChanged=function(){x.apply(this,arguments);var b=n.getCurrentFile();if(null!=b&&null!=b.getTitle()){var c=b.getMode();"google"==c?c="googleDrive":"github"==c?c="gitHub":"gitlab"==
c?c="gitLab":"onedrive"==c&&(c="oneDrive");c=mxResources.get(c);q.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else q.removeAttribute("title")};n.setStatusText(n.editor.getStatus());q.appendChild(n.statusContainer);n.buttonContainer=document.createElement("div");n.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";q.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=
-document.createElement("div");n.tabContainer.className="geTabContainer";n.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=n.diagramContainer.parentNode,B=document.createElement("div");B.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";n.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var y=n.menus.get("viewZoom"),W="1"!=urlParams.sketch?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":
+document.createElement("div");n.tabContainer.className="geTabContainer";n.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=n.diagramContainer.parentNode,y=document.createElement("div");y.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";n.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var A=n.menus.get("viewZoom"),W="1"!=urlParams.sketch?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMywxMWg4VjNIM1YxMXogTTUsNWg0djRINVY1eiIvPjxwYXRoIGQ9Ik0xMywzdjhoOFYzSDEzeiBNMTksOWgtNFY1aDRWOXoiLz48cGF0aCBkPSJNMywyMWg4di04SDNWMjF6IE01LDE1aDR2NEg1VjE1eiIvPjxwb2x5Z29uIHBvaW50cz0iMTgsMTMgMTYsMTMgMTYsMTYgMTMsMTYgMTMsMTggMTYsMTggMTYsMjEgMTgsMjEgMTgsMTggMjEsMTggMjEsMTYgMTgsMTYiLz48L2c+PC9nPjwvc3ZnPg==",
-J="1"==urlParams.sketch?document.createElement("div"):null,O="1"==urlParams.sketch?document.createElement("div"):null,aa="1"==urlParams.sketch?document.createElement("div"):null;n.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.refreshBackgroundImage();
-p.view.validateBackground()}));Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=n.hoverIcons){var ma=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||ma.apply(this,arguments)}}if(null!=p.freehand){var ga=p.freehand.createStyle;p.freehand.createStyle=function(b){return ga.apply(this,
-arguments)+"sketch=0;"}}if("1"==urlParams.sketch){O.className="geToolbarContainer";J.className="geToolbarContainer";aa.className="geToolbarContainer";q.className="geToolbarContainer";n.picker=O;var ha=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){ha||(n.statusContainer.style.display="none")});var na=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",
-b):n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&null==n.statusContainer.firstChild.getAttribute("class")){null!=n.statusContainer.firstChild?na(n.statusContainer.firstChild.getAttribute("title")):na(n.editor.getStatus());var b=n.getCurrentFile(),b=null!=b?b.savingStatusKey:DrawioFile.prototype.savingStatusKey;
-null!=n.notificationBtn&&n.notificationBtn.getAttribute("title")==mxResources.get(b)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(b))+'..."src="'+IMAGE_PATH+'/spin.gif">',n.statusContainer.style.display="inline-block",ha=!0):(n.statusContainer.style.display="none",ha=!1)}else n.statusContainer.style.display="inline-block",na(null),ha=!0}));T=d("diagram",null,IMAGE_PATH+"/drawlogo.svg");T.style.boxShadow="none";T.style.opacity="0.4";T.style.padding="6px";T.style.margin=
+I="1"==urlParams.sketch?document.createElement("div"):null,O="1"==urlParams.sketch?document.createElement("div"):null,aa="1"==urlParams.sketch?document.createElement("div"):null;n.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.refreshBackgroundImage();
+p.view.validateBackground()}));Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=n.hoverIcons){var na=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||na.apply(this,arguments)}}if(null!=p.freehand){var ga=p.freehand.createStyle;p.freehand.createStyle=function(b){return ga.apply(this,
+arguments)+"sketch=0;"}}if("1"==urlParams.sketch){O.className="geToolbarContainer";I.className="geToolbarContainer";aa.className="geToolbarContainer";q.className="geToolbarContainer";n.picker=O;var ha=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){ha||(n.statusContainer.style.display="none")});var oa=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",
+b):n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&null==n.statusContainer.firstChild.getAttribute("class")){null!=n.statusContainer.firstChild?oa(n.statusContainer.firstChild.getAttribute("title")):oa(n.editor.getStatus());var b=n.getCurrentFile(),b=null!=b?b.savingStatusKey:DrawioFile.prototype.savingStatusKey;
+null!=n.notificationBtn&&n.notificationBtn.getAttribute("title")==mxResources.get(b)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(b))+'..."src="'+IMAGE_PATH+'/spin.gif">',n.statusContainer.style.display="inline-block",ha=!0):(n.statusContainer.style.display="none",ha=!1)}else n.statusContainer.style.display="inline-block",oa(null),ha=!0}));T=d("diagram",null,IMAGE_PATH+"/drawlogo.svg");T.style.boxShadow="none";T.style.opacity="0.4";T.style.padding="6px";T.style.margin=
"0px";aa.appendChild(T);mxEvent.disableContextMenu(T);mxEvent.addGestureListeners(T,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position="";n.statusContainer.style.display="none";n.statusContainer.style.margin="0px";n.statusContainer.style.padding="6px 0px";n.statusContainer.style.maxWidth=Math.min(e-240,280)+"px";n.statusContainer.style.display=
"inline-block";n.statusContainer.style.textOverflow="ellipsis";n.buttonContainer.style.position="";n.buttonContainer.style.paddingRight="0px";n.buttonContainer.style.display="inline-block";var X=document.createElement("a");X.style.padding="0px";X.style.boxShadow="none";X.className="geMenuItem";X.style.display="inline-block";X.style.width="40px";X.style.height="12px";X.style.marginBottom="-2px";X.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";X.style.backgroundPosition="top center";
-X.style.backgroundRepeat="no-repeat";X.setAttribute("title","Minimize");var ca=!1,oa=mxUtils.bind(this,function(){O.innerHTML="";if(!ca){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default";b.style.margin="2px 0px";O.appendChild(b);mxUtils.br(O);return b};c(n.sidebar.createVertexTemplate("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",
+X.style.backgroundRepeat="no-repeat";X.setAttribute("title","Minimize");var ca=!1,pa=mxUtils.bind(this,function(){O.innerHTML="";if(!ca){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default";b.style.margin="2px 0px";O.appendChild(b);mxUtils.br(O);return b};c(n.sidebar.createVertexTemplate("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",
40,20,"Text",mxResources.get("text"),!0,!0,null,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(n.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;fontSize=24;pointerEvents=1;"+("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));
c(n.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(n.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),"edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+
("0"!=urlParams.rough?"sketch=1;":""));b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));b=b.clone();b.style+="shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,20),
!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(n.actions.get("insertFreehand"),mxResources.get("freehand"),"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==");
var d=n.actions.get("toggleShapes");b(d,mxResources.get("shapes")+" ("+d.shortcut+")",W);b(n.actions.get("insertTemplate"),mxResources.get("template"),"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEzIDExaC0ydjNIOHYyaDN2M2gydi0zaDN2LTJoLTN6bTEtOUg2Yy0xLjEgMC0yIC45LTIgMnYxNmMwIDEuMS44OSAyIDEuOTkgMkgxOGMxLjEgMCAyLS45IDItMlY4bC02LTZ6bTQgMThINlY0aDd2NWg1djExeiIvPjwvc3ZnPg==")}O.appendChild(X)});
-mxEvent.addListener(X,"click",mxUtils.bind(this,function(){ca?(mxUtils.setPrefixedStyle(O.style,"transform","translate(0, -50%)"),O.style.padding="8px 6px 4px",O.style.top="50%",O.style.bottom="",O.style.height="",X.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",X.style.width="40px",X.style.height="12px",X.setAttribute("title","Minimize"),ca=!1,oa()):(O.innerHTML="",O.appendChild(X),mxUtils.setPrefixedStyle(O.style,"transform","translate(0, 0)"),O.style.top="",O.style.bottom="12px",
-O.style.padding="0px",O.style.height="24px",X.style.height="24px",X.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==)",X.setAttribute("title",mxResources.get("insert")),X.style.width="24px",ca=!0)}));oa();n.addListener("darkModeChanged",mxUtils.bind(this,function(){oa()}))}else n.editor.addListener("statusChanged",
-mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));if(null!=y){var V=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?n.actions.get("customZoom").funct():n.actions.get("smartFit").funct()},Q=n.actions.get("zoomIn"),ra="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4=",
+mxEvent.addListener(X,"click",mxUtils.bind(this,function(){ca?(mxUtils.setPrefixedStyle(O.style,"transform","translate(0, -50%)"),O.style.padding="8px 6px 4px",O.style.top="50%",O.style.bottom="",O.style.height="",X.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",X.style.width="40px",X.style.height="12px",X.setAttribute("title","Minimize"),ca=!1,pa()):(O.innerHTML="",O.appendChild(X),mxUtils.setPrefixedStyle(O.style,"transform","translate(0, 0)"),O.style.top="",O.style.bottom="12px",
+O.style.padding="0px",O.style.height="24px",X.style.height="24px",X.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==)",X.setAttribute("title",mxResources.get("insert")),X.style.width="24px",ca=!0)}));pa();n.addListener("darkModeChanged",mxUtils.bind(this,function(){pa()}))}else n.editor.addListener("statusChanged",
+mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));if(null!=A){var V=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?n.actions.get("customZoom").funct():n.actions.get("smartFit").funct()},Q=n.actions.get("zoomIn"),ta="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4=",
Y=n.actions.get("zoomOut"),fa="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg==",
-ia=n.actions.get("resetView"),pa=n.actions.get("fullscreen"),U=n.actions.get("toggleDarkMode"),ja="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik05LjM3LDUuNTFDOS4xOSw2LjE1LDkuMSw2LjgyLDkuMSw3LjVjMCw0LjA4LDMuMzIsNy40LDcuNCw3LjRjMC42OCwwLDEuMzUtMC4wOSwxLjk5LTAuMjdDMTcuNDUsMTcuMTksMTQuOTMsMTksMTIsMTkgYy0zLjg2LDAtNy0zLjE0LTctN0M1LDkuMDcsNi44MSw2LjU1LDkuMzcsNS41MXogTTEyLDNjLTQuOTcsMC05LDQuMDMtOSw5czQuMDMsOSw5LDlzOS00LjAzLDktOWMwLTAuNDYtMC4wNC0wLjkyLTAuMS0xLjM2IGMtMC45OCwxLjM3LTIuNTgsMi4yNi00LjQsMi4yNmMtMi45OCwwLTUuNC0yLjQyLTUuNC01LjRjMC0xLjgxLDAuODktMy40MiwyLjI2LTQuNEMxMi45MiwzLjA0LDEyLjQ2LDMsMTIsM0wxMiwzeiIvPjwvc3ZnPg==",
+ia=n.actions.get("resetView"),ra=n.actions.get("fullscreen"),U=n.actions.get("toggleDarkMode"),ja="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik05LjM3LDUuNTFDOS4xOSw2LjE1LDkuMSw2LjgyLDkuMSw3LjVjMCw0LjA4LDMuMzIsNy40LDcuNCw3LjRjMC42OCwwLDEuMzUtMC4wOSwxLjk5LTAuMjdDMTcuNDUsMTcuMTksMTQuOTMsMTksMTIsMTkgYy0zLjg2LDAtNy0zLjE0LTctN0M1LDkuMDcsNi44MSw2LjU1LDkuMzcsNS41MXogTTEyLDNjLTQuOTcsMC05LDQuMDMtOSw5czQuMDMsOSw5LDlzOS00LjAzLDktOWMwLTAuNDYtMC4wNC0wLjkyLTAuMS0xLjM2IGMtMC45OCwxLjM3LTIuNTgsMi4yNi00LjQsMi4yNmMtMi45OCwwLTUuNC0yLjQyLTUuNC01LjRjMC0xLjgxLDAuODktMy40MiwyLjI2LTQuNEMxMi45MiwzLjA0LDEyLjQ2LDMsMTIsM0wxMiwzeiIvPjwvc3ZnPg==",
ba="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik0xMiw5YzEuNjUsMCwzLDEuMzUsMywzcy0xLjM1LDMtMywzcy0zLTEuMzUtMy0zUzEwLjM1LDksMTIsOSBNMTIsN2MtMi43NiwwLTUsMi4yNC01LDVzMi4yNCw1LDUsNXM1LTIuMjQsNS01IFMxNC43Niw3LDEyLDdMMTIsN3ogTTIsMTNsMiwwYzAuNTUsMCwxLTAuNDUsMS0xcy0wLjQ1LTEtMS0xbC0yLDBjLTAuNTUsMC0xLDAuNDUtMSwxUzEuNDUsMTMsMiwxM3ogTTIwLDEzbDIsMGMwLjU1LDAsMS0wLjQ1LDEtMSBzLTAuNDUtMS0xLTFsLTIsMGMtMC41NSwwLTEsMC40NS0xLDFTMTkuNDUsMTMsMjAsMTN6IE0xMSwydjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMVYyYzAtMC41NS0wLjQ1LTEtMS0xUzExLDEuNDUsMTEsMnogTTExLDIwdjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMXYtMmMwLTAuNTUtMC40NS0xLTEtMUMxMS40NSwxOSwxMSwxOS40NSwxMSwyMHogTTUuOTksNC41OGMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDAgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBzMC4zOS0xLjAzLDAtMS40MUw1Ljk5LDQuNTh6IE0xOC4zNiwxNi45NSBjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDEgTDE4LjM2LDE2Ljk1eiBNMTkuNDIsNS45OWMwLjM5LTAuMzksMC4zOS0xLjAzLDAtMS40MWMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDBsLTEuMDYsMS4wNmMtMC4zOSwwLjM5LTAuMzksMS4wMywwLDEuNDEgczEuMDMsMC4zOSwxLjQxLDBMMTkuNDIsNS45OXogTTcuMDUsMTguMzZjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDFjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwbC0xLjA2LDEuMDYgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MXMxLjAzLDAuMzksMS40MSwwTDcuMDUsMTguMzZ6Ii8+PC9zdmc+",
-la=n.actions.get("undo"),da=n.actions.get("redo"),ua=f("",la.funct,null,mxResources.get("undo")+" ("+la.shortcut+")",la,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),ya=f("",da.funct,null,mxResources.get("redo")+
-" ("+da.shortcut+")",da,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),ta=f("",V,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ia,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48cGF0aCBkPSJNNiwxNmgxMlY4SDZWMTZ6IE04LDEwaDh2NEg4VjEweiBNNCwxNUgydjNjMCwxLjEsMC45LDIsMiwyaDN2LTJINFYxNXogTTQsNmgzVjRINEMyLjksNCwyLDQuOSwyLDZ2M2gyVjZ6IE0yMCw0aC0zdjJoM3YzIGgyVjZDMjIsNC45LDIxLjEsNCwyMCw0eiBNMjAsMThoLTN2MmgzYzEuMSwwLDItMC45LDItMnYtM2gtMlYxOHoiLz48L2c+PC9zdmc+"),
-ia=f("",pa.funct,null,mxResources.get("fullscreen"),pa,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),qa="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==";
-if(null!=J){var za=n.actions.get("delete"),va=f("",za.funct,null,mxResources.get("delete"),za,qa);va.style.opacity="0.1";aa.appendChild(va);za.addListener("stateChanged",function(){va.style.opacity=za.enabled?"0.4":"0.1"});y=function(){ua.style.display=0<n.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";ya.style.display=ua.style.display;ua.style.opacity=la.enabled?"0.4":"0.1";ya.style.opacity=da.enabled?"0.4":"0.1"};aa.appendChild(ua);aa.appendChild(ya);la.addListener("stateChanged",
-y);da.addListener("stateChanged",y);y();null!=urlParams.layers&&(y=n.actions.get("layers"),y=f("",y.funct,null,mxResources.get("layers"),y,Editor.layersLargeImage),y.className+=" geInverted",y.style.opacity="0.4",J.appendChild(y));null!=urlParams.tags&&(y=n.actions.get("tags"),y=f("",y.funct,null,mxResources.get("tags"),y,Editor.tagsLargeImage),y.className+=" geInverted",y.style.opacity="0.4",J.appendChild(y));y=n.actions.get("outline");y=f("",y.funct,null,mxResources.get("outline"),y,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==");
-y.style.opacity="0.4";J.appendChild(y);y=f("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Y,fa);y.style.opacity="0.4";J.appendChild(y);var T=document.createElement("div");T.innerHTML="100%";T.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");T.style.display="inline-block";T.style.cursor="pointer";T.style.textAlign="center";T.style.whiteSpace="nowrap";T.style.paddingRight="10px";T.style.textDecoration="none";T.style.verticalAlign=
-"top";T.style.padding="6px 0";T.style.fontSize="14px";T.style.width="40px";T.style.opacity="0.4";J.appendChild(T);mxEvent.addListener(T,"click",V);V=f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Q,ra);V.style.opacity="0.4";J.appendChild(V);var Aa=f("",U.funct,null,mxResources.get("dark"),U,Editor.isDarkMode()?ba:ja);Aa.style.opacity="0.4";J.appendChild(Aa);n.addListener("darkModeChanged",mxUtils.bind(this,function(){Aa.style.backgroundImage="url("+(Editor.isDarkMode()?
-ba:ja)+")"}));pa.visible&&(ia.style.opacity="0.4",J.appendChild(ia));var ka=this.createPageMenuTab(!1);ka.style.display="none";ka.style.position="";ka.style.marginLeft="";ka.style.top="";ka.style.left="";ka.style.height="100%";ka.style.lineHeight="";ka.style.borderStyle="none";ka.style.padding="3px 0";ka.style.margin="0px";ka.style.background="";ka.style.border="";ka.style.boxShadow="none";ka.style.verticalAlign="top";ka.firstChild.style.height="100%";ka.firstChild.style.opacity="0.6";ka.firstChild.style.margin=
-"0px";J.appendChild(ka);n.addListener("fileDescriptorChanged",function(){ka.style.display="1"==urlParams.pages||null!=n.pages&&1<n.pages.length?"inline-block":"none"});n.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";aa.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-J.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";B.appendChild(aa);B.appendChild(J);O.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";B.appendChild(O);window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,
-"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(B)}else q.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;",this.tabContainer.style.right="70px",T=u.addMenu("100%",y.funct),T.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)"),T.style.whiteSpace="nowrap",T.style.paddingRight="10px",T.style.textDecoration="none",T.style.textDecoration="none",T.style.overflow="hidden",
-T.style.visibility="hidden",T.style.textAlign="center",T.style.cursor="pointer",T.style.height=parseInt(n.tabContainerHeight)-1+"px",T.style.lineHeight=parseInt(n.tabContainerHeight)+1+"px",T.style.position="absolute",T.style.display="block",T.style.fontSize="12px",T.style.width="59px",T.style.right="0px",T.style.bottom="0px",T.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",T.style.backgroundPosition="right 6px center",T.style.backgroundRepeat="no-repeat",B.appendChild(T);pa=mxUtils.bind(this,
-function(){T.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);n.editor.addListener("resetGraphView",pa);n.editor.addListener("pageSelected",pa);var Ba=n.setGraphEnabled;n.setGraphEnabled=function(){Ba.apply(this,arguments);null!=this.tabContainer&&(T.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==J?this.tabContainerHeight+"px":"0px")}}B.appendChild(q);
-B.appendChild(n.diagramContainer);l.appendChild(B);n.updateTabContainer();null==J&&B.appendChild(n.tabContainer);var wa=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();
-null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,c,e,k,f,n,t){this.file=b;this.id=c;this.content=e;this.modifiedDate=k;this.createdDate=f;this.isResolved=n;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,c,e,k,f){c()};DrawioComment.prototype.editComment=function(b,c,e){c()};DrawioComment.prototype.deleteComment=function(b,c){b()};DrawioUser=function(b,c,e,k,f){this.id=b;this.email=c;this.displayName=e;this.pictureUrl=k;this.locale=f};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found \nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
-Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(b,c,e){this.init(b,c,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
+ma=n.actions.get("undo"),da=n.actions.get("redo"),qa=f("",ma.funct,null,mxResources.get("undo")+" ("+ma.shortcut+")",ma,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),ya=f("",da.funct,null,mxResources.get("redo")+
+" ("+da.shortcut+")",da,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),ua=f("",V,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ia,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48cGF0aCBkPSJNNiwxNmgxMlY4SDZWMTZ6IE04LDEwaDh2NEg4VjEweiBNNCwxNUgydjNjMCwxLjEsMC45LDIsMiwyaDN2LTJINFYxNXogTTQsNmgzVjRINEMyLjksNCwyLDQuOSwyLDZ2M2gyVjZ6IE0yMCw0aC0zdjJoM3YzIGgyVjZDMjIsNC45LDIxLjEsNCwyMCw0eiBNMjAsMThoLTN2MmgzYzEuMSwwLDItMC45LDItMnYtM2gtMlYxOHoiLz48L2c+PC9zdmc+"),
+ia=f("",ra.funct,null,mxResources.get("fullscreen"),ra,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),sa="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==";
+if(null!=I){var za=n.actions.get("delete"),va=f("",za.funct,null,mxResources.get("delete"),za,sa);va.style.opacity="0.1";aa.appendChild(va);za.addListener("stateChanged",function(){va.style.opacity=za.enabled?"0.4":"0.1"});A=function(){qa.style.display=0<n.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";ya.style.display=qa.style.display;qa.style.opacity=ma.enabled?"0.4":"0.1";ya.style.opacity=da.enabled?"0.4":"0.1"};aa.appendChild(qa);aa.appendChild(ya);ma.addListener("stateChanged",
+A);da.addListener("stateChanged",A);A();null!=urlParams.layers&&(A=n.actions.get("layers"),A=f("",A.funct,null,mxResources.get("layers"),A,Editor.layersLargeImage),A.className+=" geInverted",A.style.opacity="0.4",I.appendChild(A));null!=urlParams.tags&&(A=n.actions.get("tags"),A=f("",A.funct,null,mxResources.get("tags"),A,Editor.tagsLargeImage),A.className+=" geInverted",A.style.opacity="0.4",I.appendChild(A));A=n.actions.get("outline");A=f("",A.funct,null,mxResources.get("outline"),A,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==");
+A.style.opacity="0.4";I.appendChild(A);A=f("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Y,fa);A.style.opacity="0.4";I.appendChild(A);var T=document.createElement("div");T.innerHTML="100%";T.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");T.style.display="inline-block";T.style.cursor="pointer";T.style.textAlign="center";T.style.whiteSpace="nowrap";T.style.paddingRight="10px";T.style.textDecoration="none";T.style.verticalAlign=
+"top";T.style.padding="6px 0";T.style.fontSize="14px";T.style.width="40px";T.style.opacity="0.4";I.appendChild(T);mxEvent.addListener(T,"click",V);V=f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Q,ta);V.style.opacity="0.4";I.appendChild(V);var Aa=f("",U.funct,null,mxResources.get("dark"),U,Editor.isDarkMode()?ba:ja);Aa.style.opacity="0.4";I.appendChild(Aa);n.addListener("darkModeChanged",mxUtils.bind(this,function(){Aa.style.backgroundImage="url("+(Editor.isDarkMode()?
+ba:ja)+")"}));ra.visible&&(ia.style.opacity="0.4",I.appendChild(ia));var ka=this.createPageMenuTab(!1);ka.style.display="none";ka.style.position="";ka.style.marginLeft="";ka.style.top="";ka.style.left="";ka.style.height="100%";ka.style.lineHeight="";ka.style.borderStyle="none";ka.style.padding="3px 0";ka.style.margin="0px";ka.style.background="";ka.style.border="";ka.style.boxShadow="none";ka.style.verticalAlign="top";ka.firstChild.style.height="100%";ka.firstChild.style.opacity="0.6";ka.firstChild.style.margin=
+"0px";I.appendChild(ka);n.addListener("fileDescriptorChanged",function(){ka.style.display="1"==urlParams.pages||null!=n.pages&&1<n.pages.length?"inline-block":"none"});n.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";aa.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+I.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";y.appendChild(aa);y.appendChild(I);O.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";y.appendChild(O);window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,
+"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(y)}else q.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;",this.tabContainer.style.right="70px",T=u.addMenu("100%",A.funct),T.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)"),T.style.whiteSpace="nowrap",T.style.paddingRight="10px",T.style.textDecoration="none",T.style.textDecoration="none",T.style.overflow="hidden",
+T.style.visibility="hidden",T.style.textAlign="center",T.style.cursor="pointer",T.style.height=parseInt(n.tabContainerHeight)-1+"px",T.style.lineHeight=parseInt(n.tabContainerHeight)+1+"px",T.style.position="absolute",T.style.display="block",T.style.fontSize="12px",T.style.width="59px",T.style.right="0px",T.style.bottom="0px",T.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",T.style.backgroundPosition="right 6px center",T.style.backgroundRepeat="no-repeat",y.appendChild(T);ra=mxUtils.bind(this,
+function(){T.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ra);n.editor.addListener("resetGraphView",ra);n.editor.addListener("pageSelected",ra);var Ba=n.setGraphEnabled;n.setGraphEnabled=function(){Ba.apply(this,arguments);null!=this.tabContainer&&(T.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==I?this.tabContainerHeight+"px":"0px")}}y.appendChild(q);
+y.appendChild(n.diagramContainer);l.appendChild(y);n.updateTabContainer();null==I&&y.appendChild(n.tabContainer);var wa=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();
+null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,c,e,k,g,p,t){this.file=b;this.id=c;this.content=e;this.modifiedDate=k;this.createdDate=g;this.isResolved=p;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,c,e,k,g){c()};DrawioComment.prototype.editComment=function(b,c,e){c()};DrawioComment.prototype.deleteComment=function(b,c){b()};DrawioUser=function(b,c,e,k,g){this.id=b;this.email=c;this.displayName=e;this.pictureUrl=k;this.locale=g};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found \nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(b,c,e){this.init(b,c,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
GraphViewer.prototype.init=function(b,c,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,
-"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;
-this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=c&&(this.xmlDocument=c.ownerDocument,this.xmlNode=c,this.xml=mxUtils.getXml(c),null!=b)){var k=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var e=this.graph.view.getDrawPane().ownerSVGElement;
-this.graph.view.getCanvas();null!=this.graphConfig.border?e.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(e.style.padding="8px");e.style.boxSizing="border-box";e.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var b=this.view.graphBounds,c=this.view.translate;e.setAttribute("viewBox",b.x+c.x-this.panDx+" "+(b.y+c.y-this.panDy)+" "+(b.width+1)+" "+(b.height+1));this.container.style.backgroundColor=e.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,
-"bounds",b))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(b){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);
-this.xmlNode!=c&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(b){return d.getImageUrl(b)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var f=this.xmlNode.getElementsByTagName("diagram");if(0<f.length){if(null!=this.pageId)for(var k=0;k<f.length;k++)if(this.pageId==f[k].getAttribute("id")){this.currentPage=k;break}var n=this.graph.getGlobalVariable,
-d=this;this.graph.getGlobalVariable=function(b){var c=f[d.currentPage];return"page"==b?c.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==b?d.currentPage+1:"pagecount"==b?f.length:n.apply(this,arguments)}}}this.diagrams=[];var p=null;this.selectPage=function(b){this.handlingResize||(this.currentPage=mxUtils.mod(b,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(b){b=this.getIndexById(b);var c=0<=b;c&&this.selectPage(b);
-return c};var k=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=p&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),p=this.xmlNode)}),m=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(b){if(null!=b&&Graph.isPageLink(b.src)){var c=b.src,e=c.indexOf(",");0<e&&(e=d.getIndexById(c.substring(e+1)),0<=e&&(b=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[e])),b.originalSrc=c))}m.apply(this,arguments)};
-var v=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=v.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale;c.add(new mxRectangle((d.x+b.x)*e,(d.y+b.y)*e,b.width*e,b.height*e))}return c};this.addListener("xmlNodeChanged",k);k();urlParams.page=d.currentPage;k=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||
-1,k=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=
-!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};
-null!=k&&this.setLayersVisible(k);this.graph.customLinkClicked=function(b){if(Graph.isPageLink(b)){var c=b.indexOf(",");d.selectPageById(b.substring(c+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(b);return!0};var u=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return u.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||
-window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof e){var f=this.getObservableParent(b),n=new e(mxUtils.bind(this,function(c){0<b.offsetWidth&&(n.disconnect(),k())}));n.observe(f,{attributes:!0})}else k()}};GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};
+"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:
+this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=c&&(this.xmlDocument=c.ownerDocument,this.xmlNode=c,this.xml=mxUtils.getXml(c),null!=b)){var k=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;if(this.responsive&&
+this.graph.dialect==mxConstants.DIALECT_SVG){var e=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?e.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(e.style.padding="8px");e.style.boxSizing="border-box";e.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var b=this.view.graphBounds,c=this.view.translate;e.setAttribute("viewBox",b.x+c.x-this.panDx+" "+(b.y+c.y-this.panDy)+" "+(b.width+1)+
+" "+(b.height+1));this.container.style.backgroundColor=e.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",b))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(b){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&
+(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=c&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(b){return d.getImageUrl(b)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var f=this.xmlNode.getElementsByTagName("diagram");if(0<f.length){if(null!=this.pageId)for(var g=
+0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var k=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(b){var c=f[d.currentPage];return"page"==b?c.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==b?d.currentPage+1:"pagecount"==b?f.length:k.apply(this,arguments)}}}this.diagrams=[];var p=null;this.selectPage=function(b){this.handlingResize||(this.currentPage=mxUtils.mod(b,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
+this.selectPageById=function(b){b=this.getIndexById(b);var c=0<=b;c&&this.selectPage(b);return c};var g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=p&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),p=this.xmlNode)}),n=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(b){if(null!=b&&Graph.isPageLink(b.src)){var c=b.src,e=c.indexOf(",");0<e&&(e=d.getIndexById(c.substring(e+1)),0<=e&&(b=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[e])),
+b.originalSrc=c))}n.apply(this,arguments)};var v=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=v.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale;c.add(new mxRectangle((d.x+b.x)*e,(d.y+b.y)*e,b.width*e,b.height*e))}return c};this.addListener("xmlNodeChanged",g);g();urlParams.page=d.currentPage;g=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),
+this.graph.view.scale=this.graphConfig.zoom||1,g=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=
+!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),
+scale:this.graph.view.scale};null!=g&&this.setLayersVisible(g);this.graph.customLinkClicked=function(b){if(Graph.isPageLink(b)){var c=b.indexOf(",");d.selectPageById(b.substring(c+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(b);return!0};var u=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return u.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||
+window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof e){var g=this.getObservableParent(b),p=new e(mxUtils.bind(this,function(c){0<b.offsetWidth&&(p.disconnect(),k())}));p.observe(g,{attributes:!0})}else k()}};GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};
GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
GraphViewer.prototype.getImageForGraphModel=function(b){var c=this.graph.getGlobalVariable,e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=function(b){return c.apply(this,arguments)};document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==b)return c;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocument=b.ownerDocument,this.xml=mxUtils.getXml(b),this.xmlNode=b);this.setGraphXml(b)};GraphViewer.prototype.updateGraphXml=function(b){this.setGraphXml(b);this.fireEvent(new mxEventObject("graphChanged"))};
-GraphViewer.prototype.setLayersVisible=function(b){var c=!0;if(!this.autoOrigin){var e=[],k=this.graph.getModel();k.beginUpdate();try{for(var f=0;f<k.getChildCount(k.root);f++){var n=k.getChildAt(k.root,f),c=c&&k.isVisible(n);e.push(k.isVisible(n));k.setVisible(n,null!=b?b[f]:!0)}}finally{k.endUpdate()}}return c?null:e};
+GraphViewer.prototype.setLayersVisible=function(b){var c=!0;if(!this.autoOrigin){var e=[],k=this.graph.getModel();k.beginUpdate();try{for(var g=0;g<k.getChildCount(k.root);g++){var p=k.getChildAt(k.root,g),c=c&&k.isVisible(p);e.push(k.isVisible(p));k.setVisible(p,null!=b?b[g]:!0)}}finally{k.endUpdate()}}return c?null:e};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var c=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),c=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};c&&this.setLayersVisible(c)}};
GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,c=this.graph.getGraphBounds(),e=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var k=mxUtils.bind(this,function(){if(!e){e=!0;var c=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?c.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var c=b.getBoundingClientRect(),f=mxUtils.getScrollOrigin(document.body),
f="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-f.x,top:-f.y},c={left:c.left-f.left,top:c.top-f.top,bottom:c.bottom-f.top,right:c.right-f.left};this.toolbar.style.left=c.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=c.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=c.top+1+"px"):this.toolbar.style.top=c.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());e=!1}}),f=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(c){var d=b.offsetWidth;d==f||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=c?c:this.graphConfig.zoom||
-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},f=d,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());e=!1}}),g=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(c){var d=b.offsetWidth;d==g||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=c?c:this.graphConfig.zoom||
+(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},g=d,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",k),this.graph.addListener("size",k)):new ResizeSensor(this.graph.container,k));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,c.width+2*this.graph.border),
-0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,c.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var n=f=null,k=mxUtils.bind(this,function(){window.clearTimeout(n);this.handlingResize||(n=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",k):new ResizeSensor(this.graph.container,k))}else 9>=document.documentMode||this.graph.addListener("size",
+0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,c.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=g=null,k=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",k):new ResizeSensor(this.graph.container,k))}else 9>=document.documentMode||this.graph.addListener("size",
k);var t=mxUtils.bind(this,function(d){var e=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var k=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==d&&this.allowZoomOut&&(this.allowZoomIn||c.width+2*this.graph.border>b.offsetWidth||c.height+2*this.graph.border>k)?(d=null,null!=k&&c.height+2*this.graph.border>k-2&&(d=(k-2*this.graph.border-2)/c.height),this.fitGraph(d)):this.widthIsEmpty||
-null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-c.x/this.graph.view.scale)+d.x,Math.floor(this.graph.border-c.y/this.graph.view.scale)+d.y),f=b.offsetWidth):this.graph.center((!this.widthIsEmpty||c.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=e});8==document.documentMode?window.setTimeout(t,0):t();this.positionGraph=function(b){c=this.graph.getGraphBounds();f=null;t(b)}};
+null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-c.x/this.graph.view.scale)+d.x,Math.floor(this.graph.border-c.y/this.graph.view.scale)+d.y),g=b.offsetWidth):this.graph.center((!this.widthIsEmpty||c.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=e});8==document.documentMode?window.setTimeout(t,0):t();this.positionGraph=function(b){c=this.graph.getGraphBounds();g=null;t(b)}};
GraphViewer.prototype.crop=function(){var b=this.graph,c=b.getGraphBounds(),e=b.border,k=b.view.scale;b.view.setTranslate(null!=c.x?Math.floor(b.view.translate.x-c.x/k+e):e,null!=c.y?Math.floor(b.view.translate.y-c.y/k+e):e)};GraphViewer.prototype.updateContainerWidth=function(b,c){b.style.width=c+"px"};GraphViewer.prototype.updateContainerHeight=function(b,c){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=c+"px"};
-GraphViewer.prototype.showLayers=function(b,c){var e=this.graphConfig.layers,e=null!=e&&0<e.length?e.split(" "):[],k=this.graphConfig.layerIds,f=null!=k&&0<k.length,n=!1;if(0<e.length||f||null!=c){var t=null!=c?c.getModel():null,n=b.getModel();n.beginUpdate();try{var d=n.getChildCount(n.root);if(null==t){var t=!1,g={};if(f)for(var l=0;l<k.length;l++){var q=n.getCell(k[l]);null!=q&&(t=!0,g[q.id]=!0)}else for(l=0;l<e.length;l++)q=n.getChildAt(n.root,parseInt(e[l])),null!=q&&(t=!0,g[q.id]=!0);for(l=
-0;t&&l<d;l++)q=n.getChildAt(n.root,l),n.setVisible(q,g[q.id]||!1)}else for(l=0;l<d;l++)n.setVisible(n.getChildAt(n.root,l),t.isVisible(t.getChildAt(t.root,l)))}finally{n.endUpdate()}n=!0}return n};
+GraphViewer.prototype.showLayers=function(b,c){var e=this.graphConfig.layers,e=null!=e&&0<e.length?e.split(" "):[],k=this.graphConfig.layerIds,g=null!=k&&0<k.length,p=!1;if(0<e.length||g||null!=c){var t=null!=c?c.getModel():null,p=b.getModel();p.beginUpdate();try{var d=p.getChildCount(p.root);if(null==t){var t=!1,f={};if(g)for(var l=0;l<k.length;l++){var m=p.getCell(k[l]);null!=m&&(t=!0,f[m.id]=!0)}else for(l=0;l<e.length;l++)m=p.getChildAt(p.root,parseInt(e[l])),null!=m&&(t=!0,f[m.id]=!0);for(l=
+0;t&&l<d;l++)m=p.getChildAt(p.root,l),p.setVisible(m,f[m.id]||!1)}else for(l=0;l<d;l++)p.setVisible(p.getChildAt(p.root,l),t.isVisible(t.getChildAt(t.root,l)))}finally{p.endUpdate()}p=!0}return p};
GraphViewer.prototype.addToolbar=function(){function b(b,c,d,f){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",b);null!=d&&g.setAttribute("title",d);g.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",c);null==f||f?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",function(){g.style.backgroundColor=
-"#eee"}),mxUtils.setOpacity(b,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(b);e.appendChild(g);q++;return g}var c=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?c.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(c.style.marginTop=this.toolbarHeight+"px");var e=c.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign=
-"left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,f=null,n=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=f&&(window.clearTimeout(f),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=
-null;f=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";f=null}),100)}),b||200)}),t=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=f&&(window.clearTimeout(f),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,b||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(t(30),n())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",
-function(b){mxEvent.consume(b)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(b){t(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(b){t(100);mxEvent.consume(b)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||t(30)}));var d=this.graph,g=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=d.container.scrollLeft;
-this.scrollTop=d.container.scrollTop},mouseMove:function(b,c){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<g&&Math.abs(this.scrollTop-d.container.scrollTop)<g&&Math.abs(this.startX-c.getGraphX())<g&&Math.abs(this.startY-c.getGraphY())<g&&(0<parseFloat(e.style.opacity||0)?n():t(30))}})}for(var l=this.toolbarItems,q=0,p=null,m=null,v=0;v<l.length;v++){var u=l[v];if("pages"==u){m=c.ownerDocument.createElement("div");m.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";
-mxUtils.setOpacity(m,70);var B=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");B.style.borderRightStyle="none";B.style.paddingLeft="0px";B.style.paddingRight="0px";e.appendChild(m);var x=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";u=mxUtils.bind(this,function(){m.innerHTML=
-"";mxUtils.write(m,this.currentPage+1+" / "+this.diagrams.length);m.style.display=1<this.diagrams.length?"inline-block":"none";B.style.display=m.style.display;x.style.display=m.style.display});this.addListener("graphChanged",u);u()}else if("zoom"==u)this.zoomEnabled&&(b(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(mxUtils.bind(this,
-function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==u){if(this.layersEnabled){var E=this.graph.getModel(),A=b(mxUtils.bind(this,function(b){if(null!=p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var b=this.graph.getGraphBounds(),
-c=this.graph.view;0>b.x||0>b.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale}):null!=this.graph.originalViewState&&0<b.x/c.scale+this.graph.originalViewState.translate.x-c.translate.x&&0<b.y/c.scale+this.graph.originalViewState.translate.y-c.translate.y&&(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState=
-{translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});b=A.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var c=mxUtils.getDocumentScrollOrigin(document);p.style.left=c.x+
-b.left-1+"px";p.style.top=c.y+b.bottom-2+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");E.addListener(mxEvent.CHANGE,function(){A.style.display=1<E.getChildCount(E.root)?"inline-block":"none"});A.style.display=1<E.getChildCount(E.root)?"inline-block":"none"}}else"lightbox"==u?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(u=this.graphConfig["toolbar-buttons"][u],
-null!=u&&(u.elem=b(null==u.enabled||u.enabled?u.handler:function(){},u.image,u.title,u.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*q);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),
-mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*q;var F=c.style.border,I=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,c.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var b=c.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},
-b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};e.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=b.top+1+"px"):e.style.top=b.top+"px";"1px solid transparent"==F&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=
-p&&(p.parentNode.removeChild(p),p=null);c.style.border=F});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==c||b==e||b==p)return;b=b.parentNode}f()});mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",I):I();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&
-I()})).observe(c)};GraphViewer.prototype.disableButton=function(b){var c=this.graphConfig["toolbar-buttons"][b];null!=c&&(mxUtils.setOpacity(c.elem,30),mxEvent.removeListener(c.elem,"click",c.handler),mxEvent.addListener(c.elem,"mouseenter",function(){c.elem.style.backgroundColor="#eee"}))};
-GraphViewer.prototype.addClickHandler=function(b,c){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,k){if(null==k)for(var f=mxEvent.getSource(e);f!=b.container&&null!=f&&null==k;)"a"==f.nodeName.toLowerCase()&&(k=f.getAttribute("href")),f=f.parentNode;null!=c?null==k||b.isCustomLink(k)?mxEvent.consume(e):b.isExternalProtocol(k)||b.isBlankLink(k)||window.setTimeout(function(){c.destroy()},0):null!=k&&null==c&&b.isCustomLink(k)&&
+"#eee"}),mxUtils.setOpacity(b,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(b);e.appendChild(g);m++;return g}var c=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?c.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(c.style.marginTop=this.toolbarHeight+"px");var e=c.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign=
+"left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,g=null,p=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=
+null;g=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";g=null}),100)}),b||200)}),t=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,b||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(t(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",
+function(b){mxEvent.consume(b)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(b){t(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(b){t(100);mxEvent.consume(b)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||t(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=d.container.scrollLeft;
+this.scrollTop=d.container.scrollTop},mouseMove:function(b,c){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-c.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?p():t(30))}})}for(var l=this.toolbarItems,m=0,q=null,n=null,v=null,u=null,y=0;y<l.length;y++){var x=l[y];if("pages"==x){u=c.ownerDocument.createElement("div");u.style.cssText=
+"display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(u,70);var H=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");H.style.borderRightStyle="none";H.style.paddingLeft="0px";H.style.paddingRight="0px";e.appendChild(u);var D=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,
+mxResources.get("nextPage")||"Next Page");D.style.paddingLeft="0px";D.style.paddingRight="0px";x=mxUtils.bind(this,function(){u.innerHTML="";mxUtils.write(u,this.currentPage+1+" / "+this.diagrams.length);u.style.display=1<this.diagrams.length?"inline-block":"none";H.style.display=u.style.display;D.style.display=u.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)this.zoomEnabled&&(b(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||
+"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==x){if(this.layersEnabled){var E=this.graph.getModel(),J=b(mxUtils.bind(this,function(b){if(null!=q)q.parentNode.removeChild(q),
+q=null;else{q=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var b=this.graph.getGraphBounds(),c=this.graph.view;0>b.x||0>b.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale}):null!=this.graph.originalViewState&&0<b.x/c.scale+this.graph.originalViewState.translate.x-c.translate.x&&0<b.y/c.scale+this.graph.originalViewState.translate.y-c.translate.y&&
+(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});b=J.getBoundingClientRect();q.style.width="140px";q.style.padding="2px 0px 2px 0px";q.style.border="1px solid #d0d0d0";q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style.fontSize=
+"11px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var c=mxUtils.getDocumentScrollOrigin(document);q.style.left=c.x+b.left-1+"px";q.style.top=c.y+b.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");E.addListener(mxEvent.CHANGE,function(){J.style.display=1<E.getChildCount(E.root)?"inline-block":"none"});J.style.display=1<E.getChildCount(E.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var L=b(mxUtils.bind(this,
+function(b){null==n&&(n=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),n.div.getElementsByTagName("div")[0].style.position="",n.div.style.maxHeight="160px",n.div.style.maxWidth="120px",n.div.style.padding="2px",n.div.style.overflow="auto",n.div.style.height="auto",n.div.style.position="fixed",n.div.style.fontFamily=Editor.defaultHtmlFont,n.div.style.fontSize="11px",n.div.style.backgroundColor="#eee",n.div.style.color="#000",n.div.style.border="1px solid #d0d0d0",n.div.style.zIndex=
+this.toolbarZIndex+1,mxUtils.setOpacity(n.div,80));if(null!=v)v.parentNode.removeChild(v),v=null;else{v=n.div;mxEvent.addListener(v,"mouseleave",function(){v.parentNode.removeChild(v);v=null});b=L.getBoundingClientRect();var c=mxUtils.getDocumentScrollOrigin(document);v.style.left=c.x+b.left-1+"px";v.style.top=c.y+b.bottom-2+"px";document.body.appendChild(v);n.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");E.addListener(mxEvent.CHANGE,function(){L.style.display=0<this.graph.getAllTags().length?
+"inline-block":"none"});L.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==x?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(x=this.graphConfig["toolbar-buttons"][x],null!=x&&(x.elem=b(null==x.enabled||x.enabled?x.handler:function(){},x.image,x.title,x.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=
+34*m);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*m;var G=c.style.border,K=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?
+"auto":Math.max(this.minToolbarWidth,c.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var b=c.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};e.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=b.bottom-1+"px":"inline"!=
+this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=b.top+1+"px"):e.style.top=b.top+"px";"1px solid transparent"==G&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=q&&(q.parentNode.removeChild(q),q=null);c.style.border=G});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==c||b==e||b==q)return;b=b.parentNode}f()});
+mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",K):K();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&K()})).observe(c)};
+GraphViewer.prototype.disableButton=function(b){var c=this.graphConfig["toolbar-buttons"][b];null!=c&&(mxUtils.setOpacity(c.elem,30),mxEvent.removeListener(c.elem,"click",c.handler),mxEvent.addListener(c.elem,"mouseenter",function(){c.elem.style.backgroundColor="#eee"}))};
+GraphViewer.prototype.addClickHandler=function(b,c){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,k){if(null==k)for(var g=mxEvent.getSource(e);g!=b.container&&null!=g&&null==k;)"a"==g.nodeName.toLowerCase()&&(k=g.getAttribute("href")),g=g.parentNode;null!=c?null==k||b.isCustomLink(k)?mxEvent.consume(e):b.isExternalProtocol(k)||b.isBlankLink(k)||window.setTimeout(function(){c.destroy()},0):null!=k&&null==c&&b.isCustomLink(k)&&
(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&b.customLinkClicked(k)&&(mxUtils.clearSelection(),mxEvent.consume(e))}),mxUtils.bind(this,function(b){null!=c||!this.lightboxClickEnabled||mxEvent.isTouchEvent(b)&&0!=this.toolbarItems.length||this.showLightbox()}))};
-GraphViewer.prototype.showLightbox=function(b,c,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,target:null!=e?e:"blank"};b&&(e.edit=this.graphConfig.edit||"_blank");if(null!=c?c:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
-(e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(b){"ready"==b.data&&b.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(e.dev="1");this.lightboxWindow=
-window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
+GraphViewer.prototype.showLightbox=function(b,c,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,target:null!=e?e:"blank"};b&&(e.edit=this.graphConfig.edit||"_blank");if(null!=c?c:1)e.close=1;this.layersEnabled&&(e.layers=1);this.tagsEnabled&&(e.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=
+this.graphConfig.highlight&&(e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(b){"ready"==b.data&&b.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(e.dev=
+"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("src",Editor.closeImage);c.style.cssText="position:fixed;top:32px;right:32px;";c.style.cursor="pointer";mxEvent.addListener(c,
-"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;
-EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var e=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=e;k.refresh=function(){};var f=mxUtils.bind(this,function(b){27==b.keyCode&&k.destroy()}),
-n=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",f);document.body.removeChild(b);document.body.removeChild(c);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;n.apply(this,arguments)};var t=k.editor.graph,d=t.container;d.style.overflow="hidden";this.lightboxChrome?(d.style.border="1px solid #c0c0c0",d.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",f)):(b.style.display="none",c.style.display="none");var g=this;
-t.getImageFromBundles=function(b){return g.getImageUrl(b)};var l=k.createTemporaryGraph;k.createTemporaryGraph=function(){var b=l.apply(this,arguments);b.getImageFromBundles=function(b){return g.getImageUrl(b)};return b};this.graphConfig.move&&(t.isMoveCellsEvent=function(b){return!0});mxUtils.setPrefixedStyle(d.style,"border-radius","4px");d.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(d.style,
-"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(d.style,"transition","all .25s ease-in-out"));this.addClickHandler(t,k);window.setTimeout(mxUtils.bind(this,function(){d.style.outline="none";d.style.zIndex=this.lightboxZIndex;c.style.zIndex=this.lightboxZIndex;document.body.appendChild(d);document.body.appendChild(c);k.setFileData(this.xml);mxUtils.setPrefixedStyle(d.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;
-document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});k.lightboxFit();k.chromelessResize();this.showLayers(t,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k};
+"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,
+Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var e=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=e;k.refresh=function(){};
+var g=mxUtils.bind(this,function(b){27==b.keyCode&&k.destroy()}),p=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",g);document.body.removeChild(b);document.body.removeChild(c);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;p.apply(this,arguments)};var t=k.editor.graph,d=t.container;d.style.overflow="hidden";this.lightboxChrome?(d.style.border="1px solid #c0c0c0",d.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",
+g)):(b.style.display="none",c.style.display="none");var f=this;t.getImageFromBundles=function(b){return f.getImageUrl(b)};var l=k.createTemporaryGraph;k.createTemporaryGraph=function(){var b=l.apply(this,arguments);b.getImageFromBundles=function(b){return f.getImageUrl(b)};return b};this.graphConfig.move&&(t.isMoveCellsEvent=function(b){return!0});mxUtils.setPrefixedStyle(d.style,"border-radius","4px");d.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";
+mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(d.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(d.style,"transition","all .25s ease-in-out"));this.addClickHandler(t,k);window.setTimeout(mxUtils.bind(this,function(){d.style.outline="none";d.style.zIndex=this.lightboxZIndex;c.style.zIndex=this.lightboxZIndex;document.body.appendChild(d);document.body.appendChild(c);k.setFileData(this.xml);mxUtils.setPrefixedStyle(d.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom=
+"60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});k.lightboxFit();k.chromelessResize();this.showLayers(t,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerHTML="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(b){try{b.innerHTML="",GraphViewer.createViewerForElement(b)}catch(e){b.innerHTML=e.message,null!=window.console&&console.error(e)}})};
-GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var c=document.getElementsByClassName(b);b=[];for(var e=0;e<c.length;e++)b.push(c[e]);return b}for(var k=document.getElementsByTagName("*"),c=[],e=0;e<k.length;e++){var f=k[e].className;null!=f&&0<f.length&&(f=f.split(" "),0<=mxUtils.indexOf(f,b)&&c.push(k[e]))}return c};
-GraphViewer.createViewerForElement=function(b,c){var e=b.getAttribute("data-mxgraph");if(null!=e){var k=JSON.parse(e),f=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(b,e.documentElement,k);null!=c&&c(e)};null!=k.url?GraphViewer.getUrl(k.url,function(b){f(b)}):f(k.xml)}};
+GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var c=document.getElementsByClassName(b);b=[];for(var e=0;e<c.length;e++)b.push(c[e]);return b}for(var k=document.getElementsByTagName("*"),c=[],e=0;e<k.length;e++){var g=k[e].className;null!=g&&0<g.length&&(g=g.split(" "),0<=mxUtils.indexOf(g,b)&&c.push(k[e]))}return c};
+GraphViewer.createViewerForElement=function(b,c){var e=b.getAttribute("data-mxgraph");if(null!=e){var k=JSON.parse(e),g=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(b,e.documentElement,k);null!=c&&c(e)};null!=k.url?GraphViewer.getUrl(k.url,function(b){g(b)}):g(k.xml)}};
GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(c){}};
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,c,e){if(null!=GraphViewer.cachedUrls[b])c(GraphViewer.cachedUrls[b]);else{var k=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;k.open("GET",b);k.onload=function(){c(null!=k.getText?k.getText():k.responseText)};k.onerror=e;k.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(b){return window.setTimeout(b,20)},c=function(e,k){function f(){this.q=[];this.add=function(b){this.q.push(b)};var b,c;this.call=function(){b=0;for(c=this.q.length;b<c;b++)this.q[b].call()}}function n(b,c){return b.currentStyle?b.currentStyle[c]:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue(c):b.style[c]}function t(c,d){if(!c.resizedAttached)c.resizedAttached=
-new f,c.resizedAttached.add(d);else if(c.resizedAttached){c.resizedAttached.add(d);return}c.resizeSensor=document.createElement("div");c.resizeSensor.className="resize-sensor";c.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";c.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-c.appendChild(c.resizeSensor);"static"==n(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],g=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){g.style.width="100000px";g.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,p=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(p))};b(p);var q,t,L,H,K=function(){if((L=c.offsetWidth)!=q||(H=c.offsetHeight)!=t)m=!0,q=L,t=H;l()},C=function(b,c,d){b.attachEvent?
-b.attachEvent("on"+c,d):b.addEventListener(c,d)};C(e,"scroll",K);C(k,"scroll",K)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},g=Object.prototype.toString.call(e),l="[object Array]"===g||"[object NodeList]"===g||"[object HTMLCollection]"===g||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var g=0,q=e.length;g<q;g++)t(e[g],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(b){return window.setTimeout(b,20)},c=function(e,k){function g(){this.q=[];this.add=function(b){this.q.push(b)};var b,c;this.call=function(){b=0;for(c=this.q.length;b<c;b++)this.q[b].call()}}function p(b,c){return b.currentStyle?b.currentStyle[c]:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue(c):b.style[c]}function t(c,d){if(!c.resizedAttached)c.resizedAttached=
+new g,c.resizedAttached.add(d);else if(c.resizedAttached){c.resizedAttached.add(d);return}c.resizeSensor=document.createElement("div");c.resizeSensor.className="resize-sensor";c.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";c.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
+c.appendChild(c.resizeSensor);"static"==p(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],f=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){f.style.width="100000px";f.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(n))};b(n);var q,t,L,G,K=function(){if((L=c.offsetWidth)!=q||(G=c.offsetHeight)!=t)m=!0,q=L,t=G;l()},C=function(b,c,d){b.attachEvent?
+b.attachEvent("on"+c,d):b.addEventListener(c,d)};C(e,"scroll",K);C(k,"scroll",K)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},f=Object.prototype.toString.call(e),l="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var f=0,m=e.length;f<m;f++)t(e[f],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
c.detach=function(b){b.resizeSensor&&(b.removeChild(b.resizeSensor),delete b.resizeSensor,delete b.resizedAttached)};window.ResizeSensor=c})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index cea0896d..4ee322e4 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -200,7 +200,7 @@ null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.1.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+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||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.1.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||
0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),
@@ -2002,20 +2002,27 @@ d);this.exportColor(e)};this.fromRGB=function(a,b,c,d){0>a&&(a=0);1<a&&(a=1);0>b
function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6===c[1].length?this.fromRGB(parseInt(c[1].substr(0,2),16)/255,parseInt(c[1].substr(2,2),16)/255,parseInt(c[1].substr(4,2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),y=!1,B=!1,A=1,z=2,C=4,v=8;u&&(q=function(){r.fromString(u.value,A);p()},mxJSColor.addEvent(u,"keyup",q),mxJSColor.addEvent(u,"input",q),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
-Editor=function(b,c,e,k,f){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=k||this.createGraph(c,e);this.editable=null!=f?f:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(b){this.status=b;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+Editor=function(b,c,e,k,g){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=k||this.createGraph(c,e);this.editable=null!=g?g:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(b){this.status=b;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
function(){return this.status};this.graphChangeListener=function(b,c){var d=null!=c?c.getProperty("edit"):null;null!=d&&d.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
-(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(c){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
-Editor.moveImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=":IMAGE_PATH+
-"/move.png";Editor.rowMoveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/thumb_horz.png";
-Editor.lightHelpImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+":IMAGE_PATH+
-"/help.png";
+(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(c){}})();Editor.defaultHtmlFont="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
+Editor.rowMoveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/thumb_horz.png";
Editor.lightCheckmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+
"/checkmark.gif";Editor.darkHelpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=";Editor.darkCheckmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==";
-Editor.maximizeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAADgKxmiAAAABXRSTlMA758vX1Pw3BoAAABJSURBVAjXY8AJQkODGBhUQ0MhbAUGBiYY24CBgRnGFmZgMISwgwwDGRhEhVVBbAVmEQYGRwMmBjIAQi/CTIRd6G5AuA3dzYQBAHj0EFdHkvV4AAAAAElFTkSuQmCC";Editor.zoomOutImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCxxcXEhISFgYGChjTUxAAAAAXRSTlMAQObYZgAAAEdJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITgLJZXFxgbIQ4Qj3CHIT5ggoIe5kgNkM1KSDYKBKqxPkDAPo5BAZBE54hAAAAAElFTkSuQmCC";
-Editor.zoomInImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCwhISFxcXFgYGBavKaoAAAAAXRSTlMAQObYZgAAAElJREFUCNdjIAMwCQrB2YKCggJQJqMIA4sglK3owMzgqABVwsDMwCgAZTMbG8PYCHGEeoQ5CPMFFRD2MkFshmpSQLBRJFSJ8wcAEqcEM2uhl2MAAAAASUVORK5CYII=";Editor.zoomFitImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAD1BMVEUAAAAAAAAwMDBwcHBgYGC1xl09AAAAAXRSTlMAQObYZgAAAEFJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITwMdGqEeYgzBfUAFhLxPEZqgmBQQbRUKFOH8AAK5OA3lA+FFOAAAAAElFTkSuQmCC";
-Editor.layersImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAAaVBMVEUAAAAgICAICAgdHR0PDw8WFhYICAgLCwsXFxcvLy8ODg4uLi4iIiIqKiokJCQYGBgKCgonJycFBQUCAgIqKiocHBwcHBwODg4eHh4cHBwnJycJCQkUFBQqKiojIyMuLi4ZGRkgICAEBATOWYXAAAAAGnRSTlMAD7+fnz8/H7/ff18/77+vr5+fn39/b28fH2xSoKsAAACQSURBVBjTrYxJEsMgDARZZMAY73sgCcn/HxnhKtnk7j6oRq0psfuoyndZ/SuODkHPLzfVT6KeyPePnJ7KrnkRjWMXTn4SMnN8mXe2SSM3ts8L/ZUxxrbAULSYJJULE0Iw9pjpenoICcgcX61mGgTgtCv9Be99pzCoDhNQWQnchD1mup5++CYGcoQexajZbfwAj/0MD8ZOaUgAAAAASUVORK5CYII=";
-Editor.previousImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAAh0lEQVQ4je3UsQnCUBCA4U8hpa1NsoEjpHQJS0dxADdwEMuMIJkgA1hYChbGQgMi+JC8q4L/AB/vDu7x74cWWEZhJU44RmA1zujR5GIbXF9YNrjD/Q0bDRY4fEBZ4P4LlgTnCbAf84pUM8/9hY08tMUtEoQ1LpEgrNBFglChFXR6Q6GfwwR6AGKJMF74Vtt3AAAAAElFTkSuQmCC";Editor.nextImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAAi0lEQVQ4jeXUIQ7CUAwA0MeGxWI2yylwnALJUdBcgYvM7QYLmjOQIAkIPmJZghiIvypoUtX0tfnJL38X5ZfaEgUeUcManFBHgS0SLlhHggk3bCPBhCf2keCQR8wjwYTDp6YiZxJmOU1jGw7vGALescuBxsArNlOwd/CM1VSM/ut1qCIw+uOwiMJ+OF4CQzBCXm3hyAAAAABJRU5ErkJggg==";
-Editor.editImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCwALAIABAFdXV////yH5BAEAAAEALAAAAAALAAsAAAIZjB8AiKuc4jvLOGqzrjX6zmkWyChXaUJBAQA7":IMAGE_PATH+"/edit.gif";Editor.zoomOutLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6TTcgOWg1djFIN3oiLz48L3N2Zz4=";
+Editor.lightHelpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+";
+Editor.moveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=";
+Editor.maximizeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1IDNsMi4zIDIuMy0yLjg5IDIuODcgMS40MiAxLjQyTDE4LjcgNi43IDIxIDlWM2gtNnpNMyA5bDIuMy0yLjMgMi44NyAyLjg5IDEuNDItMS40Mkw2LjcgNS4zIDkgM0gzdjZ6bTYgMTJsLTIuMy0yLjMgMi44OS0yLjg3LTEuNDItMS40Mkw1LjMgMTcuMyAzIDE1djZoNnptMTItNmwtMi4zIDIuMy0yLjg3LTIuODktMS40MiAxLjQyIDIuODkgMi44N0wxNSAyMWg2di02eiIvPjwvc3ZnPg==";
+Editor.zoomOutImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6TTcgOWg1djFIN3oiLz48L3N2Zz4=";
+Editor.zoomInImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6bS41LTdIOXYySDd2MWgydjJoMXYtMmgyVjloLTJ6Ii8+PC9zdmc+";
+Editor.zoomFitImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTUgMTVIM3Y0YzAgMS4xLjkgMiAyIDJoNHYtMkg1di00ek01IDVoNFYzSDVjLTEuMSAwLTIgLjktMiAydjRoMlY1em03IDNjLTIuMjEgMC00IDEuNzktNCA0czEuNzkgNCA0IDQgNC0xLjc5IDQtNC0xLjc5LTQtNC00em0wIDZjLTEuMSAwLTItLjktMi0ycy45LTIgMi0yIDIgLjkgMiAyLS45IDItMiAyem03LTExaC00djJoNHY0aDJWNWMwLTEuMS0uOS0yLTItMnptMCAxNmgtNHYyaDRjMS4xIDAgMi0uOSAyLTJ2LTRoLTJ2NHoiLz48L3N2Zz4=";
+Editor.layersImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTExLjk5IDE4LjU0bC03LjM3LTUuNzNMMyAxNC4wN2w5IDcgOS03LTEuNjMtMS4yN3pNMTIgMTZsNy4zNi01LjczTDIxIDlsLTktNy05IDcgMS42MyAxLjI3TDEyIDE2em0wLTExLjQ3TDE3Ljc0IDkgMTIgMTMuNDcgNi4yNiA5IDEyIDQuNTN6Ii8+PC9zdmc+";Editor.previousImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjQxIDcuNDFMMTQgNmwtNiA2IDYgNiAxLjQxLTEuNDFMMTAuODMgMTJsNC41OC00LjU5eiIvPjwvc3ZnPg==";
+Editor.nextImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEwIDZMOC41OSA3LjQxIDEzLjE3IDEybC00LjU4IDQuNTlMMTAgMThsNi02LTYtNnoiLz48L3N2Zz4=";Editor.editImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE0LjA2IDkuMDJsLjkyLjkyTDUuOTIgMTlINXYtLjkybDkuMDYtOS4wNk0xNy42NiAzYy0uMjUgMC0uNTEuMS0uNy4yOWwtMS44MyAxLjgzIDMuNzUgMy43NSAxLjgzLTEuODNjLjM5LS4zOS4zOS0xLjAyIDAtMS40MWwtMi4zNC0yLjM0Yy0uMi0uMi0uNDUtLjI5LS43MS0uMjl6bS0zLjYgMy4xOUwzIDE3LjI1VjIxaDMuNzVMMTcuODEgOS45NGwtMy43NS0zLjc1eiIvPjwvc3ZnPg==";
+Editor.duplicateImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE2IDFINGMtMS4xIDAtMiAuOS0yIDJ2MTRoMlYzaDEyVjF6bTMgNEg4Yy0xLjEgMC0yIC45LTIgMnYxNGMwIDEuMS45IDIgMiAyaDExYzEuMSAwIDItLjkgMi0yVjdjMC0xLjEtLjktMi0yLTJ6bTAgMTZIOFY3aDExdjE0eiIvPjwvc3ZnPg==";Editor.addImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEzaC02djZoLTJ2LTZINXYtMmg2VjVoMnY2aDZ2MnoiLz48L3N2Zz4=";
+Editor.crossImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDYuNDFMMTcuNTkgNSAxMiAxMC41OSA2LjQxIDUgNSA2LjQxIDEwLjU5IDEyIDUgMTcuNTkgNi40MSAxOSAxMiAxMy40MSAxNy41OSAxOSAxOSAxNy41OSAxMy40MSAxMiAxOSA2LjQxeiIvPjwvc3ZnPg==";Editor.verticalDotsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDhjMS4xIDAgMi0uOSAyLTJzLS45LTItMi0yLTIgLjktMiAyIC45IDIgMiAyem0wIDJjLTEuMSAwLTIgLjktMiAycy45IDIgMiAyIDItLjkgMi0yLS45LTItMi0yem0wIDZjLTEuMSAwLTIgLjktMiAycy45IDIgMiAyIDItLjkgMi0yLS45LTItMi0yeiIvPjwvc3ZnPg==";
+Editor.trashImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE2IDl2MTBIOFY5aDhtLTEuNS02aC01bC0xIDFINXYyaDE0VjRoLTMuNWwtMS0xek0xOCA3SDZ2MTJjMCAxLjEuOSAyIDIgMmg4YzEuMSAwIDItLjkgMi0yVjd6Ii8+PC9zdmc+";Editor.hiddenImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNS0uNTkgMS4yMi0xLjQyIDIuMjctMi40MSAzLjEybDEuNDEgMS40MWMxLjM5LTEuMjMgMi40OS0yLjc3IDMuMTgtNC41M0MyMS4yNyA3LjExIDE3IDQgMTIgNGMtMS4yNyAwLTIuNDkuMi0zLjY0LjU3bDEuNjUgMS42NUMxMC42NiA2LjA5IDExLjMyIDYgMTIgNnptLTEuMDcgMS4xNEwxMyA5LjIxYy41Ny4yNSAxLjAzLjcxIDEuMjggMS4yOGwyLjA3IDIuMDdjLjA4LS4zNC4xNC0uNy4xNC0xLjA3QzE2LjUgOS4wMSAxNC40OCA3IDEyIDdjLS4zNyAwLS43Mi4wNS0xLjA3LjE0ek0yLjAxIDMuODdsMi42OCAyLjY4QzMuMDYgNy44MyAxLjc3IDkuNTMgMSAxMS41IDIuNzMgMTUuODkgNyAxOSAxMiAxOWMxLjUyIDAgMi45OC0uMjkgNC4zMi0uODJsMy40MiAzLjQyIDEuNDEtMS40MUwzLjQyIDIuNDUgMi4wMSAzLjg3em03LjUgNy41bDIuNjEgMi42MWMtLjA0LjAxLS4wOC4wMi0uMTIuMDItMS4zOCAwLTIuNS0xLjEyLTIuNS0yLjUgMC0uMDUuMDEtLjA4LjAxLS4xM3ptLTMuNC0zLjRsMS43NSAxLjc1Yy0uMjMuNTUtLjM2IDEuMTUtLjM2IDEuNzggMCAyLjQ4IDIuMDIgNC41IDQuNSA0LjUuNjMgMCAxLjIzLS4xMyAxLjc3LS4zNmwuOTguOThjLS44OC4yNC0xLjguMzgtMi43NS4zOC0zLjc5IDAtNy4xNy0yLjEzLTguODItNS41LjctMS40MyAxLjcyLTIuNjEgMi45My0zLjUzeiIvPjwvc3ZnPg==";
+Editor.visibleImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNUMxOS4xNyAxNC44NyAxNS43OSAxNyAxMiAxN3MtNy4xNy0yLjEzLTguODItNS41QzQuODMgOC4xMyA4LjIxIDYgMTIgNm0wLTJDNyA0IDIuNzMgNy4xMSAxIDExLjUgMi43MyAxNS44OSA3IDE5IDEyIDE5czkuMjctMy4xMSAxMS03LjVDMjEuMjcgNy4xMSAxNyA0IDEyIDR6bTAgNWMxLjM4IDAgMi41IDEuMTIgMi41IDIuNVMxMy4zOCAxNCAxMiAxNHMtMi41LTEuMTItMi41LTIuNVMxMC42MiA5IDEyIDltMC0yYy0yLjQ4IDAtNC41IDIuMDItNC41IDQuNVM5LjUyIDE2IDEyIDE2czQuNS0yLjAyIDQuNS00LjVTMTQuNDggNyAxMiA3eiIvPjwvc3ZnPg==";
+Editor.lockedImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PGcgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6Ii8+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBvcGFjaXR5PSIuODciLz48L2c+PHBhdGggZD0iTTE4IDhoLTFWNmMwLTIuNzYtMi4yNC01LTUtNVM3IDMuMjQgNyA2djJINmMtMS4xIDAtMiAuOS0yIDJ2MTBjMCAxLjEuOSAyIDIgMmgxMmMxLjEgMCAyLS45IDItMlYxMGMwLTEuMS0uOS0yLTItMnpNOSA2YzAtMS42NiAxLjM0LTMgMy0zczMgMS4zNCAzIDN2Mkg5VjZ6bTkgMTRINlYxMGgxMnYxMHptLTYtM2MxLjEgMCAyLS45IDItMnMtLjktMi0yLTItMiAuOS0yIDIgLjkgMiAyIDJ6Ii8+PC9zdmc+";
+Editor.unlockedImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE4IDhoLTFWNmMwLTIuNzYtMi4yNC01LTUtNVM3IDMuMjQgNyA2aDJjMC0xLjY2IDEuMzQtMyAzLTNzMyAxLjM0IDMgM3YySDZjLTEuMSAwLTIgLjktMiAydjEwYzAgMS4xLjkgMiAyIDJoMTJjMS4xIDAgMi0uOSAyLTJWMTBjMC0xLjEtLjktMi0yLTJ6bTAgMTJINlYxMGgxMnYxMHptLTYtM2MxLjEgMCAyLS45IDItMnMtLjktMi0yLTItMiAuOS0yIDIgLjkgMiAyIDJ6Ii8+PC9zdmc+";
+Editor.zoomOutLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6TTcgOWg1djFIN3oiLz48L3N2Zz4=";
Editor.zoomInLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0MxNS40MSAxMi41OSAxNiAxMS4xMSAxNiA5LjUgMTYgNS45MSAxMy4wOSAzIDkuNSAzUzMgNS45MSAzIDkuNSA1LjkxIDE2IDkuNSAxNmMxLjYxIDAgMy4wOS0uNTkgNC4yMy0xLjU3bC4yNy4yOHYuNzlsNSA0Ljk5TDIwLjQ5IDE5bC00Ljk5LTV6bS02IDBDNy4wMSAxNCA1IDExLjk5IDUgOS41UzcuMDEgNSA5LjUgNSAxNCA3LjAxIDE0IDkuNSAxMS45OSAxNCA5LjUgMTR6bS41LTdIOXYySDd2MWgydjJoMXYtMmgyVjloLTJ6Ii8+PC9zdmc+";
Editor.actualSizeLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTUgMTVIM3Y0YzAgMS4xLjkgMiAyIDJoNHYtMkg1di00ek01IDVoNFYzSDVjLTEuMSAwLTIgLjktMiAydjRoMlY1em03IDNjLTIuMjEgMC00IDEuNzktNCA0czEuNzkgNCA0IDQgNC0xLjc5IDQtNC0xLjc5LTQtNC00em0wIDZjLTEuMSAwLTItLjktMi0ycy45LTIgMi0yIDIgLjkgMiAyLS45IDItMiAyem03LTExaC00djJoNHY0aDJWNWMwLTEuMS0uOS0yLTItMnptMCAxNmgtNHYyaDRjMS4xIDAgMi0uOSAyLTJ2LTRoLTJ2NHoiLz48L3N2Zz4=";
Editor.printLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDhoLTFWM0g2djVINWMtMS42NiAwLTMgMS4zNC0zIDN2Nmg0djRoMTJ2LTRoNHYtNmMwLTEuNjYtMS4zNC0zLTMtM3pNOCA1aDh2M0g4VjV6bTggMTJ2Mkg4di00aDh2MnptMi0ydi0ySDZ2Mkg0di00YzAtLjU1LjQ1LTEgMS0xaDE0Yy41NSAwIDEgLjQ1IDEgMXY0aC0yeiIvPjxjaXJjbGUgY3g9IjE4IiBjeT0iMTEuNSIgcj0iMSIvPjwvc3ZnPg==";
@@ -2028,7 +2035,7 @@ Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Ha
Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.darkMode=!1;Editor.isDarkMode=function(b){return Editor.darkMode||"dark"==uiTheme};Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;
Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
-Editor.prototype.editAsNew=function(b,c){var e=null!=c?"?title="+encodeURIComponent(c):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,f=mxUtils.bind(this,function(c){"ready"==c.data&&c.source==k&&(mxEvent.removeListener(window,"message",f),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",f);k=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+
+Editor.prototype.editAsNew=function(b,c){var e=null!=c?"?title="+encodeURIComponent(c):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,g=mxUtils.bind(this,function(c){"ready"==c.data&&c.source==k&&(mxEvent.removeListener(window,"message",g),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",g);k=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+
"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,c){var e=new Graph(null,c,null,null,b);e.transparentBackground=!1;this.chromeless||(e.isBlankLink=function(b){return!this.isExternalProtocol(b)});return e};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
@@ -2041,105 +2048,101 @@ Editor.prototype.getGraphXml=function(b){b=(null!=b?b:1)?(new mxCodec(mxUtils.cr
this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width);
b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(b){this.modified=b};
Editor.prototype.setFilename=function(b){this.filename=b};
-Editor.prototype.createUndoManager=function(){var b=this.graph,c=new mxUndoManager;this.undoListener=function(b,e){c.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(b,c){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,e);b.getView().addListener(mxEvent.UNDO,e);e=function(c,e){var f=b.getSelectionCellsForChanges(e.getProperty("edit").changes,function(b){return!(b instanceof mxChildChange)});if(0<f.length){b.getModel();for(var k=[],d=0;d<
-f.length;d++)null!=b.view.getState(f[d])&&k.push(f[d]);b.setSelectionCells(k)}};c.addListener(mxEvent.UNDO,e);c.addListener(mxEvent.REDO,e);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};
+Editor.prototype.createUndoManager=function(){var b=this.graph,c=new mxUndoManager;this.undoListener=function(b,e){c.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(b,c){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,e);b.getView().addListener(mxEvent.UNDO,e);e=function(c,e){var g=b.getSelectionCellsForChanges(e.getProperty("edit").changes,function(b){return!(b instanceof mxChildChange)});if(0<g.length){b.getModel();for(var k=[],d=0;d<
+g.length;d++)null!=b.view.getState(g[d])&&k.push(g[d]);b.setSelectionCells(k)}};c.addListener(mxEvent.UNDO,e);c.addListener(mxEvent.REDO,e);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,c,e,k,f,n,t,d,g,l,q){var p=g?57:0,m=e,v=k,u=g?0:64,B=mxUtils.getDocumentSize();null!=window.innerHeight&&(B.height=window.innerHeight);var x=B.height,E=Math.max(1,Math.round((B.width-e-u)/2)),A=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-u):e;k=Math.min(k,x-u);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",
-this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));B=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=B.x+"px";this.bg.style.top=B.y+"px";E+=B.x;A+=B.y;f&&document.body.appendChild(this.bg);var F=b.createDiv(g?"geTransDialog":"geDialog");f=this.getPosition(E,A,e,k);E=f.x;A=f.y;F.style.width=e+"px";F.style.height=k+"px";F.style.left=E+"px";F.style.top=A+"px";F.style.zIndex=
-this.zIndex;F.appendChild(c);document.body.appendChild(F);!d&&c.clientHeight>F.clientHeight-u&&(c.style.overflowY="auto");if(n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",n.style.top=A+14+"px",n.style.left=E+e+38-p+"px",n.style.zIndex=this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=n,!q)){var I=!1;
-mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){I=!0}),null,mxUtils.bind(this,function(d){I&&(b.hideDialog(!0),I=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var g=l();null!=g&&(m=e=g.w,v=k=g.h)}g=mxUtils.getDocumentSize();x=g.height;this.bg.style.height=x+"px";E=Math.max(1,Math.round((g.width-e-u)/2));A=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(m,document.body.scrollWidth-u):m;k=Math.min(v,x-u);g=this.getPosition(E,A,e,
-k);E=g.x;A=g.y;F.style.left=E+"px";F.style.top=A+"px";F.style.width=e+"px";F.style.height=k+"px";!d&&c.clientHeight>F.clientHeight-u&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=A+14+"px",this.dialogImg.style.left=E+e+38-p+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=F;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,c,e,k,g,p,t,d,f,l,m){var q=f?57:0,n=e,v=k,u=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,H=Math.max(1,Math.round((y.width-e-u)/2)),D=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-u):e;k=Math.min(k,x-u);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",
+this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));y=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=y.x+"px";this.bg.style.top=y.y+"px";H+=y.x;D+=y.y;g&&document.body.appendChild(this.bg);var E=b.createDiv(f?"geTransDialog":"geDialog");g=this.getPosition(H,D,e,k);H=g.x;D=g.y;E.style.width=e+"px";E.style.height=k+"px";E.style.left=H+"px";E.style.top=D+"px";E.style.zIndex=
+this.zIndex;E.appendChild(c);document.body.appendChild(E);!d&&c.clientHeight>E.clientHeight-u&&(c.style.overflowY="auto");if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=D+14+"px",p.style.left=H+e+38-q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!m)){var J=!1;
+mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){J=!0}),null,mxUtils.bind(this,function(d){J&&(b.hideDialog(!0),J=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(n=e=f.w,v=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";H=Math.max(1,Math.round((f.width-e-u)/2));D=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(n,document.body.scrollWidth-u):n;k=Math.min(v,x-u);f=this.getPosition(H,D,e,
+k);H=f.x;D=f.y;E.style.left=H+"px";E.style.top=D+"px";E.style.width=e+"px";E.style.height=k+"px";!d&&c.clientHeight>E.clientHeight-u&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=D+14+"px",this.dialogImg.style.left=H+e+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=E;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":
IMAGE_PATH+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
-"/clear.gif";
-Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCODExNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCODIxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3RjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI4MDE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvqMCFYAAAAVUExURZmZmb+/v7KysqysrMzMzLGxsf///4g8N1cAAAAHdFJOU////////wAaSwNGAAAAPElEQVR42lTMQQ4AIQgEwUa0//9kTQirOweYOgDqAMbZUr10AGlAwx4/BJ2QJ4U0L5brYjovvpv32xZgAHZaATFtMbu4AAAAAElFTkSuQmCC":IMAGE_PATH+
-"/locked.png";
-Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
-"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,c){return new mxPoint(b,c)};Dialog.prototype.close=function(b,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,c,e,k,f,n,t,d,g,l,q){g=null!=g?g:!0;var p=document.createElement("div");p.style.textAlign="center";if(null!=c){var m=document.createElement("div");m.style.padding="0px";m.style.margin="0px";m.style.fontSize="18px";m.style.paddingBottom="16px";m.style.marginBottom="10px";m.style.borderBottom="1px solid #c0c0c0";m.style.color="gray";m.style.whiteSpace="nowrap";m.style.textOverflow="ellipsis";m.style.overflow="hidden";mxUtils.write(m,c);m.setAttribute("title",c);p.appendChild(m)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;p.appendChild(c);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=n&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();n()}),c.className="geBtn",e.appendChild(c),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=q&&q()}),l.className="geBtn",e.appendChild(l));var v=mxUtils.button(k,function(){g&&b.hideDialog();null!=f&&f()});
-v.className="geBtn";e.appendChild(v);null!=t&&(k=mxUtils.button(t,function(){g&&b.hideDialog();null!=d&&d()}),k.className="geBtn gePrimaryBtn",e.appendChild(k));this.init=function(){v.focus()};p.appendChild(e);this.container=p},PrintDialog=function(b,c){this.create(b,c)};
-PrintDialog.prototype.create=function(b){function c(b){var g=d.checked||l.checked,c=parseInt(p.value)/100;isNaN(c)&&(c=1,p.value="100%");var c=.75*c,f=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/e.pageScale;if(g){var m=d.checked?1:parseInt(q.value);isNaN(m)||(k=mxUtils.getScaleForPageCount(m,e,f))}e.getGraphBounds();var n=m=0,f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width*c);f.height=Math.ceil(f.height*c);k*=c;!g&&e.pageVisible?(c=e.getPageLayout(),m-=c.x*f.width,n-=c.y*f.height):
-g=!0;g=PrintDialog.createPrintPreview(e,k,f,0,m,n,g);g.open();b&&PrintDialog.printPreview(g)}var e=b.editor.graph,k,f,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var t=document.createElement("tbody");k=document.createElement("tr");var d=document.createElement("input");d.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(d);var g=document.createElement("span");mxUtils.write(g," "+mxResources.get("fitPage"));
-f.appendChild(g);mxEvent.addListener(g,"click",function(b){d.checked=!d.checked;l.checked=!d.checked;mxEvent.consume(b)});mxEvent.addListener(d,"change",function(){l.checked=!d.checked});k.appendChild(f);t.appendChild(k);k=k.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(l);g=document.createElement("span");mxUtils.write(g," "+mxResources.get("posterPrint")+":");f.appendChild(g);mxEvent.addListener(g,
-"click",function(b){l.checked=!l.checked;d.checked=!l.checked;mxEvent.consume(b)});k.appendChild(f);var q=document.createElement("input");q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.setAttribute("size","4");q.setAttribute("disabled","disabled");q.style.width="50px";f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(q);mxUtils.write(f," "+mxResources.get("pages")+" (max)");k.appendChild(f);t.appendChild(k);mxEvent.addListener(l,"change",
-function(){l.checked?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled");d.checked=!l.checked});k=k.cloneNode(!1);f=document.createElement("td");mxUtils.write(f,mxResources.get("pageScale")+":");k.appendChild(f);f=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";f.appendChild(p);k.appendChild(f);t.appendChild(k);k=document.createElement("tr");f=document.createElement("td");f.colSpan=2;
-f.style.paddingTop="20px";f.setAttribute("align","right");g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";b.editor.cancelFirst&&f.appendChild(g);if(PrintDialog.previewEnabled){var m=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)});m.className="geBtn";f.appendChild(m)}m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});m.className="geBtn gePrimaryBtn";f.appendChild(m);b.editor.cancelFirst||
-f.appendChild(g);k.appendChild(f);t.appendChild(k);n.appendChild(t);this.container=n};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var c=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(e){}};
-PrintDialog.createPrintPreview=function(b,c,e,k,f,n,t){c=new mxPrintPreview(b,c,e,k,f,n);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=t;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";c.backgroundColor=b;var d=c.writeHead;c.writeHead=function(b){d.apply(this,arguments);b.writeln('<style type="text/css">');b.writeln("@media screen {");b.writeln(" body > div { padding:30px;box-sizing:content-box; }");b.writeln("}");b.writeln("</style>")};return c};
+"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,c){return new mxPoint(b,c)};Dialog.prototype.close=function(b,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
+var ErrorDialog=function(b,c,e,k,g,p,t,d,f,l,m){f=null!=f?f:!0;var q=document.createElement("div");q.style.textAlign="center";if(null!=c){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="10px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";n.style.whiteSpace="nowrap";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxUtils.write(n,c);n.setAttribute("title",c);q.appendChild(n)}c=
+document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;q.appendChild(c);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=p&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),c.className="geBtn",e.appendChild(c),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",e.appendChild(l));var v=mxUtils.button(k,function(){f&&b.hideDialog();null!=g&&g()});
+v.className="geBtn";e.appendChild(v);null!=t&&(k=mxUtils.button(t,function(){f&&b.hideDialog();null!=d&&d()}),k.className="geBtn gePrimaryBtn",e.appendChild(k));this.init=function(){v.focus()};q.appendChild(e);this.container=q},PrintDialog=function(b,c){this.create(b,c)};
+PrintDialog.prototype.create=function(b){function c(b){var f=d.checked||l.checked,c=parseInt(q.value)/100;isNaN(c)&&(c=1,q.value="100%");var c=.75*c,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/e.pageScale;if(f){var n=d.checked?1:parseInt(m.value);isNaN(n)||(k=mxUtils.getScaleForPageCount(n,e,g))}e.getGraphBounds();var p=n=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*c);g.height=Math.ceil(g.height*c);k*=c;!f&&e.pageVisible?(c=e.getPageLayout(),n-=c.x*g.width,p-=c.y*g.height):
+f=!0;f=PrintDialog.createPrintPreview(e,k,g,0,n,p,f);f.open();b&&PrintDialog.printPreview(f)}var e=b.editor.graph,k,g,p=document.createElement("table");p.style.width="100%";p.style.height="100%";var t=document.createElement("tbody");k=document.createElement("tr");var d=document.createElement("input");d.setAttribute("type","checkbox");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";g.appendChild(d);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage"));
+g.appendChild(f);mxEvent.addListener(f,"click",function(b){d.checked=!d.checked;l.checked=!d.checked;mxEvent.consume(b)});mxEvent.addListener(d,"change",function(){l.checked=!d.checked});k.appendChild(g);t.appendChild(k);k=k.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(l);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");g.appendChild(f);mxEvent.addListener(f,
+"click",function(b){l.checked=!l.checked;d.checked=!l.checked;mxEvent.consume(b)});k.appendChild(g);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(m);mxUtils.write(g," "+mxResources.get("pages")+" (max)");k.appendChild(g);t.appendChild(k);mxEvent.addListener(l,"change",
+function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");d.checked=!l.checked});k=k.cloneNode(!1);g=document.createElement("td");mxUtils.write(g,mxResources.get("pageScale")+":");k.appendChild(g);g=document.createElement("td");var q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";g.appendChild(q);k.appendChild(g);t.appendChild(k);k=document.createElement("tr");g=document.createElement("td");g.colSpan=2;
+g.style.paddingTop="20px";g.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&g.appendChild(f);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)});n.className="geBtn";g.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});n.className="geBtn gePrimaryBtn";g.appendChild(n);b.editor.cancelFirst||
+g.appendChild(f);k.appendChild(g);t.appendChild(k);p.appendChild(t);this.container=p};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var c=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(e){}};
+PrintDialog.createPrintPreview=function(b,c,e,k,g,p,t){c=new mxPrintPreview(b,c,e,k,g,p);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=t;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";c.backgroundColor=b;var d=c.writeHead;c.writeHead=function(b){d.apply(this,arguments);b.writeln('<style type="text/css">');b.writeln("@media screen {");b.writeln(" body > div { padding:30px;box-sizing:content-box; }");b.writeln("}");b.writeln("</style>")};return c};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function c(){null==q||q==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=q,l.style.backgroundImage="")}function e(){var d=u;null!=d&&Graph.isPageLink(d.src)&&(d=b.createImageForPageLink(d.src,null));null!=d&&null!=d.src?(v.setAttribute("src",d.src),v.style.display=""):(v.removeAttribute("src"),v.style.display="none")}var k=b.editor.graph,f,n,t=document.createElement("table");t.style.width=
-"100%";t.style.height="100%";var d=document.createElement("tbody");f=document.createElement("tr");n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");f.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var g=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",k.pageFormat);f.appendChild(n);d.appendChild(f);f=document.createElement("tr");n=document.createElement("td");
-mxUtils.write(n,mxResources.get("background")+":");f.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="22px";l.style.height="22px";l.style.cursor="pointer";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(l.style.position="relative",l.style.top="-6px");var q=k.background;c();mxEvent.addListener(l,
-"click",function(d){b.pickColor(q||"none",function(b){q=b;c()});mxEvent.consume(d)});n.appendChild(l);mxUtils.write(n,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=k.getGridSize();n.appendChild(p);mxEvent.addListener(p,"change",function(){var b=parseInt(p.value);p.value=Math.max(1,isNaN(b)?k.getGridSize():b)});f.appendChild(n);d.appendChild(f);f=document.createElement("tr");
-n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");f.appendChild(n);n=document.createElement("td");var m=document.createElement("button");m.className="geBtn";m.style.margin="0px";mxUtils.write(m,mxResources.get("change")+"...");var v=document.createElement("img");v.setAttribute("valign","middle");v.style.verticalAlign="middle";v.style.border="1px solid lightGray";v.style.borderRadius="4px";v.style.marginRight="14px";v.style.maxWidth="100px";v.style.cursor="pointer";v.style.height=
-"60px";v.style.padding="4px";var u=k.backgroundImage,B=function(d){b.showBackgroundImageDialog(function(b,d){d||(u=b,e())},u);mxEvent.consume(d)};mxEvent.addListener(m,"click",B);mxEvent.addListener(v,"click",B);e();n.appendChild(v);n.appendChild(m);f.appendChild(n);d.appendChild(f);f=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";
-b.editor.cancelFirst&&n.appendChild(m);B=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var d=parseInt(p.value);isNaN(d)||k.gridSize===d||k.setGridSize(d);d=new ChangePageSetup(b,q,u,g.get());d.ignoreColor=k.background==q;d.ignoreImage=(null!=k.backgroundImage?k.backgroundImage.src:null)===(null!=u?u.src:null);k.pageFormat.width==d.previousFormat.width&&k.pageFormat.height==d.previousFormat.height&&d.ignoreColor&&d.ignoreImage||k.model.execute(d)});B.className="geBtn gePrimaryBtn";
-n.appendChild(B);b.editor.cancelFirst||n.appendChild(m);f.appendChild(n);d.appendChild(f);t.appendChild(d);this.container=t};
-PageSetupDialog.addPageFormatPanel=function(b,c,e,k){function f(b,c,l){if(l||p!=document.activeElement&&m!=document.activeElement){b=!1;for(c=0;c<u.length;c++)l=u[c],A?"custom"==l.key&&(d.value=l.key,A=!1):null!=l.format&&("a4"==l.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==l.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==l.format.width&&
-e.height==l.format.height?(d.value=l.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,b=!0):e.width==l.format.height&&e.height==l.format.width&&(d.value=l.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,b=t.checked=!0));b?(g.style.display="",q.style.display="none"):(p.value=e.width/100,m.value=e.height/100,n.setAttribute("checked","checked"),
-d.value="custom",g.style.display="none",q.style.display="")}}c="format-"+c;var n=document.createElement("input");n.setAttribute("name",c);n.setAttribute("type","radio");n.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",c);t.setAttribute("type","radio");t.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.width="202px";var g=document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";
-g.style.height="24px";n.style.marginRight="6px";g.appendChild(n);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));g.appendChild(c);t.style.marginLeft="10px";t.style.marginRight="6px";g.appendChild(t);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));g.appendChild(l);var q=document.createElement("div");q.style.marginLeft="4px";q.style.width="210px";q.style.height="24px";var p=document.createElement("input");
-p.setAttribute("size","7");p.style.textAlign="right";q.appendChild(p);mxUtils.write(q," in x ");var m=document.createElement("input");m.setAttribute("size","7");m.style.textAlign="right";q.appendChild(m);mxUtils.write(q," in");g.style.display="none";q.style.display="none";for(var v={},u=PageSetupDialog.getFormats(),B=0;B<u.length;B++){var x=u[B];v[x.key]=x;var E=document.createElement("option");E.setAttribute("value",x.key);mxUtils.write(E,x.title);d.appendChild(E)}var A=!1;f();b.appendChild(d);mxUtils.br(b);
-b.appendChild(g);b.appendChild(q);var F=e,I=function(b,c){var l=v[d.value];null!=l.format?(p.value=l.format.width/100,m.value=l.format.height/100,q.style.display="none",g.style.display=""):(g.style.display="none",q.style.display="");l=parseFloat(p.value);if(isNaN(l)||0>=l)p.value=e.width/100;l=parseFloat(m.value);if(isNaN(l)||0>=l)m.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),Math.floor(100*parseFloat(m.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,
-l.height,l.width));c&&A||l.width==F.width&&l.height==F.height||(F=l,null!=k&&k(F))};mxEvent.addListener(c,"click",function(b){n.checked=!0;I(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;I(b);mxEvent.consume(b)});mxEvent.addListener(p,"blur",I);mxEvent.addListener(p,"click",I);mxEvent.addListener(m,"blur",I);mxEvent.addListener(m,"click",I);mxEvent.addListener(t,"change",I);mxEvent.addListener(n,"change",I);mxEvent.addListener(d,"change",function(b){A="custom"==d.value;
-I(b,!0)});I();return{set:function(b){e=b;f(null,null,!0)},get:function(){return F},widthInput:p,heightInput:m}};
+var PageSetupDialog=function(b){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function e(){var d=u;null!=d&&Graph.isPageLink(d.src)&&(d=b.createImageForPageLink(d.src,null));null!=d&&null!=d.src?(v.setAttribute("src",d.src),v.style.display=""):(v.removeAttribute("src"),v.style.display="none")}var k=b.editor.graph,g,p,t=document.createElement("table");t.style.width=
+"100%";t.style.height="100%";var d=document.createElement("tbody");g=document.createElement("tr");p=document.createElement("td");p.style.verticalAlign="top";p.style.fontSize="10pt";mxUtils.write(p,mxResources.get("paperSize")+":");g.appendChild(p);p=document.createElement("td");p.style.verticalAlign="top";p.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(p,"pagesetupdialog",k.pageFormat);g.appendChild(p);d.appendChild(g);g=document.createElement("tr");p=document.createElement("td");
+mxUtils.write(p,mxResources.get("background")+":");g.appendChild(p);p=document.createElement("td");p.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="22px";l.style.height="22px";l.style.cursor="pointer";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(l.style.position="relative",l.style.top="-6px");var m=k.background;c();mxEvent.addListener(l,
+"click",function(d){b.pickColor(m||"none",function(b){m=b;c()});mxEvent.consume(d)});p.appendChild(l);mxUtils.write(p,mxResources.get("gridSize")+":");var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.style.width="40px";q.style.marginLeft="6px";q.value=k.getGridSize();p.appendChild(q);mxEvent.addListener(q,"change",function(){var b=parseInt(q.value);q.value=Math.max(1,isNaN(b)?k.getGridSize():b)});g.appendChild(p);d.appendChild(g);g=document.createElement("tr");
+p=document.createElement("td");mxUtils.write(p,mxResources.get("image")+":");g.appendChild(p);p=document.createElement("td");var n=document.createElement("button");n.className="geBtn";n.style.margin="0px";mxUtils.write(n,mxResources.get("change")+"...");var v=document.createElement("img");v.setAttribute("valign","middle");v.style.verticalAlign="middle";v.style.border="1px solid lightGray";v.style.borderRadius="4px";v.style.marginRight="14px";v.style.maxWidth="100px";v.style.cursor="pointer";v.style.height=
+"60px";v.style.padding="4px";var u=k.backgroundImage,y=function(d){b.showBackgroundImageDialog(function(b,d){d||(u=b,e())},u);mxEvent.consume(d)};mxEvent.addListener(n,"click",y);mxEvent.addListener(v,"click",y);e();p.appendChild(v);p.appendChild(n);g.appendChild(p);d.appendChild(g);g=document.createElement("tr");p=document.createElement("td");p.colSpan=2;p.style.paddingTop="16px";p.setAttribute("align","right");n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";
+b.editor.cancelFirst&&p.appendChild(n);y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var d=parseInt(q.value);isNaN(d)||k.gridSize===d||k.setGridSize(d);d=new ChangePageSetup(b,m,u,f.get());d.ignoreColor=k.background==m;d.ignoreImage=(null!=k.backgroundImage?k.backgroundImage.src:null)===(null!=u?u.src:null);k.pageFormat.width==d.previousFormat.width&&k.pageFormat.height==d.previousFormat.height&&d.ignoreColor&&d.ignoreImage||k.model.execute(d)});y.className="geBtn gePrimaryBtn";
+p.appendChild(y);b.editor.cancelFirst||p.appendChild(n);g.appendChild(p);d.appendChild(g);t.appendChild(d);this.container=t};
+PageSetupDialog.addPageFormatPanel=function(b,c,e,k){function g(b,c,l){if(l||q!=document.activeElement&&n!=document.activeElement){b=!1;for(c=0;c<u.length;c++)l=u[c],D?"custom"==l.key&&(d.value=l.key,D=!1):null!=l.format&&("a4"==l.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==l.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==l.format.width&&
+e.height==l.format.height?(d.value=l.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,b=!0):e.width==l.format.height&&e.height==l.format.width&&(d.value=l.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,b=t.checked=!0));b?(f.style.display="",m.style.display="none"):(q.value=e.width/100,n.value=e.height/100,p.setAttribute("checked","checked"),
+d.value="custom",f.style.display="none",m.style.display="")}}c="format-"+c;var p=document.createElement("input");p.setAttribute("name",c);p.setAttribute("type","radio");p.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",c);t.setAttribute("type","radio");t.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.width="202px";var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";
+f.style.height="24px";p.style.marginRight="6px";f.appendChild(p);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));f.appendChild(c);t.style.marginLeft="10px";t.style.marginRight="6px";f.appendChild(t);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));f.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var q=document.createElement("input");
+q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var v={},u=PageSetupDialog.getFormats(),y=0;y<u.length;y++){var x=u[y];v[x.key]=x;var H=document.createElement("option");H.setAttribute("value",x.key);mxUtils.write(H,x.title);d.appendChild(H)}var D=!1;g();b.appendChild(d);mxUtils.br(b);
+b.appendChild(f);b.appendChild(m);var E=e,J=function(b,c){var l=v[d.value];null!=l.format?(q.value=l.format.width/100,n.value=l.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");l=parseFloat(q.value);if(isNaN(l)||0>=l)q.value=e.width/100;l=parseFloat(n.value);if(isNaN(l)||0>=l)n.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),Math.floor(100*parseFloat(n.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,
+l.height,l.width));c&&D||l.width==E.width&&l.height==E.height||(E=l,null!=k&&k(E))};mxEvent.addListener(c,"click",function(b){p.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(q,"blur",J);mxEvent.addListener(q,"click",J);mxEvent.addListener(n,"blur",J);mxEvent.addListener(n,"click",J);mxEvent.addListener(t,"change",J);mxEvent.addListener(p,"change",J);mxEvent.addListener(d,"change",function(b){D="custom"==d.value;
+J(b,!0)});J();return{set:function(b){e=b;g(null,null,!0)},get:function(){return E},widthInput:q,heightInput:n}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,c,e,k,f,n,t,d,g,l,q,p){g=null!=g?g:!0;var m,v,u=document.createElement("table"),B=document.createElement("tbody");u.style.position="absolute";u.style.top="30px";u.style.left="20px";m=document.createElement("tr");v=document.createElement("td");v.style.textOverflow="ellipsis";v.style.textAlign="right";v.style.maxWidth="100px";v.style.fontSize="10pt";v.style.width="84px";mxUtils.write(v,(f||mxResources.get("filename"))+":");m.appendChild(v);var x=document.createElement("input");
-x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=p?p+"px":"180px";var E=mxUtils.button(e,function(){if(null==n||n(x.value))g&&b.hideDialog(),k(x.value)});E.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=u.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
-"",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),E.click());b.stopPropagation();
-b.preventDefault()}))}}};v=document.createElement("td");v.style.whiteSpace="nowrap";v.appendChild(x);m.appendChild(v);if(null!=f||null==t)B.appendChild(m),null!=q&&(v.appendChild(FilenameDialog.createTypeHint(b,x,q)),null!=b.editor.diagramFileTypes&&(m=document.createElement("tr"),v=document.createElement("td"),v.style.textOverflow="ellipsis",v.style.textAlign="right",v.style.maxWidth="100px",v.style.fontSize="10pt",v.style.width="84px",mxUtils.write(v,mxResources.get("type")+":"),m.appendChild(v),
-v=document.createElement("td"),v.style.whiteSpace="nowrap",m.appendChild(v),c=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",v.appendChild(c),x.style.width=null!=p?p-40+"px":"190px",m.appendChild(v),B.appendChild(m)));null!=t&&(m=document.createElement("tr"),v=document.createElement("td"),v.colSpan=2,v.appendChild(t),m.appendChild(v),B.appendChild(m));m=document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop=
-null!=q?"12px":"20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});q.className="geBtn";b.editor.cancelFirst&&v.appendChild(q);null!=d&&(p=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),p.className="geBtn",v.appendChild(p));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&E.click()});v.appendChild(E);b.editor.cancelFirst||v.appendChild(q);m.appendChild(v);B.appendChild(m);
-u.appendChild(B);this.container=u};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(b,c,e){var k=document.createElement("img");k.style.backgroundPosition="center bottom";k.style.backgroundRepeat="no-repeat";k.style.margin="2px 0 0 4px";k.style.verticalAlign="top";k.style.cursor="pointer";k.style.height="16px";k.style.width="16px";mxUtils.setOpacity(k,70);var f=function(){k.setAttribute("src",Editor.helpImage);k.setAttribute("title",mxResources.get("help"));for(var b=0;b<e.length;b++)if(0<e[b].ext.length&&c.value.toLowerCase().substring(c.value.length-
-e[b].ext.length-1)=="."+e[b].ext){k.setAttribute("title",mxResources.get(e[b].title));break}};mxEvent.addListener(c,"keyup",f);mxEvent.addListener(c,"change",f);mxEvent.addListener(k,"click",function(c){var e=k.getAttribute("title");k.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=e&&b.showError(null,e,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(c)});
-f();return k};
-FilenameDialog.createFileTypes=function(b,c,e){var k=document.createElement("select");for(b=0;b<e.length;b++){var f=document.createElement("option");f.setAttribute("value",b);mxUtils.write(f,mxResources.get(e[b].description)+" (."+e[b].extension+")");k.appendChild(f)}mxEvent.addListener(k,"change",function(b){b=e[k.value].extension;var f=c.value.lastIndexOf(".drawio."),f=0<f?f:c.value.lastIndexOf(".");"drawio"!=b&&(b="drawio."+b);c.value=0<f?c.value.substring(0,f+1)+b:c.value+"."+b;"createEvent"in
-document?(b=document.createEvent("HTMLEvents"),b.initEvent("change",!1,!0),c.dispatchEvent(b)):c.fireEvent("onchange")});b=function(b){b=c.value.toLowerCase();for(var f=0,d=0;d<e.length;d++){var g=e[d].extension,l=null;"drawio"!=g&&(l=g,g=".drawio."+g);if(b.substring(b.length-g.length-1)=="."+g||null!=l&&b.substring(b.length-l.length-1)=="."+l){f=d;break}}k.value=f};mxEvent.addListener(c,"change",b);mxEvent.addListener(c,"keyup",b);b();return k};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var b=this.graph;if(null!=b.container&&!b.transparentBackground){if(b.pageVisible){var d=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var g=b.container.firstChild;null!=g&&g.nodeType!=mxConstants.NODETYPE_ELEMENT;)g=g.nextSibling;null!=g&&(this.backgroundPageShape=this.createBackgroundPageShape(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
-this.backgroundPageShape.init(b.container),g.style.position="absolute",b.container.insertBefore(this.backgroundPageShape.node,g),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){b.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!=
+var FilenameDialog=function(b,c,e,k,g,p,t,d,f,l,m,q){f=null!=f?f:!0;var n,v,u=document.createElement("table"),y=document.createElement("tbody");u.style.position="absolute";u.style.top="30px";u.style.left="20px";n=document.createElement("tr");v=document.createElement("td");v.style.textOverflow="ellipsis";v.style.textAlign="right";v.style.maxWidth="100px";v.style.fontSize="10pt";v.style.width="84px";mxUtils.write(v,(g||mxResources.get("filename"))+":");n.appendChild(v);var x=document.createElement("input");
+x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=q?q+"px":"180px";var H=mxUtils.button(e,function(){if(null==p||p(x.value))f&&b.hideDialog(),k(x.value)});H.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=u.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
+"",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),H.click());b.stopPropagation();
+b.preventDefault()}))}}};v=document.createElement("td");v.style.whiteSpace="nowrap";v.appendChild(x);n.appendChild(v);if(null!=g||null==t)y.appendChild(n),null!=m&&(v.appendChild(FilenameDialog.createTypeHint(b,x,m)),null!=b.editor.diagramFileTypes&&(n=document.createElement("tr"),v=document.createElement("td"),v.style.textOverflow="ellipsis",v.style.textAlign="right",v.style.maxWidth="100px",v.style.fontSize="10pt",v.style.width="84px",mxUtils.write(v,mxResources.get("type")+":"),n.appendChild(v),
+v=document.createElement("td"),v.style.whiteSpace="nowrap",n.appendChild(v),c=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",v.appendChild(c),x.style.width=null!=q?q-40+"px":"190px",n.appendChild(v),y.appendChild(n)));null!=t&&(n=document.createElement("tr"),v=document.createElement("td"),v.colSpan=2,v.appendChild(t),n.appendChild(v),y.appendChild(n));n=document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop=
+null!=m?"12px":"20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&v.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",v.appendChild(q));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&H.click()});v.appendChild(H);b.editor.cancelFirst||v.appendChild(m);n.appendChild(v);y.appendChild(n);
+u.appendChild(y);this.container=u};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createTypeHint=function(b,c,e){var k=document.createElement("img");k.style.backgroundPosition="center bottom";k.style.backgroundRepeat="no-repeat";k.style.margin="2px 0 0 4px";k.style.verticalAlign="top";k.style.cursor="pointer";k.style.height="16px";k.style.width="16px";mxUtils.setOpacity(k,70);var g=function(){k.setAttribute("src",Editor.helpImage);k.setAttribute("title",mxResources.get("help"));for(var b=0;b<e.length;b++)if(0<e[b].ext.length&&c.value.toLowerCase().substring(c.value.length-
+e[b].ext.length-1)=="."+e[b].ext){k.setAttribute("title",mxResources.get(e[b].title));break}};mxEvent.addListener(c,"keyup",g);mxEvent.addListener(c,"change",g);mxEvent.addListener(k,"click",function(c){var e=k.getAttribute("title");k.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=e&&b.showError(null,e,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(c)});
+g();return k};
+FilenameDialog.createFileTypes=function(b,c,e){var k=document.createElement("select");for(b=0;b<e.length;b++){var g=document.createElement("option");g.setAttribute("value",b);mxUtils.write(g,mxResources.get(e[b].description)+" (."+e[b].extension+")");k.appendChild(g)}mxEvent.addListener(k,"change",function(b){b=e[k.value].extension;var g=c.value.lastIndexOf(".drawio."),g=0<g?g:c.value.lastIndexOf(".");"drawio"!=b&&(b="drawio."+b);c.value=0<g?c.value.substring(0,g+1)+b:c.value+"."+b;"createEvent"in
+document?(b=document.createEvent("HTMLEvents"),b.initEvent("change",!1,!0),c.dispatchEvent(b)):c.fireEvent("onchange")});b=function(b){b=c.value.toLowerCase();for(var g=0,d=0;d<e.length;d++){var f=e[d].extension,l=null;"drawio"!=f&&(l=f,f=".drawio."+f);if(b.substring(b.length-f.length-1)=="."+f||null!=l&&b.substring(b.length-l.length-1)=="."+l){g=d;break}}k.value=g};mxEvent.addListener(c,"change",b);mxEvent.addListener(c,"keyup",b);b();return k};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var b=this.graph;if(null!=b.container&&!b.transparentBackground){if(b.pageVisible){var d=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var f=b.container.firstChild;null!=f&&f.nodeType!=mxConstants.NODETYPE_ELEMENT;)f=f.nextSibling;null!=f&&(this.backgroundPageShape=this.createBackgroundPageShape(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+this.backgroundPageShape.init(b.container),f.style.position="absolute",b.container.insertBefore(this.backgroundPageShape.node,f),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){b.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!=
b.tooltipHandler&&b.tooltipHandler.isHideOnHover()&&b.tooltipHandler.hide();b.isMouseDown&&!mxEvent.isConsumed(d)&&b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=d,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var b=this.graph,d=null==b.background||b.background==mxConstants.NONE?b.defaultPageBackgroundColor:b.background,g=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",c="none",e="";if(b.isGridEnabled()||b.gridVisible){e=10;mxClient.IS_SVG?(c=unescape(encodeURIComponent(this.createSvgGrid(g))),c=window.btoa?btoa(c):Base64.encode(c,!0),c="url(data:image/svg+xml;base64,"+c+")",e=b.gridSize*this.scale*this.gridSteps):c="url("+this.gridImage+
-")";var f=g=0;null!=b.view.backgroundPageShape&&(f=this.getBackgroundPageBounds(),g=1+f.x,f=1+f.y);e=-Math.round(e-mxUtils.mod(this.translate.x*this.scale-g,e))+"px "+-Math.round(e-mxUtils.mod(this.translate.y*this.scale-f,e))+"px"}g=b.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);null!=b.view.backgroundPageShape?(b.view.backgroundPageShape.node.style.backgroundPosition=e,b.view.backgroundPageShape.node.style.backgroundImage=c,b.view.backgroundPageShape.node.style.backgroundColor=d,b.view.backgroundPageShape.node.style.borderColor=
-b.defaultPageBorderColor,b.container.className="geDiagramContainer geDiagramBackdrop",g.style.backgroundImage="none",g.style.backgroundColor=""):(b.container.className="geDiagramContainer",g.style.backgroundPosition=e,g.style.backgroundColor=d,g.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(b){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var g=this.gridSteps*d,c=[],e=1;e<this.gridSteps;e++){var f=e*d;c.push("M 0 "+f+" L "+g+" "+f+" M "+f+" 0 L "+f+
-" "+g)}return'<svg width="'+g+'" height="'+g+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+g+'" height="'+g+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+b+'" opacity="0.2" stroke-width="1"/><path d="M '+g+" 0 L 0 0 0 "+g+'" fill="none" stroke="'+b+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,d){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var g=this.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+c,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+d,e))+"px";g.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(b,d,g){var c=this.view.scale,e=this.view.translate,f=this.pageFormat,k=c*this.pageScale,n=this.view.getBackgroundPageBounds();
-d=n.width;g=n.height;var u=new mxRectangle(c*e.x,c*e.y,f.width*k,f.height*k),t=(b=b&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(g/u.height)-1:0,x=b?Math.ceil(d/u.width)-1:0,E=n.x+d,A=n.y+g;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,g=0;g<=d;g++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),
-Math.round(n.y+(g+1)*u.height)),new mxPoint(Math.round(E),Math.round(n.y+(g+1)*u.height))]:[new mxPoint(Math.round(n.x+(g+1)*u.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(g+1)*u.width),Math.round(A))];null!=b[g]?(b[g].points=c,b[g].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[g]=c)}for(g=d;g<b.length;g++)b[g].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
-b(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(b,d,g){for(var e=0;e<d.length;e++){if(this.graph.isTableCell(d[e])||this.graph.isTableRow(d[e]))return!1;if(this.graph.getModel().isVertex(d[e])){var f=this.graph.getCellGeometry(d[e]);if(null!=f&&f.relative)return!1}}return c.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var b=
-e.apply(this,arguments);b.intersects=mxUtils.bind(this,function(d,g){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(b,arguments)});return b};mxGraphView.prototype.createBackgroundPageShape=function(b){return new mxRectangleShape(b,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var b=this.getGraphBounds(),d=0<b.width?b.x/this.scale-this.translate.x:0,g=0<b.height?b.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,
-e=this.graph.pageScale,f=c.width*e,c=c.height*e,e=Math.floor(Math.min(0,d)/f),k=Math.floor(Math.min(0,g)/c);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+k*c),this.scale*(Math.ceil(Math.max(1,d+b.width/this.scale)/f)-e)*f,this.scale*(Math.ceil(Math.max(1,g+b.height/this.scale)/c)-k)*c)};var k=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){k.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=b+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var f=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(b,d,g,c,e,k){var l=f.apply(this,arguments);null==k||k||mxEvent.addListener(l,"mousedown",function(b){mxEvent.consume(b)});return l};var n=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(b,d,g){var c,e=this.graph.model.getParent(b);if(d)c=this.graph.model.isEdge(b)?null:this.graph.getCellGeometry(b),c=!this.graph.model.isEdge(e)&&!this.graph.isSiblingSelected(b)&&(null!=c&&c.relative||!this.graph.isContainer(e)||this.graph.isPart(b));else if(c=n.apply(this,arguments),this.graph.isTableCell(b)||this.graph.isTableRow(b))c=e,this.graph.isTable(c)||(c=this.graph.model.getParent(c)),c=!this.graph.selectionCellsHandler.isHandled(c)||this.graph.isCellSelected(c)&&this.graph.isToggleEvent(g.getEvent())||
-this.graph.isCellSelected(b)&&!this.graph.isToggleEvent(g.getEvent())||this.graph.isTableCell(b)&&this.graph.isCellSelected(e);return c};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(b){b=b.getCell();for(var d=this.graph.getModel(),g=d.getParent(b),c=this.graph.view.getState(g),e=this.graph.isCellSelected(b);null!=c&&(d.isVertex(g)||d.isEdge(g));){var f=this.graph.isCellSelected(g),e=e||f;if(f||!e&&(this.graph.isTableCell(b)||this.graph.isTableRow(b)))b=g;g=d.getParent(g)}return b}})();EditorUi=function(b,c,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=c||document.body;var k=this.editor.graph;k.lightbox=e;this.initialDefaultVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);if(e){var f=k.getGraphBounds;k.getGraphBounds=function(b){var d=f.apply(this,arguments);b=this.backgroundImage;if(null!=b){var g=this.view.translate,c=this.view.scale;d.add(new mxRectangle((g.x+b.x)*c,
-(g.y+b.y)*c,b.width*c,b.height*c))}return d}}k.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,k.isEnabled=
-function(){return!1},k.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!k.standalone){var n="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),t="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");
-this.setDefaultStyle=function(b){try{var d=k.view.getState(b);if(null!=d){var g=b.clone();g.style="";var c=k.getCellStyle(g);b=[];var g=[],e;for(e in d.style)c[e]!=d.style[e]&&(b.push(d.style[e]),g.push(e));for(var l=k.getModel().getStyle(d.cell),f=null!=l?l.split(";"):[],l=0;l<f.length;l++){var q=f[l],m=q.indexOf("=");if(0<=m){e=q.substring(0,m);var p=q.substring(m+1);null!=c[e]&&"none"==p&&(b.push(p),g.push(e))}}k.getModel().isEdge(d.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
-"keys",g,"values",b,"cells",[d.cell]))}}catch(ma){this.handleError(ma)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var d=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<d.length;c++)0>mxUtils.indexOf(n,d[c])&&n.push(d[c]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
-l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(e=0;e<l[c].length;e++)n.push(l[c][e]);for(c=0;c<t.length;c++)0>mxUtils.indexOf(n,t[c])&&n.push(t[c]);var q=function(b,d,g,c,e,f,q){c=null!=c?c:k.currentVertexStyle;e=null!=e?e:k.currentEdgeStyle;g=null!=g?g:k.getModel();
-if(q){q=[];for(var m=0;m<b.length;m++)q=q.concat(g.getDescendants(b[m]));b=q}g.beginUpdate();try{for(m=0;m<b.length;m++){var G=b[m],p;if(d)p=["fontSize","fontFamily","fontColor"];else{var D=g.getStyle(G),y=null!=D?D.split(";"):[];p=n.slice();for(var u=0;u<y.length;u++){var v=y[u],x=v.indexOf("=");if(0<=x){var B=v.substring(0,x),A=mxUtils.indexOf(p,B);0<=A&&p.splice(A,1);for(q=0;q<l.length;q++){var M=l[q];if(0<=mxUtils.indexOf(M,B))for(var W=0;W<M.length;W++){var C=mxUtils.indexOf(p,M[W]);0<=C&&p.splice(C,
-1)}}}}}var F=g.isEdge(G);q=F?e:c;for(var I=g.getStyle(G),u=0;u<p.length;u++){var B=p[u],E=q[B];null!=E&&("shape"!=B||F)&&(!F||f||0>mxUtils.indexOf(t,B))&&(I=mxUtils.setStyle(I,B,E))}Editor.simpleLabels&&(I=mxUtils.setStyle(mxUtils.setStyle(I,"html",null),"whiteSpace",null));g.setStyle(G,I)}}finally{g.endUpdate()}};k.addListener("cellsInserted",function(b,d){q(d.getProperty("cells"))});k.addListener("textInserted",function(b,d){q(d.getProperty("cells"),!0)});this.insertHandler=q;this.createDivs();
-this.createUi();this.refresh();var p=mxUtils.bind(this,function(b){null==b&&(b=window.event);return k.isEditing()||null!=b&&this.isSelectionAllowed(b)});this.container==document.body&&(this.menubarContainer.onselectstart=p,this.menubarContainer.onmousedown=p,this.toolbarContainer.onselectstart=p,this.toolbarContainer.onmousedown=p,this.diagramContainer.onselectstart=p,this.diagramContainer.onmousedown=p,this.sidebarContainer.onselectstart=p,this.sidebarContainer.onmousedown=p,this.formatContainer.onselectstart=
-p,this.formatContainer.onmousedown=p,this.footerContainer.onselectstart=p,this.footerContainer.onmousedown=p,null!=this.tabContainer&&(this.tabContainer.onselectstart=p));!this.editor.chromeless||this.editor.editable?(c=function(b){if(null!=b){var d=mxEvent.getSource(b);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return p(b)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
-c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var m=k.graphHandler.start;k.graphHandler.start=function(){null!=K.hoverIcons&&K.hoverIcons.reset();m.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(b){var d=
+mxGraphView.prototype.validateBackgroundStyles=function(){var b=this.graph,d=null==b.background||b.background==mxConstants.NONE?b.defaultPageBackgroundColor:b.background,f=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",c="none",e="";if(b.isGridEnabled()||b.gridVisible){e=10;mxClient.IS_SVG?(c=unescape(encodeURIComponent(this.createSvgGrid(f))),c=window.btoa?btoa(c):Base64.encode(c,!0),c="url(data:image/svg+xml;base64,"+c+")",e=b.gridSize*this.scale*this.gridSteps):c="url("+this.gridImage+
+")";var g=f=0;null!=b.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),f=1+g.x,g=1+g.y);e=-Math.round(e-mxUtils.mod(this.translate.x*this.scale-f,e))+"px "+-Math.round(e-mxUtils.mod(this.translate.y*this.scale-g,e))+"px"}f=b.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=b.view.backgroundPageShape?(b.view.backgroundPageShape.node.style.backgroundPosition=e,b.view.backgroundPageShape.node.style.backgroundImage=c,b.view.backgroundPageShape.node.style.backgroundColor=d,b.view.backgroundPageShape.node.style.borderColor=
+b.defaultPageBorderColor,b.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(b.container.className="geDiagramContainer",f.style.backgroundPosition=e,f.style.backgroundColor=d,f.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(b){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,c=[],e=1;e<this.gridSteps;e++){var g=e*d;c.push("M 0 "+g+" L "+f+" "+g+" M "+g+" 0 L "+g+
+" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+b+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+b+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,d){b.apply(this,arguments);
+if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+c,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+d,e))+"px";f.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(b,d,f){var c=this.view.scale,e=this.view.translate,g=this.pageFormat,k=c*this.pageScale,p=this.view.getBackgroundPageBounds();
+d=p.width;f=p.height;var u=new mxRectangle(c*e.x,c*e.y,g.width*k,g.height*k),t=(b=b&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(f/u.height)-1:0,x=b?Math.ceil(d/u.width)-1:0,H=p.x+d,D=p.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,f=0;f<=d;f++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(p.x),
+Math.round(p.y+(f+1)*u.height)),new mxPoint(Math.round(H),Math.round(p.y+(f+1)*u.height))]:[new mxPoint(Math.round(p.x+(f+1)*u.width),Math.round(p.y)),new mxPoint(Math.round(p.x+(f+1)*u.width),Math.round(D))];null!=b[f]?(b[f].points=c,b[f].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[f]=c)}for(f=d;f<b.length;f++)b[f].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
+b(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(b,d,f){for(var e=0;e<d.length;e++){if(this.graph.isTableCell(d[e])||this.graph.isTableRow(d[e]))return!1;if(this.graph.getModel().isVertex(d[e])){var g=this.graph.getCellGeometry(d[e]);if(null!=g&&g.relative)return!1}}return c.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var b=
+e.apply(this,arguments);b.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(b,arguments)});return b};mxGraphView.prototype.createBackgroundPageShape=function(b){return new mxRectangleShape(b,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var b=this.getGraphBounds(),d=0<b.width?b.x/this.scale-this.translate.x:0,f=0<b.height?b.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,
+e=this.graph.pageScale,g=c.width*e,c=c.height*e,e=Math.floor(Math.min(0,d)/g),k=Math.floor(Math.min(0,f)/c);return new mxRectangle(this.scale*(this.translate.x+e*g),this.scale*(this.translate.y+k*c),this.scale*(Math.ceil(Math.max(1,d+b.width/this.scale)/g)-e)*g,this.scale*(Math.ceil(Math.max(1,f+b.height/this.scale)/c)-k)*c)};var k=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){k.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=b+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(b,d,f,c,e,k){var l=g.apply(this,arguments);null==k||k||mxEvent.addListener(l,"mousedown",function(b){mxEvent.consume(b)});return l};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(b,d,f){var c,e=this.graph.model.getParent(b);if(d)c=this.graph.model.isEdge(b)?null:this.graph.getCellGeometry(b),c=!this.graph.model.isEdge(e)&&!this.graph.isSiblingSelected(b)&&(null!=c&&c.relative||!this.graph.isContainer(e)||this.graph.isPart(b));else if(c=p.apply(this,arguments),this.graph.isTableCell(b)||this.graph.isTableRow(b))c=e,this.graph.isTable(c)||(c=this.graph.model.getParent(c)),c=!this.graph.selectionCellsHandler.isHandled(c)||this.graph.isCellSelected(c)&&this.graph.isToggleEvent(f.getEvent())||
+this.graph.isCellSelected(b)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(b)&&this.graph.isCellSelected(e);return c};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(b){b=b.getCell();for(var d=this.graph.getModel(),f=d.getParent(b),c=this.graph.view.getState(f),e=this.graph.isCellSelected(b);null!=c&&(d.isVertex(f)||d.isEdge(f));){var g=this.graph.isCellSelected(f),e=e||g;if(g||!e&&(this.graph.isTableCell(b)||this.graph.isTableRow(b)))b=f;f=d.getParent(f)}return b}})();EditorUi=function(b,c,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=c||document.body;var k=this.editor.graph;k.lightbox=e;this.initialDefaultVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);if(e){var g=k.getGraphBounds;k.getGraphBounds=function(b){var d=g.apply(this,arguments);b=this.backgroundImage;if(null!=b){var f=this.view.translate,c=this.view.scale;d.add(new mxRectangle((f.x+b.x)*c,
+(f.y+b.y)*c,b.width*c,b.height*c))}return d}}k.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,k.isEnabled=
+function(){return!1},k.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!k.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),t="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");
+this.setDefaultStyle=function(b){try{var d=k.view.getState(b);if(null!=d){var f=b.clone();f.style="";var c=k.getCellStyle(f);b=[];var f=[],e;for(e in d.style)c[e]!=d.style[e]&&(b.push(d.style[e]),f.push(e));for(var l=k.getModel().getStyle(d.cell),g=null!=l?l.split(";"):[],l=0;l<g.length;l++){var m=g[l],q=m.indexOf("=");if(0<=q){e=m.substring(0,q);var n=m.substring(q+1);null!=c[e]&&"none"==n&&(b.push(n),f.push(e))}}k.getModel().isEdge(d.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
+"keys",f,"values",b,"cells",[d.cell]))}}catch(na){this.handleError(na)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var d=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<d.length;c++)0>mxUtils.indexOf(p,d[c])&&p.push(d[c]);var f="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
+l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(e=0;e<l[c].length;e++)p.push(l[c][e]);for(c=0;c<t.length;c++)0>mxUtils.indexOf(p,t[c])&&p.push(t[c]);var m=function(b,d,f,c,e,g,m){c=null!=c?c:k.currentVertexStyle;e=null!=e?e:k.currentEdgeStyle;f=null!=f?f:k.getModel();
+if(m){m=[];for(var F=0;F<b.length;F++)m=m.concat(f.getDescendants(b[F]));b=m}f.beginUpdate();try{for(F=0;F<b.length;F++){var q=b[F],n;if(d)n=["fontSize","fontFamily","fontColor"];else{var B=f.getStyle(q),A=null!=B?B.split(";"):[];n=p.slice();for(var u=0;u<A.length;u++){var v=A[u],x=v.indexOf("=");if(0<=x){var y=v.substring(0,x),N=mxUtils.indexOf(n,y);0<=N&&n.splice(N,1);for(m=0;m<l.length;m++){var D=l[m];if(0<=mxUtils.indexOf(D,y))for(var W=0;W<D.length;W++){var C=mxUtils.indexOf(n,D[W]);0<=C&&n.splice(C,
+1)}}}}}var E=f.isEdge(q);m=E?e:c;for(var J=f.getStyle(q),u=0;u<n.length;u++){var y=n[u],H=m[y];null!=H&&("shape"!=y||E)&&(!E||g||0>mxUtils.indexOf(t,y))&&(J=mxUtils.setStyle(J,y,H))}Editor.simpleLabels&&(J=mxUtils.setStyle(mxUtils.setStyle(J,"html",null),"whiteSpace",null));f.setStyle(q,J)}}finally{f.endUpdate()}};k.addListener("cellsInserted",function(b,d){m(d.getProperty("cells"))});k.addListener("textInserted",function(b,d){m(d.getProperty("cells"),!0)});this.insertHandler=m;this.createDivs();
+this.createUi();this.refresh();var q=mxUtils.bind(this,function(b){null==b&&(b=window.event);return k.isEditing()||null!=b&&this.isSelectionAllowed(b)});this.container==document.body&&(this.menubarContainer.onselectstart=q,this.menubarContainer.onmousedown=q,this.toolbarContainer.onselectstart=q,this.toolbarContainer.onmousedown=q,this.diagramContainer.onselectstart=q,this.diagramContainer.onmousedown=q,this.sidebarContainer.onselectstart=q,this.sidebarContainer.onmousedown=q,this.formatContainer.onselectstart=
+q,this.formatContainer.onmousedown=q,this.footerContainer.onselectstart=q,this.footerContainer.onmousedown=q,null!=this.tabContainer&&(this.tabContainer.onselectstart=q));!this.editor.chromeless||this.editor.editable?(c=function(b){if(null!=b){var d=mxEvent.getSource(b);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return q(b)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
+c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var n=k.graphHandler.start;k.graphHandler.start=function(){null!=K.hoverIcons&&K.hoverIcons.reset();n.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(b){var d=
mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(b)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(b)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var v=!1,u=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(b,d){return v||u.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(b){32!=b.which||k.isEditing()?mxEvent.isConsumed(b)||
-27!=b.keyCode||this.hideDialog(null,!0):(v=!0,this.hoverIcons.reset(),k.container.style.cursor="move",k.isEditing()||mxEvent.getSource(b)!=k.container||mxEvent.consume(b))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(b){k.container.style.cursor="";v=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var B=k.panningHandler.isForcePanningEvent;k.panningHandler.isForcePanningEvent=function(b){return B.apply(this,arguments)||v||mxEvent.isMouseEvent(b.getEvent())&&
-(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var E=k.isZoomWheelEvent;k.isZoomWheelEvent=function(){return v||
-E.apply(this,arguments)};var A=!1,F=null,I=null,L=null,H=mxUtils.bind(this,function(){if(null!=this.toolbar&&A!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var g=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=g}b=this.toolbar.fontMenu;g=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);this.toolbar.fontMenu=
-F;this.toolbar.sizeMenu=I}A=k.cellEditor.isContentEditing();F=b;I=g;L=d}}),K=this,C=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){C.apply(this,arguments);H();if(k.cellEditor.isContentEditing()){var b=!1,d=function(){b||(b=!0,window.setTimeout(function(){var d=k.getSelectedEditingElement();null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=K.toolbar&&(K.toolbar.setFontName(Graph.stripQuotes(d.fontFamily)),K.toolbar.setFontSize(parseInt(d.fontSize))));b=!1},0))};mxEvent.addListener(k.cellEditor.textarea,
-"input",d);mxEvent.addListener(k.cellEditor.textarea,"touchend",d);mxEvent.addListener(k.cellEditor.textarea,"mouseup",d);mxEvent.addListener(k.cellEditor.textarea,"keyup",d);d()}};var N=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{N.apply(this,arguments),H()}catch(P){K.handleError(P)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(R){}var S=k.fireMouseEvent;
-k.fireMouseEvent=function(b,d,g){b==mxEvent.MOUSE_DOWN&&this.container.focus();S.apply(this,arguments)};k.popupMenuHandler.autoExpand=!0;null!=this.menus&&(k.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,d,g){this.menus.createPopupMenu(b,d,g)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){k.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};k.connectionHandler.addListener(mxEvent.CONNECT,function(b,
-d){var g=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(g.push(d.getProperty("terminal")),window.setTimeout(function(){null!=K.hoverIcons&&K.hoverIcons.update(k.view.getState(g[g.length-1]))},0));q(g)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,f=!1;if(0<e.length)for(var q=0;q<e.length&&(l=k.getModel().isVertex(e[q])||l,!(f=k.getModel().isEdge(e[q])||f)||!l);q++);else f=l=!0;for(var e=c.getProperty("keys"),m=c.getProperty("values"),
-q=0;q<e.length;q++){var p=0<=mxUtils.indexOf(d,e[q]);if("strokeColor"!=e[q]||null!=m[q]&&"none"!=m[q])if(0<=mxUtils.indexOf(t,e[q]))f||0<=mxUtils.indexOf(g,e[q])?null==m[q]?delete k.currentEdgeStyle[e[q]]:k.currentEdgeStyle[e[q]]=m[q]:l&&0<=mxUtils.indexOf(n,e[q])&&(null==m[q]?delete k.currentVertexStyle[e[q]]:k.currentVertexStyle[e[q]]=m[q]);else if(0<=mxUtils.indexOf(n,e[q])){if(l||p)null==m[q]?delete k.currentVertexStyle[e[q]]:k.currentVertexStyle[e[q]]=m[q];if(f||p||0<=mxUtils.indexOf(g,e[q]))null==
-m[q]?delete k.currentEdgeStyle[e[q]]:k.currentEdgeStyle[e[q]]=m[q]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||
+27!=b.keyCode||this.hideDialog(null,!0):(v=!0,this.hoverIcons.reset(),k.container.style.cursor="move",k.isEditing()||mxEvent.getSource(b)!=k.container||mxEvent.consume(b))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(b){k.container.style.cursor="";v=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=k.panningHandler.isForcePanningEvent;k.panningHandler.isForcePanningEvent=function(b){return y.apply(this,arguments)||v||mxEvent.isMouseEvent(b.getEvent())&&
+(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var H=k.isZoomWheelEvent;k.isZoomWheelEvent=function(){return v||
+H.apply(this,arguments)};var D=!1,E=null,J=null,L=null,G=mxUtils.bind(this,function(){if(null!=this.toolbar&&D!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var f=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=f}b=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);this.toolbar.fontMenu=
+E;this.toolbar.sizeMenu=J}D=k.cellEditor.isContentEditing();E=b;J=f;L=d}}),K=this,C=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){C.apply(this,arguments);G();if(k.cellEditor.isContentEditing()){var b=!1,d=function(){b||(b=!0,window.setTimeout(function(){var d=k.getSelectedEditingElement();null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=K.toolbar&&(K.toolbar.setFontName(Graph.stripQuotes(d.fontFamily)),K.toolbar.setFontSize(parseInt(d.fontSize))));b=!1},0))};mxEvent.addListener(k.cellEditor.textarea,
+"input",d);mxEvent.addListener(k.cellEditor.textarea,"touchend",d);mxEvent.addListener(k.cellEditor.textarea,"mouseup",d);mxEvent.addListener(k.cellEditor.textarea,"keyup",d);d()}};var M=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{M.apply(this,arguments),G()}catch(R){K.handleError(R)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(S){}var P=k.fireMouseEvent;
+k.fireMouseEvent=function(b,d,f){b==mxEvent.MOUSE_DOWN&&this.container.focus();P.apply(this,arguments)};k.popupMenuHandler.autoExpand=!0;null!=this.menus&&(k.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,d,f){this.menus.createPopupMenu(b,d,f)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){k.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};k.connectionHandler.addListener(mxEvent.CONNECT,function(b,
+d){var f=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(f.push(d.getProperty("terminal")),window.setTimeout(function(){null!=K.hoverIcons&&K.hoverIcons.update(k.view.getState(f[f.length-1]))},0));m(f)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,g=!1;if(0<e.length)for(var m=0;m<e.length&&(l=k.getModel().isVertex(e[m])||l,!(g=k.getModel().isEdge(e[m])||g)||!l);m++);else g=l=!0;for(var e=c.getProperty("keys"),q=c.getProperty("values"),
+m=0;m<e.length;m++){var n=0<=mxUtils.indexOf(d,e[m]);if("strokeColor"!=e[m]||null!=q[m]&&"none"!=q[m])if(0<=mxUtils.indexOf(t,e[m]))g||0<=mxUtils.indexOf(f,e[m])?null==q[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=q[m]:l&&0<=mxUtils.indexOf(p,e[m])&&(null==q[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=q[m]);else if(0<=mxUtils.indexOf(p,e[m])){if(l||n)null==q[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=q[m];if(g||n||0<=mxUtils.indexOf(f,e[m]))null==
+q[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=q[m]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||
"none"==k.currentEdgeStyle.edgeStyle||null==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==k.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==k.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==k.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
-mxUtils.getValue(k.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(k.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var b=k.currentVertexStyle.fontFamily||"Helvetica",d=String(k.currentVertexStyle.fontSize||"12"),g=k.getView().getState(k.getSelectionCell());
-null!=g&&(b=g.style[mxConstants.STYLE_FONTFAMILY]||b,d=g.style[mxConstants.STYLE_FONTSIZE]||d,10<b.length&&(b=b.substring(0,8)+"..."));this.toolbar.setFontName(b);this.toolbar.setFontSize(d)}),k.getSelectionModel().addListener(mxEvent.CHANGE,b),k.getModel().addListener(mxEvent.CHANGE,b));k.addListener(mxEvent.CELLS_ADDED,function(b,d){var g=d.getProperty("cells"),c=d.getProperty("parent");k.getModel().isLayer(c)&&!k.isCellVisible(c)&&null!=g&&0<g.length&&k.getModel().setVisible(c,!0)});this.gestureHandler=
+mxUtils.getValue(k.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(k.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var b=k.currentVertexStyle.fontFamily||"Helvetica",d=String(k.currentVertexStyle.fontSize||"12"),f=k.getView().getState(k.getSelectionCell());
+null!=f&&(b=f.style[mxConstants.STYLE_FONTFAMILY]||b,d=f.style[mxConstants.STYLE_FONTSIZE]||d,10<b.length&&(b=b.substring(0,8)+"..."));this.toolbar.setFontName(b);this.toolbar.setFontSize(d)}),k.getSelectionModel().addListener(mxEvent.CHANGE,b),k.getModel().addListener(mxEvent.CHANGE,b));k.addListener(mxEvent.CELLS_ADDED,function(b,d){var f=d.getProperty("cells"),c=d.getProperty("parent");k.getModel().isLayer(c)&&!k.isCellVisible(c)&&null!=f&&0<f.length&&k.getModel().setVisible(c,!0)});this.gestureHandler=
mxUtils.bind(this,function(b){null!=this.currentMenu&&mxEvent.getSource(b)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",
this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){k.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){k.view.validateBackground()}));
k.addListener("gridSizeChanged",mxUtils.bind(this,function(){k.isGridEnabled()&&k.view.validateBackground()}));this.editor.resetGraph()}this.init();k.standalone||this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;
@@ -2148,17 +2151,17 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
"keydown",mxUtils.bind(this,function(b){this.onKeyDown(b)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(b){this.onKeyPress(b)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var c=b.setDefaultParent,e=this;this.editor.graph.setDefaultParent=function(){c.apply(this,
arguments);e.updateActionStates()};b.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,c=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,d){"mouseDown"==d.getProperty("eventName")&&c.hideShapePicker()}));var e=mxUtils.bind(this,function(){c.hideShapePicker(!0)});b.addListener("wheel",e);b.addListener(mxEvent.ESCAPE,e);b.view.addListener(mxEvent.SCALE,e);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,e);b.getSelectionModel().addListener(mxEvent.CHANGE,e);b.getModel().addListener(mxEvent.CHANGE,
-e);var k=b.popupMenuHandler.isMenuShowing;b.popupMenuHandler.isMenuShowing=function(){return k.apply(this,arguments)||null!=c.shapePicker};var f=b.dblClick;b.dblClick=function(d,e){if(this.isEnabled())if(null!=e||null==c.sidebar||mxEvent.isShiftDown(d)||b.isCellLocked(b.getDefaultParent()))f.apply(this,arguments);else{var g=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d));mxEvent.consume(d);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(g.x,g.y)}),
-30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",e);var n=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();n.apply(this,arguments)};var t=this.hoverIcons.execute;this.hoverIcons.execute=function(d,e,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?t.apply(this,arguments):this.graph.connectVertex(d.cell,e,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(g,l,q){var k=b.getCompositeParent(d.cell);g=b.getCellGeometry(k);
-for(f.consume();null!=k&&b.model.isVertex(k)&&null!=g&&g.relative;)cell=k,k=b.model.getParent(cell),g=b.getCellGeometry(k);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(f.getGraphX(),f.getGraphY(),k,mxUtils.bind(this,function(d){q(d);null!=c.hoverIcons&&c.hoverIcons.update(b.view.getState(d))}),e)}),30)}),mxUtils.bind(this,function(b){this.graph.selectCellsForConnectVertex(b,g,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(g,e){null!=d&&window.clearTimeout(d);
-d=window.setTimeout(mxUtils.bind(this,function(){var d=e.getProperty("arrow"),g=e.getProperty("direction"),l=e.getProperty("event"),d=d.getBoundingClientRect(),f=mxUtils.getOffset(b.container),k=b.container.scrollLeft+d.x-f.x,f=b.container.scrollTop+d.y-f.y,n=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),x=c.showShapePicker(k,f,n,mxUtils.bind(this,function(d){null!=d&&b.connectVertex(n,g,b.defaultEdgeLength,l,!0,!0,function(g,e,l){l(d);null!=c.hoverIcons&&
-c.hoverIcons.update(b.view.getState(d))},function(d){b.selectCellsForConnectVertex(d)},l,this.hoverIcons)}),g,!0);this.centerShapePicker(x,d,k,f,g);mxUtils.setOpacity(x,30);mxEvent.addListener(x,"mouseenter",function(){mxUtils.setOpacity(x,100)});mxEvent.addListener(x,"mouseleave",function(){c.hideShapePicker()})}),500)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(b,c){null!=d&&window.clearTimeout(d)}))}};
-EditorUi.prototype.centerShapePicker=function(b,c,e,k,f){if(f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST)b.style.width="40px";var n=b.getBoundingClientRect();f==mxConstants.DIRECTION_NORTH?(e-=n.width/2-10,k-=n.height+6):f==mxConstants.DIRECTION_SOUTH?(e-=n.width/2-10,k+=c.height+6):f==mxConstants.DIRECTION_WEST?(e-=n.width+6,k-=n.height/2-10):f==mxConstants.DIRECTION_EAST&&(e+=c.width+6,k-=n.height/2-10);b.style.left=e+"px";b.style.top=k+"px"};
-EditorUi.prototype.showShapePicker=function(b,c,e,k,f,n){b=this.createShapePicker(b,c,e,k,f,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,n),n);null!=b&&(null==this.hoverIcons||n||this.hoverIcons.reset(),n=this.editor.graph,n.popupMenuHandler.hideMenu(),n.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=k,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,c,e,k,f,n,t,d){var g=null;if(null!=t&&0<t.length){var l=this,q=this.editor.graph,g=document.createElement("div");f=q.view.getState(e);var p=null==e||null!=f&&q.isTransparentState(f)?null:q.copyStyle(e);e=6>t.length?35*t.length:140;g.className="geToolbarContainer geSidebarContainer";g.style.cssText="position:absolute;left:"+b+"px;top:"+c+"px;width:"+e+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(g.style,"transform","translate(-22px,-22px)");null!=q.background&&q.background!=mxConstants.NONE&&(g.style.backgroundColor=q.background);q.container.appendChild(g);e=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";g.appendChild(e);null!=p&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(p,[d]):l.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(e,"click",function(){var g=q.cloneCell(d);if(null!=k)k(g);else{g.geometry.x=q.snap(Math.round(b/q.view.scale)-q.view.translate.x-d.geometry.width/2);g.geometry.y=q.snap(Math.round(c/q.view.scale)-q.view.translate.y-d.geometry.height/2);q.model.beginUpdate();try{q.addCell(g)}finally{q.model.endUpdate()}q.setSelectionCell(g);
-q.scrollCellToVisible(g);q.startEditingAtCell(g);null!=l.hoverIcons&&l.hoverIcons.update(q.view.getState(g))}null!=n&&n()})});for(f=0;f<(d?Math.min(t.length,4):t.length);f++)e(t[f]);t=g.offsetTop+g.clientHeight-(q.container.scrollTop+q.container.offsetHeight);0<t&&(g.style.top=Math.max(q.container.scrollTop+22,c-t)+"px");t=g.offsetLeft+g.clientWidth-(q.container.scrollLeft+q.container.offsetWidth);0<t&&(g.style.left=Math.max(q.container.scrollLeft+22,b-t)+"px")}return g};
+e);var k=b.popupMenuHandler.isMenuShowing;b.popupMenuHandler.isMenuShowing=function(){return k.apply(this,arguments)||null!=c.shapePicker};var g=b.dblClick;b.dblClick=function(d,e){if(this.isEnabled())if(null!=e||null==c.sidebar||mxEvent.isShiftDown(d)||b.isCellLocked(b.getDefaultParent()))g.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d));mxEvent.consume(d);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(f.x,f.y)}),
+30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",e);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();p.apply(this,arguments)};var t=this.hoverIcons.execute;this.hoverIcons.execute=function(d,e,g){var f=g.getEvent();this.graph.isCloneEvent(f)||mxEvent.isShiftDown(f)?t.apply(this,arguments):this.graph.connectVertex(d.cell,e,this.graph.defaultEdgeLength,f,null,null,mxUtils.bind(this,function(f,l,m){var k=b.getCompositeParent(d.cell);f=b.getCellGeometry(k);
+for(g.consume();null!=k&&b.model.isVertex(k)&&null!=f&&f.relative;)cell=k,k=b.model.getParent(cell),f=b.getCellGeometry(k);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(g.getGraphX(),g.getGraphY(),k,mxUtils.bind(this,function(d){m(d);null!=c.hoverIcons&&c.hoverIcons.update(b.view.getState(d))}),e)}),30)}),mxUtils.bind(this,function(b){this.graph.selectCellsForConnectVertex(b,f,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,e){null!=d&&window.clearTimeout(d);
+d=window.setTimeout(mxUtils.bind(this,function(){var d=e.getProperty("arrow"),f=e.getProperty("direction"),l=e.getProperty("event"),d=d.getBoundingClientRect(),g=mxUtils.getOffset(b.container),k=b.container.scrollLeft+d.x-g.x,g=b.container.scrollTop+d.y-g.y,p=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),x=c.showShapePicker(k,g,p,mxUtils.bind(this,function(d){null!=d&&b.connectVertex(p,f,b.defaultEdgeLength,l,!0,!0,function(f,e,l){l(d);null!=c.hoverIcons&&
+c.hoverIcons.update(b.view.getState(d))},function(d){b.selectCellsForConnectVertex(d)},l,this.hoverIcons)}),f,!0);this.centerShapePicker(x,d,k,g,f);mxUtils.setOpacity(x,30);mxEvent.addListener(x,"mouseenter",function(){mxUtils.setOpacity(x,100)});mxEvent.addListener(x,"mouseleave",function(){c.hideShapePicker()})}),500)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(b,c){null!=d&&window.clearTimeout(d)}))}};
+EditorUi.prototype.centerShapePicker=function(b,c,e,k,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(e-=p.width/2-10,k-=p.height+6):g==mxConstants.DIRECTION_SOUTH?(e-=p.width/2-10,k+=c.height+6):g==mxConstants.DIRECTION_WEST?(e-=p.width+6,k-=p.height/2-10):g==mxConstants.DIRECTION_EAST&&(e+=c.width+6,k-=p.height/2-10);b.style.left=e+"px";b.style.top=k+"px"};
+EditorUi.prototype.showShapePicker=function(b,c,e,k,g,p){b=this.createShapePicker(b,c,e,k,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=k,this.shapePicker=b);return b};
+EditorUi.prototype.createShapePicker=function(b,c,e,k,g,p,t,d){var f=null;if(null!=t&&0<t.length){var l=this,m=this.editor.graph,f=document.createElement("div");g=m.view.getState(e);var q=null==e||null!=g&&m.isTransparentState(g)?null:m.copyStyle(e);e=6>t.length?35*t.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+c+"px;width:"+e+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(f.style.backgroundColor=m.background);m.container.appendChild(f);e=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(e);null!=q&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(q,[d]):l.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(e,"click",function(){var f=m.cloneCell(d);if(null!=k)k(f);else{f.geometry.x=m.snap(Math.round(b/m.view.scale)-m.view.translate.x-d.geometry.width/2);f.geometry.y=m.snap(Math.round(c/m.view.scale)-m.view.translate.y-d.geometry.height/2);m.model.beginUpdate();try{m.addCell(f)}finally{m.model.endUpdate()}m.setSelectionCell(f);
+m.scrollCellToVisible(f);m.startEditingAtCell(f);null!=l.hoverIcons&&l.hoverIcons.update(m.view.getState(f))}null!=p&&p()})});for(g=0;g<(d?Math.min(t.length,4):t.length);g++)e(t[g]);t=f.offsetTop+f.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0<t&&(f.style.top=Math.max(m.container.scrollTop+22,c-t)+"px");t=f.offsetLeft+f.clientWidth-(m.container.scrollLeft+m.container.offsetWidth);0<t&&(f.style.left=Math.max(m.container.scrollLeft+22,b-t)+"px")}return f};
EditorUi.prototype.getCellsForShapePicker=function(b,c){var e=mxUtils.bind(this,function(b,c,e,t){return this.editor.graph.createVertex(null,null,t||"",0,0,c||120,e||60,b,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),
e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",
120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};
@@ -2172,48 +2175,48 @@ EditorUi.prototype.getCssClassForMarker=function(b,c,e,k){return"flexArrow"==c?n
e==mxConstants.ARROW_DIAMOND_THIN?"1"==k?"geSprite geSprite-"+b+"thindiamond":"geSprite geSprite-"+b+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+b+"openasync":"dash"==e?"geSprite geSprite-"+b+"dash":"cross"==e?"geSprite geSprite-"+b+"cross":"async"==e?"1"==k?"geSprite geSprite-"+b+"async":"geSprite geSprite-"+b+"asynctrans":"circle"==e||"circlePlus"==e?"1"==k||"circle"==e?"geSprite geSprite-"+b+"circle":"geSprite geSprite-"+b+"circleplus":"ERone"==e?"geSprite geSprite-"+b+"erone":"ERmandOne"==
e?"geSprite geSprite-"+b+"eronetoone":"ERmany"==e?"geSprite geSprite-"+b+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+b+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+b+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+b+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,c=this.actions.get("paste"),e=this.actions.get("pasteHere");c.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));e.setEnabled(c.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,c=mxClipboard.cut;mxClipboard.cut=function(e){e.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(c){var e=null;if(c.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var e=e||c.getSelectionCells(),e=c.getExportableCells(c.model.getTopmostCells(e)),d={},g=c.createCellLookup(e),l=c.cloneCells(e,null,d),f=new mxGraphModel,k=f.getChildAt(f.getRoot(),
-0),m=0;m<l.length;m++){f.add(k,l[m]);var n=c.view.getState(e[m]);if(null!=n){var u=c.getCellGeometry(l[m]);null!=u&&u.relative&&!f.isEdge(e[m])&&null==g[mxObjectIdentity.get(f.getParent(e[m]))]&&(u.offset=null,u.relative=!1,u.x=n.x/n.view.scale-n.view.translate.x,u.y=n.y/n.view.scale-n.view.translate.y)}}c.updateCustomLinks(c.createCellMapping(d,g),l);mxClipboard.insertCount=1;mxClipboard.setCells(l)}b.updatePasteActionStates();return e};var e=mxClipboard.paste;mxClipboard.paste=function(c){var f=
-null;c.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):f=e.apply(this,arguments);b.updatePasteActionStates();return f};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);b.updatePasteActionStates()};var f=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(c,e){f.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.initClipboard=function(){var b=this,c=mxClipboard.cut;mxClipboard.cut=function(e){e.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(c){var e=null;if(c.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var e=e||c.getSelectionCells(),e=c.getExportableCells(c.model.getTopmostCells(e)),d={},f=c.createCellLookup(e),l=c.cloneCells(e,null,d),g=new mxGraphModel,k=g.getChildAt(g.getRoot(),
+0),n=0;n<l.length;n++){g.add(k,l[n]);var p=c.view.getState(e[n]);if(null!=p){var u=c.getCellGeometry(l[n]);null!=u&&u.relative&&!g.isEdge(e[n])&&null==f[mxObjectIdentity.get(g.getParent(e[n]))]&&(u.offset=null,u.relative=!1,u.x=p.x/p.view.scale-p.view.translate.x,u.y=p.y/p.view.scale-p.view.translate.y)}}c.updateCustomLinks(c.createCellMapping(d,f),l);mxClipboard.insertCount=1;mxClipboard.setCells(l)}b.updatePasteActionStates();return e};var e=mxClipboard.paste;mxClipboard.paste=function(c){var g=
+null;c.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):g=e.apply(this,arguments);b.updatePasteActionStates();return g};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);b.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(c,e){g.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var b=this.graph.getPageLayout(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+b.x*d.width),this.scale*(this.translate.y+b.y*d.height),this.scale*b.width*d.width,
-this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,g){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,g,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),f=mxUtils.hasScrollbars(b.container),k=b.view.translate,q=b.view.scale,m=mxRectangle.fromRectangle(l);
-m.x=m.x/q-k.x;m.y=m.y/q-k.y;m.width/=q;m.height/=q;var k=b.container.scrollTop,p=b.container.scrollLeft,G=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)G+=3;var D=b.container.offsetWidth-G,G=b.container.offsetHeight-G;d=d?Math.max(.3,Math.min(g||1,D/m.width)):q;g=(D-d*m.width)/2/d;var u=0==this.lightboxVerticalDivider?0:(G-d*m.height)/this.lightboxVerticalDivider/d;f&&(g=Math.max(g,0),u=Math.max(u,0));if(f||l.width<D||l.height<G)b.view.scaleAndTranslate(d,Math.floor(g-
-m.x),Math.floor(u-m.y)),b.container.scrollTop=k*d/q,b.container.scrollLeft=p*d/q;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/q),Math.floor(l.y+e/q))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
-function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var f=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing=
-"border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var n=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top=
-"0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",n);n();var t=0,n=mxUtils.bind(this,function(b,d,g){t++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",b);null!=g&&c.setAttribute("title",g);b=document.createElement("img");b.setAttribute("border","0");
-b.setAttribute("src",d);c.appendChild(b);this.chromelessToolbar.appendChild(c);return c});null!=f.backBtn&&n(mxUtils.bind(this,function(b){window.location.href=f.backBtn.url;mxEvent.consume(b)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=n(mxUtils.bind(this,function(b){this.actions.get("previousPage").funct();mxEvent.consume(b)}),Editor.previousLargeImage,mxResources.get("previousPage")),g=document.createElement("div");g.style.display="inline-block";
-g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="10px";g.style.fontSize="14px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var l=n(mxUtils.bind(this,function(b){this.actions.get("nextPage").funct();mxEvent.consume(b)}),Editor.nextLargeImage,mxResources.get("nextPage")),q=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+
-this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",d.style.display="",g.style.display="inline-block"):(l.style.display="none",d.style.display="none",g.style.display="none");q()});this.editor.addListener("resetGraphView",p);this.editor.addListener("pageSelected",q)}n(mxUtils.bind(this,function(b){this.actions.get("zoomOut").funct();
-mxEvent.consume(b)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(b){this.actions.get("zoomIn").funct();mxEvent.consume(b)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(d){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var m=null,v=null,u=mxUtils.bind(this,
-function(b){null!=m&&(window.clearTimeout(m),m=null);null!=v&&(window.clearTimeout(v),v=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);m=null;v=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";v=null}),600)}),b||200)}),B=mxUtils.bind(this,function(b){null!=m&&(window.clearTimeout(m),m=null);null!=v&&(window.clearTimeout(v),v=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,
-b||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=n(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var g=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius",
-"5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=g.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";g=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=g.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),E=b.getModel();E.addListener(mxEvent.CHANGE,function(){x.style.display=1<E.getChildCount(E.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():
-"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(p=0;p<this.lightboxToolbarActions.length;p++){var A=this.lightboxToolbarActions[p];A.elem=n(A.fn,A.icon,A.tooltip)}null!=f.refreshBtn&&n(mxUtils.bind(this,function(b){f.refreshBtn.url?window.location.href=f.refreshBtn.url:window.location.reload();mxEvent.consume(b)}),
-Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=f.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,function(d){f.fullscreenBtn.url?b.openLink(f.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(f.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&n(mxUtils.bind(this,function(b){"1"==urlParams.close||
-f.closeBtn?window.close():(this.destroy(),mxEvent.consume(b))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(mxEvent.isShiftDown(b)||B(30),u())}));mxEvent.addListener(this.chromelessToolbar,
-mxClient.IS_POINTER?"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?u():B(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?u():B(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||B(30)}));var F=b.getTolerance();b.addMouseListener({startX:0,
-startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,g){this.startX=g.getGraphX();this.startY=g.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(b,d){},mouseUp:function(d,g){mxEvent.isTouchEvent(g.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<F&&Math.abs(this.scrollTop-b.container.scrollTop)<F&&Math.abs(this.startX-g.getGraphX())<F&&Math.abs(this.startY-g.getGraphY())<F&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?
-u():B(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var I=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*d.width;this.translate.y=b.y-(this.y0||0)*d.height}I.apply(this,arguments)};if(!b.isViewer()){var L=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=
-this.getPageLayout(),g=this.getPagePadding(),c=this.getPageSize(),e=Math.ceil(2*g.x+d.width*c.width),l=Math.ceil(2*g.y+d.height*c.height),f=b.minimumGraphSize;if(null==f||f.width!=e||f.height!=l)b.minimumGraphSize=new mxRectangle(0,0,e,l);e=g.x-d.x*c.width;g=g.y-d.y*c.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==g?L.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=b.view.translate.x,c=b.view.translate.y,b.view.setTranslate(e,g),b.container.scrollLeft+=
-Math.round((e-d)*b.view.scale),b.container.scrollTop+=Math.round((g-c)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var H=b.view.getBackgroundPane(),K=b.view.getDrawPane();b.cumulativeZoomFactor=1;var C=null,N=null,S=null,R=null,M=null,P=function(d){null!=C&&window.clearTimeout(C);window.setTimeout(function(){if(!b.isMouseDown||R)C=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&
-null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),K.style.transformOrigin="",H.style.transformOrigin="",mxClient.IS_SF?(K.style.transform="scale(1)",H.style.transform="scale(1)",window.setTimeout(function(){K.style.transform="";H.style.transform=""},0)):(K.style.transform="",H.style.transform=""),b.view.getDecoratorPane().style.opacity="",
-b.view.getOverlayPane().style.opacity="");var d=new mxPoint(b.container.scrollLeft,b.container.scrollTop),g=mxUtils.getOffset(b.container),l=b.view.scale,f=0,q=0;null!=N&&(f=b.container.offsetWidth/2-N.x+g.x,q=b.container.offsetHeight/2-N.y+g.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=S&&(f+=d.x-S.x,q+=d.y-S.y),null!=c&&e.chromelessResize(!1,null,f*(b.cumulativeZoomFactor-1),q*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==f&&0==q||(b.container.scrollLeft-=f*(b.cumulativeZoomFactor-
-1),b.container.scrollTop-=q*(b.cumulativeZoomFactor-1)));null!=M&&K.setAttribute("filter",M);b.cumulativeZoomFactor=1;M=R=N=S=C=null}),null!=d?d:b.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)},G=Date.now();b.lazyZoom=function(d,g,c){(g=g||!b.scrollbars)&&(N=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-G)){G=Date.now();d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
-(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==M&&""!=K.getAttribute("filter")&&(M=K.getAttribute("filter"),K.removeAttribute("filter"));S=new mxPoint(b.container.scrollLeft,b.container.scrollTop);d=g?b.container.scrollLeft+b.container.clientWidth/2:N.x+b.container.scrollLeft-b.container.offsetLeft;var l=g?b.container.scrollTop+b.container.clientHeight/2:N.y+b.container.scrollTop-b.container.offsetTop;K.style.transformOrigin=d+"px "+l+"px";K.style.transform="scale("+
-this.cumulativeZoomFactor+")";H.style.transformOrigin=d+"px "+l+"px";H.style.transform="scale("+this.cumulativeZoomFactor+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(d=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(d.style,"transform-origin",(g?b.container.clientWidth/2+b.container.scrollLeft-d.offsetLeft+"px":N.x+b.container.scrollLeft-d.offsetLeft-b.container.offsetLeft+"px")+" "+(g?b.container.clientHeight/2+b.container.scrollTop-d.offsetTop+"px":N.y+
-b.container.scrollTop-d.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(d.style,"transform","scale("+this.cumulativeZoomFactor+")"));b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}P(c)}};mxEvent.addGestureListeners(b.container,function(b){null!=C&&window.clearTimeout(C)},null,function(d){1!=b.cumulativeZoomFactor&&P(0)});mxEvent.addListener(b.container,"scroll",function(d){null==C||b.isMouseDown||1==b.cumulativeZoomFactor||
-P(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,g,c,e,l){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!c&&b.isScrollWheelEvent(d))c=b.view.getTranslate(),e=40/b.view.scale,mxEvent.isShiftDown(d)?b.view.setTranslate(c.x+(g?-e:e),c.y):b.view.setTranslate(c.x,c.y+(g?e:-e));else if(c||b.isZoomWheelEvent(d))for(var f=mxEvent.getSource(d);null!=f;){if(f==b.container)return b.tooltipHandler.hideTooltip(),N=null!=e&&null!=l?new mxPoint(e,
-l):new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),R=c,b.lazyZoom(g),mxEvent.consume(d),!1;f=f.parentNode}}),b.container);b.panningHandler.zoomGraph=function(d){b.cumulativeZoomFactor=d.scale;b.lazyZoom(0<d.scale,!0);mxEvent.consume(d)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printLargeImage,mxResources.get("print"))};
-EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
-EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
+this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,f){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,f,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),g=mxUtils.hasScrollbars(b.container),k=b.view.translate,m=b.view.scale,q=mxRectangle.fromRectangle(l);
+q.x=q.x/m-k.x;q.y=q.y/m-k.y;q.width/=m;q.height/=m;var k=b.container.scrollTop,F=b.container.scrollLeft,n=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var B=b.container.offsetWidth-n,n=b.container.offsetHeight-n;d=d?Math.max(.3,Math.min(f||1,B/q.width)):m;f=(B-d*q.width)/2/d;var p=0==this.lightboxVerticalDivider?0:(n-d*q.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),p=Math.max(p,0));if(g||l.width<B||l.height<n)b.view.scaleAndTranslate(d,Math.floor(f-
+q.x),Math.floor(p-q.y)),b.container.scrollTop=k*d/m,b.container.scrollLeft=F*d/m;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/m),Math.floor(l.y+e/m))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
+function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing=
+"border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top=
+"0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var t=0,p=mxUtils.bind(this,function(b,d,f){t++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",b);null!=f&&c.setAttribute("title",f);b=document.createElement("img");b.setAttribute("border","0");
+b.setAttribute("src",d);c.appendChild(b);this.chromelessToolbar.appendChild(c);return c});null!=g.backBtn&&p(mxUtils.bind(this,function(b){window.location.href=g.backBtn.url;mxEvent.consume(b)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=p(mxUtils.bind(this,function(b){this.actions.get("previousPage").funct();mxEvent.consume(b)}),Editor.previousLargeImage,mxResources.get("previousPage")),f=document.createElement("div");f.style.display="inline-block";
+f.style.verticalAlign="top";f.style.fontFamily=Editor.defaultHtmlFont;f.style.marginTop="10px";f.style.fontSize="14px";f.style.color="#ffffff";this.chromelessToolbar.appendChild(f);var l=p(mxUtils.bind(this,function(b){this.actions.get("nextPage").funct();mxEvent.consume(b)}),Editor.nextLargeImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+
+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var q=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",d.style.display="",f.style.display="inline-block"):(l.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",m)}p(mxUtils.bind(this,function(b){this.actions.get("zoomOut").funct();
+mxEvent.consume(b)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(b){this.actions.get("zoomIn").funct();mxEvent.consume(b)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(d){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var n=null,v=null,u=mxUtils.bind(this,
+function(b){null!=n&&(window.clearTimeout(n),n=null);null!=v&&(window.clearTimeout(v),v=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;v=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";v=null}),600)}),b||200)}),y=mxUtils.bind(this,function(b){null!=n&&(window.clearTimeout(n),n=null);null!=v&&(window.clearTimeout(v),v=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,
+b||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=p(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius",
+"5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),H=b.getModel();H.addListener(mxEvent.CHANGE,function(){x.style.display=1<H.getChildCount(H.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,
+function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var D=this.lightboxToolbarActions[q];D.elem=p(D.fn,D.icon,D.tooltip)}null!=g.refreshBtn&&p(mxUtils.bind(this,function(b){g.refreshBtn.url?
+window.location.href=g.refreshBtn.url:window.location.reload();mxEvent.consume(b)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(d){g.fullscreenBtn.url?b.openLink(g.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||
+this.container!=document.body))&&p(mxUtils.bind(this,function(b){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(b))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
+function(b){mxEvent.isTouchEvent(b)||(mxEvent.isShiftDown(b)||y(30),u())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?u():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?u():y(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||y(30)}));var E=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,f){this.startX=f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(b,d){},mouseUp:function(d,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<E&&Math.abs(this.scrollTop-b.container.scrollTop)<E&&
+Math.abs(this.startX-f.getGraphX())<E&&Math.abs(this.startY-f.getGraphY())<E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?u():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var J=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*d.width;this.translate.y=b.y-(this.y0||0)*d.height}J.apply(this,
+arguments)};if(!b.isViewer()){var L=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),f=this.getPagePadding(),c=this.getPageSize(),e=Math.ceil(2*f.x+d.width*c.width),l=Math.ceil(2*f.y+d.height*c.height),g=b.minimumGraphSize;if(null==g||g.width!=e||g.height!=l)b.minimumGraphSize=new mxRectangle(0,0,e,l);e=f.x-d.x*c.width;f=f.y-d.y*c.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==f?L.apply(this,
+arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=b.view.translate.x,c=b.view.translate.y,b.view.setTranslate(e,f),b.container.scrollLeft+=Math.round((e-d)*b.view.scale),b.container.scrollTop+=Math.round((f-c)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var G=b.view.getBackgroundPane(),K=b.view.getDrawPane();b.cumulativeZoomFactor=1;var C=null,M=null,P=null,S=null,N=null,R=function(d){null!=C&&window.clearTimeout(C);
+window.setTimeout(function(){if(!b.isMouseDown||S)C=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),K.style.transformOrigin="",G.style.transformOrigin="",mxClient.IS_SF?(K.style.transform="scale(1)",G.style.transform="scale(1)",window.setTimeout(function(){K.style.transform=
+"";G.style.transform=""},0)):(K.style.transform="",G.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var d=new mxPoint(b.container.scrollLeft,b.container.scrollTop),f=mxUtils.getOffset(b.container),l=b.view.scale,g=0,k=0;null!=M&&(g=b.container.offsetWidth/2-M.x+f.x,k=b.container.offsetHeight/2-M.y+f.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=P&&(g+=d.x-P.x,k+=d.y-P.y),null!=c&&e.chromelessResize(!1,null,g*(b.cumulativeZoomFactor-
+1),k*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==g&&0==k||(b.container.scrollLeft-=g*(b.cumulativeZoomFactor-1),b.container.scrollTop-=k*(b.cumulativeZoomFactor-1)));null!=N&&K.setAttribute("filter",N);b.cumulativeZoomFactor=1;N=S=M=P=C=null}),null!=d?d:b.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)},F=Date.now();b.lazyZoom=function(d,f,c){(f=f||!b.scrollbars)&&(M=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/
+2));if(mxClient.IS_IOS||!(15>Date.now()-F)){F=Date.now();d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*
+this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==N&&""!=K.getAttribute("filter")&&(N=K.getAttribute("filter"),K.removeAttribute("filter"));P=new mxPoint(b.container.scrollLeft,b.container.scrollTop);d=f?b.container.scrollLeft+b.container.clientWidth/2:M.x+b.container.scrollLeft-b.container.offsetLeft;var l=f?b.container.scrollTop+b.container.clientHeight/
+2:M.y+b.container.scrollTop-b.container.offsetTop;K.style.transformOrigin=d+"px "+l+"px";K.style.transform="scale("+this.cumulativeZoomFactor+")";G.style.transformOrigin=d+"px "+l+"px";G.style.transform="scale("+this.cumulativeZoomFactor+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(d=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(d.style,"transform-origin",(f?b.container.clientWidth/2+b.container.scrollLeft-d.offsetLeft+"px":M.x+b.container.scrollLeft-d.offsetLeft-
+b.container.offsetLeft+"px")+" "+(f?b.container.clientHeight/2+b.container.scrollTop-d.offsetTop+"px":M.y+b.container.scrollTop-d.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(d.style,"transform","scale("+this.cumulativeZoomFactor+")"));b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}R(c)}};mxEvent.addGestureListeners(b.container,function(b){null!=C&&window.clearTimeout(C)},null,function(d){1!=b.cumulativeZoomFactor&&
+R(0)});mxEvent.addListener(b.container,"scroll",function(d){null==C||b.isMouseDown||1==b.cumulativeZoomFactor||R(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,f,c,e,l){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!c&&b.isScrollWheelEvent(d))c=b.view.getTranslate(),e=40/b.view.scale,mxEvent.isShiftDown(d)?b.view.setTranslate(c.x+(f?-e:e),c.y):b.view.setTranslate(c.x,c.y+(f?e:-e));else if(c||b.isZoomWheelEvent(d))for(var g=
+mxEvent.getSource(d);null!=g;){if(g==b.container)return b.tooltipHandler.hideTooltip(),M=null!=e&&null!=l?new mxPoint(e,l):new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),S=c,b.lazyZoom(f),mxEvent.consume(d),!1;g=g.parentNode}}),b.container);b.panningHandler.zoomGraph=function(d){b.cumulativeZoomFactor=d.scale;b.lazyZoom(0<d.scale,!0);mxEvent.consume(d)}};
+EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printLargeImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};
+EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var c=urlParams.border,e=60;null!=c&&(e=parseInt(c));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,c){try{var e=mxUtils.parseXml(b);this.editor.setGraphXml(e.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=c&&(this.editor.setFilename(c),this.updateDocumentTitle())}catch(k){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+k.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,c,e,k){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(b);f.div.className+=" geMenubarMenu";f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});f.popup(c,e,null,k);this.setCurrentMenu(f)};
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,c,e,k){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(b);g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});g.popup(c,e,null,k);this.setCurrentMenu(g)};
EditorUi.prototype.setCurrentMenu=function(b,c){this.currentMenuElt=c;this.currentMenu=b};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};
EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var c=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);c==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(e){}};
EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var c=0<b.indexOf("?")?1:0,e;for(e in urlParams)b=0==c?b+"?":b+"&",b+=e+"="+urlParams[e],c++;return b};
@@ -2221,28 +2224,28 @@ EditorUi.prototype.setScrollbars=function(b){var c=this.editor.graph,e=c.contain
EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var c=b.getPagePadding();b.container.scrollTop=Math.floor(c.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(c.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
1;c=b.getGraphBounds();0<c.width&&0<c.height&&(c.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(c.x+c.width-b.container.clientWidth,c.x-10)),c.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(c.y+c.height-b.container.clientHeight,c.y-10)))}else{var c=b.getGraphBounds(),e=Math.max(c.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,c.y-Math.max(20,(b.container.clientHeight-Math.max(c.height,
b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,c.x-Math.max(0,(b.container.clientWidth-e)/2)))}else{var c=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds()),e=b.view.translate,k=b.view.scale;c.x=c.x/k-e.x;c.y=c.y/k-e.y;c.width/=k;c.height/=k;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-c.width)/2)-c.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-c.height)/4))-c.y+1))}};
-EditorUi.prototype.setPageVisible=function(b){var c=this.editor.graph,e=mxUtils.hasScrollbars(c.container),k=0,f=0;e&&(k=c.view.translate.x*c.view.scale-c.container.scrollLeft,f=c.view.translate.y*c.view.scale-c.container.scrollTop);c.pageVisible=b;c.pageBreaksVisible=b;c.preferPageSize=b;c.view.validateBackground();e&&(b=c.getSelectionCells(),c.clearSelection(),c.setSelectionCells(b));c.sizeDidChange();e&&(c.container.scrollLeft=c.view.translate.x*c.view.scale-k,c.container.scrollTop=c.view.translate.y*
-c.view.scale-f);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(b,c){this.ui=b;this.color=c}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
-function ChangePageSetup(b,c,e,k,f){this.ui=b;this.previousColor=this.color=c;this.previousImage=this.image=e;this.previousFormat=this.format=k;this.previousPageScale=this.pageScale=f;this.ignoreImage=this.ignoreColor=!1}
+EditorUi.prototype.setPageVisible=function(b){var c=this.editor.graph,e=mxUtils.hasScrollbars(c.container),k=0,g=0;e&&(k=c.view.translate.x*c.view.scale-c.container.scrollLeft,g=c.view.translate.y*c.view.scale-c.container.scrollTop);c.pageVisible=b;c.pageBreaksVisible=b;c.preferPageSize=b;c.view.validateBackground();e&&(b=c.getSelectionCells(),c.clearSelection(),c.setSelectionCells(b));c.sizeDidChange();e&&(c.container.scrollLeft=c.view.translate.x*c.view.scale-k,c.container.scrollTop=c.view.translate.y*
+c.view.scale-g);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(b,c){this.ui=b;this.color=c}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
+function ChangePageSetup(b,c,e,k,g){this.ui=b;this.previousColor=this.color=c;this.previousImage=this.image=e;this.previousFormat=this.format=k;this.previousPageScale=this.pageScale=g;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var c=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=c}if(!this.ignoreImage){this.image=this.previousImage;var c=b.backgroundImage,e=this.previousImage;null!=e&&null!=e.src&&"data:page/id,"==e.src.substring(0,13)&&(e=this.ui.createImageForPageLink(e.src,this.ui.currentPage));this.ui.setBackgroundImage(e);this.previousImage=c}null!=this.previousFormat&&
(this.format=this.previousFormat,c=b.pageFormat,this.previousFormat.width!=c.width||this.previousFormat.height!=c.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=c);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(b,e,k){k.previousColor=k.color;k.previousImage=k.image;k.previousFormat=k.format;k.previousPageScale=k.pageScale;null!=k.foldingEnabled&&(k.foldingEnabled=!k.foldingEnabled);return k};mxCodecRegistry.register(b)})();
EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(b){this.editor.graph.foldingEnabled=b;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
EditorUi.prototype.setPageFormat=function(b,c){c=null!=c?c:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;c||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),c=this.actions.get("redo"),e=this.editor.undoManager,k=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,k);e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);e.addListener(mxEvent.CLEAR,k);var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);k()};var n=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(b,d){n.apply(this,arguments);k()};k()};
-EditorUi.prototype.updateActionStates=function(){var b=this.editor.graph,c=!1,e=!1,k=!1,f=!1,n=[],t=b.getSelectionCells();if(null!=t)for(var d=0;d<t.length;d++){var g=t[d];b.isCellEditable(g)&&(n.push(g),f=!0,b.getModel().isEdge(g)&&(k=!0),b.getModel().isVertex(g)&&(c=!0,0<b.getModel().getChildCount(g)||b.isContainer(g)))&&(e=!0)}t="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(d=
-0;d<t.length;d++)this.actions.get(t[d]).setEnabled(f);this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(f);this.actions.get("copySize").setEnabled(1==b.getSelectionCount());this.actions.get("bringForward").setEnabled(1==n.length);this.actions.get("sendBackward").setEnabled(1==n.length);this.actions.get("turn").setEnabled(0<b.getResizableCells(b.getSelectionCells()).length);
-this.actions.get("curved").setEnabled(k);this.actions.get("rotation").setEnabled(c);this.actions.get("wordWrap").setEnabled(c);this.actions.get("autosize").setEnabled(c);k=c&&1==b.getSelectionCount();this.actions.get("group").setEnabled(1<b.getSelectionCount()||k&&!b.isContainer(b.getSelectionCell()));this.actions.get("ungroup").setEnabled(e);this.actions.get("removeFromGroup").setEnabled(k&&b.getModel().isVertex(b.getModel().getParent(n[0])));b.view.getState(b.getSelectionCell());this.menus.get("navigation").setEnabled(f||
+EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),c=this.actions.get("redo"),e=this.editor.undoManager,k=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,k);e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);e.addListener(mxEvent.CLEAR,k);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);k()};var p=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(b,d){p.apply(this,arguments);k()};k()};
+EditorUi.prototype.updateActionStates=function(){var b=this.editor.graph,c=!1,e=!1,k=!1,g=!1,p=[],t=b.getSelectionCells();if(null!=t)for(var d=0;d<t.length;d++){var f=t[d];b.isCellEditable(f)&&(p.push(f),g=!0,b.getModel().isEdge(f)&&(k=!0),b.getModel().isVertex(f)&&(c=!0,0<b.getModel().getChildCount(f)||b.isContainer(f)))&&(e=!0)}t="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(d=
+0;d<t.length;d++)this.actions.get(t[d]).setEnabled(g);this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(g);this.actions.get("copySize").setEnabled(1==b.getSelectionCount());this.actions.get("bringForward").setEnabled(1==p.length);this.actions.get("sendBackward").setEnabled(1==p.length);this.actions.get("turn").setEnabled(0<b.getResizableCells(b.getSelectionCells()).length);
+this.actions.get("curved").setEnabled(k);this.actions.get("rotation").setEnabled(c);this.actions.get("wordWrap").setEnabled(c);this.actions.get("autosize").setEnabled(c);k=c&&1==b.getSelectionCount();this.actions.get("group").setEnabled(1<b.getSelectionCount()||k&&!b.isContainer(b.getSelectionCell()));this.actions.get("ungroup").setEnabled(e);this.actions.get("removeFromGroup").setEnabled(k&&b.getModel().isVertex(b.getModel().getParent(p[0])));b.view.getState(b.getSelectionCell());this.menus.get("navigation").setEnabled(g||
null!=b.view.currentRoot);this.actions.get("collapsible").setEnabled(c&&(b.isContainer(b.getSelectionCell())||0<b.model.getChildCount(b.getSelectionCell())));this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.getSelectionCount()&&b.isValidRoot(b.getSelectionCell()));e=1==b.getSelectionCount()&&b.isCellFoldable(b.getSelectionCell());this.actions.get("expand").setEnabled(e);this.actions.get("collapse").setEnabled(e);
-this.actions.get("editLink").setEnabled(1==n.length);this.actions.get("openLink").setEnabled(1==b.getSelectionCount()&&null!=b.getLinkForCell(b.getSelectionCell()));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);n=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent());this.menus.get("layout").setEnabled(n);this.menus.get("insert").setEnabled(n);this.menus.get("direction").setEnabled(n&&c);this.menus.get("align").setEnabled(n&&
-c&&1<b.getSelectionCount());this.menus.get("distribute").setEnabled(n&&c&&1<b.getSelectionCount());this.actions.get("selectVertices").setEnabled(n);this.actions.get("selectEdges").setEnabled(n);this.actions.get("selectAll").setEnabled(n);this.actions.get("selectNone").setEnabled(n);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var c=this.container.clientWidth,e=this.container.clientHeight;this.container==document.body&&(c=document.body.clientWidth||document.documentElement.clientWidth,e=document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var f=Math.max(0,Math.min(this.hsplitPosition,c-this.splitSize-
-20)),n=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",n+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",n+=this.toolbarHeight);0<n&&(n+=1);c=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,c=Math.max(0,Math.min(e-n-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=f+"px";this.sidebarFooterContainer.style.height=c+"px";
-this.sidebarFooterContainer.style.bottom=t+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=n+"px";this.sidebarContainer.style.width=f+"px";this.formatContainer.style.top=n+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var t=this.getDiagramContainerOffset(),d=null!=this.hsplit.parentNode?f+this.splitSize:0;this.diagramContainer.style.left=d+t.x+"px";this.diagramContainer.style.top=n+t.y+"px";this.footerContainer.style.height=
-this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=f+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=d+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px");this.diagramContainer.style.right=e+"px";f=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=
-this.diagramContainer.style.right,f=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+c+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";this.diagramContainer.style.bottom=this.footerHeight+k+f+"px";b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+this.actions.get("editLink").setEnabled(1==p.length);this.actions.get("openLink").setEnabled(1==b.getSelectionCount()&&null!=b.getLinkForCell(b.getSelectionCell()));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);p=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent());this.menus.get("layout").setEnabled(p);this.menus.get("insert").setEnabled(p);this.menus.get("direction").setEnabled(p&&c);this.menus.get("align").setEnabled(p&&
+c&&1<b.getSelectionCount());this.menus.get("distribute").setEnabled(p&&c&&1<b.getSelectionCount());this.actions.get("selectVertices").setEnabled(p);this.actions.get("selectEdges").setEnabled(p);this.actions.get("selectAll").setEnabled(p);this.actions.get("selectNone").setEnabled(p);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
+EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var c=this.container.clientWidth,e=this.container.clientHeight;this.container==document.body&&(c=document.body.clientWidth||document.documentElement.clientWidth,e=document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,c-this.splitSize-
+20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&(p+=1);c=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,c=Math.max(0,Math.min(e-p-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=c+"px";
+this.sidebarFooterContainer.style.bottom=t+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var t=this.getDiagramContainerOffset(),d=null!=this.hsplit.parentNode?g+this.splitSize:0;this.diagramContainer.style.left=d+t.x+"px";this.diagramContainer.style.top=p+t.y+"px";this.footerContainer.style.height=
+this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=d+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px");this.diagramContainer.style.right=e+"px";g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=
+this.diagramContainer.style.right,g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+c+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";this.diagramContainer.style.bottom=this.footerHeight+k+g+"px";b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2251,18 +2254,18 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(b){this.hsplitPosition=b;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};
EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(b){var c=document.createElement("div");c.className=b;return c};
-EditorUi.prototype.addSplitHandler=function(b,c,e,k){function f(b){if(null!=t){var f=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));k(Math.max(0,d+(c?f.x-t.x:t.y-f.y)-e));mxEvent.consume(b);d!=q()&&(g=!0,l=null)}}function n(b){f(b);t=d=null}var t=null,d=null,g=!0,l=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var q=mxUtils.bind(this,function(){var d=parseInt(c?b.style.left:b.style.bottom);c||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(b,function(b){t=new mxPoint(mxEvent.getClientX(b),
-mxEvent.getClientY(b));d=q();g=!1;mxEvent.consume(b)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){if(!g&&this.hsplitClickEnabled){var d=null!=l?l-e:0;l=q();k(d);mxEvent.consume(b)}}));mxEvent.addGestureListeners(document,null,f,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,f,n)})};
-EditorUi.prototype.handleError=function(b,c,e,k,f){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=c){f=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=b&&null!=b.message&&(f=mxUtils.htmlEntities(b.message));this.showError(c,f,n,e,null,null,null,null,null,null,null,null,k?e:null)}else null!=e&&e()};
-EditorUi.prototype.showError=function(b,c,e,k,f,n,t,d,g,l,q,p,m){b=new ErrorDialog(this,b,c,e||mxResources.get("ok"),k,f,n,t,p,d,g);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(b.container,l||340,q||100+20*c,!0,!1,m);b.init()};EditorUi.prototype.showDialog=function(b,c,e,k,f,n,t,d,g,l){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,c,e,k,f,n,t,d,g,l);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(b,c,e,k){function g(b){if(null!=t){var g=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));k(Math.max(0,d+(c?g.x-t.x:t.y-g.y)-e));mxEvent.consume(b);d!=m()&&(f=!0,l=null)}}function p(b){g(b);t=d=null}var t=null,d=null,f=!0,l=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var m=mxUtils.bind(this,function(){var d=parseInt(c?b.style.left:b.style.bottom);c||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(b,function(b){t=new mxPoint(mxEvent.getClientX(b),
+mxEvent.getClientY(b));d=m();f=!1;mxEvent.consume(b)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){if(!f&&this.hsplitClickEnabled){var d=null!=l?l-e:0;l=m();k(d);mxEvent.consume(b)}}));mxEvent.addGestureListeners(document,null,g,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,p)})};
+EditorUi.prototype.handleError=function(b,c,e,k,g){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=c){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=b&&null!=b.message&&(g=mxUtils.htmlEntities(b.message));this.showError(c,g,p,e,null,null,null,null,null,null,null,null,k?e:null)}else null!=e&&e()};
+EditorUi.prototype.showError=function(b,c,e,k,g,p,t,d,f,l,m,q,n){b=new ErrorDialog(this,b,c,e||mxResources.get("ok"),k,g,p,t,q,d,f);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(b.container,l||340,m||100+20*c,!0,!1,n);b.init()};EditorUi.prototype.showDialog=function(b,c,e,k,g,p,t,d,f,l){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,c,e,k,g,p,t,d,f,l);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,c,e){null!=this.dialogs&&0<this.dialogs.length&&(null==e||e==this.dialog.container.firstChild)&&(e=this.dialogs.pop(),0==e.close(b,c)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var c=b.getSelectionCells(),e=new mxDictionary,k=[],f=0;f<c.length;f++){var n=b.isTableCell(c[f])?b.model.getParent(c[f]):c[f];null==n||e.get(n)||(e.put(n,!0),k.push(n))}b.setSelectionCells(b.duplicateCells(k,!1))}catch(t){this.handleError(t)}};
-EditorUi.prototype.pickColor=function(b,c){var e=this.editor.graph,k=e.cellEditor.saveSelection(),f=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),n=new ColorDialog(this,b||"none",function(b){e.cellEditor.restoreSelection(k);c(b)},function(){e.cellEditor.restoreSelection(k)});this.showDialog(n.container,230,f,!0,!1);n.init()};
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var c=b.getSelectionCells(),e=new mxDictionary,k=[],g=0;g<c.length;g++){var p=b.isTableCell(c[g])?b.model.getParent(c[g]):c[g];null==p||e.get(p)||(e.put(p,!0),k.push(p))}b.setSelectionCells(b.duplicateCells(k,!1))}catch(t){this.handleError(t)}};
+EditorUi.prototype.pickColor=function(b,c){var e=this.editor.graph,k=e.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),p=new ColorDialog(this,b||"none",function(b){e.cellEditor.restoreSelection(k);c(b)},function(){e.cellEditor.restoreSelection(k)});this.showDialog(p.container,230,g,!0,!1);p.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=null;try{var e=b.indexOf("&lt;mxGraphModel ");if(0<=e){var k=b.lastIndexOf("&lt;/mxGraphModel&gt;");k>e&&(c=b.substring(e,k+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(f){}return c};
+EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=null;try{var e=b.indexOf("&lt;mxGraphModel ");if(0<=e){var k=b.lastIndexOf("&lt;/mxGraphModel&gt;");k>e&&(c=b.substring(e,k+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return c};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(c){null!=c?b(c):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(c){if(null!=c){var e=decodeURIComponent(c);this.isCompatibleString(e)&&(c=e)}b(c)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,c){navigator.clipboard.read().then(mxUtils.bind(this,function(e){if(null!=e&&0<e.length&&"html"==c&&0<=mxUtils.indexOf(e[0].types,"text/html"))e[0].getType("text/html").then(mxUtils.bind(this,function(c){c.text().then(mxUtils.bind(this,function(c){try{var e=this.parseHtmlData(c),f="text/plain"!=e.getAttribute("data-type")?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);try{var d=f.lastIndexOf("%3E");
-0<=d&&d<f.length-3&&(f=f.substring(0,d+3))}catch(q){}try{var g=e.getElementsByTagName("span"),l=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(f);this.isCompatibleString(l)&&(f=l)}catch(q){}}catch(q){}b(this.isCompatibleString(f)?f:null)}))["catch"](function(c){b(null)})}))["catch"](function(c){b(null)});else if(null!=e&&0<e.length&&"text"==c&&0<=mxUtils.indexOf(e[0].types,"text/plain"))e[0].getType("text/plain").then(function(c){c.text().then(function(c){b(c)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,c){navigator.clipboard.read().then(mxUtils.bind(this,function(e){if(null!=e&&0<e.length&&"html"==c&&0<=mxUtils.indexOf(e[0].types,"text/html"))e[0].getType("text/html").then(mxUtils.bind(this,function(c){c.text().then(mxUtils.bind(this,function(c){try{var e=this.parseHtmlData(c),g="text/plain"!=e.getAttribute("data-type")?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);try{var d=g.lastIndexOf("%3E");
+0<=d&&d<g.length-3&&(g=g.substring(0,d+3))}catch(m){}try{var f=e.getElementsByTagName("span"),l=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(g);this.isCompatibleString(l)&&(g=l)}catch(m){}}catch(m){}b(this.isCompatibleString(g)?g:null)}))["catch"](function(c){b(null)})}))["catch"](function(c){b(null)});else if(null!=e&&0<e.length&&"text"==c&&0<=mxUtils.indexOf(e[0].types,"text/plain"))e[0].getType("text/plain").then(function(c){c.text().then(function(c){b(c)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(c){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var c=null;if(null!=b&&0<b.length){var e="<meta "==b.substring(0,6),c=document.createElement("div");c.innerHTML=(e?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=c.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=c.firstChild.nextSibling&&c.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
c.firstChild.nodeName&&"A"==c.firstChild.nextSibling.nodeName&&null==c.firstChild.nextSibling.nextSibling&&(b=null==c.firstChild.nextSibling.innerText?mxUtils.getTextContent(c.firstChild.nextSibling):c.firstChild.nextSibling.innerText,b==c.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(c,b),asHtml=!1));e=e&&null!=c.firstChild?c.firstChild.nextSibling:c.firstChild;null!=e&&null==e.nextSibling&&e.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==e.nodeName?(b=e.getAttribute("src"),
@@ -2272,111 +2275,111 @@ EditorUi.prototype.extractGraphModelFromEvent=function(b){var c=null,e=null;null
(c=e);return c};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(b){this.save(b)}),null,mxUtils.bind(this,function(b){if(null!=b&&0<b.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,c);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(c.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(c))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(c);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayout=function(b,c,e){var k=this.editor.graph;if(k.isEnabled()){k.getModel().beginUpdate();try{b()}catch(f){throw f;}finally{this.allowAnimation&&c&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(b=new mxMorphing(k),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=e&&e()})),b.startAnimation()):(k.getModel().endUpdate(),null!=e&&e())}}};
-EditorUi.prototype.showImageDialog=function(b,c,e,k){k=this.editor.graph.cellEditor;var f=k.saveSelection(),n=mxUtils.prompt(b,c);k.restoreSelection(f);if(null!=n&&0<n.length){var t=new Image;t.onload=function(){e(n,t.width,t.height)};t.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};t.src=n}else e(null)};EditorUi.prototype.showLinkDialog=function(b,c,e){b=new LinkDialog(this,b,c,e);this.showDialog(b.container,420,90,!0,!0);b.init()};
+EditorUi.prototype.executeLayout=function(b,c,e){var k=this.editor.graph;if(k.isEnabled()){k.getModel().beginUpdate();try{b()}catch(g){throw g;}finally{this.allowAnimation&&c&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(b=new mxMorphing(k),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=e&&e()})),b.startAnimation()):(k.getModel().endUpdate(),null!=e&&e())}}};
+EditorUi.prototype.showImageDialog=function(b,c,e,k){k=this.editor.graph.cellEditor;var g=k.saveSelection(),p=mxUtils.prompt(b,c);k.restoreSelection(g);if(null!=p&&0<p.length){var t=new Image;t.onload=function(){e(p,t.width,t.height)};t.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};t.src=p}else e(null)};EditorUi.prototype.showLinkDialog=function(b,c,e){b=new LinkDialog(this,b,c,e);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};
EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b){b=new ChangePageSetup(this,null,b);b.ignoreColor=!0;this.editor.graph.model.execute(b)});var e=mxUtils.prompt(mxResources.get("backgroundImage"),null!=c?c.src:"");null!=e&&0<e.length?(c=new Image,c.onload=function(){b(new mxImage(e,c.width,c.height),!1)},c.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},c.src=e):b(null)};
EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,c,e){mxUtils.confirm(b)?null!=c&&c():null!=e&&e()};EditorUi.prototype.createOutline=function(b){var c=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){c.update(!1)});return c};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(b){function c(b,g,c){t.push(function(){if(!k.isSelectionEmpty()&&k.isEnabled())if(g=null!=g?g:1,c){k.getModel().beginUpdate();try{for(var d=k.getSelectionCells(),e=0;e<d.length;e++)if(k.getModel().isVertex(d[e])&&k.isCellResizable(d[e])){var l=k.getCellGeometry(d[e]);null!=l&&(l=l.clone(),37==b?l.width=Math.max(0,l.width-g):38==b?l.height=Math.max(0,l.height-g):39==b?l.width+=g:40==b&&(l.height+=g),k.getModel().setGeometry(d[e],l))}}finally{k.getModel().endUpdate()}}else{var f=
-k.getSelectionCell(),l=k.model.getParent(f),d=null;1==k.getSelectionCount()&&k.model.isVertex(f)&&null!=k.layoutManager&&!k.isCellLocked(f)&&(d=k.layoutManager.getLayout(l));if(null!=d&&d.constructor==mxStackLayout)d=l.getIndex(f),37==b||38==b?k.model.add(l,f,Math.max(0,d-1)):39!=b&&40!=b||k.model.add(l,f,Math.min(k.model.getChildCount(l),d+1));else{d=k.getMovableCells(k.getSelectionCells());f=[];for(e=0;e<d.length;e++)l=k.getCurrentCellStyle(d[e]),"1"==mxUtils.getValue(l,"part","0")?(l=k.model.getParent(d[e]),
-k.model.isVertex(l)&&0>mxUtils.indexOf(d,l)&&f.push(l)):f.push(d[e]);0<f.length&&(d=l=0,37==b?l=-g:38==b?d=-g:39==b?l=g:40==b&&(d=g),k.moveCells(f,l,d))}}});null!=d&&window.clearTimeout(d);d=window.setTimeout(function(){if(0<t.length){k.getModel().beginUpdate();try{for(var b=0;b<t.length;b++)t[b]();t=[]}finally{k.getModel().endUpdate()}}},200)}var e=this,k=this.editor.graph,f=new mxKeyHandler(k),n=f.isEventIgnored;f.isEventIgnored=function(b){return!(mxEvent.isShiftDown(b)&&9==b.keyCode)&&(!this.isControlDown(b)||
-mxEvent.isShiftDown(b)||90!=b.keyCode&&89!=b.keyCode&&188!=b.keyCode&&190!=b.keyCode&&85!=b.keyCode)&&(66!=b.keyCode&&73!=b.keyCode||!this.isControlDown(b)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&n.apply(this,arguments)};f.isEnabledForEvent=function(b){return!mxEvent.isConsumed(b)&&this.isGraphEvent(b)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};f.isControlDown=function(b){return mxEvent.isControlDown(b)||mxClient.IS_MAC&&b.metaKey};var t=[],d=
-null,g={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=f.getFunction;mxKeyHandler.prototype.getFunction=function(b){if(k.isEnabled()){if(mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){var d=e.actions.get(e.altShiftActions[b.keyCode]);if(null!=d)return d.funct}if(null!=g[b.keyCode]&&!k.isSelectionEmpty())if(!this.isControlDown(b)&&mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){if(k.model.isVertex(k.getSelectionCell()))return function(){var d=
-k.connectVertex(k.getSelectionCell(),g[b.keyCode],k.defaultEdgeLength,b,!0);null!=d&&0<d.length&&(1==d.length&&k.model.isEdge(d[0])?k.setSelectionCell(k.model.getTerminal(d[0],!1)):k.setSelectionCell(d[d.length-1]),k.scrollCellToVisible(k.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(k.view.getState(k.getSelectionCell())))}}else return this.isControlDown(b)?function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null,!0)}:function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null)}}return l.apply(this,
-arguments)};f.bindAction=mxUtils.bind(this,function(b,d,g,c){var e=this.actions.get(g);null!=e&&(g=function(){e.isEnabled()&&e.funct()},d?c?f.bindControlShiftKey(b,g):f.bindControlKey(b,g):c?f.bindShiftKey(b,g):f.bindKey(b,g))});var q=this,p=f.escape;f.escape=function(b){p.apply(this,arguments)};f.enter=function(){};f.bindControlShiftKey(36,function(){k.exitGroup()});f.bindControlShiftKey(35,function(){k.enterGroup()});f.bindShiftKey(36,function(){k.home()});f.bindKey(35,function(){k.refresh()});
-f.bindAction(107,!0,"zoomIn");f.bindAction(109,!0,"zoomOut");f.bindAction(80,!0,"print");f.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)f.bindControlKey(36,function(){k.isEnabled()&&k.foldCells(!0)}),f.bindControlKey(35,function(){k.isEnabled()&&k.foldCells(!1)}),f.bindControlKey(13,function(){q.ctrlEnter()}),f.bindAction(8,!1,"delete"),f.bindAction(8,!0,"deleteAll"),f.bindAction(8,!1,"deleteLabels",!0),f.bindAction(46,!1,"delete"),f.bindAction(46,!0,"deleteAll"),
-f.bindAction(46,!1,"deleteLabels",!0),f.bindAction(36,!1,"resetView"),f.bindAction(72,!0,"fitWindow",!0),f.bindAction(74,!0,"fitPage"),f.bindAction(74,!0,"fitTwoPages",!0),f.bindAction(48,!0,"customZoom"),f.bindAction(82,!0,"turn"),f.bindAction(82,!0,"clearDefaultStyle",!0),f.bindAction(83,!0,"save"),f.bindAction(83,!0,"saveAs",!0),f.bindAction(65,!0,"selectAll"),f.bindAction(65,!0,"selectNone",!0),f.bindAction(73,!0,"selectVertices",!0),f.bindAction(69,!0,"selectEdges",!0),f.bindAction(69,!0,"editStyle"),
-f.bindAction(66,!0,"bold"),f.bindAction(66,!0,"toBack",!0),f.bindAction(70,!0,"toFront",!0),f.bindAction(68,!0,"duplicate"),f.bindAction(68,!0,"setAsDefaultStyle",!0),f.bindAction(90,!0,"undo"),f.bindAction(89,!0,"autosize",!0),f.bindAction(88,!0,"cut"),f.bindAction(67,!0,"copy"),f.bindAction(86,!0,"paste"),f.bindAction(71,!0,"group"),f.bindAction(77,!0,"editData"),f.bindAction(71,!0,"grid",!0),f.bindAction(73,!0,"italic"),f.bindAction(76,!0,"lockUnlock"),f.bindAction(76,!0,"layers",!0),f.bindAction(80,
-!0,"formatPanel",!0),f.bindAction(85,!0,"underline"),f.bindAction(85,!0,"ungroup",!0),f.bindAction(190,!0,"superscript"),f.bindAction(188,!0,"subscript"),f.bindAction(13,!1,"keyPressEnter"),f.bindKey(113,function(){k.isEnabled()&&k.startEditingAtCell()});mxClient.IS_WIN?f.bindAction(89,!0,"redo"):f.bindAction(90,!0,"redo",!0);return f};
+EditorUi.prototype.createKeyHandler=function(b){function c(b,f,c){t.push(function(){if(!k.isSelectionEmpty()&&k.isEnabled())if(f=null!=f?f:1,c){k.getModel().beginUpdate();try{for(var d=k.getSelectionCells(),e=0;e<d.length;e++)if(k.getModel().isVertex(d[e])&&k.isCellResizable(d[e])){var l=k.getCellGeometry(d[e]);null!=l&&(l=l.clone(),37==b?l.width=Math.max(0,l.width-f):38==b?l.height=Math.max(0,l.height-f):39==b?l.width+=f:40==b&&(l.height+=f),k.getModel().setGeometry(d[e],l))}}finally{k.getModel().endUpdate()}}else{var g=
+k.getSelectionCell(),l=k.model.getParent(g),d=null;1==k.getSelectionCount()&&k.model.isVertex(g)&&null!=k.layoutManager&&!k.isCellLocked(g)&&(d=k.layoutManager.getLayout(l));if(null!=d&&d.constructor==mxStackLayout)d=l.getIndex(g),37==b||38==b?k.model.add(l,g,Math.max(0,d-1)):39!=b&&40!=b||k.model.add(l,g,Math.min(k.model.getChildCount(l),d+1));else{d=k.getMovableCells(k.getSelectionCells());g=[];for(e=0;e<d.length;e++)l=k.getCurrentCellStyle(d[e]),"1"==mxUtils.getValue(l,"part","0")?(l=k.model.getParent(d[e]),
+k.model.isVertex(l)&&0>mxUtils.indexOf(d,l)&&g.push(l)):g.push(d[e]);0<g.length&&(d=l=0,37==b?l=-f:38==b?d=-f:39==b?l=f:40==b&&(d=f),k.moveCells(g,l,d))}}});null!=d&&window.clearTimeout(d);d=window.setTimeout(function(){if(0<t.length){k.getModel().beginUpdate();try{for(var b=0;b<t.length;b++)t[b]();t=[]}finally{k.getModel().endUpdate()}}},200)}var e=this,k=this.editor.graph,g=new mxKeyHandler(k),p=g.isEventIgnored;g.isEventIgnored=function(b){return!(mxEvent.isShiftDown(b)&&9==b.keyCode)&&(!this.isControlDown(b)||
+mxEvent.isShiftDown(b)||90!=b.keyCode&&89!=b.keyCode&&188!=b.keyCode&&190!=b.keyCode&&85!=b.keyCode)&&(66!=b.keyCode&&73!=b.keyCode||!this.isControlDown(b)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};g.isEnabledForEvent=function(b){return!mxEvent.isConsumed(b)&&this.isGraphEvent(b)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};g.isControlDown=function(b){return mxEvent.isControlDown(b)||mxClient.IS_MAC&&b.metaKey};var t=[],d=
+null,f={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=g.getFunction;mxKeyHandler.prototype.getFunction=function(b){if(k.isEnabled()){if(mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){var d=e.actions.get(e.altShiftActions[b.keyCode]);if(null!=d)return d.funct}if(null!=f[b.keyCode]&&!k.isSelectionEmpty())if(!this.isControlDown(b)&&mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){if(k.model.isVertex(k.getSelectionCell()))return function(){var d=
+k.connectVertex(k.getSelectionCell(),f[b.keyCode],k.defaultEdgeLength,b,!0);null!=d&&0<d.length&&(1==d.length&&k.model.isEdge(d[0])?k.setSelectionCell(k.model.getTerminal(d[0],!1)):k.setSelectionCell(d[d.length-1]),k.scrollCellToVisible(k.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(k.view.getState(k.getSelectionCell())))}}else return this.isControlDown(b)?function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null,!0)}:function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null)}}return l.apply(this,
+arguments)};g.bindAction=mxUtils.bind(this,function(b,d,f,c){var e=this.actions.get(f);null!=e&&(f=function(){e.isEnabled()&&e.funct()},d?c?g.bindControlShiftKey(b,f):g.bindControlKey(b,f):c?g.bindShiftKey(b,f):g.bindKey(b,f))});var m=this,q=g.escape;g.escape=function(b){q.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){k.exitGroup()});g.bindControlShiftKey(35,function(){k.enterGroup()});g.bindShiftKey(36,function(){k.home()});g.bindKey(35,function(){k.refresh()});
+g.bindAction(107,!0,"zoomIn");g.bindAction(109,!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){k.isEnabled()&&k.foldCells(!0)}),g.bindControlKey(35,function(){k.isEnabled()&&k.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),
+g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),
+g.bindAction(66,!0,"bold"),g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,
+!0,"formatPanel",!0),g.bindAction(85,!0,"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){k.isEnabled()&&k.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&
(mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,
"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}for(var c=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],b=0;b<c.length;b++)null!=c[b]&&null!=c[b].parentNode&&c[b].parentNode.removeChild(c[b])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var b=[["nbsp","160"],["shy","173"]],c=mxUtils.parseXml;mxUtils.parseXml=function(e){for(var k=0;k<b.length;k++)e=e.replace(new RegExp("&"+b[k][0]+";","g"),"&#"+b[k][1]+";");return c(e)}})();
Date.prototype.toISOString||function(){function b(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,c=function(c){return"function"===typeof c||"[object Function]"===b.call(c)},e=Math.pow(2,53)-1;return function(b){var f=Object(b);if(null==b)throw new TypeError("Array.from requires an array-like object - not null or undefined");var k=1<arguments.length?arguments[1]:void 0,t;if("undefined"!==typeof k){if(!c(k))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(t=
-arguments[2])}var d;d=Number(f.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),e);for(var g=c(this)?Object(new this(d)):Array(d),l=0,q;l<d;)q=f[l],g[l]=k?"undefined"===typeof t?k(q,l):k.call(t,q,l):q,l+=1;g.length=d;return g}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,c=function(c){return"function"===typeof c||"[object Function]"===b.call(c)},e=Math.pow(2,53)-1;return function(b){var g=Object(b);if(null==b)throw new TypeError("Array.from requires an array-like object - not null or undefined");var k=1<arguments.length?arguments[1]:void 0,t;if("undefined"!==typeof k){if(!c(k))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(t=
+arguments[2])}var d;d=Number(g.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),e);for(var f=c(this)?Object(new this(d)):Array(d),l=0,m;l<d;)m=g[l],f[l]=k?"undefined"===typeof t?k(m,l):k.call(t,m,l):m,l+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(c){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,c,e){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,c,e,k,f,n){mxGraph.call(this,b,c,e,k);this.themes=f||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=n?n:!1;b=this.baseUrl;c=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=b.indexOf("/",c+2),0<c&&(this.domainUrl=b.substring(0,c)),c=b.lastIndexOf("/"),0<c&&(this.domainPathUrl=b.substring(0,c+1)));this.isHtmlLabel=function(b){b=this.getCurrentCellStyle(b);
-return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,g=null,l=null,q=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),f=e.getState();if(!mxEvent.isAltDown(e.getEvent())&&null!=f)if(this.model.isEdge(f.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),q=this.isCellSelected(f.cell),g=f,d=e,null!=f.text&&null!=f.text.boundingBox&&
-mxUtils.contains(f.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var k=this.selectionCellsHandler.getHandler(f.cell);null!=k&&null!=k.bends&&0<k.bends.length&&(l=k.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(k=this.selectionCellsHandler.getHandler(f.cell),null==k||null==k.getHandleForEvent(e))){var p=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);p.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(f.cell)&&!this.isCellSelected(f.cell)){var m=this.model.getParent(f.cell),k=this.model.getParent(m);if(!this.isCellSelected(k)&&(mxUtils.intersects(p,new mxRectangle(f.x,f.y-2,f.width,3))&&this.model.getChildAt(k,0)!=m||mxUtils.intersects(p,new mxRectangle(f.x,f.y+f.height-2,f.width,3))||mxUtils.intersects(p,new mxRectangle(f.x-2,f.y,2,f.height))&&this.model.getChildAt(m,0)!=f.cell||mxUtils.intersects(p,new mxRectangle(f.x+f.width-
-2,f.y,2,f.height)))&&(m=this.selectionCellsHandler.isHandled(k),this.selectCellForEvent(k,e.getEvent()),k=this.selectionCellsHandler.getHandler(k),null!=k)){var u=k.getHandleForEvent(e);null!=u&&(k.start(e.getGraphX(),e.getGraphY(),u),k.blockDelayedSelection=!m,e.consume())}}for(;!e.isConsumed()&&null!=f&&(this.isTableCell(f.cell)||this.isTableRow(f.cell)||this.isTable(f.cell));)this.isSwimlane(f.cell)&&(k=this.getActualStartSize(f.cell),m=this.view.scale,(0<k.x||0<k.width)&&mxUtils.intersects(p,
-new mxRectangle(f.x+(k.x-k.width-1)*m+(0==k.x?f.width:0),f.y,1,f.height))||(0<k.y||0<k.height)&&mxUtils.intersects(p,new mxRectangle(f.x,f.y+(k.y-k.height-1)*m+(0==k.y?f.height:0),f.width,1)))&&(this.selectCellForEvent(f.cell,e.getEvent()),k=this.selectionCellsHandler.getHandler(f.cell),null!=k&&(u=mxEvent.CUSTOM_HANDLE-k.customHandles.length+1,k.start(e.getGraphX(),e.getGraphY(),u),e.consume())),f=this.view.getState(this.model.getParent(f.cell))}}}));this.addMouseListener({mouseDown:function(b,d){},
-mouseMove:mxUtils.bind(this,function(b,c){var e=this.selectionCellsHandler.handlers.map,f;for(f in e)if(null!=e[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(c.getEvent()))if(f=this.tolerance,null!=t&&null!=g&&null!=d){if(e=g,Math.abs(t.x-c.getGraphX())>f||Math.abs(t.y-c.getGraphY())>f){var k=this.selectionCellsHandler.getHandler(e.cell);null==k&&this.model.isEdge(e.cell)&&(k=this.createHandler(e));if(null!=k&&null!=k.bends&&0<k.bends.length){f=k.getHandleForEvent(d);
-var p=this.view.getEdgeStyle(e),m=p==mxEdgeStyle.EntityRelation;q||l!=mxEvent.LABEL_HANDLE||(f=l);if(m&&0!=f&&f!=k.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!m||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=e.visibleSourceState||f==k.bends.length-1||null!=e.visibleTargetState)m||f==mxEvent.LABEL_HANDLE||(m=e.absolutePoints,null!=m&&(null==p&&null==f||p==mxEdgeStyle.OrthConnector)&&(f=l,null==f&&(f=new mxRectangle(t.x,
-t.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,m[0].x,m[0].y)?f=0:mxUtils.contains(f,m[m.length-1].x,m[m.length-1].y)?f=k.bends.length-1:null!=p&&(2==m.length||3==m.length&&(0==Math.round(m[0].x-m[1].x)&&0==Math.round(m[1].x-m[2].x)||0==Math.round(m[0].y-m[1].y)&&0==Math.round(m[1].y-m[2].y)))?f=2:(f=mxUtils.findNearestSegment(e,t.x,t.y),f=null==p?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),k.start(c.getGraphX(),c.getGraphX(),f),c.consume(),this.graphHandler.reset()}null!=
-k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(e.cell)||(this.selectionCellsHandler.handlers.put(e.cell,k),this.selectCellForEvent(e.cell,c.getEvent())):this.isCellSelected(e.cell)||k.destroy());q=!1;t=d=g=l=null}}else if(e=c.getState(),null!=e&&this.isCellEditable(e.cell)){k=null;if(this.model.isEdge(e.cell)){if(f=new mxRectangle(c.getGraphX(),c.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),m=e.absolutePoints,null!=m)if(null!=e.text&&null!=e.text.boundingBox&&
-mxUtils.contains(e.text.boundingBox,c.getGraphX(),c.getGraphY()))k="move";else if(mxUtils.contains(f,m[0].x,m[0].y)||mxUtils.contains(f,m[m.length-1].x,m[m.length-1].y))k="pointer";else if(null!=e.visibleSourceState||null!=e.visibleTargetState)f=this.view.getEdgeStyle(e),k="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(e)&&(f=mxUtils.findNearestSegment(e,c.getGraphX(),c.getGraphY()),f<m.length-1&&0<=f&&(k=0==Math.round(m[f].x-m[f+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(c.getEvent())){f=
-new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);f.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(e.cell)&&(m=this.model.getParent(e.cell),p=this.model.getParent(m),!this.isCellSelected(p)))if(mxUtils.intersects(f,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(m,0)!=e.cell||mxUtils.intersects(f,new mxRectangle(e.x+e.width-2,e.y,2,e.height)))k="col-resize";else if(mxUtils.intersects(f,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(p,0)!=m||mxUtils.intersects(f,
-new mxRectangle(e.x,e.y+e.height-2,e.width,3)))k="row-resize";for(m=e;null==k&&null!=m&&(this.isTableCell(m.cell)||this.isTableRow(m.cell)||this.isTable(m.cell));){if(this.isSwimlane(m.cell)){var p=this.getActualStartSize(m.cell),u=this.view.scale;(0<p.x||0<p.width)&&mxUtils.intersects(f,new mxRectangle(m.x+(p.x-p.width-1)*u+(0==p.x?m.width*u:0),m.y,1,m.height))?k="col-resize":(0<p.y||0<p.height)&&mxUtils.intersects(f,new mxRectangle(m.x,m.y+(p.y-p.height-1)*u+(0==p.y?m.height:0),m.width,1))&&(k=
-"row-resize")}m=this.view.getState(this.model.getParent(m.cell))}}null!=k&&e.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(b,c){l=t=d=g=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(b){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);b.view.graph.isHtmlLabel(b.cell)&&(d=1!=b.style.html?mxUtils.htmlEntities(d,!1):b.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);
-this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(b,d){return!1};this.alternateEdgeStyle="vertical";null==k&&this.loadStylesheet();var p=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var b=p.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],g=this.graph.pageFormat,c=this.graph.pageScale,e=g.width*c,g=g.height*c,c=this.graph.view.translate,l=this.graph.view.scale,f=this.graph.getPageLayout(),k=0;k<f.width;k++)d.push(new mxRectangle(((f.x+k)*e+c.x)*l,(f.y*g+c.y)*l,e*l,g*l));for(k=1;k<f.height;k++)d.push(new mxRectangle((f.x*e+c.x)*l,((f.y+k)*g+c.y)*l,e*l,g*l));b=d.concat(b)}return b};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
-function(b,d){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var m=this.graphHandler.getCells;this.graphHandler.getCells=function(b){for(var d=m.apply(this,arguments),g=new mxDictionary,c=[],e=0;e<d.length;e++){var l=this.graph.isTableCell(b)&&this.graph.isTableCell(d[e])&&
-this.graph.isCellSelected(d[e])?this.graph.model.getParent(d[e]):this.graph.isTableRow(b)&&this.graph.isTableRow(d[e])&&this.graph.isCellSelected(d[e])?d[e]:this.graph.getCompositeParent(d[e]);null==l||g.get(l)||(g.put(l,!0),c.push(l))}return c};var v=this.graphHandler.start;this.graphHandler.start=function(b,d,g,c){var e=!1;this.graph.isTableCell(b)&&(this.graph.isCellSelected(b)?e=!0:b=this.graph.model.getParent(b));e||this.graph.isTableRow(b)&&this.graph.isCellSelected(b)||(b=this.graph.getCompositeParent(b));
-v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var B=(new Date).getTime(),x=0,E=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;E.apply(this,arguments);b!=this.currentState?(B=(new Date).getTime(),x=0):x=(new Date).getTime()-B};var A=
-this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&A.apply(this,arguments)};var F=this.isToggleEvent;this.isToggleEvent=function(b){return F.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var I=u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(b){return I.apply(this,
+Graph=function(b,c,e,k,g,p){mxGraph.call(this,b,c,e,k);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;c=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=b.indexOf("/",c+2),0<c&&(this.domainUrl=b.substring(0,c)),c=b.lastIndexOf("/"),0<c&&(this.domainPathUrl=b.substring(0,c+1)));this.isHtmlLabel=function(b){b=this.getCurrentCellStyle(b);
+return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,f=null,l=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),g=e.getState();if(!mxEvent.isAltDown(e.getEvent())&&null!=g)if(this.model.isEdge(g.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),m=this.isCellSelected(g.cell),f=g,d=e,null!=g.text&&null!=g.text.boundingBox&&
+mxUtils.contains(g.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var k=this.selectionCellsHandler.getHandler(g.cell);null!=k&&null!=k.bends&&0<k.bends.length&&(l=k.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(k=this.selectionCellsHandler.getHandler(g.cell),null==k||null==k.getHandleForEvent(e))){var q=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);q.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(g.cell)&&!this.isCellSelected(g.cell)){var n=this.model.getParent(g.cell),k=this.model.getParent(n);if(!this.isCellSelected(k)&&(mxUtils.intersects(q,new mxRectangle(g.x,g.y-2,g.width,3))&&this.model.getChildAt(k,0)!=n||mxUtils.intersects(q,new mxRectangle(g.x,g.y+g.height-2,g.width,3))||mxUtils.intersects(q,new mxRectangle(g.x-2,g.y,2,g.height))&&this.model.getChildAt(n,0)!=g.cell||mxUtils.intersects(q,new mxRectangle(g.x+g.width-
+2,g.y,2,g.height)))&&(n=this.selectionCellsHandler.isHandled(k),this.selectCellForEvent(k,e.getEvent()),k=this.selectionCellsHandler.getHandler(k),null!=k)){var p=k.getHandleForEvent(e);null!=p&&(k.start(e.getGraphX(),e.getGraphY(),p),k.blockDelayedSelection=!n,e.consume())}}for(;!e.isConsumed()&&null!=g&&(this.isTableCell(g.cell)||this.isTableRow(g.cell)||this.isTable(g.cell));)this.isSwimlane(g.cell)&&(k=this.getActualStartSize(g.cell),n=this.view.scale,(0<k.x||0<k.width)&&mxUtils.intersects(q,
+new mxRectangle(g.x+(k.x-k.width-1)*n+(0==k.x?g.width:0),g.y,1,g.height))||(0<k.y||0<k.height)&&mxUtils.intersects(q,new mxRectangle(g.x,g.y+(k.y-k.height-1)*n+(0==k.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),k=this.selectionCellsHandler.getHandler(g.cell),null!=k&&(p=mxEvent.CUSTOM_HANDLE-k.customHandles.length+1,k.start(e.getGraphX(),e.getGraphY(),p),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,d){},
+mouseMove:mxUtils.bind(this,function(b,c){var e=this.selectionCellsHandler.handlers.map,g;for(g in e)if(null!=e[g].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(c.getEvent()))if(g=this.tolerance,null!=t&&null!=f&&null!=d){if(e=f,Math.abs(t.x-c.getGraphX())>g||Math.abs(t.y-c.getGraphY())>g){var k=this.selectionCellsHandler.getHandler(e.cell);null==k&&this.model.isEdge(e.cell)&&(k=this.createHandler(e));if(null!=k&&null!=k.bends&&0<k.bends.length){g=k.getHandleForEvent(d);
+var q=this.view.getEdgeStyle(e),n=q==mxEdgeStyle.EntityRelation;m||l!=mxEvent.LABEL_HANDLE||(g=l);if(n&&0!=g&&g!=k.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!n||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=e.visibleSourceState||g==k.bends.length-1||null!=e.visibleTargetState)n||g==mxEvent.LABEL_HANDLE||(n=e.absolutePoints,null!=n&&(null==q&&null==g||q==mxEdgeStyle.OrthConnector)&&(g=l,null==g&&(g=new mxRectangle(t.x,
+t.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,n[0].x,n[0].y)?g=0:mxUtils.contains(g,n[n.length-1].x,n[n.length-1].y)?g=k.bends.length-1:null!=q&&(2==n.length||3==n.length&&(0==Math.round(n[0].x-n[1].x)&&0==Math.round(n[1].x-n[2].x)||0==Math.round(n[0].y-n[1].y)&&0==Math.round(n[1].y-n[2].y)))?g=2:(g=mxUtils.findNearestSegment(e,t.x,t.y),g=null==q?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),k.start(c.getGraphX(),c.getGraphX(),g),c.consume(),this.graphHandler.reset()}null!=
+k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(e.cell)||(this.selectionCellsHandler.handlers.put(e.cell,k),this.selectCellForEvent(e.cell,c.getEvent())):this.isCellSelected(e.cell)||k.destroy());m=!1;t=d=f=l=null}}else if(e=c.getState(),null!=e&&this.isCellEditable(e.cell)){k=null;if(this.model.isEdge(e.cell)){if(g=new mxRectangle(c.getGraphX(),c.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),n=e.absolutePoints,null!=n)if(null!=e.text&&null!=e.text.boundingBox&&
+mxUtils.contains(e.text.boundingBox,c.getGraphX(),c.getGraphY()))k="move";else if(mxUtils.contains(g,n[0].x,n[0].y)||mxUtils.contains(g,n[n.length-1].x,n[n.length-1].y))k="pointer";else if(null!=e.visibleSourceState||null!=e.visibleTargetState)g=this.view.getEdgeStyle(e),k="crosshair",g!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(e)&&(g=mxUtils.findNearestSegment(e,c.getGraphX(),c.getGraphY()),g<n.length-1&&0<=g&&(k=0==Math.round(n[g].x-n[g+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(c.getEvent())){g=
+new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);g.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(e.cell)&&(n=this.model.getParent(e.cell),q=this.model.getParent(n),!this.isCellSelected(q)))if(mxUtils.intersects(g,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(n,0)!=e.cell||mxUtils.intersects(g,new mxRectangle(e.x+e.width-2,e.y,2,e.height)))k="col-resize";else if(mxUtils.intersects(g,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(q,0)!=n||mxUtils.intersects(g,
+new mxRectangle(e.x,e.y+e.height-2,e.width,3)))k="row-resize";for(n=e;null==k&&null!=n&&(this.isTableCell(n.cell)||this.isTableRow(n.cell)||this.isTable(n.cell));){if(this.isSwimlane(n.cell)){var q=this.getActualStartSize(n.cell),p=this.view.scale;(0<q.x||0<q.width)&&mxUtils.intersects(g,new mxRectangle(n.x+(q.x-q.width-1)*p+(0==q.x?n.width*p:0),n.y,1,n.height))?k="col-resize":(0<q.y||0<q.height)&&mxUtils.intersects(g,new mxRectangle(n.x,n.y+(q.y-q.height-1)*p+(0==q.y?n.height:0),n.width,1))&&(k=
+"row-resize")}n=this.view.getState(this.model.getParent(n.cell))}}null!=k&&e.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(b,c){l=t=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(b){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);b.view.graph.isHtmlLabel(b.cell)&&(d=1!=b.style.html?mxUtils.htmlEntities(d,!1):b.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);
+this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(b,d){return!1};this.alternateEdgeStyle="vertical";null==k&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
+function(){var b=q.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],f=this.graph.pageFormat,c=this.graph.pageScale,e=f.width*c,f=f.height*c,c=this.graph.view.translate,l=this.graph.view.scale,g=this.graph.getPageLayout(),k=0;k<g.width;k++)d.push(new mxRectangle(((g.x+k)*e+c.x)*l,(g.y*f+c.y)*l,e*l,f*l));for(k=1;k<g.height;k++)d.push(new mxRectangle((g.x*e+c.x)*l,((g.y+k)*f+c.y)*l,e*l,f*l));b=d.concat(b)}return b};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+function(b,d){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(b){for(var d=n.apply(this,arguments),f=new mxDictionary,c=[],e=0;e<d.length;e++){var l=this.graph.isTableCell(b)&&this.graph.isTableCell(d[e])&&
+this.graph.isCellSelected(d[e])?this.graph.model.getParent(d[e]):this.graph.isTableRow(b)&&this.graph.isTableRow(d[e])&&this.graph.isCellSelected(d[e])?d[e]:this.graph.getCompositeParent(d[e]);null==l||f.get(l)||(f.put(l,!0),c.push(l))}return c};var v=this.graphHandler.start;this.graphHandler.start=function(b,d,f,c){var e=!1;this.graph.isTableCell(b)&&(this.graph.isCellSelected(b)?e=!0:b=this.graph.model.getParent(b));e||this.graph.isTableRow(b)&&this.graph.isCellSelected(b)||(b=this.graph.getCompositeParent(b));
+v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var y=(new Date).getTime(),x=0,H=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;H.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var D=
+this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&D.apply(this,arguments)};var E=this.isToggleEvent;this.isToggleEvent=function(b){return E.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var J=u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(b){return J.apply(this,
arguments)&&!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isControlDown(b.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==b.getState()&&mxEvent.isTouchEvent(b.getEvent())};var L=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(L=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,
-mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=L)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var H=this.click;this.click=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);if(this.isEnabled()&&!d||b.isConsumed())return H.apply(this,arguments);var g=d?b.sourceState.cell:b.getCell();null!=g&&(g=this.getClickableLinkForCell(g),null!=g&&(this.isCustomLink(g)?
-this.customLinkClicked(g):this.openLink(g)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};var K=this.tooltipHandler.show;this.tooltipHandler.show=function(){K.apply(this,arguments);if(null!=this.div)for(var b=this.div.getElementsByTagName("a"),d=0;d<b.length;d++)null!=b[d].getAttribute("href")&&null==b[d].getAttribute("target")&&b[d].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};
-this.getCursorForMouseEvent=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);return this.getCursorForCell(d?b.sourceState.cell:b.getCell())};var C=this.getCursorForCell;this.getCursorForCell=function(b){if(!this.isEnabled()||this.isCellLocked(b)){if(null!=this.getClickableLinkForCell(b))return"pointer";if(this.isCellLocked(b))return"default"}return C.apply(this,arguments)};this.selectRegion=function(b,d){var g=this.getCells(b.x,b.y,b.width,b.height,null,
-null,null,function(b){return"1"==mxUtils.getValue(b.style,"locked","0")},!0);this.selectCellsForEvent(g,d);return g};var N=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,d,g){return this.graph.isCellSelected(b)?!1:N.apply(this,arguments)};this.isCellLocked=function(b){for(;null!=b;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(b),"locked","0"))return!0;b=this.model.getParent(b)}return!1};var S=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,
-mxUtils.bind(this,function(b,d){if("mouseDown"==d.getProperty("eventName")){var g=d.getProperty("event").getState();S=null==g||this.isSelectionEmpty()||this.isCellSelected(g.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,d){if(!mxEvent.isMultiTouchEvent(d)){var g=d.getProperty("event"),e=d.getProperty("cell");null==e?(g=mxUtils.convertPoint(this.container,mxEvent.getClientX(g),mxEvent.getClientY(g)),u.start(g.x,g.y)):null!=S?this.addSelectionCells(S):
-1<this.getSelectionCount()&&this.isCellSelected(e)&&this.removeSelectionCell(e);S=null;d.consume()}}));this.connectionHandler.selectCells=function(b,d){this.graph.setSelectionCell(d||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,d){var g=b.view.graph;return d&&(g.isCellSelected(b.cell)||g.isTableRow(b.cell)&&g.selectionCellsHandler.isHandled(g.model.getParent(b.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.connectionHandler.constraintHandler;
-null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var R=this.updateMouseEvent;this.updateMouseEvent=function(b){b=R.apply(this,arguments);null!=b.state&&this.isCellLocked(b.getCell())&&(b.state=null);return b}}this.currentTranslate=new mxPoint(0,0)};
+mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=L)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var G=this.click;this.click=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);if(this.isEnabled()&&!d||b.isConsumed())return G.apply(this,arguments);var f=d?b.sourceState.cell:b.getCell();null!=f&&(f=this.getClickableLinkForCell(f),null!=f&&(this.isCustomLink(f)?
+this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};var K=this.tooltipHandler.show;this.tooltipHandler.show=function(){K.apply(this,arguments);if(null!=this.div)for(var b=this.div.getElementsByTagName("a"),d=0;d<b.length;d++)null!=b[d].getAttribute("href")&&null==b[d].getAttribute("target")&&b[d].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};
+this.getCursorForMouseEvent=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);return this.getCursorForCell(d?b.sourceState.cell:b.getCell())};var C=this.getCursorForCell;this.getCursorForCell=function(b){if(!this.isEnabled()||this.isCellLocked(b)){if(null!=this.getClickableLinkForCell(b))return"pointer";if(this.isCellLocked(b))return"default"}return C.apply(this,arguments)};this.selectRegion=function(b,d){var f=this.getCells(b.x,b.y,b.width,b.height,null,
+null,null,function(b){return"1"==mxUtils.getValue(b.style,"locked","0")},!0);this.selectCellsForEvent(f,d);return f};var M=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,d,f){return this.graph.isCellSelected(b)?!1:M.apply(this,arguments)};this.isCellLocked=function(b){for(;null!=b;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(b),"locked","0"))return!0;b=this.model.getParent(b)}return!1};var P=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,
+mxUtils.bind(this,function(b,d){if("mouseDown"==d.getProperty("eventName")){var f=d.getProperty("event").getState();P=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,d){if(!mxEvent.isMultiTouchEvent(d)){var f=d.getProperty("event"),e=d.getProperty("cell");null==e?(f=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f)),u.start(f.x,f.y)):null!=P?this.addSelectionCells(P):
+1<this.getSelectionCount()&&this.isCellSelected(e)&&this.removeSelectionCell(e);P=null;d.consume()}}));this.connectionHandler.selectCells=function(b,d){this.graph.setSelectionCell(d||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,d){var f=b.view.graph;return d&&(f.isCellSelected(b.cell)||f.isTableRow(b.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(b.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.connectionHandler.constraintHandler;
+null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var S=this.updateMouseEvent;this.updateMouseEvent=function(b){b=S.apply(this,arguments);null!=b.state&&this.isCellLocked(b.getCell())&&(b.state=null);return b}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.createOffscreenGraph=function(b){var c=new Graph(document.createElement("div"));c.stylesheet.styles=mxUtils.clone(b.styles);c.resetViewOnRootChange=!1;c.setConnectable(!1);c.gridEnabled=!1;c.autoScroll=!1;c.setTooltips(!1);c.setEnabled(!1);c.container.style.visibility="hidden";c.container.style.position="absolute";c.container.style.overflow="hidden";c.container.style.height="1px";c.container.style.width="1px";return c};
-Graph.createSvgImage=function(b,c,e,k,f){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+c+'px" '+(null!=k&&null!=f?'viewBox="0 0 '+k+" "+f+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),b,c)};
-Graph.zapGremlins=function(b){for(var c=0,e=[],k=0;k<b.length;k++){var f=b.charCodeAt(k);(32<=f||9==f||10==f||13==f)&&65535!=f&&65534!=f||(e.push(b.substring(c,k)),c=k+1)}0<c&&c<b.length&&e.push(b.substring(c));return 0==e.length?b:e.join("")};Graph.stringToBytes=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=b.charCodeAt(e);return c};Graph.bytesToString=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=String.fromCharCode(b[e]);return c.join("")};
+Graph.createSvgImage=function(b,c,e,k,g){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+c+'px" '+(null!=k&&null!=g?'viewBox="0 0 '+k+" "+g+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),b,c)};
+Graph.zapGremlins=function(b){for(var c=0,e=[],k=0;k<b.length;k++){var g=b.charCodeAt(k);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(e.push(b.substring(c,k)),c=k+1)}0<c&&c<b.length&&e.push(b.substring(c));return 0==e.length?b:e.join("")};Graph.stringToBytes=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=b.charCodeAt(e);return c};Graph.bytesToString=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=String.fromCharCode(b[e]);return c.join("")};
Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(b,e){return String.fromCharCode(parseInt(e,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(b){return"%"+("00"+b.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,c){var e=mxUtils.getXml(b);return Graph.compress(c?e:Graph.zapGremlins(e))};
Graph.arrayBufferToString=function(b){var c="";b=new Uint8Array(b);for(var e=b.byteLength,k=0;k<e;k++)c+=String.fromCharCode(b[k]);return c};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(b){return b.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(b,c,e){var k=c.charCodeAt(0),f=1,n=-1;for(e=e||0;e<b.byteLength;e++)if(b[e]==k){n=e;break}for(e=n+1;-1<n&&e<b.byteLength&&e<n+c.length-1;e++){if(b[e]!=c.charCodeAt(f))return Graph.arrayBufferIndexOfString(b,c,n+1);f++}return f==c.length-1?n:-1};Graph.compress=function(b,c){if(null==b||0==b.length||"undefined"===typeof pako)return b;var e=c?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(e)))};
+Graph.arrayBufferIndexOfString=function(b,c,e){var k=c.charCodeAt(0),g=1,p=-1;for(e=e||0;e<b.byteLength;e++)if(b[e]==k){p=e;break}for(e=p+1;-1<p&&e<b.byteLength&&e<p+c.length-1;e++){if(b[e]!=c.charCodeAt(g))return Graph.arrayBufferIndexOfString(b,c,p+1);g++}return g==c.length-1?p:-1};Graph.compress=function(b,c){if(null==b||0==b.length||"undefined"===typeof pako)return b;var e=c?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(e)))};
Graph.decompress=function(b,c,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));c=decodeURIComponent(c?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return e?c:Graph.zapGremlins(c)};
-Graph.fadeNodes=function(b,c,e,k,f){f=null!=f?f:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,c);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+f+"ms ease-in-out");Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=k&&k()},f)},0)};Graph.setTransitionForNodes=function(b,c){for(var e=0;e<b.length;e++)mxUtils.setPrefixedStyle(b[e].style,"transition",c)};
+Graph.fadeNodes=function(b,c,e,k,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,c);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=k&&k()},g)},0)};Graph.setTransitionForNodes=function(b,c){for(var e=0;e<b.length;e++)mxUtils.setPrefixedStyle(b[e].style,"transition",c)};
Graph.setOpacityForNodes=function(b,c){for(var e=0;e<b.length;e++)b[e].style.opacity=c};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};Graph.sanitizeHtml=function(b,c){return html_sanitize(b,function(b){return null!=b&&"javascript:"!==b.toString().toLowerCase().substring(0,11)?b:null},function(b){return b})};
-Graph.sanitizeSvg=function(b){for(var c=b.getElementsByTagName("*"),e=0;e<c.length;e++)for(var k=0;k<c[e].attributes.length;k++){var f=c[e].attributes[k];2<f.name.length&&"on"==f.name.toLowerCase().substring(0,2)&&c[e].removeAttribute(f.name)}for(b=b.getElementsByTagName("script");0<b.length;)b[0].parentNode.removeChild(b[0])};
-Graph.clipSvgDataUri=function(b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var c=document.createElement("div");c.style.position="absolute";c.style.visibility="hidden";var e=decodeURIComponent(escape(atob(b.substring(26)))),k=e.indexOf("<svg");if(0<=k){c.innerHTML=e.substring(k);Graph.sanitizeSvg(c);var f=c.getElementsByTagName("svg");if(0<f.length){document.body.appendChild(c);try{var n=f[0].getBBox();0<n.width&&0<n.height&&(c.getElementsByTagName("svg")[0].setAttribute("viewBox",
-n.x+" "+n.y+" "+n.width+" "+n.height),c.getElementsByTagName("svg")[0].setAttribute("width",n.width),c.getElementsByTagName("svg")[0].setAttribute("height",n.height))}catch(t){}finally{document.body.removeChild(c)}b=Editor.createSvgDataUri(mxUtils.getXml(f[0]))}}}catch(t){}return b};
+Graph.sanitizeSvg=function(b){for(var c=b.getElementsByTagName("*"),e=0;e<c.length;e++)for(var k=0;k<c[e].attributes.length;k++){var g=c[e].attributes[k];2<g.name.length&&"on"==g.name.toLowerCase().substring(0,2)&&c[e].removeAttribute(g.name)}for(b=b.getElementsByTagName("script");0<b.length;)b[0].parentNode.removeChild(b[0])};
+Graph.clipSvgDataUri=function(b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var c=document.createElement("div");c.style.position="absolute";c.style.visibility="hidden";var e=decodeURIComponent(escape(atob(b.substring(26)))),k=e.indexOf("<svg");if(0<=k){c.innerHTML=e.substring(k);Graph.sanitizeSvg(c);var g=c.getElementsByTagName("svg");if(0<g.length){document.body.appendChild(c);try{var p=g[0].getBBox();0<p.width&&0<p.height&&(c.getElementsByTagName("svg")[0].setAttribute("viewBox",
+p.x+" "+p.y+" "+p.width+" "+p.height),c.getElementsByTagName("svg")[0].setAttribute("width",p.width),c.getElementsByTagName("svg")[0].setAttribute("height",p.height))}catch(t){}finally{document.body.removeChild(c)}b=Editor.createSvgDataUri(mxUtils.getXml(g[0]))}}}catch(t){}return b};
Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.createRemoveIcon=function(b,c){var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);e.setAttribute("title",b);e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px";e.style.cursor="pointer";mxEvent.addListener(e,"click",c);return e};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i;
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled=!0;Graph.prototype.lightbox=!1;
Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;
Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(b,c){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var e=b.view.graph.tolerance,k=!0,t=null,d=mxUtils.bind(this,function(b){k=!0;t=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b))}),g=mxUtils.bind(this,function(b){k=k&&null!=t&&Math.abs(t.x-mxEvent.getClientX(b))<e&&Math.abs(t.y-mxEvent.getClientY(b))<e}),l=mxUtils.bind(this,function(d){if(k)for(var g=mxEvent.getSource(d);null!=
-g&&g!=c.node;){if("a"==g.nodeName.toLowerCase()){b.view.graph.labelLinkClicked(b,g,d);break}g=g.parentNode}});mxEvent.addGestureListeners(c.node,d,g,l);mxEvent.addListener(c.node,"click",function(b){mxEvent.consume(b)})};if(null!=this.tooltipHandler){var c=this.tooltipHandler.init;this.tooltipHandler.init=function(){c.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);"A"==c.nodeName&&(c=c.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(b,c){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var e=b.view.graph.tolerance,k=!0,t=null,d=mxUtils.bind(this,function(b){k=!0;t=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b))}),f=mxUtils.bind(this,function(b){k=k&&null!=t&&Math.abs(t.x-mxEvent.getClientX(b))<e&&Math.abs(t.y-mxEvent.getClientY(b))<e}),l=mxUtils.bind(this,function(d){if(k)for(var f=mxEvent.getSource(d);null!=
+f&&f!=c.node;){if("a"==f.nodeName.toLowerCase()){b.view.graph.labelLinkClicked(b,f,d);break}f=f.parentNode}});mxEvent.addGestureListeners(c.node,d,f,l);mxEvent.addListener(c.node,"click",function(b){mxEvent.consume(b)})};if(null!=this.tooltipHandler){var c=this.tooltipHandler.init;this.tooltipHandler.init=function(){c.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);"A"==c.nodeName&&(c=c.getAttribute("href"),null!=
c&&this.graph.isCustomLink(c)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&this.graph.customLinkClicked(c)&&mxEvent.consume(b))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){if(null!=this.container&&this.flowAnimationStyle){var e=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(e)}}));this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.getVerticesAndEdges=function(b,c){b=null!=b?b:!0;c=null!=c?c:!0;var d=this.model;return d.filterDescendants(function(g){return b&&d.isVertex(g)||c&&d.isEdge(g)},d.getRoot())};Graph.prototype.getCommonStyle=function(b){for(var c={},d=0;d<b.length;d++){var g=this.view.getState(b[d]);this.mergeStyle(g.style,c,0==d)}return c};Graph.prototype.mergeStyle=function(b,
-c,d){if(null!=b){var g={},e;for(e in b){var f=b[e];null!=f&&(g[e]=!0,null==c[e]&&d?c[e]=f:c[e]!=f&&delete c[e])}for(e in c)g[e]||delete c[e]}};Graph.prototype.getStartEditingCell=function(b,c){var d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(b)&&(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b)&&(b=this.model.getChildAt(b,0),d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(b)&&
-(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b))for(d=0;d<this.model.getChildCount(b);d++){var g=this.model.getChildAt(b,d);if(this.isCellEditable(g)){b=g;break}}return b};Graph.prototype.copyStyle=function(b){var c=null;if(null!=b){c=mxUtils.clone(this.getCurrentCellStyle(b));b=this.model.getStyle(b);b=null!=b?b.split(";"):[];for(var d=0;d<b.length;d++){var g=b[d],e=g.indexOf("=");if(0<=e){var f=g.substring(0,e),g=g.substring(e+1);null==c[f]&&g==mxConstants.NONE&&
-(c[f]=mxConstants.NONE)}}}return c};Graph.prototype.pasteStyle=function(b,c,d){d=null!=d?d:Graph.pasteStyles;this.model.beginUpdate();try{for(var g=0;g<c.length;g++)for(var e=this.getCurrentCellStyle(c[g]),f=0;f<d.length;f++){var k=e[d[f]],m=b[d[f]];k==m||null==k&&m==mxConstants.NONE||this.setCellStyles(d[f],m,[c[g]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||
-mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(b,c,d,g,e,f){this.useCssTransforms&&(b=b/this.currentScale-this.currentTranslate.x,c=c/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(b,c,d,g,e,f){g=null!=g?g:!0;e=null!=e?e:!0;null==d&&(d=this.getCurrentRoot(),
-null==d&&(d=this.getModel().getRoot()));if(null!=d)for(var l=this.model.getChildCount(d)-1;0<=l;l--){var k=this.model.getChildAt(d,l),q=this.getScaledCellAt(b,c,k,g,e,f);if(null!=q)return q;if(this.isCellVisible(k)&&(e&&this.model.isEdge(k)||g&&this.model.isVertex(k))&&(q=this.view.getState(k),null!=q&&(null==f||!f(q,b,c))&&this.intersects(q,b,c)))return k}return null};Graph.prototype.isRecursiveVertexResize=function(b){return!this.isSwimlane(b.cell)&&0<this.model.getChildCount(b.cell)&&!this.isCellCollapsed(b.cell)&&
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.getVerticesAndEdges=function(b,c){b=null!=b?b:!0;c=null!=c?c:!0;var d=this.model;return d.filterDescendants(function(f){return b&&d.isVertex(f)||c&&d.isEdge(f)},d.getRoot())};Graph.prototype.getCommonStyle=function(b){for(var c={},d=0;d<b.length;d++){var f=this.view.getState(b[d]);this.mergeStyle(f.style,c,0==d)}return c};Graph.prototype.mergeStyle=function(b,
+c,d){if(null!=b){var f={},e;for(e in b){var g=b[e];null!=g&&(f[e]=!0,null==c[e]&&d?c[e]=g:c[e]!=g&&delete c[e])}for(e in c)f[e]||delete c[e]}};Graph.prototype.getStartEditingCell=function(b,c){var d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(b)&&(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b)&&(b=this.model.getChildAt(b,0),d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(b)&&
+(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b))for(d=0;d<this.model.getChildCount(b);d++){var f=this.model.getChildAt(b,d);if(this.isCellEditable(f)){b=f;break}}return b};Graph.prototype.copyStyle=function(b){var c=null;if(null!=b){c=mxUtils.clone(this.getCurrentCellStyle(b));b=this.model.getStyle(b);b=null!=b?b.split(";"):[];for(var d=0;d<b.length;d++){var f=b[d],e=f.indexOf("=");if(0<=e){var g=f.substring(0,e),f=f.substring(e+1);null==c[g]&&f==mxConstants.NONE&&
+(c[g]=mxConstants.NONE)}}}return c};Graph.prototype.pasteStyle=function(b,c,d){d=null!=d?d:Graph.pasteStyles;this.model.beginUpdate();try{for(var f=0;f<c.length;f++)for(var e=this.getCurrentCellStyle(c[f]),g=0;g<d.length;g++){var k=e[d[g]],n=b[d[g]];k==n||null==k&&n==mxConstants.NONE||this.setCellStyles(d[g],n,[c[f]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||
+mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(b,c,d,f,e,g){this.useCssTransforms&&(b=b/this.currentScale-this.currentTranslate.x,c=c/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(b,c,d,f,e,g){f=null!=f?f:!0;e=null!=e?e:!0;null==d&&(d=this.getCurrentRoot(),
+null==d&&(d=this.getModel().getRoot()));if(null!=d)for(var l=this.model.getChildCount(d)-1;0<=l;l--){var k=this.model.getChildAt(d,l),m=this.getScaledCellAt(b,c,k,f,e,g);if(null!=m)return m;if(this.isCellVisible(k)&&(e&&this.model.isEdge(k)||f&&this.model.isVertex(k))&&(m=this.view.getState(k),null!=m&&(null==g||!g(m,b,c))&&this.intersects(m,b,c)))return k}return null};Graph.prototype.isRecursiveVertexResize=function(b){return!this.isSwimlane(b.cell)&&0<this.model.getChildCount(b.cell)&&!this.isCellCollapsed(b.cell)&&
"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(b){for(var c=this.getCellGeometry(b);null!=c&&c.relative;)b=this.getModel().getParent(b),c=this.getCellGeometry(cellToClone);return b};Graph.prototype.isPart=function(b){return"1"==mxUtils.getValue(this.getCurrentCellStyle(b),"part","0")||this.isTableCell(b)||this.isTableRow(b)};Graph.prototype.getCompositeParent=function(b){for(;this.isPart(b);){var c=
-this.model.getParent(b);if(!this.model.isVertex(c))break;b=c}return b};Graph.prototype.filterSelectionCells=function(b){var c=this.getSelectionCells();if(null!=b){for(var d=[],g=0;g<c.length;g++)b(c[g])||d.push(c[g]);c=d}return c};mxCellHighlight.prototype.getStrokeWidth=function(b){b=this.strokeWidth;this.graph.useCssTransforms&&(b/=this.graph.currentScale);return b};mxGraphView.prototype.getGraphBounds=function(){var b=this.graphBounds;if(this.graph.useCssTransforms)var c=this.graph.currentTranslate,
+this.model.getParent(b);if(!this.model.isVertex(c))break;b=c}return b};Graph.prototype.filterSelectionCells=function(b){var c=this.getSelectionCells();if(null!=b){for(var d=[],f=0;f<c.length;f++)b(c[f])||d.push(c[f]);c=d}return c};mxCellHighlight.prototype.getStrokeWidth=function(b){b=this.strokeWidth;this.graph.useCssTransforms&&(b/=this.graph.currentScale);return b};mxGraphView.prototype.getGraphBounds=function(){var b=this.graphBounds;if(this.graph.useCssTransforms)var c=this.graph.currentTranslate,
d=this.graph.currentScale,b=new mxRectangle((b.x+c.x)*d,(b.y+c.y)*d,b.width*d,b.height*d);return b};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var b=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(c){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=
0,this.translate.y=0);b.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var c=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(b){b=c.apply(this,arguments);for(var e=[],d=0;d<b.length;d++)this.isTableRow(b[d])||this.isTableCell(b[d])||e.push(b[d]);return e};var e=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=
function(b){b=e.apply(this,arguments);for(var c=[],d=0;d<b.length;d++)this.isTable(b[d])||this.isTableRow(b[d])||this.isTableCell(b[d])||c.push(b[d]);return c};Graph.prototype.updateCssTransform=function(){var b=this.view.getDrawPane();if(null!=b)if(b=b.parentNode,this.useCssTransforms){var c=b.getAttribute("transform");b.setAttribute("transformOrigin","0 0");var d=Math.round(100*this.currentScale)/100;b.setAttribute("transform","scale("+d+","+d+")translate("+Math.round(100*this.currentTranslate.x)/
100+","+Math.round(100*this.currentTranslate.y)/100+")");c!=b.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",b.getAttribute("transform"))}else b.removeAttribute("transformOrigin"),b.removeAttribute("transform")};var k=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var b=this.graph.useCssTransforms,c=this.scale,d=this.translate;b&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);
-k.apply(this,arguments);b&&(this.scale=c,this.translate=d)};var f=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(b,c,d){var g=this.useCssTransforms,e=this.view.scale,k=this.view.translate;g&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);f.apply(this,arguments);g&&(this.view.scale=e,this.view.translate=k,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+k.apply(this,arguments);b&&(this.scale=c,this.translate=d)};var g=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(b,c,d){var f=this.useCssTransforms,e=this.view.scale,k=this.view.translate;f&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);g.apply(this,arguments);f&&(this.view.scale=e,this.view.translate=k,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(b,c,e){c=c.getAttribute("href");if(null!=c&&!this.isCustomLink(c)&&(mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(c)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(c),b);mxEvent.consume(e)}};
-Graph.prototype.openLink=function(b,c,e){var k=window;try{if("_self"==c&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var f=b.split("#")[1];window.location.hash=="#"+f&&(window.location.hash="");window.location.hash=f}else k=window.open(b,null!=c?c:"_blank"),null==k||e||(k.opener=null)}catch(n){}return k};
+Graph.prototype.openLink=function(b,c,e){var k=window;try{if("_self"==c&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var g=b.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else k=window.open(b,null!=c?c:"_blank"),null==k||e||(k.opener=null)}catch(p){}return k};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(b){return null!=b&&!this.absoluteUrlPattern.test(b)&&"data:"!==b.substring(0,5)&&!this.isExternalProtocol(b)};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="#"==b.charAt(0)?this.baseUrl+b:"/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b,c){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,c){var e=this.graph.model.getParent(b);if(c!=mxEvent.BEGIN_UPDATE||this.hasLayout(e,c)){e=this.graph.getCellStyle(b);if("stackLayout"==e.childLayout){var k=new mxStackLayout(this.graph,!0);k.resizeParentMax="1"==mxUtils.getValue(e,"resizeParentMax","1");k.horizontal="1"==mxUtils.getValue(e,
"horizontalStack","1");k.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1");k.resizeLast="1"==mxUtils.getValue(e,"resizeLast","0");k.spacing=e.stackSpacing||k.spacing;k.border=e.stackBorder||k.border;k.marginLeft=e.marginLeft||0;k.marginRight=e.marginRight||0;k.marginTop=e.marginTop||0;k.marginBottom=e.marginBottom||0;k.allowGaps=e.allowGaps||0;k.fill=!0;k.allowGaps&&(k.gridSize=parseFloat(mxUtils.getValue(e,"stackUnitSize",20)));return k}if("treeLayout"==e.childLayout)return k=new mxCompactTreeLayout(this.graph),
k.horizontal="1"==mxUtils.getValue(e,"horizontalTree","1"),k.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1"),k.groupPadding=mxUtils.getValue(e,"parentPadding",20),k.levelDistance=mxUtils.getValue(e,"treeLevelDistance",30),k.maintainParentLocation=!0,k.edgeRouting=!1,k.resetEdges=!1,k;if("flowLayout"==e.childLayout)return k=new mxHierarchicalLayout(this.graph,mxUtils.getValue(e,"flowOrientation",mxConstants.DIRECTION_EAST)),k.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1"),k.parentBorder=
mxUtils.getValue(e,"parentPadding",20),k.maintainParentLocation=!0,k.intraCellSpacing=mxUtils.getValue(e,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),k.interRankCellSpacing=mxUtils.getValue(e,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),k.interHierarchySpacing=mxUtils.getValue(e,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),k.parallelEdgeSpacing=mxUtils.getValue(e,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),
-k;if("circleLayout"==e.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==e.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==e.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=null!=b[e].value?b[e].value.attributes:null,f={};f.id=b[e].id;if(null!=k)for(var n=0;n<k.length;n++)f[k[n].nodeName]=k[n].nodeValue;else f.label=this.convertValueToString(b[e]);c.push(f)}return c};
-Graph.prototype.getNodesForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=this.view.getState(b[e]);if(null!=k){for(var f=this.cellRenderer.getShapesForState(k),n=0;n<f.length;n++)null!=f[n]&&null!=f[n].node&&c.push(f[n].node);null!=k.control&&null!=k.control.node&&c.push(k.control.node)}}return c};
-Graph.prototype.createWipeAnimations=function(b,c){for(var e=[],k=0;k<b.length;k++){var f=this.view.getState(b[k]);null!=f&&null!=f.shape&&(this.model.isEdge(f.cell)&&null!=f.absolutePoints&&1<f.absolutePoints.length?e.push(this.createEdgeWipeAnimation(f,c)):this.model.isVertex(f.cell)&&null!=f.shape.bounds&&e.push(this.createVertexWipeAnimation(f,c)))}return e};
-Graph.prototype.createEdgeWipeAnimation=function(b,c){var e=b.absolutePoints.slice(),k=b.segments,f=b.length,n=e.length;return{execute:mxUtils.bind(this,function(t,d){if(null!=b.shape){var g=[e[0]],l=t/d;c||(l=1-l);for(var q=f*l,p=1;p<n;p++)if(q<=k[p-1]){g.push(new mxPoint(e[p-1].x+(e[p].x-e[p-1].x)*q/k[p-1],e[p-1].y+(e[p].y-e[p-1].y)*q/k[p-1]));break}else q-=k[p-1],g.push(e[p]);b.shape.points=g;b.shape.redraw();0==t&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+k;if("circleLayout"==e.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==e.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==e.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=null!=b[e].value?b[e].value.attributes:null,g={};g.id=b[e].id;if(null!=k)for(var p=0;p<k.length;p++)g[k[p].nodeName]=k[p].nodeValue;else g.label=this.convertValueToString(b[e]);c.push(g)}return c};
+Graph.prototype.getNodesForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=this.view.getState(b[e]);if(null!=k){for(var g=this.cellRenderer.getShapesForState(k),p=0;p<g.length;p++)null!=g[p]&&null!=g[p].node&&c.push(g[p].node);null!=k.control&&null!=k.control.node&&c.push(k.control.node)}}return c};
+Graph.prototype.createWipeAnimations=function(b,c){for(var e=[],k=0;k<b.length;k++){var g=this.view.getState(b[k]);null!=g&&null!=g.shape&&(this.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?e.push(this.createEdgeWipeAnimation(g,c)):this.model.isVertex(g.cell)&&null!=g.shape.bounds&&e.push(this.createVertexWipeAnimation(g,c)))}return e};
+Graph.prototype.createEdgeWipeAnimation=function(b,c){var e=b.absolutePoints.slice(),k=b.segments,g=b.length,p=e.length;return{execute:mxUtils.bind(this,function(t,d){if(null!=b.shape){var f=[e[0]],l=t/d;c||(l=1-l);for(var m=g*l,q=1;q<p;q++)if(m<=k[q-1]){f.push(new mxPoint(e[q-1].x+(e[q].x-e[q-1].x)*m/k[q-1],e[q-1].y+(e[q].y-e[q-1].y)*m/k[q-1]));break}else m-=k[q-1],f.push(e[q]);b.shape.points=f;b.shape.redraw();0==t&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=l)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=e,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(b,c){var e=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(k,f){if(null!=b.shape){var n=k/f;c||(n=1-n);b.shape.bounds=new mxRectangle(e.x,e.y,e.width*n,e.height);b.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=n)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=e,b.shape.redraw(),null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};Graph.prototype.executeAnimations=function(b,c,e,k){e=null!=e?e:30;k=null!=k?k:30;var f=null,n=0,t=mxUtils.bind(this,function(){if(n==e||this.stoppingCustomActions){window.clearInterval(f);for(var d=0;d<b.length;d++)b[d].stop();null!=c&&c()}else for(d=0;d<b.length;d++)b[d].execute(n,e);n++}),f=window.setInterval(t,k);t()};
+Graph.prototype.createVertexWipeAnimation=function(b,c){var e=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(k,g){if(null!=b.shape){var p=k/g;c||(p=1-p);b.shape.bounds=new mxRectangle(e.x,e.y,e.width*p,e.height);b.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=p)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=e,b.shape.redraw(),null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};Graph.prototype.executeAnimations=function(b,c,e,k){e=null!=e?e:30;k=null!=k?k:30;var g=null,p=0,t=mxUtils.bind(this,function(){if(p==e||this.stoppingCustomActions){window.clearInterval(g);for(var d=0;d<b.length;d++)b[d].stop();null!=c&&c()}else for(d=0;d<b.length;d++)b[d].execute(p,e);p++}),g=window.setInterval(t,k);t()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),c=this.getGraphBounds();if(0==c.width||0==c.height)return new mxRectangle(0,0,1,1);var e=Math.floor(Math.ceil(c.x/this.view.scale-this.view.translate.x)/b.width),k=Math.floor(Math.ceil(c.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(e,k,Math.ceil((Math.floor((c.x+c.width)/this.view.scale)-this.view.translate.x)/b.width)-e,Math.ceil((Math.floor((c.y+c.height)/this.view.scale)-this.view.translate.y)/b.height)-
k)};Graph.prototype.sanitizeHtml=function(b,c){return Graph.sanitizeHtml(b,c)};Graph.prototype.updatePlaceholders=function(){var b=!1,c;for(c in this.model.cells){var e=this.model.cells[c];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
@@ -2386,39 +2389,39 @@ Graph.prototype.getLabel=function(b){var c=mxGraph.prototype.getLabel.apply(this
Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var c=this.getLinkForCell(b);if(null!=c)return c;b=this.model.getParent(b)}while(null!=b);return null};
Graph.prototype.getGlobalVariable=function(b){var c=null;"date"==b?c=(new Date).toLocaleDateString():"time"==b?c=(new Date).toLocaleTimeString():"timestamp"==b?c=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),c=this.formatDate(new Date,b));return c};
Graph.prototype.formatDate=function(b,c,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var k=this.dateFormatCache,f=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,t=function(b,d){b=String(b);for(d=d||2;b.length<d;)b="0"+b;return b};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(c=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");c=String(k.masks[c]||c||k.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),e=!0);var d=e?"getUTC":"get",g=b[d+"Date"](),l=b[d+"Day"](),q=b[d+"Month"](),p=b[d+"FullYear"](),m=b[d+"Hours"](),v=b[d+"Minutes"](),u=b[d+"Seconds"](),d=b[d+"Milliseconds"](),B=e?0:b.getTimezoneOffset(),x={d:g,dd:t(g),ddd:k.i18n.dayNames[l],dddd:k.i18n.dayNames[l+7],m:q+1,mm:t(q+1),mmm:k.i18n.monthNames[q],mmmm:k.i18n.monthNames[q+
-12],yy:String(p).slice(2),yyyy:p,h:m%12||12,hh:t(m%12||12),H:m,HH:t(m),M:v,MM:t(v),s:u,ss:t(u),l:t(d,3),L:t(99<d?Math.round(d/10):d),t:12>m?"a":"p",tt:12>m?"am":"pm",T:12>m?"A":"P",TT:12>m?"AM":"PM",Z:e?"UTC":(String(b).match(f)||[""]).pop().replace(n,""),o:(0<B?"-":"+")+t(100*Math.floor(Math.abs(B)/60)+Math.abs(B)%60,4),S:["th","st","nd","rd"][3<g%10?0:(10!=g%100-g%10)*g%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(b){return b in x?x[b]:b.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var k=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,t=function(b,d){b=String(b);for(d=d||2;b.length<d;)b="0"+b;return b};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(c=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");c=String(k.masks[c]||c||k.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),e=!0);var d=e?"getUTC":"get",f=b[d+"Date"](),l=b[d+"Day"](),m=b[d+"Month"](),q=b[d+"FullYear"](),n=b[d+"Hours"](),v=b[d+"Minutes"](),u=b[d+"Seconds"](),d=b[d+"Milliseconds"](),y=e?0:b.getTimezoneOffset(),x={d:f,dd:t(f),ddd:k.i18n.dayNames[l],dddd:k.i18n.dayNames[l+7],m:m+1,mm:t(m+1),mmm:k.i18n.monthNames[m],mmmm:k.i18n.monthNames[m+
+12],yy:String(q).slice(2),yyyy:q,h:n%12||12,hh:t(n%12||12),H:n,HH:t(n),M:v,MM:t(v),s:u,ss:t(u),l:t(d,3),L:t(99<d?Math.round(d/10):d),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(b).match(g)||[""]).pop().replace(p,""),o:(0<y?"-":"+")+t(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(b){return b in x?x[b]:b.slice(1,
b.length-1)})};Graph.prototype.getLayerForCells=function(b){var c=null;if(0<b.length){for(c=b[0];!this.model.isLayer(c);)c=this.model.getParent(c);for(var e=1;e<b.length;e++)if(!this.model.isAncestor(c,b[e])){c=null;break}}return c};
-Graph.prototype.createLayersDialog=function(b){var c=document.createElement("div");c.style.position="absolute";for(var e=this.getModel(),k=e.getChildCount(e.root),f=0;f<k;f++)mxUtils.bind(this,function(f){var k=document.createElement("div");k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";var d=document.createElement("input");d.style.display="inline-block";d.setAttribute("type","checkbox");e.isVisible(f)&&(d.setAttribute("checked","checked"),
-d.defaultChecked=!0);k.appendChild(d);var g=this.convertValueToString(f)||mxResources.get("background")||"Background";k.setAttribute("title",g);mxUtils.write(k,g);c.appendChild(k);mxEvent.addListener(d,"click",function(){null!=d.getAttribute("checked")?d.removeAttribute("checked"):d.setAttribute("checked","checked");e.setVisible(f,d.checked);null!=b&&b(f)})})(e.getChildAt(e.root,f));return c};
-Graph.prototype.replacePlaceholders=function(b,c,e,k){k=[];if(null!=c){for(var f=0;match=this.placeholderPattern.exec(c);){var n=match[0];if(2<n.length&&"%label%"!=n&&"%tooltip%"!=n){var t=null;if(match.index>f&&"%"==c.charAt(match.index-1))t=n.substring(1);else{var d=n.substring(1,n.length-1);if("id"==d)t=b.id;else if(0>d.indexOf("{"))for(var g=b;null==t&&null!=g;)null!=g.value&&"object"==typeof g.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(t=g.getAttribute(d+"_"+Graph.diagramLanguage)),
-null==t&&(t=g.hasAttribute(d)?null!=g.getAttribute(d)?g.getAttribute(d):"":null)),g=this.model.getParent(g);null==t&&(t=this.getGlobalVariable(d));null==t&&null!=e&&(t=e[d])}k.push(c.substring(f,match.index)+(null!=t?t:n));f=match.index+n.length}}k.push(c.substring(f))}return k.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var c=[],e=0;e<b.length;e++){var k=this.model.getCell(b[e].id);null!=k&&c.push(k)}this.setSelectionCells(c)}else this.clearSelection()};
+Graph.prototype.createLayersDialog=function(b){var c=document.createElement("div");c.style.position="absolute";for(var e=this.getModel(),k=e.getChildCount(e.root),g=0;g<k;g++)mxUtils.bind(this,function(g){var k=document.createElement("div");k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";var d=document.createElement("input");d.style.display="inline-block";d.setAttribute("type","checkbox");e.isVisible(g)&&(d.setAttribute("checked","checked"),
+d.defaultChecked=!0);k.appendChild(d);var f=this.convertValueToString(g)||mxResources.get("background")||"Background";k.setAttribute("title",f);mxUtils.write(k,f);c.appendChild(k);mxEvent.addListener(d,"click",function(){null!=d.getAttribute("checked")?d.removeAttribute("checked"):d.setAttribute("checked","checked");e.setVisible(g,d.checked);null!=b&&b(g)})})(e.getChildAt(e.root,g));return c};
+Graph.prototype.replacePlaceholders=function(b,c,e,k){k=[];if(null!=c){for(var g=0;match=this.placeholderPattern.exec(c);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var t=null;if(match.index>g&&"%"==c.charAt(match.index-1))t=p.substring(1);else{var d=p.substring(1,p.length-1);if("id"==d)t=b.id;else if(0>d.indexOf("{"))for(var f=b;null==t&&null!=f;)null!=f.value&&"object"==typeof f.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(t=f.getAttribute(d+"_"+Graph.diagramLanguage)),
+null==t&&(t=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)),f=this.model.getParent(f);null==t&&(t=this.getGlobalVariable(d));null==t&&null!=e&&(t=e[d])}k.push(c.substring(g,match.index)+(null!=t?t:p));g=match.index+p.length}}k.push(c.substring(g))}return k.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var c=[],e=0;e<b.length;e++){var k=this.model.getCell(b[e].id);null!=k&&c.push(k)}this.setSelectionCells(c)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(b,c,e){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=e&&(mxEvent.isTouchEvent(c)?e.update(e.getState(this.view.getState(b[1]))):e.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=c&&c.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,c,e,k,f,n,t,d){n=n?n:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var g=this.isCloneConnectSource(b),l=g?b:this.getCompositeParent(b),q=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(q.x+=l.geometry.width/2,q.y-=e):c==
-mxConstants.DIRECTION_SOUTH?(q.x+=l.geometry.width/2,q.y+=l.geometry.height+e):(q.x=c==mxConstants.DIRECTION_WEST?q.x-e:q.x+(l.geometry.width+e),q.y+=l.geometry.height/2);var p=this.view.getState(this.model.getParent(b));e=this.view.scale;var m=this.view.translate,l=m.x*e,m=m.y*e;null!=p&&this.model.isVertex(p.cell)&&(l=p.x,m=p.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(q.x+=b.parent.geometry.x,q.y+=b.parent.geometry.y);n=n?null:(new mxRectangle(l+q.x*e,m+q.y*e)).grow(40*e);n=null!=n?
-this.getCells(0,0,0,0,null,null,n,null,!0):null;var p=this.view.getState(b),v=null,u=null;if(null!=n){n=n.reverse();for(var B=0;B<n.length;B++)if(!this.isCellLocked(n[B])&&!this.model.isEdge(n[B])&&n[B]!=b)if(!this.model.isAncestor(b,n[B])&&this.isContainer(n[B])&&(null==v||n[B]==this.model.getParent(b)))v=n[B];else if(null==u&&this.isCellConnectable(n[B])&&!this.model.isAncestor(n[B],b)&&!this.isSwimlane(n[B])){var x=this.view.getState(n[B]);null==p||null==x||mxUtils.intersects(p,x)||(u=n[B])}}var E=
-!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||f;E&&("1"!=urlParams.sketch||f)&&(c==mxConstants.DIRECTION_NORTH?q.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?q.y+=b.geometry.height/2:q.x=c==mxConstants.DIRECTION_WEST?q.x-b.geometry.width/2:q.x+b.geometry.width/2);var A=[],F=u,u=v;f=mxUtils.bind(this,function(e){if(null==t||null!=e||null==u&&g){this.model.beginUpdate();try{if(null==F&&E){var f=this.getAbsoluteParent(null!=e?e:b),f=g?b:this.getCompositeParent(f);F=null!=e?e:this.duplicateCells([f],
-!1)[0];null!=e&&this.addCells([F],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(F);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?q.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?q.y+=l.height/2:q.x=c==mxConstants.DIRECTION_WEST?q.x-l.width/2:q.x+l.width/2),l.x=q.x-l.width/2,l.y=q.y-l.height/2);null!=v?(this.addCells([F],v,null,null,null,!0),u=null):E&&!g&&this.addCells([F],this.getDefaultParent(),null,null,null,!0)}var m=mxEvent.isControlDown(k)&&
-mxEvent.isShiftDown(k)&&E||null==u&&g?null:this.insertEdge(this.model.getParent(b),null,"",b,F,this.createCurrentEdgeStyle());if(null!=m&&this.connectionHandler.insertBeforeSource){var p=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=m.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==m.parent&&(p=e.parent.getIndex(e),this.model.add(e.parent,m,p))}null==u&&null!=F&&null!=b.parent&&g&&c==mxConstants.DIRECTION_WEST&&(p=b.parent.getIndex(b),this.model.add(b.parent,
-F,p));null!=m&&A.push(m);null==u&&null!=F&&A.push(F);null==F&&null!=m&&m.geometry.setTerminalPoint(q,!1);null!=m&&this.fireEvent(new mxEventObject("cellsInserted","cells",[m]))}finally{this.model.endUpdate()}}if(null!=d)d(A);else return A});if(null==t||null!=F||!E||null==u&&g)return f(F);t(l+q.x*e,m+q.y*e,f)};
+Graph.prototype.connectVertex=function(b,c,e,k,g,p,t,d){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),l=f?b:this.getCompositeParent(b),m=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(m.x+=l.geometry.width/2,m.y-=e):c==
+mxConstants.DIRECTION_SOUTH?(m.x+=l.geometry.width/2,m.y+=l.geometry.height+e):(m.x=c==mxConstants.DIRECTION_WEST?m.x-e:m.x+(l.geometry.width+e),m.y+=l.geometry.height/2);var q=this.view.getState(this.model.getParent(b));e=this.view.scale;var n=this.view.translate,l=n.x*e,n=n.y*e;null!=q&&this.model.isVertex(q.cell)&&(l=q.x,n=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(l+m.x*e,n+m.y*e)).grow(40*e);p=null!=p?
+this.getCells(0,0,0,0,null,null,p,null,!0):null;var q=this.view.getState(b),v=null,u=null;if(null!=p){p=p.reverse();for(var y=0;y<p.length;y++)if(!this.isCellLocked(p[y])&&!this.model.isEdge(p[y])&&p[y]!=b)if(!this.model.isAncestor(b,p[y])&&this.isContainer(p[y])&&(null==v||p[y]==this.model.getParent(b)))v=p[y];else if(null==u&&this.isCellConnectable(p[y])&&!this.model.isAncestor(p[y],b)&&!this.isSwimlane(p[y])){var x=this.view.getState(p[y]);null==q||null==x||mxUtils.intersects(q,x)||(u=p[y])}}var H=
+!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;H&&("1"!=urlParams.sketch||g)&&(c==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var D=[],E=u,u=v;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==u&&f){this.model.beginUpdate();try{if(null==E&&H){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);E=null!=e?e:this.duplicateCells([g],
+!1)[0];null!=e&&this.addCells([E],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(E);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?m.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=l.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-l.width/2:m.x+l.width/2),l.x=m.x-l.width/2,l.y=m.y-l.height/2);null!=v?(this.addCells([E],v,null,null,null,!0),u=null):H&&!f&&this.addCells([E],this.getDefaultParent(),null,null,null,!0)}var q=mxEvent.isControlDown(k)&&
+mxEvent.isShiftDown(k)&&H||null==u&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,E,this.createCurrentEdgeStyle());if(null!=q&&this.connectionHandler.insertBeforeSource){var n=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=q.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==q.parent&&(n=e.parent.getIndex(e),this.model.add(e.parent,q,n))}null==u&&null!=E&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(n=b.parent.getIndex(b),this.model.add(b.parent,
+E,n));null!=q&&D.push(q);null==u&&null!=E&&D.push(E);null==E&&null!=q&&q.geometry.setTerminalPoint(m,!1);null!=q&&this.fireEvent(new mxEventObject("cellsInserted","cells",[q]))}finally{this.model.endUpdate()}}if(null!=d)d(D);else return D});if(null==t||null!=E||!H||null==u&&f)return g(E);t(l+m.x*e,n+m.y*e,g)};
Graph.prototype.getIndexableText=function(){var b=document.createElement("div"),c=[],e,k;for(k in this.model.cells)if(e=this.model.cells[k],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&c.push(e);return c.join(" ")};
Graph.prototype.convertValueToString=function(b){var c=this.model.getValue(b);if(null!=c&&"object"==typeof c){var e=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),k=b;null==e&&null!=k;)null!=k.value&&"object"==typeof k.value&&(e=k.hasAttribute(c)?null!=k.getAttribute(c)?k.getAttribute(c):"":null),k=this.model.getParent(k);else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=c.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=c.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.getCellStyle=function(b){var c=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=b&&null!=this.layoutManager){var e=this.model.getParent(b);this.model.isVertex(e)&&this.isCellCollapsed(b)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(c[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return c};
Graph.prototype.updateAlternateBounds=function(b,c,e){if(null!=b&&null!=c&&null!=this.layoutManager&&null!=c.alternateBounds){var k=this.layoutManager.getLayout(this.model.getParent(b));null!=k&&k.constructor==mxStackLayout&&(k.horizontal?c.alternateBounds.height=0:c.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,c){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(c.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,c,e,k,f){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),b));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<e.length;n++){var t=this.view.getState(e[n]),d=this.getCellGeometry(e[n]);if(null!=t&&null!=d){var g=Math.round(d.width-t.width/this.view.scale),l=Math.round(d.height-t.height/this.view.scale);if(0!=l||0!=g){var q=this.model.getParent(e[n]),p=this.layoutManager.getLayout(q);
-null==p?null!=f&&this.isMoveCellsEvent(f,t)&&this.moveSiblings(t,q,g,l):null!=f&&mxEvent.isAltDown(f)||p.constructor!=mxStackLayout||p.resizeLast||this.resizeParentStacks(q,p,g,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
-Graph.prototype.moveSiblings=function(b,c,e,k){this.model.beginUpdate();try{var f=this.getCellsBeyond(b.x,b.y,c,!0,!0);for(c=0;c<f.length;c++)if(f[c]!=b.cell){var n=this.view.getState(f[c]),t=this.getCellGeometry(f[c]);null!=n&&null!=t&&(t=t.clone(),t.translate(Math.round(e*Math.max(0,Math.min(1,(n.x-b.x)/b.width))),Math.round(k*Math.max(0,Math.min(1,(n.y-b.y)/b.height)))),this.model.setGeometry(f[c],t))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(b,c,e,k){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var f=c.horizontal;null!=b&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==f&&!c.resizeLast;){var n=this.getCellGeometry(b),t=this.view.getState(b);null!=t&&null!=n&&(n=n.clone(),c.horizontal?n.width+=e+Math.min(0,t.width/this.view.scale-n.width):n.height+=k+Math.min(0,t.height/this.view.scale-n.height),this.model.setGeometry(b,
-n));b=this.model.getParent(b);c=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var c=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(b){var c=this.getCurrentCellStyle(b);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.foldCells=function(b,c,e,k,g){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),b));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<e.length;p++){var t=this.view.getState(e[p]),d=this.getCellGeometry(e[p]);if(null!=t&&null!=d){var f=Math.round(d.width-t.width/this.view.scale),l=Math.round(d.height-t.height/this.view.scale);if(0!=l||0!=f){var m=this.model.getParent(e[p]),q=this.layoutManager.getLayout(m);
+null==q?null!=g&&this.isMoveCellsEvent(g,t)&&this.moveSiblings(t,m,f,l):null!=g&&mxEvent.isAltDown(g)||q.constructor!=mxStackLayout||q.resizeLast||this.resizeParentStacks(m,q,f,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.moveSiblings=function(b,c,e,k){this.model.beginUpdate();try{var g=this.getCellsBeyond(b.x,b.y,c,!0,!0);for(c=0;c<g.length;c++)if(g[c]!=b.cell){var p=this.view.getState(g[c]),t=this.getCellGeometry(g[c]);null!=p&&null!=t&&(t=t.clone(),t.translate(Math.round(e*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(k*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(g[c],t))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(b,c,e,k){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var g=c.horizontal;null!=b&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==g&&!c.resizeLast;){var p=this.getCellGeometry(b),t=this.view.getState(b);null!=t&&null!=p&&(p=p.clone(),c.horizontal?p.width+=e+Math.min(0,t.width/this.view.scale-p.width):p.height+=k+Math.min(0,t.height/this.view.scale-p.height),this.model.setGeometry(b,
+p));b=this.model.getParent(b);c=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var c=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(b){var c=this.getCurrentCellStyle(b);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(b){var c=this.getCurrentCellStyle(b);return null!=c.movableLabel?"0"!=c.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,c,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};
Graph.prototype.getSwimlaneAt=function(b,c,e){var k=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(k)&&(k=null);return k};Graph.prototype.isCellFoldable=function(b){var c=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&("1"==c.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=c.collapsible||!this.isContainer(b)&&"1"==c.collapsible))};
Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,c){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(b,c){c=null!=c?c:10;var e=this.container.clientWidth-c,k=this.container.clientHeight-c,f=Math.floor(20*Math.min(e/b.width,k/b.height))/20;this.zoomTo(f);if(mxUtils.hasScrollbars(this.container)){var n=this.view.translate;this.container.scrollTop=(b.y+n.y)*f-Math.max((k-b.height*f)/2+c/2,0);this.container.scrollLeft=(b.x+n.x)*f-Math.max((e-b.width*f)/2+c/2,0)}};
-Graph.prototype.getTooltipForCell=function(b){var c="";if(mxUtils.isNode(b.value)){var e=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==e&&(e=b.value.getAttribute("tooltip"));if(null!=e)null!=e&&this.isReplacePlaceholders(b)&&(e=this.replacePlaceholders(b,e)),c=this.sanitizeHtml(e);else{e=this.builtInProperties;b=b.value.attributes;var k=[];this.isEnabled()&&(e.push("linkTarget"),e.push("link"));for(var f=0;f<b.length;f++)0>
-mxUtils.indexOf(e,b[f].nodeName)&&0<b[f].nodeValue.length&&k.push({name:b[f].nodeName,value:b[f].nodeValue});k.sort(function(b,c){return b.name<c.name?-1:b.name>c.name?1:0});for(f=0;f<k.length;f++)"link"==k[f].name&&this.isCustomLink(k[f].value)||(c+=("link"!=k[f].name?"<b>"+k[f].name+":</b> ":"")+mxUtils.htmlEntities(k[f].value)+"\n");0<c.length&&(c=c.substring(0,c.length-1),mxClient.IS_SVG&&(c='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+c+"</div>"))}}return c};
+Graph.prototype.fitWindow=function(b,c){c=null!=c?c:10;var e=this.container.clientWidth-c,k=this.container.clientHeight-c,g=Math.floor(20*Math.min(e/b.width,k/b.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*g-Math.max((k-b.height*g)/2+c/2,0);this.container.scrollLeft=(b.x+p.x)*g-Math.max((e-b.width*g)/2+c/2,0)}};
+Graph.prototype.getTooltipForCell=function(b){var c="";if(mxUtils.isNode(b.value)){var e=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==e&&(e=b.value.getAttribute("tooltip"));if(null!=e)null!=e&&this.isReplacePlaceholders(b)&&(e=this.replacePlaceholders(b,e)),c=this.sanitizeHtml(e);else{e=this.builtInProperties;b=b.value.attributes;var k=[];this.isEnabled()&&(e.push("linkTarget"),e.push("link"));for(var g=0;g<b.length;g++)0>
+mxUtils.indexOf(e,b[g].nodeName)&&0<b[g].nodeValue.length&&k.push({name:b[g].nodeName,value:b[g].nodeValue});k.sort(function(b,c){return b.name<c.name?-1:b.name>c.name?1:0});for(g=0;g<k.length;g++)"link"==k[g].name&&this.isCustomLink(k[g].value)||(c+=("link"!=k[g].name?"<b>"+k[g].name+":</b> ":"")+mxUtils.htmlEntities(k[g].value)+"\n");0<c.length&&(c=c.substring(0,c.length-1),mxClient.IS_SVG&&(c='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+c+"</div>"))}}return c};
Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var c=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(c);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,c){return Graph.compress(b,c)};
Graph.prototype.decompress=function(b,c){return Graph.decompress(b,c)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
@@ -2431,7 +2434,7 @@ HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangle
this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);
this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(b){null!=b.relatedTarget&&
mxEvent.getSource(b)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(b){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(c){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(c.getEvent())||this.graph.model.isVertex(c.getCell())||this.reset()});var c=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(b,
-k){c=!1;var e=k.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var n=this.getState(k.getState());null==n&&mxEvent.isTouchEvent(e)||this.update(n)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(b,k){var e=k.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(k.getState()),k.getGraphX(),k.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(c=!0)}),mouseUp:mxUtils.bind(this,
+k){c=!1;var e=k.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var p=this.getState(k.getState());null==p&&mxEvent.isTouchEvent(e)||this.update(p)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(b,k){var e=k.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(k.getState()),k.getGraphX(),k.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(c=!0)}),mouseUp:mxUtils.bind(this,
function(b,k){var e=k.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));this.isResetEvent(e)?this.reset():this.isActive()&&!c&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),k):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(k.getGraphX(),k.getGraphY())))):mxEvent.isTouchEvent(e)||
null!=this.bbox&&mxUtils.contains(this.bbox,k.getGraphX(),k.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||this.reset();c=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,c){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
HoverIcons.prototype.createArrow=function(b,c,e){var k=null,k=mxUtils.createImage(b.src);k.style.width=b.width+"px";k.style.height=b.height+"px";k.style.padding=this.tolerance+"px";null!=c&&k.setAttribute("title",c);k.style.position="absolute";k.style.cursor=this.cssCursor;mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){null==this.currentState||this.isResetEvent(b)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),this.drag(b,
@@ -2441,187 +2444,187 @@ HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;th
HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(c){c.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(b,c,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,c,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,c=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=c&&c.setHandlesVisible(!1),c=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=c&&"orthogonalEdgeStyle"===
mxUtils.getValue(c.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),c.cell.style=mxUtils.setStyle(c.cell.style,"sourcePortConstraint",b),c.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,c,e){return this.graph.view.getState(this.graph.getCellAt(c,e))};
-HoverIcons.prototype.click=function(b,c,e){var k=e.getEvent(),f=e.getGraphX(),n=e.getGraphY(),f=this.getStateAt(b,f,n);null==f||!this.graph.model.isEdge(f.cell)||this.graph.isCloneEvent(k)||f.getVisibleTerminalState(!0)!=b&&f.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,c,e):(this.graph.setSelectionCell(f.cell),this.reset());e.consume()};
+HoverIcons.prototype.click=function(b,c,e){var k=e.getEvent(),g=e.getGraphX(),p=e.getGraphY(),g=this.getStateAt(b,g,p);null==g||!this.graph.model.isEdge(g.cell)||this.graph.isCloneEvent(k)||g.getVisibleTerminalState(!0)!=b&&g.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,c,e):(this.graph.setSelectionCell(g.cell),this.reset());e.consume()};
HoverIcons.prototype.execute=function(b,c,e){e=e.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,c,this.graph.defaultEdgeLength,e,this.graph.isCloneEvent(e),this.graph.isCloneEvent(e)),e,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var c=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(c=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var e=null;null!=c&&(b.x-=c.horizontalOffset/2,b.y-=c.verticalOffset/2,b.width+=c.horizontalOffset,b.height+=c.verticalOffset,null!=c.rotationShape&&null!=c.rotationShape.node&&"hidden"!=c.rotationShape.node.style.visibility&&"none"!=c.rotationShape.node.style.display&&null!=c.rotationShape.boundingBox&&
-(e=c.rotationShape.boundingBox));c=mxUtils.bind(this,function(b,g,c){if(null!=e){var d=new mxRectangle(g,c,b.clientWidth,b.clientHeight);mxUtils.intersects(d,e)&&(b==this.arrowUp?c-=d.y+d.height-e.y:b==this.arrowRight?g+=e.x+e.width-d.x:b==this.arrowDown?c+=e.y+e.height-d.y:b==this.arrowLeft&&(g-=d.x+d.width-e.x))}b.style.left=g+"px";b.style.top=c+"px";mxUtils.setOpacity(b,this.inactiveOpacity)});c(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+(e=c.rotationShape.boundingBox));c=mxUtils.bind(this,function(b,f,c){if(null!=e){var d=new mxRectangle(f,c,b.clientWidth,b.clientHeight);mxUtils.intersects(d,e)&&(b==this.arrowUp?c-=d.y+d.height-e.y:b==this.arrowRight?f+=e.x+e.width-d.x:b==this.arrowDown?c+=e.y+e.height-d.y:b==this.arrowLeft&&(f-=d.x+d.width-e.x))}b.style.left=f+"px";b.style.top=c+"px";mxUtils.setOpacity(b,this.inactiveOpacity)});c(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));c(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));c(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));c(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var c=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY()),
-k=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),f=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2),b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=c&&c==k&&k==f&&f==b&&(b=f=k=c=null);var n=this.graph.getCellGeometry(this.currentState.cell),t=mxUtils.bind(this,function(b,g){var d=this.graph.model.isVertex(b)&&this.graph.getCellGeometry(b);null==b||this.graph.model.isAncestor(b,
-this.currentState.cell)||this.graph.isSwimlane(b)||!(null==d||null==n||d.height<3*n.height&&d.width<3*n.width)?g.style.visibility="visible":g.style.visibility="hidden"});t(c,this.arrowRight);t(k,this.arrowLeft);t(f,this.arrowUp);t(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+k=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),g=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2),b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=c&&c==k&&k==g&&g==b&&(b=g=k=c=null);var p=this.graph.getCellGeometry(this.currentState.cell),t=mxUtils.bind(this,function(b,f){var d=this.graph.model.isVertex(b)&&this.graph.getCellGeometry(b);null==b||this.graph.model.isAncestor(b,
+this.currentState.cell)||this.graph.isSwimlane(b)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?f.style.visibility="visible":f.style.visibility="hidden"});t(c,this.arrowRight);t(k,this.arrowLeft);t(g,this.arrowUp);t(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(c){null!=c.parentNode&&(c=new mxRectangle(c.offsetLeft,c.offsetTop,c.offsetWidth,c.offsetHeight),null==b?b=c:b.add(c))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var c=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(c)&&this.graph.isCellConnectable(c)&&(b=c)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
HoverIcons.prototype.update=function(b,c,e){if(!this.graph.connectionArrowsEnabled||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var k=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,k=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,c,e))}),this.updateDelay+10))):null!=this.startTime&&(k=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&k<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,c,e)?this.reset(!1):(null!=this.currentState||k>this.activationDelay)&&this.currentState!=b&&(k>this.updateDelay&&null!=b||null==this.bbox||null==c||null==e||!mxUtils.contains(this.bbox,
c,e))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,c,e,k,f){b=this.cloneCell(b);for(var n=0;n<e;n++){var t=this.cloneCell(c),d=this.getCellGeometry(t);null!=d&&(d.x+=n*k,d.y+=n*f);b.insert(t)}return b};
-Graph.prototype.createTable=function(b,c,e,k,f,n,t,d,g){e=null!=e?e:60;k=null!=k?k:40;n=null!=n?n:30;d=null!=d?d:"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";g=null!=g?g:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,null,null!=f?f:"",0,0,c*e,
-b*k+(null!=f?n:0),null!=t?t:"shape=table;startSize="+(null!=f?n:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*e,k,d),this.createVertex(null,null,"",0,0,e,k,g),c,e,0),b,0,k)};Graph.prototype.setTableValues=function(b,c,e){for(var k=this.model.getChildCells(b,!0),f=0;f<k.length;f++)if(null!=e&&(k[f].value=e[f]),null!=c)for(var n=this.model.getChildCells(k[f],!0),t=0;t<n.length;t++)null!=c[f][t]&&(n[t].value=c[f][t]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,c,e,k,f,n,t,d,g){e=null!=e?e:120;k=null!=k?k:120;var l=null==f?0:40;t=null!=t?t:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+l+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";d=null!=d?d:"swimlane;connectable=0;startSize=40;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";g=null!=g?g:"swimlane;connectable=0;startSize="+(null==f?"40":"0")+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
-f=this.createVertex(null,null,null!=f?f:"",0,0,c*e,b*k,null!=n?n:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+l+";"+(null==f?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");n=mxUtils.getValue(this.getCellStyle(f),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);f.geometry.width+=n;f.geometry.height+=n;t=this.createVertex(null,null,"",0,n,c*e+n,k,t);f.insert(this.createParent(t,this.createVertex(null,null,"",n,0,e,k,d),c,e,0));
-return 1<b?(t.geometry.y=k+n,this.createParent(f,this.createParent(t,this.createVertex(null,null,"",n,0,e,k,g),c,e,0),b-1,0,k)):f};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};
-Graph.prototype.setTableRowHeight=function(b,c,e){e=null!=e?e:!0;var k=this.getModel();k.beginUpdate();try{var f=this.getCellGeometry(b);if(null!=f){f=f.clone();f.height+=c;k.setGeometry(b,f);var n=k.getParent(b),t=k.getChildCells(n,!0);if(!e){var d=mxUtils.indexOf(t,b);if(d<t.length-1){var g=t[d+1],l=this.getCellGeometry(g);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,k.setGeometry(g,l))}}var q=this.getCellGeometry(n);null!=q&&(e||(e=b==t[t.length-1]),e&&(q=q.clone(),q.height+=c,k.setGeometry(n,q)));
-null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}}finally{k.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),f=k.getParent(b),n=k.getParent(f),t=k.getChildCells(f,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var g=k.getChildCells(n,!0),l=0;l<g.length;l++){var f=g[l],t=k.getChildCells(f,!0),q=t[b],p=this.getCellGeometry(q);null!=p&&(p=p.clone(),p.width+=c,k.setGeometry(q,p));b<t.length-1&&(q=t[b+1],p=this.getCellGeometry(q),null!=p&&(p=p.clone(),p.x+=c,e||(p.width-=c),k.setGeometry(q,p)))}if(d||
-e){var m=this.getCellGeometry(n);null!=m&&(m=m.clone(),m.width+=c,k.setGeometry(n,m))}null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};
-TableLayout.prototype.getSize=function(b,c){for(var e=0,k=0;k<b.length;k++)if(!this.isVertexIgnored(b[k])){var f=this.graph.getCellGeometry(b[k]);null!=f&&(e+=c?f.width:f.height)}return e};TableLayout.prototype.getRowLayout=function(b,c){for(var e=this.graph.model.getChildCells(b,!0),k=this.graph.getActualStartSize(b,!0),f=this.getSize(e,!0),n=c-k.x-k.width,t=[],k=k.x,d=0;d<e.length;d++){var g=this.graph.getCellGeometry(e[d]);null!=g&&(k+=g.width*n/f,t.push(Math.round(k)))}return t};
-TableLayout.prototype.layoutRow=function(b,c,e,k){var f=this.graph.getModel(),n=f.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var t=b.x,d=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var g=0;g<n.length;g++){var l=this.graph.getCellGeometry(n[g]);null!=l&&(l=l.clone(),l.y=b.y,l.height=e-b.y-b.height,null!=c?(l.x=c[g],l.width=c[g+1]-l.x,g==n.length-1&&g<c.length-2&&(l.width=k-l.x-b.x-b.width)):(l.x=t,t+=l.width,g==n.length-1?l.width=k-b.x-b.width-d:d+=l.width),f.setGeometry(n[g],l))}return d};
-TableLayout.prototype.execute=function(b){if(null!=b){var c=this.graph.getActualStartSize(b,!0),e=this.graph.getCellGeometry(b),k=this.graph.getCellStyle(b),f="1"==mxUtils.getValue(k,"resizeLastRow","0"),n="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),t=this.graph.getModel(),d=0;t.beginUpdate();try{var g=e.height-c.y-c.height,l=e.width-c.x-c.width,q=t.getChildCells(b,!0),p=this.getSize(q,!1);if(0<g&&0<l&&0<q.length&&0<p){if(f){var m=this.graph.getCellGeometry(q[q.length-
-1]);null!=m&&(m=m.clone(),m.height=g-p+m.height,t.setGeometry(q[q.length-1],m))}for(var v=n?null:this.getRowLayout(q[0],l),u=c.y,B=0;B<q.length;B++)m=this.graph.getCellGeometry(q[B]),null!=m&&(m=m.clone(),m.x=c.x,m.width=l,m.y=Math.round(u),u=f||k?u+m.height:u+m.height/p*g,m.height=Math.round(u)-m.y,t.setGeometry(q[B],m)),d=Math.max(d,this.layoutRow(q[B],v,m.height,l));k&&g<p&&(e=e.clone(),e.height=u+c.height,t.setGeometry(b,e));n&&l<d+Graph.minTableColumnWidth&&(e=e.clone(),e.width=d+c.width+c.x+
+HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,c,e,k,g){b=this.cloneCell(b);for(var p=0;p<e;p++){var t=this.cloneCell(c),d=this.getCellGeometry(t);null!=d&&(d.x+=p*k,d.y+=p*g);b.insert(t)}return b};
+Graph.prototype.createTable=function(b,c,e,k,g,p,t,d,f){e=null!=e?e:60;k=null!=k?k:40;p=null!=p?p:30;d=null!=d?d:"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";f=null!=f?f:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,null,null!=g?g:"",0,0,c*e,
+b*k+(null!=g?p:0),null!=t?t:"shape=table;startSize="+(null!=g?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*e,k,d),this.createVertex(null,null,"",0,0,e,k,f),c,e,0),b,0,k)};Graph.prototype.setTableValues=function(b,c,e){for(var k=this.model.getChildCells(b,!0),g=0;g<k.length;g++)if(null!=e&&(k[g].value=e[g]),null!=c)for(var p=this.model.getChildCells(k[g],!0),t=0;t<p.length;t++)null!=c[g][t]&&(p[t].value=c[g][t]);return b};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,c,e,k,g,p,t,d,f){e=null!=e?e:120;k=null!=k?k:120;var l=null==g?0:40;t=null!=t?t:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+l+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";d=null!=d?d:"swimlane;connectable=0;startSize=40;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";f=null!=f?f:"swimlane;connectable=0;startSize="+(null==g?"40":"0")+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
+g=this.createVertex(null,null,null!=g?g:"",0,0,c*e,b*k,null!=p?p:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+l+";"+(null==g?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");p=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=p;g.geometry.height+=p;t=this.createVertex(null,null,"",0,p,c*e+p,k,t);g.insert(this.createParent(t,this.createVertex(null,null,"",p,0,e,k,d),c,e,0));
+return 1<b?(t.geometry.y=k+p,this.createParent(g,this.createParent(t,this.createVertex(null,null,"",p,0,e,k,f),c,e,0),b-1,0,k)):g};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};
+Graph.prototype.setTableRowHeight=function(b,c,e){e=null!=e?e:!0;var k=this.getModel();k.beginUpdate();try{var g=this.getCellGeometry(b);if(null!=g){g=g.clone();g.height+=c;k.setGeometry(b,g);var p=k.getParent(b),t=k.getChildCells(p,!0);if(!e){var d=mxUtils.indexOf(t,b);if(d<t.length-1){var f=t[d+1],l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,k.setGeometry(f,l))}}var m=this.getCellGeometry(p);null!=m&&(e||(e=b==t[t.length-1]),e&&(m=m.clone(),m.height+=c,k.setGeometry(p,m)));
+null!=this.layoutManager&&this.layoutManager.executeLayout(p,!0)}}finally{k.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),g=k.getParent(b),p=k.getParent(g),t=k.getChildCells(g,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var f=k.getChildCells(p,!0),l=0;l<f.length;l++){var g=f[l],t=k.getChildCells(g,!0),m=t[b],q=this.getCellGeometry(m);null!=q&&(q=q.clone(),q.width+=c,k.setGeometry(m,q));b<t.length-1&&(m=t[b+1],q=this.getCellGeometry(m),null!=q&&(q=q.clone(),q.x+=c,e||(q.width-=c),k.setGeometry(m,q)))}if(d||
+e){var n=this.getCellGeometry(p);null!=n&&(n=n.clone(),n.width+=c,k.setGeometry(p,n))}null!=this.layoutManager&&this.layoutManager.executeLayout(p,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};
+TableLayout.prototype.getSize=function(b,c){for(var e=0,k=0;k<b.length;k++)if(!this.isVertexIgnored(b[k])){var g=this.graph.getCellGeometry(b[k]);null!=g&&(e+=c?g.width:g.height)}return e};TableLayout.prototype.getRowLayout=function(b,c){for(var e=this.graph.model.getChildCells(b,!0),k=this.graph.getActualStartSize(b,!0),g=this.getSize(e,!0),p=c-k.x-k.width,t=[],k=k.x,d=0;d<e.length;d++){var f=this.graph.getCellGeometry(e[d]);null!=f&&(k+=f.width*p/g,t.push(Math.round(k)))}return t};
+TableLayout.prototype.layoutRow=function(b,c,e,k){var g=this.graph.getModel(),p=g.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var t=b.x,d=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var f=0;f<p.length;f++){var l=this.graph.getCellGeometry(p[f]);null!=l&&(l=l.clone(),l.y=b.y,l.height=e-b.y-b.height,null!=c?(l.x=c[f],l.width=c[f+1]-l.x,f==p.length-1&&f<c.length-2&&(l.width=k-l.x-b.x-b.width)):(l.x=t,t+=l.width,f==p.length-1?l.width=k-b.x-b.width-d:d+=l.width),g.setGeometry(p[f],l))}return d};
+TableLayout.prototype.execute=function(b){if(null!=b){var c=this.graph.getActualStartSize(b,!0),e=this.graph.getCellGeometry(b),k=this.graph.getCellStyle(b),g="1"==mxUtils.getValue(k,"resizeLastRow","0"),p="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),t=this.graph.getModel(),d=0;t.beginUpdate();try{var f=e.height-c.y-c.height,l=e.width-c.x-c.width,m=t.getChildCells(b,!0),q=this.getSize(m,!1);if(0<f&&0<l&&0<m.length&&0<q){if(g){var n=this.graph.getCellGeometry(m[m.length-
+1]);null!=n&&(n=n.clone(),n.height=f-q+n.height,t.setGeometry(m[m.length-1],n))}for(var v=p?null:this.getRowLayout(m[0],l),u=c.y,y=0;y<m.length;y++)n=this.graph.getCellGeometry(m[y]),null!=n&&(n=n.clone(),n.x=c.x,n.width=l,n.y=Math.round(u),u=g||k?u+n.height:u+n.height/q*f,n.height=Math.round(u)-n.y,t.setGeometry(m[y],n)),d=Math.max(d,this.layoutRow(m[y],v,n.height,l));k&&f<q&&(e=e.clone(),e.height=u+c.height,t.setGeometry(b,e));p&&l<d+Graph.minTableColumnWidth&&(e=e.clone(),e.width=d+c.width+c.x+
Graph.minTableColumnWidth,t.setGeometry(b,e))}}finally{t.endUpdate()}}};
-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(b,d){d=null!=d?d:!0;var g=this.getState(b);null!=g&&d&&this.graph.model.isEdge(g.cell)&&null!=g.style&&1!=g.style[mxConstants.STYLE_CURVED]&&!g.invalid&&this.updateLineJumps(g)&&this.graph.cellRenderer.redraw(g,!1,this.isRendering());g=c.apply(this,
-arguments);null!=g&&d&&this.graph.model.isEdge(g.cell)&&null!=g.style&&1!=g.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(g);return g};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(){e.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var b=this.node.getElementsByTagName("path");if(1<b.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&b[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var d=this.state.view.graph.getFlowAnimationStyle();null!=d&&b[1].setAttribute("class",d.getAttribute("id"))}}};var k=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(b,d){return k.apply(this,arguments)||null!=b.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.routedPoints,b.routedPoints)};var f=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(b){f.apply(this,arguments);this.graph.model.isEdge(b.cell)&&1!=b.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(b)};mxGraphView.prototype.updateLineJumps=function(b){var d=b.absolutePoints;if(Graph.lineJumpsEnabled){var g=null!=b.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(b.style,"jumpStyle","none")){for(var e=function(d,g,e){var f=new mxPoint(g,e);f.type=d;c.push(f);f=null!=b.routedPoints?b.routedPoints[c.length-1]:null;return null==f||f.type!=
-d||f.x!=g||f.y!=e},f=.5*this.scale,g=!1,c=[],l=0;l<d.length-1;l++){for(var k=d[l+1],q=d[l],n=[],t=d[l+2];l<d.length-2&&mxUtils.ptSegDistSq(q.x,q.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,l++,t=d[l+2];for(var g=e(0,q.x,q.y)||g,L=0;L<this.validEdges.length;L++){var H=this.validEdges[L],K=H.absolutePoints;if(null!=K&&mxUtils.intersects(b,H)&&"1"!=H.style.noJump)for(H=0;H<K.length-1;H++){for(var C=K[H+1],N=K[H],t=K[H+2];H<K.length-2&&mxUtils.ptSegDistSq(N.x,N.y,t.x,t.y,C.x,C.y)<1*this.scale*this.scale;)C=
-t,H++,t=K[H+2];t=mxUtils.intersection(q.x,q.y,k.x,k.y,N.x,N.y,C.x,C.y);if(null!=t&&(Math.abs(t.x-q.x)>f||Math.abs(t.y-q.y)>f)&&(Math.abs(t.x-k.x)>f||Math.abs(t.y-k.y)>f)&&(Math.abs(t.x-N.x)>f||Math.abs(t.y-N.y)>f)&&(Math.abs(t.x-C.x)>f||Math.abs(t.y-C.y)>f)){C=t.x-q.x;N=t.y-q.y;t={distSq:C*C+N*N,x:t.x,y:t.y};for(C=0;C<n.length;C++)if(n[C].distSq>t.distSq){n.splice(C,0,t);t=null;break}null==t||0!=n.length&&n[n.length-1].x===t.x&&n[n.length-1].y===t.y||n.push(t)}}}for(H=0;H<n.length;H++)g=e(1,n[H].x,
-n[H].y)||g}t=d[d.length-1];g=e(0,t.x,t.y)||g}b.routedPoints=c;return g}return!1};var n=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(b,d,g){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)n.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,
-"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,f=mxUtils.getValue(this.style,"jumpStyle","none"),l=!0,k=null,q=null,m=[],p=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var H=this.state.routedPoints[t],K=new mxPoint(H.x/this.scale,H.y/this.scale);0==t?K=d[0]:t==this.state.routedPoints.length-1&&(K=d[d.length-1]);var C=!1;if(null!=k&&1==H.type){var N=this.state.routedPoints[t+1],H=N.x/this.scale-K.x,N=N.y/this.scale-K.y,H=H*H+N*N;null==p&&(p=new mxPoint(K.x-k.x,K.y-k.y),
-q=Math.sqrt(p.x*p.x+p.y*p.y),0<q?(p.x=p.x*e/q,p.y=p.y*e/q):p=null);H>e*e&&0<q&&(H=k.x-K.x,N=k.y-K.y,H=H*H+N*N,H>e*e&&(C=new mxPoint(K.x-p.x,K.y-p.y),H=new mxPoint(K.x+p.x,K.y+p.y),m.push(C),this.addPoints(b,m,g,c,!1,null,l),m=0>Math.round(p.x)||0==Math.round(p.x)&&0>=Math.round(p.y)?1:-1,l=!1,"sharp"==f?(b.lineTo(C.x-p.y*m,C.y+p.x*m),b.lineTo(H.x-p.y*m,H.y+p.x*m),b.lineTo(H.x,H.y)):"line"==f?(b.moveTo(C.x+p.y*m,C.y-p.x*m),b.lineTo(C.x-p.y*m,C.y+p.x*m),b.moveTo(H.x-p.y*m,H.y+p.x*m),b.lineTo(H.x+p.y*
-m,H.y-p.x*m),b.moveTo(H.x,H.y)):"arc"==f?(m*=1.3,b.curveTo(C.x-p.y*m,C.y+p.x*m,H.x-p.y*m,H.y+p.x*m,H.x,H.y)):(b.moveTo(H.x,H.y),l=!0),m=[H],C=!0))}else p=null;C||(m.push(K),k=K)}this.addPoints(b,m,g,c,!1,null,l);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,g,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
-mxGraphView.prototype.updateFloatingTerminalPoint=function(b,g,c,e){if(null==g||null==b||"1"!=g.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{g=this.getTerminalPort(b,g,e);var f=this.getNextPoint(b,c,e),l=this.graph.isOrthogonal(b),k=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),q=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=k)var m=Math.cos(-k),p=Math.sin(-k),f=mxUtils.getRotatedPoint(f,m,p,q);m=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);m+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(g,f,0==k&&l,m);0!=k&&(m=Math.cos(k),p=Math.sin(k),f=mxUtils.getRotatedPoint(f,m,p,q));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,g,c,e,f),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,g,c,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);c=g=null;if(null!=b)for(var f=0;f<b.length;f++){var l=this.graph.getConnectionPoint(d,
-b[f]);if(null!=l){var k=(l.x-e.x)*(l.x-e.x)+(l.y-e.y)*(l.y-e.y);if(null==c||k<c)g=l,c=k}}null!=g&&(e=g)}return e};var g=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(b,d,c){var e=g.apply(this,arguments);"1"==b.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var l=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(b){if(null!=b.style&&"undefined"!==typeof pako){var d=
-mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"string"===typeof d&&"stencil("==d.substring(0,8))try{var g=d.substring(8,d.length-1),c=mxUtils.parseXml(Graph.decompress(g));return new mxShape(new mxStencil(c.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return l.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(b,d){d=null!=d?d:!0;var f=this.getState(b);null!=f&&d&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=c.apply(this,
+arguments);null!=f&&d&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(){e.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var b=this.node.getElementsByTagName("path");if(1<b.length){"1"!=mxUtils.getValue(this.state.style,
+mxConstants.STYLE_DASHED,"0")&&b[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var d=this.state.view.graph.getFlowAnimationStyle();null!=d&&b[1].setAttribute("class",d.getAttribute("id"))}}};var k=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(b,d){return k.apply(this,arguments)||null!=b.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.routedPoints,b.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(b){g.apply(this,arguments);this.graph.model.isEdge(b.cell)&&1!=b.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(b)};mxGraphView.prototype.updateLineJumps=function(b){var d=b.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=b.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(b.style,"jumpStyle","none")){for(var e=function(d,f,e){var g=new mxPoint(f,e);g.type=d;c.push(g);g=null!=b.routedPoints?b.routedPoints[c.length-1]:null;return null==g||g.type!=
+d||g.x!=f||g.y!=e},g=.5*this.scale,f=!1,c=[],l=0;l<d.length-1;l++){for(var k=d[l+1],m=d[l],p=[],t=d[l+2];l<d.length-2&&mxUtils.ptSegDistSq(m.x,m.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,l++,t=d[l+2];for(var f=e(0,m.x,m.y)||f,L=0;L<this.validEdges.length;L++){var G=this.validEdges[L],K=G.absolutePoints;if(null!=K&&mxUtils.intersects(b,G)&&"1"!=G.style.noJump)for(G=0;G<K.length-1;G++){for(var C=K[G+1],M=K[G],t=K[G+2];G<K.length-2&&mxUtils.ptSegDistSq(M.x,M.y,t.x,t.y,C.x,C.y)<1*this.scale*this.scale;)C=
+t,G++,t=K[G+2];t=mxUtils.intersection(m.x,m.y,k.x,k.y,M.x,M.y,C.x,C.y);if(null!=t&&(Math.abs(t.x-m.x)>g||Math.abs(t.y-m.y)>g)&&(Math.abs(t.x-k.x)>g||Math.abs(t.y-k.y)>g)&&(Math.abs(t.x-M.x)>g||Math.abs(t.y-M.y)>g)&&(Math.abs(t.x-C.x)>g||Math.abs(t.y-C.y)>g)){C=t.x-m.x;M=t.y-m.y;t={distSq:C*C+M*M,x:t.x,y:t.y};for(C=0;C<p.length;C++)if(p[C].distSq>t.distSq){p.splice(C,0,t);t=null;break}null==t||0!=p.length&&p[p.length-1].x===t.x&&p[p.length-1].y===t.y||p.push(t)}}}for(G=0;G<p.length;G++)f=e(1,p[G].x,
+p[G].y)||f}t=d[d.length-1];f=e(0,t.x,t.y)||f}b.routedPoints=c;return f}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(b,d,f){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,
+"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),l=!0,k=null,m=null,q=[],n=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var G=this.state.routedPoints[t],K=new mxPoint(G.x/this.scale,G.y/this.scale);0==t?K=d[0]:t==this.state.routedPoints.length-1&&(K=d[d.length-1]);var C=!1;if(null!=k&&1==G.type){var M=this.state.routedPoints[t+1],G=M.x/this.scale-K.x,M=M.y/this.scale-K.y,G=G*G+M*M;null==n&&(n=new mxPoint(K.x-k.x,K.y-k.y),
+m=Math.sqrt(n.x*n.x+n.y*n.y),0<m?(n.x=n.x*e/m,n.y=n.y*e/m):n=null);G>e*e&&0<m&&(G=k.x-K.x,M=k.y-K.y,G=G*G+M*M,G>e*e&&(C=new mxPoint(K.x-n.x,K.y-n.y),G=new mxPoint(K.x+n.x,K.y+n.y),q.push(C),this.addPoints(b,q,f,c,!1,null,l),q=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,l=!1,"sharp"==g?(b.lineTo(C.x-n.y*q,C.y+n.x*q),b.lineTo(G.x-n.y*q,G.y+n.x*q),b.lineTo(G.x,G.y)):"line"==g?(b.moveTo(C.x+n.y*q,C.y-n.x*q),b.lineTo(C.x-n.y*q,C.y+n.x*q),b.moveTo(G.x-n.y*q,G.y+n.x*q),b.lineTo(G.x+n.y*
+q,G.y-n.x*q),b.moveTo(G.x,G.y)):"arc"==g?(q*=1.3,b.curveTo(C.x-n.y*q,C.y+n.x*q,G.x-n.y*q,G.y+n.x*q,G.x,G.y)):(b.moveTo(G.x,G.y),l=!0),q=[G],C=!0))}else n=null;C||(q.push(K),k=K)}this.addPoints(b,q,f,c,!1,null,l);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,f,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(b,f,c,e){if(null==f||null==b||"1"!=f.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{f=this.getTerminalPort(b,f,e);var g=this.getNextPoint(b,c,e),l=this.graph.isOrthogonal(b),k=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=k)var q=Math.cos(-k),n=Math.sin(-k),g=mxUtils.getRotatedPoint(g,q,n,m);q=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);q+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(f,g,0==k&&l,q);0!=k&&(q=Math.cos(k),n=Math.sin(k),g=mxUtils.getRotatedPoint(g,q,n,m));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,f,c,e,g),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,f,c,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);c=f=null;if(null!=b)for(var g=0;g<b.length;g++){var l=this.graph.getConnectionPoint(d,
+b[g]);if(null!=l){var k=(l.x-e.x)*(l.x-e.x)+(l.y-e.y)*(l.y-e.y);if(null==c||k<c)f=l,c=k}}null!=f&&(e=f)}return e};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(b,d,c){var e=f.apply(this,arguments);"1"==b.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var l=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(b){if(null!=b.style&&"undefined"!==typeof pako){var d=
+mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"string"===typeof d&&"stencil("==d.substring(0,8))try{var f=d.substring(8,d.length-1),c=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(c.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return l.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.filesLoaded={};
-mxStencilRegistry.getStencil=function(b){var c=mxStencilRegistry.stencils[b];if(null==c&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(b);if(null!=e){c=mxStencilRegistry.libraries[e];if(null!=c){if(null==mxStencilRegistry.packages[e]){for(var k=0;k<c.length;k++){var f=c[k];if(!mxStencilRegistry.filesLoaded[f])if(mxStencilRegistry.filesLoaded[f]=!0,".xml"==f.toLowerCase().substring(f.length-4,f.length))mxStencilRegistry.loadStencilSet(f,
-null);else if(".js"==f.toLowerCase().substring(f.length-3,f.length))try{if(mxStencilRegistry.allowEval){var n=mxUtils.load(f);null!=n&&200<=n.getStatus()&&299>=n.getStatus()&&eval.call(window,n.getText())}}catch(t){null!=window.console&&console.log("error in getStencil:",b,e,c,f,t)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);c=mxStencilRegistry.stencils[b]}}return c};
+mxStencilRegistry.getStencil=function(b){var c=mxStencilRegistry.stencils[b];if(null==c&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(b);if(null!=e){c=mxStencilRegistry.libraries[e];if(null!=c){if(null==mxStencilRegistry.packages[e]){for(var k=0;k<c.length;k++){var g=c[k];if(!mxStencilRegistry.filesLoaded[g])if(mxStencilRegistry.filesLoaded[g]=!0,".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g,
+null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(g);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(t){null!=window.console&&console.log("error in getStencil:",b,e,c,g,t)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);c=mxStencilRegistry.stencils[b]}}return c};
mxStencilRegistry.getBasenameForStencil=function(b){var c=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0]))for(var c=b[1],e=2;e<b.length-1;e++)c+="/"+b[e];return c};
-mxStencilRegistry.loadStencilSet=function(b,c,e,k){var f=mxStencilRegistry.packages[b];if(null!=e&&e||null==f){var n=!1;if(null==f)try{if(k){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(e){null!=e&&null!=e.documentElement&&(mxStencilRegistry.packages[b]=e,n=!0,mxStencilRegistry.parseStencilSet(e.documentElement,c,n))}));return}f=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=f;n=!0}catch(t){null!=window.console&&console.log("error in loadStencilSet:",b,t)}null!=f&&null!=
-f.documentElement&&mxStencilRegistry.parseStencilSet(f.documentElement,c,n)}};mxStencilRegistry.loadStencil=function(b,c){if(null!=c)mxUtils.get(b,mxUtils.bind(this,function(b){c(200<=b.getStatus()&&299>=b.getStatus()?b.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var c=0;c<b.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[c]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(b,c,e){if("stencils"==b.nodeName)for(var k=b.firstChild;null!=k;)"shapes"==k.nodeName&&mxStencilRegistry.parseStencilSet(k,c,e),k=k.nextSibling;else{e=null!=e?e:!0;var k=b.firstChild,f="";b=b.getAttribute("name");for(null!=b&&(f=b+".");null!=k;){if(k.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=k.getAttribute("name"),null!=b)){var f=f.toLowerCase(),n=b.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(f+n.toLowerCase(),new mxStencil(k));if(null!=c){var t=k.getAttribute("w"),
-d=k.getAttribute("h"),t=null==t?80:parseInt(t,10),d=null==d?80:parseInt(d,10);c(f,n,b,t,d)}}k=k.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(b,c,e,k){var g=mxStencilRegistry.packages[b];if(null!=e&&e||null==g){var p=!1;if(null==g)try{if(k){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(e){null!=e&&null!=e.documentElement&&(mxStencilRegistry.packages[b]=e,p=!0,mxStencilRegistry.parseStencilSet(e.documentElement,c,p))}));return}g=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=g;p=!0}catch(t){null!=window.console&&console.log("error in loadStencilSet:",b,t)}null!=g&&null!=
+g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,c,p)}};mxStencilRegistry.loadStencil=function(b,c){if(null!=c)mxUtils.get(b,mxUtils.bind(this,function(b){c(200<=b.getStatus()&&299>=b.getStatus()?b.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var c=0;c<b.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[c]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(b,c,e){if("stencils"==b.nodeName)for(var k=b.firstChild;null!=k;)"shapes"==k.nodeName&&mxStencilRegistry.parseStencilSet(k,c,e),k=k.nextSibling;else{e=null!=e?e:!0;var k=b.firstChild,g="";b=b.getAttribute("name");for(null!=b&&(g=b+".");null!=k;){if(k.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=k.getAttribute("name"),null!=b)){var g=g.toLowerCase(),p=b.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(g+p.toLowerCase(),new mxStencil(k));if(null!=c){var t=k.getAttribute("w"),
+d=k.getAttribute("h"),t=null==t?80:parseInt(t,10),d=null==d?80:parseInt(d,10);c(g,p,b,t,d)}}k=k.nextSibling}}};
"undefined"!=typeof mxVertexHandler&&function(){function b(){var b=document.createElement("div");b.className="geHint";b.style.whiteSpace="nowrap";b.style.position="absolute";return b}function c(b,d){switch(d){case mxConstants.POINTS:return b;case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR=
"#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=
-!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(b){return!mxEvent.isAltDown(b)};var e=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(b){return e.apply(this,arguments)||this.graph.isTableRow(b)||this.graph.isTableCell(b)};var k=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(b){return k.apply(this,arguments)||this.graph.isEdgeIgnored(b)};var f=mxConnectionHandler.prototype.isCreateTarget;
-mxConnectionHandler.prototype.isCreateTarget=function(b){return this.graph.isCloneEvent(b)||f.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var b=new mxEllipse(null,this.highlightColor,this.highlightColor,0);b.opacity=mxConstants.HIGHLIGHT_OPACITY;return b};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(b){b=this.graph.createCurrentEdgeStyle();b=this.graph.createEdge(null,
-null,null,null,null,b);b=new mxCellState(this.graph.view,b,this.graph.getCellStyle(b));for(var d in this.graph.currentEdgeStyle)b.style[d]=this.graph.currentEdgeStyle[d];return b};var n=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var b=n.apply(this,arguments);b.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return b};mxConnectionHandler.prototype.updatePreview=function(b){};var t=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
-function(){var b=t.apply(this,arguments),d=b.getCell;b.getCell=mxUtils.bind(this,function(b){var g=d.apply(this,arguments);this.error=null;return g});return b};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var b="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",d="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),
-g=0;g<d.length;g++)null!=this.currentEdgeStyle[d[g]]&&(b+=d[g]+"="+this.currentEdgeStyle[d[g]]+";");null!=this.currentEdgeStyle.orthogonalLoop?b+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(b+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?b+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(b+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
-";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(b+="elbow="+this.currentEdgeStyle.elbow+";");return b=null!=this.currentEdgeStyle.html?b+("html="+this.currentEdgeStyle.html+";"):b+"html=1;"};Graph.prototype.updateCellStyles=function(b,d,g){this.model.beginUpdate();try{for(var c=0;c<g.length;c++)if(this.model.isVertex(g[c])||this.model.isEdge(g[c])){this.setCellStyles(b,null,[g[c]]);var e=this.getCellStyle(g[c])[b];d!=(null==e?mxConstants.NONE:e)&&this.setCellStyles(b,
-d,[g[c]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var b=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=b&&(new mxCodec(b.ownerDocument)).decode(b,this.getStylesheet())};Graph.prototype.createCellLookup=function(b,d){d=null!=d?d:{};for(var g=0;g<b.length;g++){var c=b[g];d[mxObjectIdentity.get(c)]=
-c.getId();for(var e=this.model.getChildCount(c),f=0;f<e;f++)this.createCellLookup([this.model.getChildAt(c,f)],d)}return d};Graph.prototype.createCellMapping=function(b,d,g){g=null!=g?g:{};for(var c in b){var e=d[c];null==g[e]&&(g[e]=b[c].getId()||"")}return g};Graph.prototype.importGraphModel=function(b,d,g,c){d=null!=d?d:0;g=null!=g?g:0;var e=new mxCodec(b.ownerDocument),f=new mxGraphModel;e.decode(b,f);b=[];var e={},l={},k=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges(),e));if(null!=
-k){var q=this.createCellLookup([f.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<k.length;f++)m=this.model.getChildren(this.moveCells([k[f]],d,g,!1,this.model.getRoot())[0]),null!=m&&(b=b.concat(m));else{var m=f.getChildren(k[0]);null!=m&&(b=this.moveCells(m,d,g,!1,this.getDefaultParent()),l[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId())}if(null!=b&&(this.createCellMapping(e,q,l),this.updateCustomLinks(l,b),c)){this.isGridEnabled()&&
-(d=this.snap(d),g=this.snap(g));var p=this.getBoundingBoxFromGeometry(b,!0);null!=p&&this.moveCells(b,d-p.x,g-p.y)}}finally{this.model.endUpdate()}}return b};Graph.prototype.encodeCells=function(b){for(var d={},g=this.cloneCells(b,null,d),c=new mxDictionary,e=0;e<b.length;e++)c.put(b[e],!0);for(var f=new mxCodec,l=new mxGraphModel,k=l.getChildAt(l.getRoot(),0),e=0;e<g.length;e++){l.add(k,g[e]);var m=this.view.getState(b[e]);if(null!=m){var q=this.getCellGeometry(g[e]);null!=q&&q.relative&&!this.model.isEdge(b[e])&&
-null==c.get(this.model.getParent(b[e]))&&(q.offset=null,q.relative=!1,q.x=m.x/m.view.scale-m.view.translate.x,q.y=m.y/m.view.scale-m.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(b)),g);return f.encode(l)};Graph.prototype.isSwimlane=function(b,d){if(null!=b&&this.model.getParent(b)!=this.model.getRoot()&&!this.model.isEdge(b)){var g=this.getCurrentCellStyle(b,d)[mxConstants.STYLE_SHAPE];return g==mxConstants.SHAPE_SWIMLANE||"table"==g}return!1};var d=Graph.prototype.isExtendParent;
-Graph.prototype.isExtendParent=function(b){var g=this.model.getParent(b);if(null!=g){var c=this.getCurrentCellStyle(g);if(null!=c.expand)return"0"!=c.expand}return d.apply(this,arguments)&&(null==g||!this.isTable(g))};var g=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(b,d,c,e,f,l,k,m){null==m&&(m=this.model.getParent(b),this.isTable(m)||this.isTableRow(m))&&(m=this.getCellAt(l,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=g.apply(this,[b,d,c,e,f,l,k,m]);this.model.setValue(c,
-"");var q=this.getChildCells(c,!0);for(d=0;d<q.length;d++){var p=this.getCellGeometry(q[d]);null!=p&&p.relative&&0<p.x&&this.model.remove(q[d])}var G=this.getChildCells(b,!0);for(d=0;d<G.length;d++)p=this.getCellGeometry(G[d]),null!=p&&p.relative&&0>=p.x&&this.model.remove(G[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
-mxConstants.NONE,[b]);var u=this.model.getTerminal(c,!1);if(null!=u){var da=this.getCurrentCellStyle(u);null!=da&&"1"==da.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(b,d,g){if(d||g)l.apply(this,arguments);
-else{var c=this.getSelectionCell(),e=null,f=[],k=mxUtils.bind(this,function(d){if(null!=this.view.getState(d)&&(this.model.isVertex(d)||this.model.isEdge(d)))if(f.push(d),d==c)e=f.length-1;else if(b&&null==c&&0<f.length||null!=e&&b&&f.length>e||!b&&0<e)return;for(var g=0;g<this.model.getChildCount(d);g++)k(this.model.getChildAt(d,g))});k(this.model.root);0<f.length&&(e=null!=e?mxUtils.mod(e+(b?1:-1),f.length):0,this.setSelectionCell(f[e]))}};var q=Graph.prototype.moveCells;Graph.prototype.moveCells=
-function(b,d,g,c,e,f,l){l=null!=l?l:{};if(this.isTable(e)){for(var k=[],m=0;m<b.length;m++)this.isTable(b[m])?k=k.concat(this.model.getChildCells(b[m],!0).reverse()):k.push(b[m]);b=k}this.model.beginUpdate();try{k=[];for(m=0;m<b.length;m++)if(null!=e&&this.isTableRow(b[m])){var p=this.model.getParent(b[m]),G=this.getCellGeometry(b[m]);this.isTable(p)&&k.push(p);if(null!=p&&null!=G&&this.isTable(p)&&this.isTable(e)&&(c||p!=e)){if(!c){var u=this.getCellGeometry(p);null!=u&&(u=u.clone(),u.height-=G.height,
-this.model.setGeometry(p,u))}u=this.getCellGeometry(e);null!=u&&(u=u.clone(),u.height+=G.height,this.model.setGeometry(e,u));var da=this.model.getChildCells(e,!0);if(0<da.length){b[m]=c?this.cloneCell(b[m]):b[m];var y=this.model.getChildCells(b[m],!0),D=this.model.getChildCells(da[0],!0),n=D.length-y.length;if(0<n)for(var v=0;v<n;v++){var x=this.cloneCell(y[y.length-1]);null!=x&&(x.value="",this.model.add(b[m],x))}else if(0>n)for(v=0;v>n;v--)this.model.remove(y[y.length+v-1]);y=this.model.getChildCells(b[m],
-!0);for(v=0;v<D.length;v++){var J=this.getCellGeometry(D[v]),t=this.getCellGeometry(y[v]);null!=J&&null!=t&&(t=t.clone(),t.width=J.width,this.model.setGeometry(y[v],t))}}}}for(var A=q.apply(this,arguments),m=0;m<k.length;m++)!c&&this.model.contains(k[m])&&0==this.model.getChildCount(k[m])&&this.model.remove(k[m]);c&&this.updateCustomLinks(this.createCellMapping(l,this.createCellLookup(b)),A)}finally{this.model.endUpdate()}return A};var p=Graph.prototype.removeCells;Graph.prototype.removeCells=function(b,
-d){var g=[];this.model.beginUpdate();try{for(var c=0;c<b.length;c++)if(this.isTableCell(b[c])){var e=this.model.getParent(b[c]),f=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(f)?0>mxUtils.indexOf(b,f)&&0>mxUtils.indexOf(g,f)&&g.push(f):this.labelChanged(b[c],"")}else{if(this.isTableRow(b[c])&&(f=this.model.getParent(b[c]),0>mxUtils.indexOf(b,f)&&0>mxUtils.indexOf(g,f))){for(var l=this.model.getChildCells(f,!0),k=0,m=0;m<l.length;m++)0<=mxUtils.indexOf(b,l[m])&&
-k++;k==l.length&&g.push(f)}g.push(b[c])}g=p.apply(this,[g,d])}finally{this.model.endUpdate()}return g};Graph.prototype.updateCustomLinks=function(b,d,g){g=null!=g?g:new Graph;for(var c=0;c<d.length;c++)null!=d[c]&&g.updateCustomLinksForCell(b,d[c],g)};Graph.prototype.updateCustomLinksForCell=function(b,d){this.doUpdateCustomLinksForCell(b,d);for(var g=this.model.getChildCount(d),c=0;c<g;c++)this.updateCustomLinksForCell(b,this.model.getChildAt(d,c))};Graph.prototype.doUpdateCustomLinksForCell=function(b,
-d){};Graph.prototype.getAllConnectionConstraints=function(b,d){if(null!=b){var g=mxUtils.getValue(b.style,"points",null);if(null!=g){var c=[];try{for(var e=JSON.parse(g),g=0;g<e.length;g++){var f=e[g];c.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(va){}return c}if(null!=b.shape&&null!=b.shape.bounds){f=b.shape.direction;e=b.shape.bounds;g=b.shape.scale;c=e.width/g;e=e.height/g;if(f==mxConstants.DIRECTION_NORTH||f==
-mxConstants.DIRECTION_SOUTH)f=c,c=e,e=f;g=b.shape.getConstraints(b.style,c,e);if(null!=g)return g;if(null!=b.shape.stencil&&null!=b.shape.stencil.constraints)return b.shape.stencil.constraints;if(null!=b.shape.constraints)return b.shape.constraints}}return null};Graph.prototype.flipEdge=function(b){if(null!=b){var d=this.getCurrentCellStyle(b),d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
-this.setCellStyles(mxConstants.STYLE_ELBOW,d,[b])}};Graph.prototype.isValidRoot=function(b){for(var d=this.model.getChildCount(b),g=0,c=0;c<d;c++){var e=this.model.getChildAt(b,c);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||g++)}return 0<g||this.isContainer(b)};Graph.prototype.isValidDropTarget=function(b,d,g){for(var c=this.getCurrentCellStyle(b),e=!0,f=!0,l=0;l<d.length&&f;l++)e=e&&this.isTable(d[l]),f=f&&this.isTableRow(d[l]);return("1"!=mxUtils.getValue(c,"part","0")||
-this.isContainer(b))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(b))&&!this.isTableRow(b)&&(!this.isTable(b)||f||e)};Graph.prototype.createGroupCell=function(){var b=mxGraph.prototype.createGroupCell.apply(this,arguments);b.setStyle("group");return b};Graph.prototype.isExtendParentsOnAdd=function(b){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=b&&null!=this.layoutManager){var g=this.model.getParent(b);
-null!=g&&(g=this.layoutManager.getLayout(g),null!=g&&g.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(b){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(b,d){var g=this.getModel(),c=[];g.beginUpdate();try{for(var e=0;e<b.length;e++){var f=b[e];if(g.isEdge(f)){var l=g.getTerminal(f,
-!0),k=g.getTerminal(f,!1);g.setTerminal(f,k,!0);g.setTerminal(f,l,!1);var m=g.getGeometry(f);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var q=m.getTerminalPoint(!0),p=m.getTerminalPoint(!1);m.setTerminalPoint(q,!1);m.setTerminalPoint(p,!0);g.setGeometry(f,m);var G=this.view.getState(f),u=this.view.getState(l),y=this.view.getState(k);if(null!=G){var n=null!=u?this.getConnectionConstraint(G,u,!0):null,v=null!=y?this.getConnectionConstraint(G,y,!1):null;this.setConnectionConstraint(f,
-l,!0,v);this.setConnectionConstraint(f,k,!1,n);var D=mxUtils.getValue(G.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(G.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[f]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,D,[f])}c.push(f)}}else if(g.isVertex(f)&&(m=this.getCellGeometry(f),null!=m)){if(!(this.isTable(f)||this.isTableRow(f)||this.isTableCell(f)||this.isSwimlane(f))){m=m.clone();m.x+=m.width/
-2-m.height/2;m.y+=m.height/2-m.width/2;var da=m.width;m.width=m.height;m.height=da;g.setGeometry(f,m)}var x=this.view.getState(f);if(null!=x){var J=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],t=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,J[mxUtils.mod(mxUtils.indexOf(J,t)+(d?-1:1),J.length)],[f])}c.push(f)}}}finally{g.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=
-function(b){if(null!=b&&null!=b.fgNode)for(b=b.fgNode.firstChild;null!=b;){if("text"==b.nodeName&&"1"==b.getAttribute("placeholders"))return!0;b=b.nextSibling}return!1};var m=Graph.prototype.processChange;Graph.prototype.processChange=function(b){if(b instanceof mxGeometryChange&&(this.isTableCell(b.cell)||this.isTableRow(b.cell))&&(null==b.previous&&null!=b.geometry||null!=b.previous&&!b.previous.equals(b.geometry))){var d=b.cell;this.isTableCell(d)&&(d=this.model.getParent(d));this.isTableRow(d)&&
-(d=this.model.getParent(d));var g=this.view.getState(d);null!=g&&null!=g.shape&&(this.view.invalidate(d),g.shape.bounds=null)}m.apply(this,arguments);b instanceof mxValueChange&&null!=b.cell&&null!=b.cell.value&&"object"==typeof b.cell.value&&this.invalidateDescendantsWithPlaceholders(b.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(b){b=this.model.getDescendants(b);if(0<b.length)for(var d=0;d<b.length;d++){var g=this.view.getState(b[d]);null!=g&&null!=g.shape&&null!=g.shape.stencil&&
-this.stencilHasPlaceholders(g.shape.stencil)?this.removeStateForCell(b[d]):this.isReplacePlaceholders(b[d])&&this.view.invalidate(b[d],!1,!1)}};Graph.prototype.replaceElement=function(b,d){for(var g=b.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(b.attributes);attr=c.pop();)g.setAttribute(attr.nodeName,attr.nodeValue);g.innerHTML=b.innerHTML;b.parentNode.replaceChild(g,b)};Graph.prototype.processElements=function(b,d){if(null!=b)for(var g=b.getElementsByTagName("*"),c=
-0;c<g.length;c++)d(g[c])};Graph.prototype.updateLabelElements=function(b,d,g){b=null!=b?b:this.getSelectionCells();for(var c=document.createElement("div"),e=0;e<b.length;e++)if(this.isHtmlLabel(b[e])){var f=this.convertValueToString(b[e]);if(null!=f&&0<f.length){c.innerHTML=f;for(var l=c.getElementsByTagName(null!=g?g:"*"),k=0;k<l.length;k++)d(l[k]);c.innerHTML!=f&&this.cellLabelChanged(b[e],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(b,d,g){d=Graph.zapGremlins(d);this.model.beginUpdate();
-try{if(null!=b.value&&"object"==typeof b.value){if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),e=b;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(c)){this.setAttributeForCell(e,c,d);break}e=this.model.getParent(e)}var f=b.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&f.hasAttribute("label_"+Graph.diagramLanguage)?f.setAttribute("label_"+Graph.diagramLanguage,d):
-f.setAttribute("label",d);d=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(b){if(null!=b){for(var d=new mxDictionary,g=0;g<b.length;g++)d.put(b[g],!0);for(var c=[],g=0;g<b.length;g++){var e=this.model.getParent(b[g]);null==e||d.get(e)||(d.put(e,!0),c.push(e))}for(g=0;g<c.length;g++)if(e=this.view.getState(c[g]),null!=e&&(this.model.isEdge(e.cell)||this.model.isVertex(e.cell))&&this.isCellDeletable(e.cell)&&this.isTransparentState(e)){for(var f=
-!0,l=0;l<this.model.getChildCount(e.cell)&&f;l++)d.get(this.model.getChildAt(e.cell,l))||(f=!1);f&&b.push(e.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(b){for(var d=[],g=0;g<b.length;g++)this.isCellDeletable(b[g])&&this.isTransparentState(this.view.getState(b[g]))&&d.push(b[g]);b=d;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(b,d){this.setAttributeForCell(b,"link",d)};Graph.prototype.setTooltipForCell=
-function(b,d){var g="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(b.value)&&b.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(g="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(b,g,d)};Graph.prototype.getAttributeForCell=function(b,d,g){b=null!=b.value&&"object"===typeof b.value?b.value.getAttribute(d):null;return null!=b?b:g};Graph.prototype.setAttributeForCell=function(b,d,g){var c;null!=b.value&&"object"==typeof b.value?c=b.value.cloneNode(!0):(c=
-mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",b.value||""));null!=g?c.setAttribute(d,g):c.removeAttribute(d);this.model.setValue(b,c)};var v=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(b,d,g,c){this.getModel();if(mxEvent.isAltDown(d))return null;for(var e=0;e<b.length;e++){var f=this.model.getParent(b[e]);if(this.model.isEdge(f)&&0>mxUtils.indexOf(b,f))return null}for(var f=v.apply(this,arguments),l=!0,e=0;e<b.length&&l;e++)l=l&&this.isTableRow(b[e]);
-l&&(this.isTableCell(f)&&(f=this.model.getParent(f)),this.isTableRow(f)&&(f=this.model.getParent(f)),this.isTable(f)||(f=null));return f};Graph.prototype.click=function(b){mxGraph.prototype.click.call(this,b);this.firstClickState=b.getState();this.firstClickSource=b.getSource()};Graph.prototype.dblClick=function(b,d){this.isEnabled()&&(d=this.insertTextForEvent(b,d),mxGraph.prototype.dblClick.call(this,b,d))};Graph.prototype.insertTextForEvent=function(b,d){var g=mxUtils.convertPoint(this.container,
-mxEvent.getClientX(b),mxEvent.getClientY(b));if(null!=b&&!this.model.isVertex(d)){var c=this.model.isEdge(d)?this.view.getState(d):null,e=mxEvent.getSource(b);this.firstClickState!=c||this.firstClickSource!=e||null!=c&&null!=c.text&&null!=c.text.node&&null!=c.text.boundingBox&&(mxUtils.contains(c.text.boundingBox,g.x,g.y)||mxUtils.isAncestorNode(c.text.node,mxEvent.getSource(b)))||(null!=c||this.isCellLocked(this.getDefaultParent()))&&(null==c||this.isCellLocked(c.cell))||!(null!=c||mxClient.IS_SVG&&
-e==this.view.getCanvas().ownerSVGElement)||(null==c&&(c=this.view.getState(this.getCellAt(g.x,g.y))),d=this.addText(g.x,g.y,c))}return d};Graph.prototype.getInsertPoint=function(){var b=this.getGridSize(),d=this.container.scrollLeft/this.view.scale-this.view.translate.x,g=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var c=this.getPageLayout(),e=this.getPageSize(),d=Math.max(d,c.x*e.width),g=Math.max(g,c.y*e.height);return new mxPoint(this.snap(d+b),this.snap(g+
-b))};Graph.prototype.getFreeInsertPoint=function(){var b=this.view,d=this.getGraphBounds(),g=this.getInsertPoint(),c=this.snap(Math.round(Math.max(g.x,d.x/b.scale-b.translate.x+(0==d.width?2*this.gridSize:0)))),b=this.snap(Math.round(Math.max(g.y,(d.y+d.height)/b.scale-b.translate.y+2*this.gridSize)));return new mxPoint(c,b)};Graph.prototype.getCenterInsertPoint=function(b){b=null!=b?b:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+
+!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(b){return!mxEvent.isAltDown(b)};var e=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(b){return e.apply(this,arguments)||this.graph.isTableRow(b)||this.graph.isTableCell(b)};var k=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(b){return k.apply(this,arguments)||this.graph.isEdgeIgnored(b)};var g=mxConnectionHandler.prototype.isCreateTarget;
+mxConnectionHandler.prototype.isCreateTarget=function(b){return this.graph.isCloneEvent(b)||g.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var b=new mxEllipse(null,this.highlightColor,this.highlightColor,0);b.opacity=mxConstants.HIGHLIGHT_OPACITY;return b};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(b){b=this.graph.createCurrentEdgeStyle();b=this.graph.createEdge(null,
+null,null,null,null,b);b=new mxCellState(this.graph.view,b,this.graph.getCellStyle(b));for(var d in this.graph.currentEdgeStyle)b.style[d]=this.graph.currentEdgeStyle[d];return b};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var b=p.apply(this,arguments);b.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return b};mxConnectionHandler.prototype.updatePreview=function(b){};var t=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
+function(){var b=t.apply(this,arguments),d=b.getCell;b.getCell=mxUtils.bind(this,function(b){var f=d.apply(this,arguments);this.error=null;return f});return b};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var b="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",d="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),
+f=0;f<d.length;f++)null!=this.currentEdgeStyle[d[f]]&&(b+=d[f]+"="+this.currentEdgeStyle[d[f]]+";");null!=this.currentEdgeStyle.orthogonalLoop?b+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(b+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?b+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(b+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(b+="elbow="+this.currentEdgeStyle.elbow+";");return b=null!=this.currentEdgeStyle.html?b+("html="+this.currentEdgeStyle.html+";"):b+"html=1;"};Graph.prototype.updateCellStyles=function(b,d,f){this.model.beginUpdate();try{for(var c=0;c<f.length;c++)if(this.model.isVertex(f[c])||this.model.isEdge(f[c])){this.setCellStyles(b,null,[f[c]]);var e=this.getCellStyle(f[c])[b];d!=(null==e?mxConstants.NONE:e)&&this.setCellStyles(b,
+d,[f[c]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var b=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=b&&(new mxCodec(b.ownerDocument)).decode(b,this.getStylesheet())};Graph.prototype.createCellLookup=function(b,d){d=null!=d?d:{};for(var f=0;f<b.length;f++){var c=b[f];d[mxObjectIdentity.get(c)]=
+c.getId();for(var e=this.model.getChildCount(c),g=0;g<e;g++)this.createCellLookup([this.model.getChildAt(c,g)],d)}return d};Graph.prototype.createCellMapping=function(b,d,f){f=null!=f?f:{};for(var c in b){var e=d[c];null==f[e]&&(f[e]=b[c].getId()||"")}return f};Graph.prototype.importGraphModel=function(b,d,f,c){d=null!=d?d:0;f=null!=f?f:0;var e=new mxCodec(b.ownerDocument),g=new mxGraphModel;e.decode(b,g);b=[];var e={},l={},k=g.getChildren(this.cloneCell(g.root,this.isCloneInvalidEdges(),e));if(null!=
+k){var m=this.createCellLookup([g.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<k.length;g++)q=this.model.getChildren(this.moveCells([k[g]],d,f,!1,this.model.getRoot())[0]),null!=q&&(b=b.concat(q));else{var q=g.getChildren(k[0]);null!=q&&(b=this.moveCells(q,d,f,!1,this.getDefaultParent()),l[g.getChildAt(g.root,0).getId()]=this.getDefaultParent().getId())}if(null!=b&&(this.createCellMapping(e,m,l),this.updateCustomLinks(l,b),c)){this.isGridEnabled()&&
+(d=this.snap(d),f=this.snap(f));var n=this.getBoundingBoxFromGeometry(b,!0);null!=n&&this.moveCells(b,d-n.x,f-n.y)}}finally{this.model.endUpdate()}}return b};Graph.prototype.encodeCells=function(b){for(var d={},f=this.cloneCells(b,null,d),c=new mxDictionary,e=0;e<b.length;e++)c.put(b[e],!0);for(var g=new mxCodec,l=new mxGraphModel,k=l.getChildAt(l.getRoot(),0),e=0;e<f.length;e++){l.add(k,f[e]);var m=this.view.getState(b[e]);if(null!=m){var q=this.getCellGeometry(f[e]);null!=q&&q.relative&&!this.model.isEdge(b[e])&&
+null==c.get(this.model.getParent(b[e]))&&(q.offset=null,q.relative=!1,q.x=m.x/m.view.scale-m.view.translate.x,q.y=m.y/m.view.scale-m.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(b)),f);return g.encode(l)};Graph.prototype.isSwimlane=function(b,d){if(null!=b&&this.model.getParent(b)!=this.model.getRoot()&&!this.model.isEdge(b)){var f=this.getCurrentCellStyle(b,d)[mxConstants.STYLE_SHAPE];return f==mxConstants.SHAPE_SWIMLANE||"table"==f}return!1};var d=Graph.prototype.isExtendParent;
+Graph.prototype.isExtendParent=function(b){var f=this.model.getParent(b);if(null!=f){var c=this.getCurrentCellStyle(f);if(null!=c.expand)return"0"!=c.expand}return d.apply(this,arguments)&&(null==f||!this.isTable(f))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(b,d,c,e,g,l,k,m){null==m&&(m=this.model.getParent(b),this.isTable(m)||this.isTableRow(m))&&(m=this.getCellAt(l,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=f.apply(this,[b,d,c,e,g,l,k,m]);this.model.setValue(c,
+"");var q=this.getChildCells(c,!0);for(d=0;d<q.length;d++){var n=this.getCellGeometry(q[d]);null!=n&&n.relative&&0<n.x&&this.model.remove(q[d])}var F=this.getChildCells(b,!0);for(d=0;d<F.length;d++)n=this.getCellGeometry(F[d]),null!=n&&n.relative&&0>=n.x&&this.model.remove(F[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
+mxConstants.NONE,[b]);var u=this.model.getTerminal(c,!1);if(null!=u){var da=this.getCurrentCellStyle(u);null!=da&&"1"==da.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(b,d,f){if(d||f)l.apply(this,arguments);
+else{var c=this.getSelectionCell(),e=null,g=[],k=mxUtils.bind(this,function(d){if(null!=this.view.getState(d)&&(this.model.isVertex(d)||this.model.isEdge(d)))if(g.push(d),d==c)e=g.length-1;else if(b&&null==c&&0<g.length||null!=e&&b&&g.length>e||!b&&0<e)return;for(var f=0;f<this.model.getChildCount(d);f++)k(this.model.getChildAt(d,f))});k(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(b?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=
+function(b,d,f,c,e,g,l){l=null!=l?l:{};if(this.isTable(e)){for(var k=[],q=0;q<b.length;q++)this.isTable(b[q])?k=k.concat(this.model.getChildCells(b[q],!0).reverse()):k.push(b[q]);b=k}this.model.beginUpdate();try{k=[];for(q=0;q<b.length;q++)if(null!=e&&this.isTableRow(b[q])){var n=this.model.getParent(b[q]),F=this.getCellGeometry(b[q]);this.isTable(n)&&k.push(n);if(null!=n&&null!=F&&this.isTable(n)&&this.isTable(e)&&(c||n!=e)){if(!c){var u=this.getCellGeometry(n);null!=u&&(u=u.clone(),u.height-=F.height,
+this.model.setGeometry(n,u))}u=this.getCellGeometry(e);null!=u&&(u=u.clone(),u.height+=F.height,this.model.setGeometry(e,u));var da=this.model.getChildCells(e,!0);if(0<da.length){b[q]=c?this.cloneCell(b[q]):b[q];var p=this.model.getChildCells(b[q],!0),v=this.model.getChildCells(da[0],!0),A=v.length-p.length;if(0<A)for(var B=0;B<A;B++){var x=this.cloneCell(p[p.length-1]);null!=x&&(x.value="",this.model.add(b[q],x))}else if(0>A)for(B=0;B>A;B--)this.model.remove(p[p.length+B-1]);p=this.model.getChildCells(b[q],
+!0);for(B=0;B<v.length;B++){var I=this.getCellGeometry(v[B]),qa=this.getCellGeometry(p[B]);null!=I&&null!=qa&&(qa=qa.clone(),qa.width=I.width,this.model.setGeometry(p[B],qa))}}}}for(var t=m.apply(this,arguments),q=0;q<k.length;q++)!c&&this.model.contains(k[q])&&0==this.model.getChildCount(k[q])&&this.model.remove(k[q]);c&&this.updateCustomLinks(this.createCellMapping(l,this.createCellLookup(b)),t)}finally{this.model.endUpdate()}return t};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=
+function(b,d){var f=[];this.model.beginUpdate();try{for(var c=0;c<b.length;c++)if(this.isTableCell(b[c])){var e=this.model.getParent(b[c]),g=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(g)?0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g)&&f.push(g):this.labelChanged(b[c],"")}else{if(this.isTableRow(b[c])&&(g=this.model.getParent(b[c]),0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g))){for(var l=this.model.getChildCells(g,!0),k=0,m=0;m<l.length;m++)0<=mxUtils.indexOf(b,
+l[m])&&k++;k==l.length&&f.push(g)}f.push(b[c])}f=q.apply(this,[f,d])}finally{this.model.endUpdate()}return f};Graph.prototype.updateCustomLinks=function(b,d,f){f=null!=f?f:new Graph;for(var c=0;c<d.length;c++)null!=d[c]&&f.updateCustomLinksForCell(b,d[c],f)};Graph.prototype.updateCustomLinksForCell=function(b,d){this.doUpdateCustomLinksForCell(b,d);for(var f=this.model.getChildCount(d),c=0;c<f;c++)this.updateCustomLinksForCell(b,this.model.getChildAt(d,c))};Graph.prototype.doUpdateCustomLinksForCell=
+function(b,d){};Graph.prototype.getAllConnectionConstraints=function(b,d){if(null!=b){var f=mxUtils.getValue(b.style,"points",null);if(null!=f){var c=[];try{for(var e=JSON.parse(f),f=0;f<e.length;f++){var g=e[f];c.push(new mxConnectionConstraint(new mxPoint(g[0],g[1]),2<g.length?"0"!=g[2]:!0,null,3<g.length?g[3]:0,4<g.length?g[4]:0))}}catch(va){}return c}if(null!=b.shape&&null!=b.shape.bounds){g=b.shape.direction;e=b.shape.bounds;f=b.shape.scale;c=e.width/f;e=e.height/f;if(g==mxConstants.DIRECTION_NORTH||
+g==mxConstants.DIRECTION_SOUTH)g=c,c=e,e=g;f=b.shape.getConstraints(b.style,c,e);if(null!=f)return f;if(null!=b.shape.stencil&&null!=b.shape.stencil.constraints)return b.shape.stencil.constraints;if(null!=b.shape.constraints)return b.shape.constraints}}return null};Graph.prototype.flipEdge=function(b){if(null!=b){var d=this.getCurrentCellStyle(b),d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
+this.setCellStyles(mxConstants.STYLE_ELBOW,d,[b])}};Graph.prototype.isValidRoot=function(b){for(var d=this.model.getChildCount(b),f=0,c=0;c<d;c++){var e=this.model.getChildAt(b,c);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||f++)}return 0<f||this.isContainer(b)};Graph.prototype.isValidDropTarget=function(b,d,f){for(var c=this.getCurrentCellStyle(b),e=!0,g=!0,l=0;l<d.length&&g;l++)e=e&&this.isTable(d[l]),g=g&&this.isTableRow(d[l]);return("1"!=mxUtils.getValue(c,"part","0")||
+this.isContainer(b))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(b))&&!this.isTableRow(b)&&(!this.isTable(b)||g||e)};Graph.prototype.createGroupCell=function(){var b=mxGraph.prototype.createGroupCell.apply(this,arguments);b.setStyle("group");return b};Graph.prototype.isExtendParentsOnAdd=function(b){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=b&&null!=this.layoutManager){var f=this.model.getParent(b);
+null!=f&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(b){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(b,d){var f=this.getModel(),c=[];f.beginUpdate();try{for(var e=0;e<b.length;e++){var g=b[e];if(f.isEdge(g)){var l=f.getTerminal(g,
+!0),k=f.getTerminal(g,!1);f.setTerminal(g,k,!0);f.setTerminal(g,l,!1);var m=f.getGeometry(g);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var q=m.getTerminalPoint(!0),n=m.getTerminalPoint(!1);m.setTerminalPoint(q,!1);m.setTerminalPoint(n,!0);f.setGeometry(g,m);var F=this.view.getState(g),u=this.view.getState(l),p=this.view.getState(k);if(null!=F){var v=null!=u?this.getConnectionConstraint(F,u,!0):null,A=null!=p?this.getConnectionConstraint(F,p,!1):null;this.setConnectionConstraint(g,
+l,!0,A);this.setConnectionConstraint(g,k,!1,v);var B=mxUtils.getValue(F.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(F.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,B,[g])}c.push(g)}}else if(f.isVertex(g)&&(m=this.getCellGeometry(g),null!=m)){if(!(this.isTable(g)||this.isTableRow(g)||this.isTableCell(g)||this.isSwimlane(g))){m=m.clone();m.x+=m.width/
+2-m.height/2;m.y+=m.height/2-m.width/2;var da=m.width;m.width=m.height;m.height=da;f.setGeometry(g,m)}var x=this.view.getState(g);if(null!=x){var I=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],t=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,I[mxUtils.mod(mxUtils.indexOf(I,t)+(d?-1:1),I.length)],[g])}c.push(g)}}}finally{f.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=
+function(b){if(null!=b&&null!=b.fgNode)for(b=b.fgNode.firstChild;null!=b;){if("text"==b.nodeName&&"1"==b.getAttribute("placeholders"))return!0;b=b.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(b){if(b instanceof mxGeometryChange&&(this.isTableCell(b.cell)||this.isTableRow(b.cell))&&(null==b.previous&&null!=b.geometry||null!=b.previous&&!b.previous.equals(b.geometry))){var d=b.cell;this.isTableCell(d)&&(d=this.model.getParent(d));this.isTableRow(d)&&
+(d=this.model.getParent(d));var f=this.view.getState(d);null!=f&&null!=f.shape&&(this.view.invalidate(d),f.shape.bounds=null)}n.apply(this,arguments);b instanceof mxValueChange&&null!=b.cell&&null!=b.cell.value&&"object"==typeof b.cell.value&&this.invalidateDescendantsWithPlaceholders(b.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(b){b=this.model.getDescendants(b);if(0<b.length)for(var d=0;d<b.length;d++){var f=this.view.getState(b[d]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&
+this.stencilHasPlaceholders(f.shape.stencil)?this.removeStateForCell(b[d]):this.isReplacePlaceholders(b[d])&&this.view.invalidate(b[d],!1,!1)}};Graph.prototype.replaceElement=function(b,d){for(var f=b.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(b.attributes);attr=c.pop();)f.setAttribute(attr.nodeName,attr.nodeValue);f.innerHTML=b.innerHTML;b.parentNode.replaceChild(f,b)};Graph.prototype.processElements=function(b,d){if(null!=b)for(var f=b.getElementsByTagName("*"),c=
+0;c<f.length;c++)d(f[c])};Graph.prototype.updateLabelElements=function(b,d,f){b=null!=b?b:this.getSelectionCells();for(var c=document.createElement("div"),e=0;e<b.length;e++)if(this.isHtmlLabel(b[e])){var g=this.convertValueToString(b[e]);if(null!=g&&0<g.length){c.innerHTML=g;for(var l=c.getElementsByTagName(null!=f?f:"*"),k=0;k<l.length;k++)d(l[k]);c.innerHTML!=g&&this.cellLabelChanged(b[e],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(b,d,f){d=Graph.zapGremlins(d);this.model.beginUpdate();
+try{if(null!=b.value&&"object"==typeof b.value){if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),e=b;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(c)){this.setAttributeForCell(e,c,d);break}e=this.model.getParent(e)}var g=b.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&g.hasAttribute("label_"+Graph.diagramLanguage)?g.setAttribute("label_"+Graph.diagramLanguage,d):
+g.setAttribute("label",d);d=g}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(b){if(null!=b){for(var d=new mxDictionary,f=0;f<b.length;f++)d.put(b[f],!0);for(var c=[],f=0;f<b.length;f++){var e=this.model.getParent(b[f]);null==e||d.get(e)||(d.put(e,!0),c.push(e))}for(f=0;f<c.length;f++)if(e=this.view.getState(c[f]),null!=e&&(this.model.isEdge(e.cell)||this.model.isVertex(e.cell))&&this.isCellDeletable(e.cell)&&this.isTransparentState(e)){for(var g=
+!0,l=0;l<this.model.getChildCount(e.cell)&&g;l++)d.get(this.model.getChildAt(e.cell,l))||(g=!1);g&&b.push(e.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(b){for(var d=[],f=0;f<b.length;f++)this.isCellDeletable(b[f])&&this.isTransparentState(this.view.getState(b[f]))&&d.push(b[f]);b=d;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(b,d){this.setAttributeForCell(b,"link",d)};Graph.prototype.setTooltipForCell=
+function(b,d){var f="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(b.value)&&b.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(f="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(b,f,d)};Graph.prototype.getAttributeForCell=function(b,d,f){b=null!=b.value&&"object"===typeof b.value?b.value.getAttribute(d):null;return null!=b?b:f};Graph.prototype.setAttributeForCell=function(b,d,f){var c;null!=b.value&&"object"==typeof b.value?c=b.value.cloneNode(!0):(c=
+mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",b.value||""));null!=f?c.setAttribute(d,f):c.removeAttribute(d);this.model.setValue(b,c)};var v=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(b,d,f,c){this.getModel();if(mxEvent.isAltDown(d))return null;for(var e=0;e<b.length;e++){var g=this.model.getParent(b[e]);if(this.model.isEdge(g)&&0>mxUtils.indexOf(b,g))return null}for(var g=v.apply(this,arguments),l=!0,e=0;e<b.length&&l;e++)l=l&&this.isTableRow(b[e]);
+l&&(this.isTableCell(g)&&(g=this.model.getParent(g)),this.isTableRow(g)&&(g=this.model.getParent(g)),this.isTable(g)||(g=null));return g};Graph.prototype.click=function(b){mxGraph.prototype.click.call(this,b);this.firstClickState=b.getState();this.firstClickSource=b.getSource()};Graph.prototype.dblClick=function(b,d){this.isEnabled()&&(d=this.insertTextForEvent(b,d),mxGraph.prototype.dblClick.call(this,b,d))};Graph.prototype.insertTextForEvent=function(b,d){var f=mxUtils.convertPoint(this.container,
+mxEvent.getClientX(b),mxEvent.getClientY(b));if(null!=b&&!this.model.isVertex(d)){var c=this.model.isEdge(d)?this.view.getState(d):null,e=mxEvent.getSource(b);this.firstClickState!=c||this.firstClickSource!=e||null!=c&&null!=c.text&&null!=c.text.node&&null!=c.text.boundingBox&&(mxUtils.contains(c.text.boundingBox,f.x,f.y)||mxUtils.isAncestorNode(c.text.node,mxEvent.getSource(b)))||(null!=c||this.isCellLocked(this.getDefaultParent()))&&(null==c||this.isCellLocked(c.cell))||!(null!=c||mxClient.IS_SVG&&
+e==this.view.getCanvas().ownerSVGElement)||(null==c&&(c=this.view.getState(this.getCellAt(f.x,f.y))),d=this.addText(f.x,f.y,c))}return d};Graph.prototype.getInsertPoint=function(){var b=this.getGridSize(),d=this.container.scrollLeft/this.view.scale-this.view.translate.x,f=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var c=this.getPageLayout(),e=this.getPageSize(),d=Math.max(d,c.x*e.width),f=Math.max(f,c.y*e.height);return new mxPoint(this.snap(d+b),this.snap(f+
+b))};Graph.prototype.getFreeInsertPoint=function(){var b=this.view,d=this.getGraphBounds(),f=this.getInsertPoint(),c=this.snap(Math.round(Math.max(f.x,d.x/b.scale-b.translate.x+(0==d.width?2*this.gridSize:0)))),b=this.snap(Math.round(Math.max(f.y,(d.y+d.height)/b.scale-b.translate.y+2*this.gridSize)));return new mxPoint(c,b)};Graph.prototype.getCenterInsertPoint=function(b){b=null!=b?b:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+
this.container.clientWidth/2)/this.view.scale-this.view.translate.x-b.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-b.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-b.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-b.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=
-function(b,d,g){var c=new mxCell;c.value="Text";c.geometry=new mxGeometry(0,0,0,0);c.vertex=!0;if(null!=g&&this.model.isEdge(g.cell)){c.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";c.geometry.relative=!0;c.connectable=!1;var e=this.view.getRelativePoint(g,b,d);c.geometry.x=Math.round(1E4*e.x)/1E4;c.geometry.y=Math.round(e.y);c.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(g,c.geometry),f=this.view.scale;c.geometry.offset=new mxPoint(Math.round((b-e.x)/
-f),Math.round((d-e.y)/f))}else e=this.view.translate,c.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",c.geometry.width=40,c.geometry.height=20,c.geometry.x=Math.round(b/this.view.scale)-e.x-(null!=g?g.origin.x:0),c.geometry.y=Math.round(d/this.view.scale)-e.y-(null!=g?g.origin.y:0),c.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([c],null!=g?g.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[c])),this.autoSizeCell(c)}finally{this.getModel().endUpdate()}return c};
-Graph.prototype.addClickHandler=function(b,d,g){var c=mxUtils.bind(this,function(){var b=this.container.getElementsByTagName("a");if(null!=b)for(var g=0;g<b.length;g++){var c=this.getAbsoluteUrl(b[g].getAttribute("href"));null!=c&&(b[g].setAttribute("rel",this.linkRelation),b[g].setAttribute("href",c),null!=d&&mxEvent.addGestureListeners(b[g],null,null,d))}});this.model.addListener(mxEvent.CHANGE,c);c();var e=this.container.style.cursor,f=this.getTolerance(),l=this,k={currentState:null,currentLink:null,
-currentTarget:null,highlight:null!=b&&""!=b&&b!=mxConstants.NONE?new mxCellHighlight(l,b,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(b){var d=b.sourceState;if(null==d||null==l.getLinkForCell(d.cell))b=l.getCellAt(b.getGraphX(),b.getGraphY(),null,null,null,function(b,d,g){return null==l.getLinkForCell(b.cell)}),d=null==d||l.model.isAncestor(b,d.cell)?l.view.getState(b):null;d!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=d,null!=this.currentState&&
-this.activate(this.currentState))},mouseDown:function(b,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=l.container.scrollLeft;this.scrollTop=l.container.scrollTop;null==this.currentLink&&"auto"==l.container.style.overflow&&(l.container.style.cursor="move");this.updateCurrentState(d)},mouseMove:function(b,d){if(l.isMouseDown){if(null!=this.currentLink){var g=Math.abs(this.startX-d.getGraphX()),c=Math.abs(this.startY-d.getGraphY());(g>f||c>f)&&this.clear()}}else{for(g=d.getSource();null!=
-g&&"a"!=g.nodeName.toLowerCase();)g=g.parentNode;null!=g?this.clear():(null!=l.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&l.tooltipHandler.reset(d,!0,this.currentState),(null==this.currentState||d.getState()!=this.currentState&&null!=d.sourceState||!l.intersects(this.currentState,d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d))}},mouseUp:function(b,c){for(var e=c.getSource(),k=c.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-
-l.container.scrollLeft)<f&&Math.abs(this.scrollTop-l.container.scrollTop)<f&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(e=l.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==d||d(k,this.currentLink),mxEvent.isConsumed(k)||(k=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(k)?"_blank":
-e?l.linkTarget:"_top",l.openLink(this.currentLink,k),c.consume())):null!=g&&!c.isConsumed()&&Math.abs(this.scrollLeft-l.container.scrollLeft)<f&&Math.abs(this.scrollTop-l.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-c.getGraphY())<f&&g(c.getEvent()));this.clear()},activate:function(b){this.currentLink=l.getAbsoluteUrl(l.getLinkForCell(b.cell));null!=this.currentLink&&(this.currentTarget=l.getLinkTargetForCell(b.cell),l.container.style.cursor="pointer",null!=
-this.highlight&&this.highlight.highlight(b))},clear:function(){null!=l.container&&(l.container.style.cursor=e);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=l.tooltipHandler&&l.tooltipHandler.hide()}};l.click=function(b){};l.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(b){k.clear()})};Graph.prototype.duplicateCells=function(b,d){b=null!=b?b:this.getSelectionCells();d=null!=d?d:!0;for(var g=0;g<b.length;g++)this.isTableCell(b[g])&&
-(b[g]=this.model.getParent(b[g]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,f=[];c.beginUpdate();try{for(var l={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,l,!0),g=0;g<b.length;g++){var q=c.getParent(b[g]);if(null!=q){var p=this.moveCells([m[g]],e,e,!1)[0];f.push(p);if(d)c.add(q,m[g]);else{var G=q.getIndex(b[g]);c.add(q,m[g],G+1)}if(this.isTable(q)){var u=this.getCellGeometry(m[g]),y=this.getCellGeometry(q);null!=u&&null!=y&&(y=y.clone(),y.height+=u.height,c.setGeometry(q,
-y))}}else f.push(m[g])}this.updateCustomLinks(this.createCellMapping(l,k),m,this)}finally{c.endUpdate()}return f};Graph.prototype.insertImage=function(b,d,g){if(null!=b&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<c.length;f++)e.push(c[f]);document.execCommand("insertimage",!1,b);b=this.cellEditor.textarea.getElementsByTagName("img");if(b.length==e.length+1)for(f=b.length-1;0<=f;f--)if(0==f||b[f]!=e[f-1]){b[f].setAttribute("width",d);b[f].setAttribute("height",
-g);break}}};Graph.prototype.insertLink=function(b){if(null!=this.cellEditor.textarea)if(0==b.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var d=this.cellEditor.textarea.getElementsByTagName("a"),g=[],c=0;c<d.length;c++)g.push(d[c]);document.execCommand("createlink",!1,mxUtils.trim(b));d=this.cellEditor.textarea.getElementsByTagName("a");if(d.length==g.length+1)for(c=d.length-1;0<=c;c--)if(d[c]!=g[c-1]){for(d=d[c].getElementsByTagName("a");0<d.length;){for(g=d[0].parentNode;null!=
-d[0].firstChild;)g.insertBefore(d[0].firstChild,d[0]);g.removeChild(d[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(b))};Graph.prototype.isCellResizable=function(b){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),g=this.getCurrentCellStyle(b);return!this.isTableCell(b)&&!this.isTableRow(b)&&(d||"0"!=mxUtils.getValue(g,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==g[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(b,d){null==d&&(d=this.getSelectionCells());
-if(null!=d&&1<d.length){for(var g=[],c=null,e=null,f=0;f<d.length;f++)if(this.getModel().isVertex(d[f])){var l=this.view.getState(d[f]);if(null!=l){var k=b?l.getCenterX():l.getCenterY(),c=null!=c?Math.max(c,k):k,e=null!=e?Math.min(e,k):k;g.push(l)}}if(2<g.length){g.sort(function(d,g){return b?d.x-g.x:d.y-g.y});l=this.view.translate;k=this.view.scale;e=e/k-(b?l.x:l.y);c=c/k-(b?l.x:l.y);this.getModel().beginUpdate();try{for(var m=(c-e)/(g.length-1),c=e,f=1;f<g.length-1;f++){var q=this.view.getState(this.model.getParent(g[f].cell)),
-p=this.getCellGeometry(g[f].cell),c=c+m;null!=p&&null!=q&&(p=p.clone(),b?p.x=Math.round(c-p.width/2)-q.origin.x:p.y=Math.round(c-p.height/2)-q.origin.y,this.getModel().setGeometry(g[f].cell,p))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,d){return this.getLinkForCell(b.cell)});
-return b};Graph.prototype.parseBackgroundImage=function(b){var d=null;null!=b&&0<b.length&&(b=JSON.parse(b),d=new mxImage(b.src,b.width,b.height));return d};Graph.prototype.getBackgroundImageObject=function(b){return b};Graph.prototype.getSvg=function(b,d,g,c,e,f,l,k,m,q,p,G,u,y){var n=null;if(null!=y)for(n=new mxDictionary,p=0;p<y.length;p++)n.put(y[p],!0);if(y=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;g=null!=g?g:0;e=null!=e?e:!0;
-f=null!=f?f:!0;l=null!=l?l:!0;var v="page"==u?this.view.getBackgroundPageBounds():f&&null==n||c||"diagram"==u?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),D=this.view.scale;"diagram"==u&&null!=this.backgroundImage&&v.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*D,(this.view.translate.y+this.backgroundImage.y)*D,this.backgroundImage.width*D,this.backgroundImage.height*D));if(null==v)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),
-J=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=b&&(null!=J.style?J.style.backgroundColor=b:J.setAttribute("style","background-color:"+b));null==x.createElementNS?(J.setAttribute("xmlns",mxConstants.NS_SVG),J.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):J.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/D;var t=Math.max(1,Math.ceil(v.width*b)+2*g)+(q?5:0),A=Math.max(1,Math.ceil(v.height*b)+2*g)+(q?5:0);J.setAttribute("version",
-"1.1");J.setAttribute("width",t+"px");J.setAttribute("height",A+"px");J.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+t+" "+A);x.appendChild(J);var B=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");J.appendChild(B);var W=this.createSvgCanvas(B);W.foOffset=e?-.5:0;W.textOffset=e?-.5:0;W.imageOffset=e?-.5:0;W.translate(Math.floor(g/d-v.x/D),Math.floor(g/d-v.y/D));var C=document.createElement("div"),da=W.getAlternateText;W.getAlternateText=function(b,d,g,c,e,
-f,l,k,m,q,p,G,z){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(C.innerHTML=f,f=mxUtils.extractTextWithWhitespace(C.childNodes));for(var Fa=Math.ceil(2*c/this.state.fontSize),Qa=[],sa=0,Ra=0;(0==Fa||sa<Fa)&&Ra<f.length;){var Ua=f.charCodeAt(Ra);if(10==Ua||13==Ua){if(0<sa)break}else Qa.push(f.charAt(Ra)),255>Ua&&sa++;Ra++}Qa.length<f.length&&1<f.length-Qa.length&&(f=mxUtils.trim(Qa.join(""))+"...");return f}catch(gb){return da.apply(this,arguments)}else return da.apply(this,
-arguments)};var O=this.backgroundImage;if(null!=O){d=D/d;var M=this.view.translate,F=new mxRectangle((O.x+M.x)*d,(O.y+M.y)*d,O.width*d,O.height*d);mxUtils.intersects(v,F)&&W.image(O.x+M.x,O.y+M.y,O.width,O.height,O.src,!0)}W.scale(b);W.textEnabled=l;k=null!=k?k:this.createSvgImageExport();var ua=k.drawCellState,aa=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var g=aa.apply(this,arguments);return null==g||b.view.graph.isCustomLink(g)?null:g};k.getLinkTargetForCellState=function(b,d){return b.view.graph.getLinkTargetForCell(b.cell)};
-k.drawCellState=function(b,d){for(var g=b.view.graph,c=null!=n?n.get(b.cell):g.isCellSelected(b.cell),e=g.model.getParent(b.cell);!(f&&null==n||c)&&null!=e;)c=null!=n?n.get(e):g.isCellSelected(e),e=g.model.getParent(e);(f&&null==n||c)&&ua.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),W);this.updateSvgLinks(J,m,!0);this.addForeignObjectWarning(W,J);return J}finally{y&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
-function(b,d){if("0"!=urlParams["svg-warning"]&&0<d.getElementsByTagName("foreignObject").length){var g=b.createElement("switch"),c=b.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=b.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||d.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,
-"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=b.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);g.appendChild(c);e.appendChild(f);g.appendChild(e);d.appendChild(g)}};Graph.prototype.updateSvgLinks=function(b,d,g){b=b.getElementsByTagName("a");for(var c=0;c<b.length;c++)if(null==b[c].getAttribute("target")){var e=
-b[c].getAttribute("href");null==e&&(e=b[c].getAttribute("xlink:href"));null!=e&&(null!=d&&/^https?:\/\//.test(e)?b[c].setAttribute("target",d):g&&this.isCustomLink(e)&&b[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(b){b=new mxSvgCanvas2D(b);b.pointerEvents=!0;return b};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(b=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&
-(b=document.selection.createRange().parentElement());return b};Graph.prototype.getSelectedEditingElement=function(){for(var b=this.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;null!=b&&b==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=this.cellEditor.textarea.firstChild);return b};Graph.prototype.getParentByName=function(b,d,g){for(;null!=b&&b.nodeName!=
-d;){if(b==g)return null;b=b.parentNode}return b};Graph.prototype.getParentByNames=function(b,d,g){for(;null!=b&&!(0<=mxUtils.indexOf(d,b.nodeName));){if(b==g)return null;b=b.parentNode}return b};Graph.prototype.selectNode=function(b){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var g=document.createRange();g.selectNode(b);d.removeAllRanges();d.addRange(g)}}else(d=document.selection)&&"Control"!=d.type&&(b=d.createRange(),b.collapse(!0),g=d.createRange(),
-g.setEndPoint("StartToStart",b),g.select())};Graph.prototype.deleteCells=function(b,d){var g=null;if(null!=b&&0<b.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var e=this.model.getParent(b[c]);if(this.isTable(e)){var f=this.getCellGeometry(b[c]),l=this.getCellGeometry(e);null!=f&&null!=l&&(l=l.clone(),l.height-=f.height,this.model.setGeometry(e,l))}}var k=this.selectParentAfterDelete?this.model.getParents(b):null;this.removeCells(b,d)}finally{this.model.endUpdate()}if(null!=k)for(g=
-[],c=0;c<k.length;c++)this.model.contains(k[c])&&(this.model.isVertex(k[c])||this.model.isEdge(k[c]))&&g.push(k[c])}return g};Graph.prototype.insertTableColumn=function(b,d){var g=this.getModel();g.beginUpdate();try{var c=b,e=0;if(this.isTableCell(b))var f=g.getParent(b),c=g.getParent(f),e=mxUtils.indexOf(g.getChildCells(f,!0),b);else this.isTableRow(b)?c=g.getParent(b):b=g.getChildCells(c,!0)[0],d||(e=g.getChildCells(b,!0).length-1);for(var l=g.getChildCells(c,!0),k=Graph.minTableColumnWidth,f=0;f<
-l.length;f++){var m=g.getChildCells(l[f],!0)[e],q=g.cloneCell(m,!1),p=this.getCellGeometry(q);q.value=null;if(null!=p){var k=p.width,G=this.getCellGeometry(l[f]);null!=G&&(p.height=G.height)}g.add(l[f],q,e+(d?0:1))}var u=this.getCellGeometry(c);null!=u&&(u=u.clone(),u.width+=k,g.setGeometry(c,u))}finally{g.endUpdate()}};Graph.prototype.insertTableRow=function(b,d){var g=this.getModel();g.beginUpdate();try{var c=b,e=b;if(this.isTableCell(b))e=g.getParent(b),c=g.getParent(e);else if(this.isTableRow(b))c=
-g.getParent(b);else var f=g.getChildCells(c,!0),e=f[d?0:f.length-1];var l=g.getChildCells(e,!0),k=c.getIndex(e),e=g.cloneCell(e,!1);e.value=null;var m=this.getCellGeometry(e);if(null!=m){for(f=0;f<l.length;f++){b=g.cloneCell(l[f],!1);e.insert(b);b.value=null;var q=this.getCellGeometry(b);null!=q&&(q.height=m.height)}g.add(c,e,k+(d?0:1));var p=this.getCellGeometry(c);null!=p&&(p=p.clone(),p.height+=m.height,g.setGeometry(c,p))}}finally{g.endUpdate()}};Graph.prototype.deleteTableColumn=function(b){var d=
-this.getModel();d.beginUpdate();try{var g=b,c=b;this.isTableCell(b)&&(c=d.getParent(b));this.isTableRow(c)&&(g=d.getParent(c));var e=d.getChildCells(g,!0);if(0==e.length)d.remove(g);else{this.isTableRow(c)||(c=e[0]);var f=d.getChildCells(c,!0);if(1>=f.length)d.remove(g);else{var l=f.length-1;this.isTableCell(b)&&(l=mxUtils.indexOf(f,b));for(c=b=0;c<e.length;c++){var k=d.getChildCells(e[c],!0)[l];d.remove(k);var m=this.getCellGeometry(k);null!=m&&(b=Math.max(b,m.width))}var q=this.getCellGeometry(g);
-null!=q&&(q=q.clone(),q.width-=b,d.setGeometry(g,q))}}}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(b){var d=this.getModel();d.beginUpdate();try{var g=b,c=b;this.isTableCell(b)&&(b=c=d.getParent(b));this.isTableRow(b)&&(g=d.getParent(c));var e=d.getChildCells(g,!0);if(1>=e.length)d.remove(g);else{this.isTableRow(c)||(c=e[e.length-1]);d.remove(c);b=0;var f=this.getCellGeometry(c);null!=f&&(b=f.height);var l=this.getCellGeometry(g);null!=l&&(l=l.clone(),l.height-=b,d.setGeometry(g,
-l))}}finally{d.endUpdate()}};Graph.prototype.insertRow=function(b,d){for(var g=b.tBodies[0],c=g.rows[0].cells,e=0,f=0;f<c.length;f++)var l=c[f].getAttribute("colspan"),e=e+(null!=l?parseInt(l):1);g=g.insertRow(d);for(f=0;f<e;f++)mxUtils.br(g.insertCell(-1));return g.cells[0]};Graph.prototype.deleteRow=function(b,d){b.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(b,d){var g=b.tHead;if(null!=g)for(var c=0;c<g.rows.length;c++){var e=document.createElement("th");g.rows[c].appendChild(e);
-mxUtils.br(e)}g=b.tBodies[0];for(c=0;c<g.rows.length;c++)e=g.rows[c].insertCell(d),mxUtils.br(e);return g.rows[0].cells[0<=d?d:g.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(b,d){if(0<=d)for(var g=b.tBodies[0].rows,c=0;c<g.length;c++)g[c].cells.length>d&&g[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(b){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var g=document.createElement("div");g.innerHTML=
-b;b=document.createDocumentFragment();for(var c;c=g.firstChild;)lastNode=b.appendChild(c);d.insertNode(b)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(b)};Graph.prototype.createLinkForHint=function(b,d){function g(b,d){b.length>d&&(b=b.substring(0,Math.round(d/2))+"..."+b.substring(b.length-Math.round(d/4)));return b}b=null!=b?b:"javascript:void(0);";if(null==d||0==d.length)d=this.isCustomLink(b)?this.getLinkTitle(b):b;var c=document.createElement("a");c.setAttribute("rel",
-this.linkRelation);c.setAttribute("href",this.getAbsoluteUrl(b));c.setAttribute("title",g(this.isCustomLink(b)?this.getLinkTitle(b):b,80));null!=this.linkTarget&&c.setAttribute("target",this.linkTarget);mxUtils.write(c,g(d,40));this.isCustomLink(b)&&mxEvent.addListener(c,"click",mxUtils.bind(this,function(d){this.customLinkClicked(b);mxEvent.consume(d)}));return c};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};
-this.addListener(mxEvent.START_EDITING,function(b,d){this.popupMenuHandler.hideMenu()});var b=this.updateMouseEvent;this.updateMouseEvent=function(d){d=b.apply(this,arguments);if(mxEvent.isTouchEvent(d.getEvent())&&null==d.getState()){var g=this.getCellAt(d.graphX,d.graphY);null!=g&&this.isSwimlane(g)&&this.hitsSwimlaneContent(g,d.graphX,d.graphY)||(d.state=this.view.getState(g),null!=d.state&&null!=d.state.shape&&(this.container.style.cursor=d.state.shape.node.style.cursor))}null==d.getState()&&
-this.isEnabled()&&(this.container.style.cursor="default");return d};var d=!1,g=!1,c=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(b,f,l){b==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),d=this.isCellSelected(f.getCell()),g=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(b,e){var f=mxEvent.isMouseEvent(e.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==
-e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!f&&(g&&null==e.getCell()&&this.isSelectionEmpty()||d&&this.isCellSelected(e.getCell())));f=!d||f?null:mxUtils.bind(this,function(b){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var d=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(e.getX()+d.x+1,e.getY()+d.y+1,b,e.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[b,e,f])})};mxCellEditor.prototype.isContentEditing=
+function(b,d,f){var c=new mxCell;c.value="Text";c.geometry=new mxGeometry(0,0,0,0);c.vertex=!0;if(null!=f&&this.model.isEdge(f.cell)){c.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";c.geometry.relative=!0;c.connectable=!1;var e=this.view.getRelativePoint(f,b,d);c.geometry.x=Math.round(1E4*e.x)/1E4;c.geometry.y=Math.round(e.y);c.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(f,c.geometry),g=this.view.scale;c.geometry.offset=new mxPoint(Math.round((b-e.x)/
+g),Math.round((d-e.y)/g))}else e=this.view.translate,c.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",c.geometry.width=40,c.geometry.height=20,c.geometry.x=Math.round(b/this.view.scale)-e.x-(null!=f?f.origin.x:0),c.geometry.y=Math.round(d/this.view.scale)-e.y-(null!=f?f.origin.y:0),c.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([c],null!=f?f.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[c])),this.autoSizeCell(c)}finally{this.getModel().endUpdate()}return c};
+Graph.prototype.addClickHandler=function(b,d,f){var c=mxUtils.bind(this,function(){var b=this.container.getElementsByTagName("a");if(null!=b)for(var f=0;f<b.length;f++){var c=this.getAbsoluteUrl(b[f].getAttribute("href"));null!=c&&(b[f].setAttribute("rel",this.linkRelation),b[f].setAttribute("href",c),null!=d&&mxEvent.addGestureListeners(b[f],null,null,d))}});this.model.addListener(mxEvent.CHANGE,c);c();var e=this.container.style.cursor,g=this.getTolerance(),l=this,k={currentState:null,currentLink:null,
+currentTarget:null,highlight:null!=b&&""!=b&&b!=mxConstants.NONE?new mxCellHighlight(l,b,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(b){var d=b.sourceState;if(null==d||null==l.getLinkForCell(d.cell))b=l.getCellAt(b.getGraphX(),b.getGraphY(),null,null,null,function(b,d,f){return null==l.getLinkForCell(b.cell)}),d=null==d||l.model.isAncestor(b,d.cell)?l.view.getState(b):null;d!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=d,null!=this.currentState&&
+this.activate(this.currentState))},mouseDown:function(b,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=l.container.scrollLeft;this.scrollTop=l.container.scrollTop;null==this.currentLink&&"auto"==l.container.style.overflow&&(l.container.style.cursor="move");this.updateCurrentState(d)},mouseMove:function(b,d){if(l.isMouseDown){if(null!=this.currentLink){var f=Math.abs(this.startX-d.getGraphX()),c=Math.abs(this.startY-d.getGraphY());(f>g||c>g)&&this.clear()}}else{for(f=d.getSource();null!=
+f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null!=f?this.clear():(null!=l.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&l.tooltipHandler.reset(d,!0,this.currentState),(null==this.currentState||d.getState()!=this.currentState&&null!=d.sourceState||!l.intersects(this.currentState,d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d))}},mouseUp:function(b,c){for(var e=c.getSource(),k=c.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-
+l.container.scrollLeft)<g&&Math.abs(this.scrollTop-l.container.scrollTop)<g&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(e=l.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==d||d(k,this.currentLink),mxEvent.isConsumed(k)||(k=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(k)?"_blank":
+e?l.linkTarget:"_top",l.openLink(this.currentLink,k),c.consume())):null!=f&&!c.isConsumed()&&Math.abs(this.scrollLeft-l.container.scrollLeft)<g&&Math.abs(this.scrollTop-l.container.scrollTop)<g&&Math.abs(this.startX-c.getGraphX())<g&&Math.abs(this.startY-c.getGraphY())<g&&f(c.getEvent()));this.clear()},activate:function(b){this.currentLink=l.getAbsoluteUrl(l.getLinkForCell(b.cell));null!=this.currentLink&&(this.currentTarget=l.getLinkTargetForCell(b.cell),l.container.style.cursor="pointer",null!=
+this.highlight&&this.highlight.highlight(b))},clear:function(){null!=l.container&&(l.container.style.cursor=e);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=l.tooltipHandler&&l.tooltipHandler.hide()}};l.click=function(b){};l.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(b){k.clear()})};Graph.prototype.duplicateCells=function(b,d){b=null!=b?b:this.getSelectionCells();d=null!=d?d:!0;for(var f=0;f<b.length;f++)this.isTableCell(b[f])&&
+(b[f]=this.model.getParent(b[f]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,g=[];c.beginUpdate();try{for(var l={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,l,!0),f=0;f<b.length;f++){var q=c.getParent(b[f]);if(null!=q){var n=this.moveCells([m[f]],e,e,!1)[0];g.push(n);if(d)c.add(q,m[f]);else{var F=q.getIndex(b[f]);c.add(q,m[f],F+1)}if(this.isTable(q)){var u=this.getCellGeometry(m[f]),p=this.getCellGeometry(q);null!=u&&null!=p&&(p=p.clone(),p.height+=u.height,c.setGeometry(q,
+p))}}else g.push(m[f])}this.updateCustomLinks(this.createCellMapping(l,k),m,this)}finally{c.endUpdate()}return g};Graph.prototype.insertImage=function(b,d,f){if(null!=b&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),e=[],g=0;g<c.length;g++)e.push(c[g]);document.execCommand("insertimage",!1,b);b=this.cellEditor.textarea.getElementsByTagName("img");if(b.length==e.length+1)for(g=b.length-1;0<=g;g--)if(0==g||b[g]!=e[g-1]){b[g].setAttribute("width",d);b[g].setAttribute("height",
+f);break}}};Graph.prototype.insertLink=function(b){if(null!=this.cellEditor.textarea)if(0==b.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var d=this.cellEditor.textarea.getElementsByTagName("a"),f=[],c=0;c<d.length;c++)f.push(d[c]);document.execCommand("createlink",!1,mxUtils.trim(b));d=this.cellEditor.textarea.getElementsByTagName("a");if(d.length==f.length+1)for(c=d.length-1;0<=c;c--)if(d[c]!=f[c-1]){for(d=d[c].getElementsByTagName("a");0<d.length;){for(f=d[0].parentNode;null!=
+d[0].firstChild;)f.insertBefore(d[0].firstChild,d[0]);f.removeChild(d[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(b))};Graph.prototype.isCellResizable=function(b){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),f=this.getCurrentCellStyle(b);return!this.isTableCell(b)&&!this.isTableRow(b)&&(d||"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==f[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(b,d){null==d&&(d=this.getSelectionCells());
+if(null!=d&&1<d.length){for(var f=[],c=null,e=null,g=0;g<d.length;g++)if(this.getModel().isVertex(d[g])){var l=this.view.getState(d[g]);if(null!=l){var k=b?l.getCenterX():l.getCenterY(),c=null!=c?Math.max(c,k):k,e=null!=e?Math.min(e,k):k;f.push(l)}}if(2<f.length){f.sort(function(d,f){return b?d.x-f.x:d.y-f.y});l=this.view.translate;k=this.view.scale;e=e/k-(b?l.x:l.y);c=c/k-(b?l.x:l.y);this.getModel().beginUpdate();try{for(var m=(c-e)/(f.length-1),c=e,g=1;g<f.length-1;g++){var q=this.view.getState(this.model.getParent(f[g].cell)),
+n=this.getCellGeometry(f[g].cell),c=c+m;null!=n&&null!=q&&(n=n.clone(),b?n.x=Math.round(c-n.width/2)-q.origin.x:n.y=Math.round(c-n.height/2)-q.origin.y,this.getModel().setGeometry(f[g].cell,n))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,d){return this.getLinkForCell(b.cell)});
+return b};Graph.prototype.parseBackgroundImage=function(b){var d=null;null!=b&&0<b.length&&(b=JSON.parse(b),d=new mxImage(b.src,b.width,b.height));return d};Graph.prototype.getBackgroundImageObject=function(b){return b};Graph.prototype.getSvg=function(b,d,f,c,e,g,l,k,m,q,n,F,u,p){var v=null;if(null!=p)for(v=new mxDictionary,n=0;n<p.length;n++)v.put(p[n],!0);if(p=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;f=null!=f?f:0;e=null!=e?e:!0;
+g=null!=g?g:!0;l=null!=l?l:!0;var A="page"==u?this.view.getBackgroundPageBounds():g&&null==v||c||"diagram"==u?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),B=this.view.scale;"diagram"==u&&null!=this.backgroundImage&&A.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*B,(this.view.translate.y+this.backgroundImage.y)*B,this.backgroundImage.width*B,this.backgroundImage.height*B));if(null==A)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),
+I=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=b&&(null!=I.style?I.style.backgroundColor=b:I.setAttribute("style","background-color:"+b));null==x.createElementNS?(I.setAttribute("xmlns",mxConstants.NS_SVG),I.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):I.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/B;var t=Math.max(1,Math.ceil(A.width*b)+2*f)+(q?5:0),y=Math.max(1,Math.ceil(A.height*b)+2*f)+(q?5:0);I.setAttribute("version",
+"1.1");I.setAttribute("width",t+"px");I.setAttribute("height",y+"px");I.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+t+" "+y);x.appendChild(I);var D=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");I.appendChild(D);var W=this.createSvgCanvas(D);W.foOffset=e?-.5:0;W.textOffset=e?-.5:0;W.imageOffset=e?-.5:0;W.translate(Math.floor(f/d-A.x/B),Math.floor(f/d-A.y/B));var da=document.createElement("div"),C=W.getAlternateText;W.getAlternateText=function(b,d,f,c,e,
+g,l,k,m,q,n,F,z){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?g=g.innerText:(da.innerHTML=g,g=mxUtils.extractTextWithWhitespace(da.childNodes));for(var Ga=Math.ceil(2*c/this.state.fontSize),Qa=[],la=0,Ra=0;(0==Ga||la<Ga)&&Ra<g.length;){var Ua=g.charCodeAt(Ra);if(10==Ua||13==Ua){if(0<la)break}else Qa.push(g.charAt(Ra)),255>Ua&&la++;Ra++}Qa.length<g.length&&1<g.length-Qa.length&&(g=mxUtils.trim(Qa.join(""))+"...");return g}catch(gb){return C.apply(this,arguments)}else return C.apply(this,
+arguments)};var N=this.backgroundImage;if(null!=N){d=B/d;var O=this.view.translate,aa=new mxRectangle((N.x+O.x)*d,(N.y+O.y)*d,N.width*d,N.height*d);mxUtils.intersects(A,aa)&&W.image(N.x+O.x,N.y+O.y,N.width,N.height,N.src,!0)}W.scale(b);W.textEnabled=l;k=null!=k?k:this.createSvgImageExport();var E=k.drawCellState,qa=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=qa.apply(this,arguments);return null==f||b.view.graph.isCustomLink(f)?null:f};k.getLinkTargetForCellState=function(b,d){return b.view.graph.getLinkTargetForCell(b.cell)};
+k.drawCellState=function(b,d){for(var f=b.view.graph,c=null!=v?v.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(g&&null==v||c)&&null!=e;)c=null!=v?v.get(e):f.isCellSelected(e),e=f.model.getParent(e);(g&&null==v||c)&&E.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),W);this.updateSvgLinks(I,m,!0);this.addForeignObjectWarning(W,I);return I}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
+function(b,d){if("0"!=urlParams["svg-warning"]&&0<d.getElementsByTagName("foreignObject").length){var f=b.createElement("switch"),c=b.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=b.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||d.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,
+"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var g=b.createElement("text");g.setAttribute("text-anchor","middle");g.setAttribute("font-size","10px");g.setAttribute("x","50%");g.setAttribute("y","100%");mxUtils.write(g,Graph.foreignObjectWarningText);f.appendChild(c);e.appendChild(g);f.appendChild(e);d.appendChild(f)}};Graph.prototype.updateSvgLinks=function(b,d,f){b=b.getElementsByTagName("a");for(var c=0;c<b.length;c++)if(null==b[c].getAttribute("target")){var e=
+b[c].getAttribute("href");null==e&&(e=b[c].getAttribute("xlink:href"));null!=e&&(null!=d&&/^https?:\/\//.test(e)?b[c].setAttribute("target",d):f&&this.isCustomLink(e)&&b[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(b){b=new mxSvgCanvas2D(b);b.pointerEvents=!0;return b};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(b=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&
+(b=document.selection.createRange().parentElement());return b};Graph.prototype.getSelectedEditingElement=function(){for(var b=this.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;null!=b&&b==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=this.cellEditor.textarea.firstChild);return b};Graph.prototype.getParentByName=function(b,d,f){for(;null!=b&&b.nodeName!=
+d;){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.getParentByNames=function(b,d,f){for(;null!=b&&!(0<=mxUtils.indexOf(d,b.nodeName));){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.selectNode=function(b){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var f=document.createRange();f.selectNode(b);d.removeAllRanges();d.addRange(f)}}else(d=document.selection)&&"Control"!=d.type&&(b=d.createRange(),b.collapse(!0),f=d.createRange(),
+f.setEndPoint("StartToStart",b),f.select())};Graph.prototype.deleteCells=function(b,d){var f=null;if(null!=b&&0<b.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var e=this.model.getParent(b[c]);if(this.isTable(e)){var g=this.getCellGeometry(b[c]),l=this.getCellGeometry(e);null!=g&&null!=l&&(l=l.clone(),l.height-=g.height,this.model.setGeometry(e,l))}}var k=this.selectParentAfterDelete?this.model.getParents(b):null;this.removeCells(b,d)}finally{this.model.endUpdate()}if(null!=k)for(f=
+[],c=0;c<k.length;c++)this.model.contains(k[c])&&(this.model.isVertex(k[c])||this.model.isEdge(k[c]))&&f.push(k[c])}return f};Graph.prototype.insertTableColumn=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=0;if(this.isTableCell(b))var g=f.getParent(b),c=f.getParent(g),e=mxUtils.indexOf(f.getChildCells(g,!0),b);else this.isTableRow(b)?c=f.getParent(b):b=f.getChildCells(c,!0)[0],d||(e=f.getChildCells(b,!0).length-1);for(var l=f.getChildCells(c,!0),k=Graph.minTableColumnWidth,g=0;g<
+l.length;g++){var m=f.getChildCells(l[g],!0)[e],q=f.cloneCell(m,!1),n=this.getCellGeometry(q);q.value=null;if(null!=n){var k=n.width,F=this.getCellGeometry(l[g]);null!=F&&(n.height=F.height)}f.add(l[g],q,e+(d?0:1))}var u=this.getCellGeometry(c);null!=u&&(u=u.clone(),u.width+=k,f.setGeometry(c,u))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=b;if(this.isTableCell(b))e=f.getParent(b),c=f.getParent(e);else if(this.isTableRow(b))c=
+f.getParent(b);else var g=f.getChildCells(c,!0),e=g[d?0:g.length-1];var l=f.getChildCells(e,!0),k=c.getIndex(e),e=f.cloneCell(e,!1);e.value=null;var m=this.getCellGeometry(e);if(null!=m){for(g=0;g<l.length;g++){b=f.cloneCell(l[g],!1);e.insert(b);b.value=null;var q=this.getCellGeometry(b);null!=q&&(q.height=m.height)}f.add(c,e,k+(d?0:1));var n=this.getCellGeometry(c);null!=n&&(n=n.clone(),n.height+=m.height,f.setGeometry(c,n))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(b){var d=
+this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(c=d.getParent(b));this.isTableRow(c)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(0==e.length)d.remove(f);else{this.isTableRow(c)||(c=e[0]);var g=d.getChildCells(c,!0);if(1>=g.length)d.remove(f);else{var l=g.length-1;this.isTableCell(b)&&(l=mxUtils.indexOf(g,b));for(c=b=0;c<e.length;c++){var k=d.getChildCells(e[c],!0)[l];d.remove(k);var m=this.getCellGeometry(k);null!=m&&(b=Math.max(b,m.width))}var q=this.getCellGeometry(f);
+null!=q&&(q=q.clone(),q.width-=b,d.setGeometry(f,q))}}}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(b=c=d.getParent(b));this.isTableRow(b)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(1>=e.length)d.remove(f);else{this.isTableRow(c)||(c=e[e.length-1]);d.remove(c);b=0;var g=this.getCellGeometry(c);null!=g&&(b=g.height);var l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.height-=b,d.setGeometry(f,
+l))}}finally{d.endUpdate()}};Graph.prototype.insertRow=function(b,d){for(var f=b.tBodies[0],c=f.rows[0].cells,e=0,g=0;g<c.length;g++)var l=c[g].getAttribute("colspan"),e=e+(null!=l?parseInt(l):1);f=f.insertRow(d);for(g=0;g<e;g++)mxUtils.br(f.insertCell(-1));return f.cells[0]};Graph.prototype.deleteRow=function(b,d){b.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(b,d){var f=b.tHead;if(null!=f)for(var c=0;c<f.rows.length;c++){var e=document.createElement("th");f.rows[c].appendChild(e);
+mxUtils.br(e)}f=b.tBodies[0];for(c=0;c<f.rows.length;c++)e=f.rows[c].insertCell(d),mxUtils.br(e);return f.rows[0].cells[0<=d?d:f.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(b,d){if(0<=d)for(var f=b.tBodies[0].rows,c=0;c<f.length;c++)f[c].cells.length>d&&f[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(b){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var f=document.createElement("div");f.innerHTML=
+b;b=document.createDocumentFragment();for(var c;c=f.firstChild;)lastNode=b.appendChild(c);d.insertNode(b)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(b)};Graph.prototype.createLinkForHint=function(b,d){function f(b,d){b.length>d&&(b=b.substring(0,Math.round(d/2))+"..."+b.substring(b.length-Math.round(d/4)));return b}b=null!=b?b:"javascript:void(0);";if(null==d||0==d.length)d=this.isCustomLink(b)?this.getLinkTitle(b):b;var c=document.createElement("a");c.setAttribute("rel",
+this.linkRelation);c.setAttribute("href",this.getAbsoluteUrl(b));c.setAttribute("title",f(this.isCustomLink(b)?this.getLinkTitle(b):b,80));null!=this.linkTarget&&c.setAttribute("target",this.linkTarget);mxUtils.write(c,f(d,40));this.isCustomLink(b)&&mxEvent.addListener(c,"click",mxUtils.bind(this,function(d){this.customLinkClicked(b);mxEvent.consume(d)}));return c};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};
+this.addListener(mxEvent.START_EDITING,function(b,d){this.popupMenuHandler.hideMenu()});var b=this.updateMouseEvent;this.updateMouseEvent=function(d){d=b.apply(this,arguments);if(mxEvent.isTouchEvent(d.getEvent())&&null==d.getState()){var f=this.getCellAt(d.graphX,d.graphY);null!=f&&this.isSwimlane(f)&&this.hitsSwimlaneContent(f,d.graphX,d.graphY)||(d.state=this.view.getState(f),null!=d.state&&null!=d.state.shape&&(this.container.style.cursor=d.state.shape.node.style.cursor))}null==d.getState()&&
+this.isEnabled()&&(this.container.style.cursor="default");return d};var d=!1,f=!1,c=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(b,g,l){b==mxEvent.MOUSE_DOWN&&(g=this.updateMouseEvent(g),d=this.isCellSelected(g.getCell()),f=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(b,e){var g=mxEvent.isMouseEvent(e.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==
+e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!g&&(f&&null==e.getCell()&&this.isSelectionEmpty()||d&&this.isCellSelected(e.getCell())));g=!d||g?null:mxUtils.bind(this,function(b){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var d=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(e.getX()+d.x+1,e.getY()+d.y+1,b,e.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[b,e,g])})};mxCellEditor.prototype.isContentEditing=
function(){var b=this.graph.view.getState(this.editingCell);return null!=b&&1==b.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var b="";window.getSelection?b=window.getSelection():document.getSelection?b=document.getSelection():document.selection&&(b=document.selection.createRange().text);return""!=b};mxCellEditor.prototype.insertTab=function(b){var d=
-this.textarea.ownerDocument.defaultView.getSelection(),g=d.getRangeAt(0),c="\t";if(null!=b)for(c="";0<b;)c+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(c));g.insertNode(b);g.setStartAfter(b);g.setEndAfter(b);d.removeAllRanges();d.addRange(g)};mxCellEditor.prototype.alignText=function(b,d){var g=null!=d&&mxEvent.isShiftDown(d);if(g||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=!0;this.graph.processElements(this.textarea,
-function(b){g||window.getSelection().containsNode(b,!0)?(b.removeAttribute("align"),b.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(b)}document.execCommand("justify"+b.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var b=window.getSelection();if(b.getRangeAt&&b.rangeCount){for(var d=[],g=0,c=b.rangeCount;g<c;++g)d.push(b.getRangeAt(g));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
-return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,g=b.length;d<g;++d)sel.addRange(b[d])}else document.selection&&b.select&&b.select()}catch(ta){}};var u=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(b){null!=b.text&&(b.text.replaceLinefeeds="0"!=mxUtils.getValue(b.style,"nl2Br","1"));u.apply(this,arguments)};var B=mxConstraintHandler.prototype.update;
-mxConstraintHandler.prototype.update=function(b,d){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?B.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var x=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(b,d){b=this.graph.getStartEditingCell(b,d);x.apply(this,arguments);var g=this.graph.view.getState(b);
-this.textarea.className=null!=g&&1==g.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var g=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);if(this.graph.getModel().isEdge(g)&&null!=c&&c.relative||this.graph.getModel().isEdge(b))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var E=mxCellEditor.prototype.installListeners;
-mxCellEditor.prototype.installListeners=function(b){function d(b,g){g.originalNode=b;b=b.firstChild;for(var c=g.firstChild;null!=b&&null!=c;)d(b,c),b=b.nextSibling,c=c.nextSibling;return g}function g(b,d){if(null!=b)if(d.originalNode!=b)c(b);else for(b=b.firstChild,d=d.firstChild;null!=b;){var e=b.nextSibling;null==d?c(b):(g(b,d),d=d.nextSibling);b=e}}function c(b){for(var d=b.firstChild;null!=d;){var g=d.nextSibling;c(d);d=g}1==b.nodeType&&("BR"===b.nodeName||null!=b.firstChild)||3==b.nodeType&&
-0!=mxUtils.trim(mxUtils.getTextContent(b)).length?(3==b.nodeType&&mxUtils.setTextContent(b,mxUtils.getTextContent(b).replace(/\n|\r/g,"")),1==b.nodeType&&(b.removeAttribute("style"),b.removeAttribute("class"),b.removeAttribute("width"),b.removeAttribute("cellpadding"),b.removeAttribute("cellspacing"),b.removeAttribute("border"))):b.parentNode.removeChild(b)}E.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(b){var c=
-d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?g(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var b=this.graph.view.getState(this.editingCell);if(null!=b){var d=null!=b&&"0"!=mxUtils.getValue(b.style,"nl2Br","1"),g=this.saveSelection();if(this.codeViewMode){m=
-mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<m.length&&"\n"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1));m=this.graph.sanitizeHtml(d?m.replace(/\n/g,"<br/>"):m,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(b.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(b.style,
+this.textarea.ownerDocument.defaultView.getSelection(),f=d.getRangeAt(0),c="\t";if(null!=b)for(c="";0<b;)c+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(c));f.insertNode(b);f.setStartAfter(b);f.setEndAfter(b);d.removeAllRanges();d.addRange(f)};mxCellEditor.prototype.alignText=function(b,d){var f=null!=d&&mxEvent.isShiftDown(d);if(f||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=!0;this.graph.processElements(this.textarea,
+function(b){f||window.getSelection().containsNode(b,!0)?(b.removeAttribute("align"),b.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(b)}document.execCommand("justify"+b.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var b=window.getSelection();if(b.getRangeAt&&b.rangeCount){for(var d=[],f=0,c=b.rangeCount;f<c;++f)d.push(b.getRangeAt(f));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
+return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,f=b.length;d<f;++d)sel.addRange(b[d])}else document.selection&&b.select&&b.select()}catch(ua){}};var u=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(b){null!=b.text&&(b.text.replaceLinefeeds="0"!=mxUtils.getValue(b.style,"nl2Br","1"));u.apply(this,arguments)};var y=mxConstraintHandler.prototype.update;
+mxConstraintHandler.prototype.update=function(b,d){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?y.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var x=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(b,d){b=this.graph.getStartEditingCell(b,d);x.apply(this,arguments);var f=this.graph.view.getState(b);
+this.textarea.className=null!=f&&1==f.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var f=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);if(this.graph.getModel().isEdge(f)&&null!=c&&c.relative||this.graph.getModel().isEdge(b))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var H=mxCellEditor.prototype.installListeners;
+mxCellEditor.prototype.installListeners=function(b){function d(b,f){f.originalNode=b;b=b.firstChild;for(var c=f.firstChild;null!=b&&null!=c;)d(b,c),b=b.nextSibling,c=c.nextSibling;return f}function f(b,d){if(null!=b)if(d.originalNode!=b)c(b);else for(b=b.firstChild,d=d.firstChild;null!=b;){var e=b.nextSibling;null==d?c(b):(f(b,d),d=d.nextSibling);b=e}}function c(b){for(var d=b.firstChild;null!=d;){var f=d.nextSibling;c(d);d=f}1==b.nodeType&&("BR"===b.nodeName||null!=b.firstChild)||3==b.nodeType&&
+0!=mxUtils.trim(mxUtils.getTextContent(b)).length?(3==b.nodeType&&mxUtils.setTextContent(b,mxUtils.getTextContent(b).replace(/\n|\r/g,"")),1==b.nodeType&&(b.removeAttribute("style"),b.removeAttribute("class"),b.removeAttribute("width"),b.removeAttribute("cellpadding"),b.removeAttribute("cellspacing"),b.removeAttribute("border"))):b.parentNode.removeChild(b)}H.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(b){var c=
+d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?f(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var b=this.graph.view.getState(this.editingCell);if(null!=b){var d=null!=b&&"0"!=mxUtils.getValue(b.style,"nl2Br","1"),f=this.saveSelection();if(this.codeViewMode){m=
+mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<m.length&&"\n"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1));m=this.graph.sanitizeHtml(d?m.replace(/\n/g,"<br/>"):m,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(b.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),g=(mxUtils.getValue(b.style,
mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,l=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,k=[];(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&k.push("underline");(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&k.push("line-through");this.textarea.style.lineHeight=
-mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=k.join(" ");this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=l?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=
+mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=k.join(" ");this.textarea.style.fontWeight=g?"bold":"normal";this.textarea.style.fontStyle=l?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=
this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var m=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(m=mxUtils.replaceTrailingNewlines(m,"<div><br></div>"));m=this.graph.sanitizeHtml(d?m.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):m,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";
var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=
-m&&(this.textarea.innerHTML=m);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=g;this.resize()}};var A=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(b,d){if(null!=this.textarea)if(b=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=b){var g=b.view.scale;this.bounds=mxRectangle.fromRectangle(b);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=
-160*g;this.bounds.height=60*g;var c=null!=b.text?b.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/g)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/g)+"px";this.textarea.style.overflow=
-"auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/g)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*g);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/g)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*g);this.textarea.style.left=Math.round(this.bounds.x)+
-"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+g+","+g+")")}else this.textarea.style.height="",this.textarea.style.overflow="",A.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(b,d){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var g=this.graph.getEditingValue(b.cell,d);"1"==
-mxUtils.getValue(b.style,"nl2Br","1")&&(g=g.replace(/\n/g,"<br/>"));return g=this.graph.sanitizeHtml(g,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(b){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return d="1"==mxUtils.getValue(b.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,
-"").replace(/\n/g,"")};var F=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(b){this.codeViewMode&&this.toggleViewMode();F.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(da){}};var I=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(b,d){this.graph.getModel().beginUpdate();try{I.apply(this,arguments),""==d&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)&&
+m&&(this.textarea.innerHTML=m);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=f;this.resize()}};var D=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(b,d){if(null!=this.textarea)if(b=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=b){var f=b.view.scale;this.bounds=mxRectangle.fromRectangle(b);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=
+160*f;this.bounds.height=60*f;var c=null!=b.text?b.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/f)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/f)+"px";this.textarea.style.overflow=
+"auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/f)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*f);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/f)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*f);this.textarea.style.left=Math.round(this.bounds.x)+
+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+f+","+f+")")}else this.textarea.style.height="",this.textarea.style.overflow="",D.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(b,d){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var f=this.graph.getEditingValue(b.cell,d);"1"==
+mxUtils.getValue(b.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));return f=this.graph.sanitizeHtml(f,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(b){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return d="1"==mxUtils.getValue(b.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,
+"").replace(/\n/g,"")};var E=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(b){this.codeViewMode&&this.toggleViewMode();E.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(da){}};var J=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(b,d){this.graph.getModel().beginUpdate();try{J.apply(this,arguments),""==d&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)&&
this.graph.isTransparentState(b)&&this.graph.removeCells([b.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(b){var d=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=d&&d!=mxConstants.NONE||!(null!=b.cell.geometry&&0<b.cell.geometry.width)||0==mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)||(d=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,
null));d==mxConstants.NONE&&(d=null);return d};mxCellEditor.prototype.getMinimumSize=function(b){var d=this.graph.getView().scale;return new mxRectangle(0,0,null==b.text?30:b.text.size*d+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(b,d){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(d.getEvent)};mxGraphView.prototype.formatUnitText=function(b){return b?c(b,this.unit):b};mxGraphHandler.prototype.updateHint=
-function(d){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var g=this.graph.view.translate,e=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/e-g.x);g=this.roundLength((this.bounds.y+this.currentDy)/e-g.y);e=this.graph.view.unit;this.hint.innerHTML=c(d,e)+", "+c(g,e);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";
-this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var L=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(b,d){L.apply(this,arguments);var g=this.graph.getCellStyle(b);if(null==g.childLayout){var c=this.graph.model.getParent(b),e=null!=c?this.graph.getCellGeometry(c):null;if(null!=e&&(g=this.graph.getCellStyle(c),
-"stackLayout"==g.childLayout)){var f=parseFloat(mxUtils.getValue(g,"stackBorder",mxStackLayout.prototype.border)),g="1"==mxUtils.getValue(g,"horizontalStack","1"),l=this.graph.getActualStartSize(c),e=e.clone();g?e.height=d.height+l.y+l.height+2*f:e.width=d.width+l.x+l.width+2*f;this.graph.model.setGeometry(c,e)}}};var H=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function b(b){g.get(b)||(g.put(b,!0),e.push(b))}for(var d=
-H.apply(this,arguments),g=new mxDictionary,c=this.graph.model,e=[],f=0;f<d.length;f++){var l=d[f];this.graph.isTableCell(l)?b(c.getParent(c.getParent(l))):this.graph.isTableRow(l)&&b(c.getParent(l));b(l)}return e};var K=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(b){var d=K.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};var C=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
+function(d){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var f=this.graph.view.translate,e=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/e-f.x);f=this.roundLength((this.bounds.y+this.currentDy)/e-f.y);e=this.graph.view.unit;this.hint.innerHTML=c(d,e)+", "+c(f,e);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";
+this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var L=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(b,d){L.apply(this,arguments);var f=this.graph.getCellStyle(b);if(null==f.childLayout){var c=this.graph.model.getParent(b),e=null!=c?this.graph.getCellGeometry(c):null;if(null!=e&&(f=this.graph.getCellStyle(c),
+"stackLayout"==f.childLayout)){var g=parseFloat(mxUtils.getValue(f,"stackBorder",mxStackLayout.prototype.border)),f="1"==mxUtils.getValue(f,"horizontalStack","1"),l=this.graph.getActualStartSize(c),e=e.clone();f?e.height=d.height+l.y+l.height+2*g:e.width=d.width+l.x+l.width+2*g;this.graph.model.setGeometry(c,e)}}};var G=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function b(b){f.get(b)||(f.put(b,!0),e.push(b))}for(var d=
+G.apply(this,arguments),f=new mxDictionary,c=this.graph.model,e=[],g=0;g<d.length;g++){var l=d[g];this.graph.isTableCell(l)?b(c.getParent(c.getParent(l))):this.graph.isTableRow(l)&&b(c.getParent(l));b(l)}return e};var K=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(b){var d=K.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};var C=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
function(b){var d=C.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var b=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+b.x/2,this.bounds.y+this.rotationHandleVSpacing-b.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(b,d){return this.graph.isRecursiveVertexResize(b)&&!mxEvent.isControlDown(d.getEvent())};
-mxVertexHandler.prototype.isCenteredEvent=function(b,d){return!(!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&!this.graph.isCellCollapsed(b.cell)&&"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null))&&mxEvent.isControlDown(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};var N=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return N.apply(this,arguments)&&
-!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var S=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return S.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&
-!this.graph.isTableRow(this.state.cell)};var R=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(b){return b.tableHandle||R.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var b=0;this.graph.isTableRow(this.state.cell)?b=1:this.graph.isTableCell(this.state.cell)&&(b=2);return b};var M=mxVertexHandler.prototype.getSelectionBorderBounds;
-mxVertexHandler.prototype.getSelectionBorderBounds=function(){return M.apply(this,arguments).grow(-this.getSelectionBorderInset())};var P=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=P.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=this.graph,g=d.model,c=this.state,e=this.selectionBorder,f=this;null==b&&(b=[]);var l=d.view.getCellStates(g.getChildCells(this.state.cell,!0));if(0<l.length){for(var k=d.view.getCellStates(g.getChildCells(l[0].cell,
-!0)),g=0;g<k.length;g++)mxUtils.bind(this,function(g){var l=k[g],m=g<k.length-1?k[g+1]:null,q=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);q.isDashed=e.isDashed;q.svgStrokeTolerance++;q=new mxHandle(l,"col-resize",null,q);q.tableHandle=!0;var p=0;q.shape.node.parentNode.insertBefore(q.shape.node,q.shape.node.parentNode.firstChild);q.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==p?mxConstants.NONE:e.stroke;this.shape.bounds.x=
-this.state.x+this.state.width+p*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(g==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(g==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var G=!1;q.setPosition=function(b,g,c){p=Math.max(Graph.minTableColumnWidth-b.width,g.x-b.x-b.width);G=mxEvent.isShiftDown(c.getEvent());null==m||G||(p=Math.min((m.x+m.width-l.x-l.width)/d.view.scale-Graph.minTableColumnWidth,p))};q.execute=function(b){if(0!=
-p)d.setTableColumnWidth(this.state.cell,p,G);else if(!f.blockDelayedSelection){var g=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(g,b)}p=0};q.reset=function(){p=0};b.push(q)})(g);for(g=0;g<l.length;g++)mxUtils.bind(this,function(g){g=l[g];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=e.isDashed;k.svgStrokeTolerance++;g=new mxHandle(g,"row-resize",null,k);g.tableHandle=!0;var m=0;g.shape.node.parentNode.insertBefore(g.shape.node,g.shape.node.parentNode.firstChild);
-g.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:e.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};g.setPosition=function(b,d,g){m=Math.max(Graph.minTableRowHeight-b.height,d.y-b.y-b.height)};g.execute=function(b){if(0!=m)d.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(b.getEvent()));
-else if(!f.blockDelayedSelection){var g=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(g,b)}m=0};g.reset=function(){m=0};b.push(g)})(g)}}return null!=b?b.reverse():null};var G=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){G.apply(this,arguments);if(null!=this.moveHandles)for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].style.visibility=b?"":"hidden";if(null!=this.cornerHandles)for(d=0;d<this.cornerHandles.length;d++)this.cornerHandles[d].node.style.visibility=
-b?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var b=this.graph.model;if(null!=this.moveHandles){for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].parentNode.removeChild(this.moveHandles[d]);this.moveHandles=null}this.moveHandles=[];for(d=0;d<b.getChildCount(this.state.cell);d++)mxUtils.bind(this,function(d){if(null!=d&&b.isVertex(d.cell)){var g=mxUtils.createImage(Editor.rowMoveImage);g.style.position="absolute";g.style.cursor="pointer";g.style.width="7px";g.style.height=
-"4px";g.style.padding="4px 2px 4px 2px";g.rowState=d;mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(b)&&this.graph.isCellSelected(d.cell)||this.graph.selectCellForEvent(d.cell,b);mxEvent.isPopupTrigger(b)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=
-mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0);mxEvent.consume(b)}),null,mxUtils.bind(this,function(b){mxEvent.isPopupTrigger(b)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(b),mxEvent.getClientY(b),d.cell,b),mxEvent.consume(b))}));this.moveHandles.push(g);this.graph.container.appendChild(g)}})(this.graph.view.getState(b.getChildAt(this.state.cell,d)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var b=0;b<this.customHandles.length;b++)this.customHandles[b].destroy();
-this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var D=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),d=this.tolerance,g=this.state.style.shape;null==mxCellRenderer.defaultShapes[g]&&mxStencilRegistry.getStencil(g);g=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!g&&null!=this.customHandles)for(var c=0;c<this.customHandles.length;c++)if(null!=
-this.customHandles[c].shape&&null!=this.customHandles[c].shape.bounds){var e=this.customHandles[c].shape.bounds,f=e.getCenterX(),l=e.getCenterY();if(Math.abs(this.state.x-f)<e.width/2||Math.abs(this.state.y-l)<e.height/2||Math.abs(this.state.x+this.state.width-f)<e.width/2||Math.abs(this.state.y+this.state.height-l)<e.height/2){g=!0;break}}g&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,this.graph.isTable(this.state.cell)&&(d+=7),b.x=this.sizers[0].bounds.width+d,b.y=this.sizers[0].bounds.height+
-d):b=D.apply(this,arguments);return b};mxVertexHandler.prototype.updateHint=function(d){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{d=this.state.view.scale;var g=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/d),g)+" x "+c(this.roundLength(this.bounds.height/d),g)}d=mxUtils.getBoundingBox(this.bounds,
-null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==d&&(d=this.bounds);this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=d.y+d.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var y=mxEdgeHandler.prototype.mouseMove;
-mxEdgeHandler.prototype.mouseMove=function(b,d){y.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var W=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(b,d){W.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,g){null==this.hint&&
-(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,f=this.graph.view.scale,l=this.roundLength(g.x/f-e.x),e=this.roundLength(g.y/f-e.y),f=this.graph.view.unit;this.hint.innerHTML=c(l,f)+", "+c(e,f);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(l=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*l.x)+
-"%, "+Math.round(100*l.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),g.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
+mxVertexHandler.prototype.isCenteredEvent=function(b,d){return!(!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&!this.graph.isCellCollapsed(b.cell)&&"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null))&&mxEvent.isControlDown(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};var M=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return M.apply(this,arguments)&&
+!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var P=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return P.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&
+!this.graph.isTableRow(this.state.cell)};var S=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(b){return b.tableHandle||S.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var b=0;this.graph.isTableRow(this.state.cell)?b=1:this.graph.isTableCell(this.state.cell)&&(b=2);return b};var N=mxVertexHandler.prototype.getSelectionBorderBounds;
+mxVertexHandler.prototype.getSelectionBorderBounds=function(){return N.apply(this,arguments).grow(-this.getSelectionBorderInset())};var R=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=R.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=this.graph,f=d.model,c=this.state,e=this.selectionBorder,g=this;null==b&&(b=[]);var l=d.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<l.length){for(var k=d.view.getCellStates(f.getChildCells(l[0].cell,
+!0)),f=0;f<k.length;f++)mxUtils.bind(this,function(f){var l=k[f],m=f<k.length-1?k[f+1]:null,q=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);q.isDashed=e.isDashed;q.svgStrokeTolerance++;q=new mxHandle(l,"col-resize",null,q);q.tableHandle=!0;var n=0;q.shape.node.parentNode.insertBefore(q.shape.node,q.shape.node.parentNode.firstChild);q.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==n?mxConstants.NONE:e.stroke;this.shape.bounds.x=
+this.state.x+this.state.width+n*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(f==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(f==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var F=!1;q.setPosition=function(b,f,c){n=Math.max(Graph.minTableColumnWidth-b.width,f.x-b.x-b.width);F=mxEvent.isShiftDown(c.getEvent());null==m||F||(n=Math.min((m.x+m.width-l.x-l.width)/d.view.scale-Graph.minTableColumnWidth,n))};q.execute=function(b){if(0!=
+n)d.setTableColumnWidth(this.state.cell,n,F);else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}n=0};q.reset=function(){n=0};b.push(q)})(f);for(f=0;f<l.length;f++)mxUtils.bind(this,function(f){f=l[f];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=e.isDashed;k.svgStrokeTolerance++;f=new mxHandle(f,"row-resize",null,k);f.tableHandle=!0;var m=0;f.shape.node.parentNode.insertBefore(f.shape.node,f.shape.node.parentNode.firstChild);
+f.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:e.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};f.setPosition=function(b,d,f){m=Math.max(Graph.minTableRowHeight-b.height,d.y-b.y-b.height)};f.execute=function(b){if(0!=m)d.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(b.getEvent()));
+else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}m=0};f.reset=function(){m=0};b.push(f)})(f)}}return null!=b?b.reverse():null};var F=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){F.apply(this,arguments);if(null!=this.moveHandles)for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].style.visibility=b?"":"hidden";if(null!=this.cornerHandles)for(d=0;d<this.cornerHandles.length;d++)this.cornerHandles[d].node.style.visibility=
+b?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var b=this.graph.model;if(null!=this.moveHandles){for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].parentNode.removeChild(this.moveHandles[d]);this.moveHandles=null}this.moveHandles=[];for(d=0;d<b.getChildCount(this.state.cell);d++)mxUtils.bind(this,function(d){if(null!=d&&b.isVertex(d.cell)){var f=mxUtils.createImage(Editor.rowMoveImage);f.style.position="absolute";f.style.cursor="pointer";f.style.width="7px";f.style.height=
+"4px";f.style.padding="4px 2px 4px 2px";f.rowState=d;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(b){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(b)&&this.graph.isCellSelected(d.cell)||this.graph.selectCellForEvent(d.cell,b);mxEvent.isPopupTrigger(b)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=
+mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0);mxEvent.consume(b)}),null,mxUtils.bind(this,function(b){mxEvent.isPopupTrigger(b)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(b),mxEvent.getClientY(b),d.cell,b),mxEvent.consume(b))}));this.moveHandles.push(f);this.graph.container.appendChild(f)}})(this.graph.view.getState(b.getChildAt(this.state.cell,d)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var b=0;b<this.customHandles.length;b++)this.customHandles[b].destroy();
+this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var B=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),d=this.tolerance,f=this.state.style.shape;null==mxCellRenderer.defaultShapes[f]&&mxStencilRegistry.getStencil(f);f=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!f&&null!=this.customHandles)for(var c=0;c<this.customHandles.length;c++)if(null!=
+this.customHandles[c].shape&&null!=this.customHandles[c].shape.bounds){var e=this.customHandles[c].shape.bounds,g=e.getCenterX(),l=e.getCenterY();if(Math.abs(this.state.x-g)<e.width/2||Math.abs(this.state.y-l)<e.height/2||Math.abs(this.state.x+this.state.width-g)<e.width/2||Math.abs(this.state.y+this.state.height-l)<e.height/2){f=!0;break}}f&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,this.graph.isTable(this.state.cell)&&(d+=7),b.x=this.sizers[0].bounds.width+d,b.y=this.sizers[0].bounds.height+
+d):b=B.apply(this,arguments);return b};mxVertexHandler.prototype.updateHint=function(d){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{d=this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/d),f)+" x "+c(this.roundLength(this.bounds.height/d),f)}d=mxUtils.getBoundingBox(this.bounds,
+null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==d&&(d=this.bounds);this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=d.y+d.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var A=mxEdgeHandler.prototype.mouseMove;
+mxEdgeHandler.prototype.mouseMove=function(b,d){A.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var W=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(b,d){W.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,f){null==this.hint&&
+(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,g=this.graph.view.scale,l=this.roundLength(f.x/g-e.x),e=this.roundLength(f.y/g-e.y),g=this.graph.view.unit;this.hint.innerHTML=c(l,g)+", "+c(e,g);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(l=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*l.x)+
+"%, "+Math.round(100*l.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),f.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22" stroke-width="1"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>'):
new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+
'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,
@@ -2631,383 +2634,383 @@ HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.pro
HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=
!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(b){return!mxEvent.isShiftDown(b.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(b){return!mxEvent.isShiftDown(b.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||
0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(b){return mxEvent.isMouseEvent(b.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(d)||
-mxEvent.isPopupTrigger(d)&&(null==b.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var J=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(b,d){J.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return mxEvent.isLeftMouseButton(d)&&(this.useLeftButtonForPanning&&null==
+mxEvent.isPopupTrigger(d)&&(null==b.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var I=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(b,d){I.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return mxEvent.isLeftMouseButton(d)&&(this.useLeftButtonForPanning&&null==
b.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(b){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(b.getEvent())&&mxEvent.isShiftDown(b.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(b,d){if(this.cancelled)this.cancelled=
-!1,d.consume();else{var g=null!=this.div&&"none"!=this.div.style.display,c=null,e=null,f=null,l=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,e=this.first.y,f=(this.currentX-c)/this.graph.view.scale,l=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(f=this.graph.snap(f),l=this.graph.snap(l),this.graph.isGridEnabled()||(Math.abs(f)<this.graph.tolerance&&(f=0),Math.abs(l)<this.graph.tolerance&&(l=0))));this.reset();if(g){if(mxEvent.isAltDown(d.getEvent())&&
-this.graph.isToggleEvent(d.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),g=0;g<k.length;g++)if(this.graph.isCellMovable(k[g])){var m=this.graph.view.getState(k[g]),q=this.graph.getCellGeometry(k[g]);null!=m&&null!=q&&(q=q.clone(),q.translate(f,l),this.graph.model.setGeometry(k[g],
-q))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(b,d){if(!d.isConsumed()&&null!=this.first){var g=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);g.x-=c.x;g.y-=c.y;var c=d.getX()+g.x,g=d.getY()+g.y,e=this.first.x-c,f=this.first.y-g,l=this.graph.tolerance;if(null!=this.div||Math.abs(e)>l||Math.abs(f)>l)null==
-this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,g),this.isSpaceEvent(d)?(c=this.x+this.width,g=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=g-this.height)),
+!1,d.consume();else{var f=null!=this.div&&"none"!=this.div.style.display,c=null,e=null,g=null,l=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,e=this.first.y,g=(this.currentX-c)/this.graph.view.scale,l=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(g=this.graph.snap(g),l=this.graph.snap(l),this.graph.isGridEnabled()||(Math.abs(g)<this.graph.tolerance&&(g=0),Math.abs(l)<this.graph.tolerance&&(l=0))));this.reset();if(f){if(mxEvent.isAltDown(d.getEvent())&&
+this.graph.isToggleEvent(d.getEvent())){var g=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(g.x,g.y,g.width,g.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),f=0;f<k.length;f++)if(this.graph.isCellMovable(k[f])){var m=this.graph.view.getState(k[f]),q=this.graph.getCellGeometry(k[f]);null!=m&&null!=q&&(q=q.clone(),q.translate(g,l),this.graph.model.setGeometry(k[f],
+q))}}finally{this.graph.model.endUpdate()}}else g=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(g,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(b,d){if(!d.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);f.x-=c.x;f.y-=c.y;var c=d.getX()+f.x,f=d.getY()+f.y,e=this.first.x-c,g=this.first.y-f,l=this.graph.tolerance;if(null!=this.div||Math.abs(e)>l||Math.abs(g)>l)null==
+this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,f),this.isSpaceEvent(d)?(c=this.x+this.width,f=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=f-this.height)),
this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+
"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),d.consume()}};var O=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=
-this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);O.apply(this,arguments)};var aa=(new Date).getTime(),ma=0,ga=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,d,g,c){ga.apply(this,arguments);g!=this.currentTerminalState?(aa=(new Date).getTime(),ma=0):ma=(new Date).getTime()-aa;this.currentTerminalState=g};var ha=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return null!=
-this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<ma||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ha.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(b,d){var g=null!=b&&0==b,c=this.state.getVisibleTerminalState(g),e=null!=b&&(0==b||b>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,c,g):null,g=null!=(null!=
-e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(g),e):null)?this.fixedHandleImage:null!=e&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=g)return g=new mxImageShape(new mxRectangle(0,0,g.width,g.height),g.src),g.preserveImageAspect=!1,g;g=mxConstants.HANDLE_SIZE;this.preferHtml&&--g;return new mxRectangleShape(new mxRectangle(0,0,g,g),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var na=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=
-function(b,d,g){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return na.apply(this,arguments)};var X=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var d=this.graph.getModel(),g=d.getParent(b[0]),c=this.graph.getCellGeometry(b[0]);if(d.isEdge(g)&&null!=c&&c.relative&&(d=this.graph.view.getState(b[0]),null!=d&&2>d.width&&2>d.height&&
-null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return X.apply(this,arguments)};var ca=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var b=ca.apply(this,arguments),d=[],g=0;g<b.length;g++)"1"!=mxUtils.getValue(b[g].style,"part","0")&&d.push(b[g]);return d};var oa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var d=this.graph.getModel(),g=d.getParent(b.cell),
-c=this.graph.getCellGeometry(b.cell);return d.isEdge(g)&&null!=c&&c.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(d=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):oa.apply(this,arguments)};var V=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,d){var g=this.graph.getModel(),c=g.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!g.isEdge(c)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&V.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var b=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&b==mxConstants.NONE&&d==mxConstants.NONE?(b=mxUtils.mod(mxUtils.getValue(this.state.style,
+this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);O.apply(this,arguments)};var aa=(new Date).getTime(),na=0,ga=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,d,f,c){ga.apply(this,arguments);f!=this.currentTerminalState?(aa=(new Date).getTime(),na=0):na=(new Date).getTime()-aa;this.currentTerminalState=f};var ha=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return null!=
+this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<na||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ha.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(b,d){var f=null!=b&&0==b,c=this.state.getVisibleTerminalState(f),e=null!=b&&(0==b||b>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,c,f):null,f=null!=(null!=
+e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(f),e):null)?this.fixedHandleImage:null!=e&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=f)return f=new mxImageShape(new mxRectangle(0,0,f.width,f.height),f.src),f.preserveImageAspect=!1,f;f=mxConstants.HANDLE_SIZE;this.preferHtml&&--f;return new mxRectangleShape(new mxRectangle(0,0,f,f),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var oa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=
+function(b,d,f){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return oa.apply(this,arguments)};var X=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var d=this.graph.getModel(),f=d.getParent(b[0]),c=this.graph.getCellGeometry(b[0]);if(d.isEdge(f)&&null!=c&&c.relative&&(d=this.graph.view.getState(b[0]),null!=d&&2>d.width&&2>d.height&&
+null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return X.apply(this,arguments)};var ca=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var b=ca.apply(this,arguments),d=[],f=0;f<b.length;f++)"1"!=mxUtils.getValue(b[f].style,"part","0")&&d.push(b[f]);return d};var pa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var d=this.graph.getModel(),f=d.getParent(b.cell),
+c=this.graph.getCellGeometry(b.cell);return d.isEdge(f)&&null!=c&&c.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(d=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):pa.apply(this,arguments)};var V=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,d){var f=this.graph.getModel(),c=f.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!f.isEdge(c)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&V.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var b=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&b==mxConstants.NONE&&d==mxConstants.NONE?(b=mxUtils.mod(mxUtils.getValue(this.state.style,
mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,b,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Q=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,d){Q.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display=
-"none"))};var ra=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,d){ra.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Y=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Y.apply(this,arguments);var b=!1;
-null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var d=0;4>d;d++){var g=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);g.dialect=mxConstants.DIALECT_SVG;g.init(this.graph.view.getOverlayPane());
-this.cornerHandles.push(g)}}var c=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(b,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,
-this.changeHandler);this.editingHandler=mxUtils.bind(this,function(b,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);d=this.graph.getLinkForCell(this.state.cell);g=this.graph.getLinksForState(this.state);this.updateLinkHint(d,g);if(null!=d||null!=g&&0<g.length)b=!0;b&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(d,g){try{if(null==d&&(null==g||0==g.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
-this.linkHint=null);else if(null!=d||null!=g&&0<g.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===
+"none"))};var ta=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,d){ta.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Y=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Y.apply(this,arguments);var b=!1;
+null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var d=0;4>d;d++){var f=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);f.dialect=mxConstants.DIALECT_SVG;f.init(this.graph.view.getOverlayPane());
+this.cornerHandles.push(f)}}var c=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(b,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,
+this.changeHandler);this.editingHandler=mxUtils.bind(this,function(b,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);d=this.graph.getLinkForCell(this.state.cell);f=this.graph.getLinksForState(this.state);this.updateLinkHint(d,f);if(null!=d||null!=f&&0<f.length)b=!0;b&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(d,f){try{if(null==d&&(null==f||0==f.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
+this.linkHint=null);else if(null!=d||null!=f&&0<f.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===
typeof this.graph.editLink)){var c=document.createElement("img");c.setAttribute("src",Editor.editImage);c.setAttribute("title",mxResources.get("editLink"));c.setAttribute("width","11");c.setAttribute("height","11");c.style.marginLeft="10px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(b)}));this.linkHint.appendChildGraph.createRemoveIcon(mxResources.get("removeIt",
-[mxResources.get("link")]),mxUtils.bind(this,function(b){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(b)}))}if(null!=g)for(c=0;c<g.length;c++){var e=document.createElement("div");e.style.marginTop=null!=d||0<c?"6px":"0px";e.appendChild(this.graph.createLinkForHint(g[c].getAttribute("href"),mxUtils.getTextContent(g[c])));this.linkHint.appendChild(e)}}}catch(qa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var fa=mxEdgeHandler.prototype.init;
+[mxResources.get("link")]),mxUtils.bind(this,function(b){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(b)}))}if(null!=f)for(c=0;c<f.length;c++){var e=document.createElement("div");e.style.marginTop=null!=d||0<c?"6px":"0px";e.appendChild(this.graph.createLinkForHint(f[c].getAttribute("href"),mxUtils.getTextContent(f[c])));this.linkHint.appendChild(e)}}}catch(sa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var fa=mxEdgeHandler.prototype.init;
mxEdgeHandler.prototype.init=function(){fa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var b=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,
-function(d,g){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),g=this.graph.getLinksForState(this.state);if(null!=d||null!=g&&0<g.length)this.updateLinkHint(d,g),this.redrawHandles()};var ia=mxConnectionHandler.prototype.init;
-mxConnectionHandler.prototype.init=function(){ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var pa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.left=this.moveHandles[b].rowState.x+this.moveHandles[b].rowState.width-5+"px",this.moveHandles[b].style.top=this.moveHandles[b].rowState.y+
-this.moveHandles[b].rowState.height/2-6+"px";if(null!=this.cornerHandles){var b=this.getSelectionBorderInset(),d=this.cornerHandles,g=d[0].bounds.height/2;d[0].bounds.x=this.state.x-d[0].bounds.width/2+b;d[0].bounds.y=this.state.y-g+b;d[0].redraw();d[1].bounds.x=d[0].bounds.x+this.state.width-2*b;d[1].bounds.y=d[0].bounds.y;d[1].redraw();d[2].bounds.x=d[0].bounds.x;d[2].bounds.y=this.state.y+this.state.height-2*b;d[2].redraw();d[3].bounds.x=d[1].bounds.x;d[3].bounds.y=d[2].bounds.y;d[3].redraw();
-for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");pa.apply(this);null!=this.state&&null!=this.linkHint&&(b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-
-22,this.state.width+24,this.state.height+22),g=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",b),b=null!=g?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null,null==g&&(g=this.state),g=g.y+g.height,null!=d&&(g=Math.max(g,d.y+d.height)),this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(g+this.verticalOffset/
+function(d,f){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),f=this.graph.getLinksForState(this.state);if(null!=d||null!=f&&0<f.length)this.updateLinkHint(d,f),this.redrawHandles()};var ia=mxConnectionHandler.prototype.init;
+mxConnectionHandler.prototype.init=function(){ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var ra=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.left=this.moveHandles[b].rowState.x+this.moveHandles[b].rowState.width-5+"px",this.moveHandles[b].style.top=this.moveHandles[b].rowState.y+
+this.moveHandles[b].rowState.height/2-6+"px";if(null!=this.cornerHandles){var b=this.getSelectionBorderInset(),d=this.cornerHandles,f=d[0].bounds.height/2;d[0].bounds.x=this.state.x-d[0].bounds.width/2+b;d[0].bounds.y=this.state.y-f+b;d[0].redraw();d[1].bounds.x=d[0].bounds.x+this.state.width-2*b;d[1].bounds.y=d[0].bounds.y;d[1].redraw();d[2].bounds.x=d[0].bounds.x;d[2].bounds.y=this.state.y+this.state.height-2*b;d[2].redraw();d[3].bounds.x=d[1].bounds.x;d[3].bounds.y=d[2].bounds.y;d[3].redraw();
+for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");ra.apply(this);null!=this.state&&null!=this.linkHint&&(b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-
+22,this.state.width+24,this.state.height+22),f=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",b),b=null!=f?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null,null==f&&(f=this.state),f=f.y+f.height,null!=d&&(f=Math.max(f,d.y+d.height)),this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(f+this.verticalOffset/
2+Editor.hintOffset)+"px")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){U.apply(this,arguments);if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)null!=this.moveHandles[b]&&null!=this.moveHandles[b].parentNode&&this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);this.moveHandles=null}if(null!=this.cornerHandles){for(b=0;b<this.cornerHandles.length;b++)null!=this.cornerHandles[b]&&null!=this.cornerHandles[b].node&&null!=this.cornerHandles[b].node.parentNode&&
this.cornerHandles[b].node.parentNode.removeChild(this.cornerHandles[b].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};
var ja=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(ja.apply(this),null!=this.state&&null!=this.linkHint)){var b=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(b=new mxRectangle(b.x,b.y,b.width,b.height),b.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b.y+b.height+Editor.hintOffset)+"px"}};var ba=mxEdgeHandler.prototype.reset;
-mxEdgeHandler.prototype.reset=function(){ba.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var la=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){la.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function f(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function g(){mxShape.call(this)}function l(){mxShape.call(this)}function q(b,d,g,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=g;this.strokewidth=null!=c?c:1}function p(){mxActor.call(this)}function m(){mxCylinder.call(this)}
-function v(){mxCylinder.call(this)}function u(){mxActor.call(this)}function B(){mxActor.call(this)}function x(){mxActor.call(this)}function E(){mxActor.call(this)}function A(){mxActor.call(this)}function F(){mxActor.call(this)}function I(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
-this.canvas.moveTo=mxUtils.bind(this,L.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,L.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,L.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,L.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,L.prototype.arcTo)}function H(){mxRectangleShape.call(this)}function K(){mxRectangleShape.call(this)}
-function C(){mxActor.call(this)}function N(){mxActor.call(this)}function S(){mxActor.call(this)}function R(){mxRectangleShape.call(this)}function M(){mxRectangleShape.call(this)}function P(){mxCylinder.call(this)}function G(){mxShape.call(this)}function D(){mxShape.call(this)}function y(){mxEllipse.call(this)}function W(){mxShape.call(this)}function J(){mxShape.call(this)}function O(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ma(){mxShape.call(this)}function ga(){mxShape.call(this)}
-function ha(){mxShape.call(this)}function na(){mxShape.call(this)}function X(){mxCylinder.call(this)}function ca(){mxCylinder.call(this)}function oa(){mxRectangleShape.call(this)}function V(){mxDoubleEllipse.call(this)}function Q(){mxDoubleEllipse.call(this)}function ra(){mxArrowConnector.call(this);this.spacing=0}function Y(){mxArrowConnector.call(this);this.spacing=0}function fa(){mxActor.call(this)}function ia(){mxRectangleShape.call(this)}function pa(){mxActor.call(this)}function U(){mxActor.call(this)}
-function ja(){mxActor.call(this)}function ba(){mxActor.call(this)}function la(){mxActor.call(this)}function da(){mxActor.call(this)}function ua(){mxActor.call(this)}function ya(){mxActor.call(this)}function ta(){mxActor.call(this)}function qa(){mxActor.call(this)}function za(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function T(){mxEllipse.call(this)}function Aa(){mxRhombus.call(this)}function ka(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}
-function Ca(){mxEllipse.call(this)}function Da(){mxActor.call(this)}function xa(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Z(b,d,g,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=g;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ia(){mxConnector.call(this)}function Va(b,d,g,c,e,f,l,k,m,q){l+=m;var z=c.clone();c.x-=e*(2*l+m);c.y-=f*(2*l+m);e*=l+m;f*=l+m;return function(){b.ellipse(z.x-
-e-l,z.y-f-l,2*l,2*l);q?b.fillAndStroke():b.stroke()}}mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(b,d,g,c,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-d,-g));this.paintForeground(b,
-d,g,c,e)};b.prototype.paintForeground=function(b,d,g,c,e){if(null!=this.state){var z=this.flipH,f=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var l=z,z=f,f=l;b.rotate(-this.getShapeRotation(),z,f,d+c/2,g+e/2);s=this.scale;d=this.bounds.x/s;g=this.bounds.y/s;c=this.bounds.width/s;e=this.bounds.height/s;this.paintTableForeground(b,d,g,c,e)}};b.prototype.paintTableForeground=function(b,d,g,c,e){var z=this.state.view.graph,f=z.getActualStartSize(this.state.cell),
-l=z.model.getChildCells(this.state.cell,!0);if(0<l.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),Fa="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(k)for(k=1;k<l.length;k++){var m=z.getCellGeometry(l[k]);null!=m&&(b.begin(),b.moveTo(d+f.x,g+m.y),b.lineTo(d+c-f.width,g+m.y),b.end(),b.stroke())}if(Fa)for(c=z.model.getChildCells(l[0],!0),k=1;k<c.length;k++)m=z.getCellGeometry(c[k]),null!=m&&(b.begin(),b.moveTo(d+m.x+f.x,g+f.y),b.lineTo(d+m.x+f.x,g+e-f.height),b.end(),
-b.stroke())}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=function(b,d,g,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),l=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
-b.translate(d,g);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(z,e);b.lineTo(0,e-z);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=f&&(b.setFillAlpha(Math.abs(f)),b.setFillColor(0>f?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(c-z,0),b.lineTo(c,z),b.lineTo(z,z),b.close(),b.fill()),0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(z,z),b.lineTo(z,e),b.lineTo(0,e-z),
+mxEdgeHandler.prototype.reset=function(){ba.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ma=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ma.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function g(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function l(){mxShape.call(this)}function m(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function q(){mxActor.call(this)}function n(){mxCylinder.call(this)}
+function v(){mxCylinder.call(this)}function u(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function H(){mxActor.call(this)}function D(){mxActor.call(this)}function E(){mxActor.call(this)}function J(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
+this.canvas.moveTo=mxUtils.bind(this,L.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,L.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,L.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,L.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,L.prototype.arcTo)}function G(){mxRectangleShape.call(this)}function K(){mxRectangleShape.call(this)}
+function C(){mxActor.call(this)}function M(){mxActor.call(this)}function P(){mxActor.call(this)}function S(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function F(){mxShape.call(this)}function B(){mxShape.call(this)}function A(){mxEllipse.call(this)}function W(){mxShape.call(this)}function I(){mxShape.call(this)}function O(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function na(){mxShape.call(this)}function ga(){mxShape.call(this)}
+function ha(){mxShape.call(this)}function oa(){mxShape.call(this)}function X(){mxCylinder.call(this)}function ca(){mxCylinder.call(this)}function pa(){mxRectangleShape.call(this)}function V(){mxDoubleEllipse.call(this)}function Q(){mxDoubleEllipse.call(this)}function ta(){mxArrowConnector.call(this);this.spacing=0}function Y(){mxArrowConnector.call(this);this.spacing=0}function fa(){mxActor.call(this)}function ia(){mxRectangleShape.call(this)}function ra(){mxActor.call(this)}function U(){mxActor.call(this)}
+function ja(){mxActor.call(this)}function ba(){mxActor.call(this)}function ma(){mxActor.call(this)}function da(){mxActor.call(this)}function qa(){mxActor.call(this)}function ya(){mxActor.call(this)}function ua(){mxActor.call(this)}function sa(){mxActor.call(this)}function za(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function T(){mxEllipse.call(this)}function Aa(){mxRhombus.call(this)}function ka(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}
+function Ca(){mxEllipse.call(this)}function Da(){mxActor.call(this)}function xa(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Z(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ia(){mxConnector.call(this)}function Va(b,d,f,c,e,g,l,k,m,q){l+=m;var z=c.clone();c.x-=e*(2*l+m);c.y-=g*(2*l+m);e*=l+m;g*=l+m;return function(){b.ellipse(z.x-
+e-l,z.y-g-l,2*l,2*l);q?b.fillAndStroke():b.stroke()}}mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(b,d,f,c,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-d,-f));this.paintForeground(b,
+d,f,c,e)};b.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.state){var z=this.flipH,g=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var l=z,z=g,g=l;b.rotate(-this.getShapeRotation(),z,g,d+c/2,f+e/2);s=this.scale;d=this.bounds.x/s;f=this.bounds.y/s;c=this.bounds.width/s;e=this.bounds.height/s;this.paintTableForeground(b,d,f,c,e)}};b.prototype.paintTableForeground=function(b,d,f,c,e){var z=this.state.view.graph,g=z.getActualStartSize(this.state.cell),
+l=z.model.getChildCells(this.state.cell,!0);if(0<l.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),Ga="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(k)for(k=1;k<l.length;k++){var la=z.getCellGeometry(l[k]);null!=la&&(b.begin(),b.moveTo(d+g.x,f+la.y),b.lineTo(d+c-g.width,f+la.y),b.end(),b.stroke())}if(Ga)for(c=z.model.getChildCells(l[0],!0),k=1;k<c.length;k++)la=z.getCellGeometry(c[k]),null!=la&&(b.begin(),b.moveTo(d+la.x+g.x,f+g.y),b.lineTo(d+la.x+g.x,f+e-g.height),
+b.end(),b.stroke())}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),l=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
+b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(z,e);b.lineTo(0,e-z);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(c-z,0),b.lineTo(c,z),b.lineTo(z,z),b.close(),b.fill()),0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(z,z),b.lineTo(z,e),b.lineTo(0,e-z),
b.close(),b.fill()),b.begin(),b.moveTo(z,e),b.lineTo(z,z),b.lineTo(0,0),b.moveTo(z,z),b.lineTo(c,z),b.end(),b.stroke())};c.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",c);var Sa=Math.tan(mxUtils.toRadians(30)),Ja=(.5-Sa)/2;mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(e,mxCylinder);e.prototype.size=
-6;e.prototype.paintVertexShape=function(b,d,g,c,e){b.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(d+.5*(c-z),g+.5*(e-z),z,z);b.fill();b.setFillColor(mxConstants.NONE);b.rect(d,g,c,e);b.fill()};mxCellRenderer.registerShape("waypoint",e);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(b,d,g,c,e){d=Math.min(c,e/Sa);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ja);
-b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ja)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(b,d,g,c,e,f){d=Math.min(c,e/(.5+Sa));f?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ja)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ja)*d),b.lineTo(.5*d,(1-Ja)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ja),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ja)*d),b.lineTo(0,.75*
-d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",f);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(b,d,g,c,e,f){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),f||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),f||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),f||(b.stroke(),b.begin()),b.translate(0,-d);f||(b.moveTo(0,
-d),b.curveTo(0,-d/3,c,-d/3,c,d),b.lineTo(c,e-d),b.curveTo(c,e+d/3,0,e+d/3,0,e-d),b.close())};n.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(b,d,g,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=
-Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(d,g);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(0,e);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=f&&(b.setFillAlpha(Math.abs(f)),b.setFillColor(0>f?"#FFFFFF":"#000000"),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.close(),b.fill()),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.end(),b.stroke())};
-mxCellRenderer.registerShape("note",t);mxUtils.extend(d,t);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,0)}return null};mxUtils.extend(g,mxShape);g.prototype.isoAngle=15;g.prototype.paintVertexShape=function(b,d,g,c,e){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*
-Math.PI/200,z=Math.min(c*Math.tan(z),.5*e);b.translate(d,g);b.begin();b.moveTo(.5*c,0);b.lineTo(c,z);b.lineTo(c,e-z);b.lineTo(.5*c,e);b.lineTo(0,e-z);b.lineTo(0,z);b.close();b.fillAndStroke();b.setShadow(!1);b.begin();b.moveTo(0,z);b.lineTo(.5*c,2*z);b.lineTo(c,z);b.moveTo(.5*c,2*z);b.lineTo(.5*c,e);b.stroke()};mxCellRenderer.registerShape("isoCube2",g);mxUtils.extend(l,mxShape);l.prototype.size=15;l.prototype.paintVertexShape=function(b,d,g,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));b.translate(d,g);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(q,mxCylinder);q.prototype.size=15;q.prototype.paintVertexShape=function(b,
-d,g,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=mxUtils.getValue(this.style,"lid",!0);b.translate(d,g);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),f?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),f&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*
-c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",q);mxUtils.extend(p,mxActor);p.prototype.redrawPath=function(b,d,g,c,e){b.moveTo(0,0);b.quadTo(c/2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",p);mxUtils.extend(m,mxCylinder);m.prototype.tabWidth=60;m.prototype.tabHeight=20;m.prototype.tabPosition="right";m.prototype.arcSize=.1;m.prototype.paintVertexShape=function(b,
-d,g,c,e){b.translate(d,g);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),f=mxUtils.getValue(this.style,"rounded",!1),l=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));l||(k*=Math.min(c,e));k=Math.min(k,.5*c,.5*(e-g));d=Math.max(d,
-k);d=Math.min(c-k,d);f||(k=0);b.begin();"left"==z?(b.moveTo(Math.max(k,0),g),b.lineTo(Math.max(k,0),0),b.lineTo(d,0),b.lineTo(d,g)):(b.moveTo(c-d,g),b.lineTo(c-d,0),b.lineTo(c-Math.max(k,0),0),b.lineTo(c-Math.max(k,0),g));f?(b.moveTo(0,k+g),b.arcTo(k,k,0,0,1,k,g),b.lineTo(c-k,g),b.arcTo(k,k,0,0,1,c,k+g),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,g),b.lineTo(c,g),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,
-"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,g+20),b.lineTo(c-20,g+10),b.lineTo(c-10,g+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",m);m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var g=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,
-"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-g),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-g),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};
-mxUtils.extend(v,mxCylinder);v.prototype.arcSize=.1;v.prototype.paintVertexShape=function(b,d,g,c,e){b.translate(d,g);var z=mxUtils.getValue(this.style,"rounded",!1),f=mxUtils.getValue(this.style,"absoluteArcSize",!1);d=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));g=mxUtils.getValue(this.style,"umlStateConnection",null);f||(d*=Math.min(c,e));d=Math.min(d,.5*c,.5*e);z||(d=0);z=0;null!=g&&(z=10);b.begin();b.moveTo(z,d);b.arcTo(d,d,0,0,1,z+d,0);b.lineTo(c-d,0);b.arcTo(d,d,0,0,1,c,
-d);b.lineTo(c,e-d);b.arcTo(d,d,0,0,1,c-d,e);b.lineTo(z+d,e);b.arcTo(d,d,0,0,1,z,e-d);b.close();b.fillAndStroke();b.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(b.roundrect(c-40,e-20,10,10,3,3),b.stroke(),b.roundrect(c-20,e-20,10,10,3,3),b.stroke(),b.begin(),b.moveTo(c-30,e-15),b.lineTo(c-20,e-15),b.stroke());"connPointRefEntry"==g?(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke()):"connPointRefExit"==g&&(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke(),b.begin(),b.moveTo(5,
-.5*e-5),b.lineTo(15,.5*e+5),b.moveTo(15,.5*e-5),b.lineTo(5,.5*e+5),b.stroke())};v.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",v);mxUtils.extend(u,mxActor);u.prototype.size=30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(b,d,g,c,e){d=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,d)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(B,mxActor);B.prototype.size=.4;B.prototype.redrawPath=function(b,d,g,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,d/2);b.quadTo(c/4,1.4*d,c/2,d/2);b.quadTo(3*
-c/4,d*(1-1.4),c,d/2);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};B.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),g=b.width,c=b.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(b.x,b.y+d,g,c-2*d);d*=g;return new mxRectangle(b.x+d,b.y,g-
-2*d,c)}return b};mxCellRenderer.registerShape("tape",B);mxUtils.extend(x,mxActor);x.prototype.size=.3;x.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*b.height):null};x.prototype.redrawPath=function(b,d,g,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,0);b.lineTo(c,0);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/
-4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};mxCellRenderer.registerShape("document",x);var $a=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,d,g,c){var e=mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*
-this.scale,b.height*d),0,0)}return null};q.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,
-"labelInHeader",!1)){var g=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-
-g),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-g),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};v.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",
-15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,Math.max(0,d*this.scale))}return null};mxUtils.extend(E,mxActor);E.prototype.size=.2;E.prototype.fixedSize=20;E.prototype.isRoundable=function(){return!0};E.prototype.redrawPath=function(b,d,g,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));g=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,e)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("parallelogram",E);mxUtils.extend(A,mxActor);A.prototype.size=.2;A.prototype.fixedSize=20;A.prototype.isRoundable=function(){return!0};A.prototype.redrawPath=function(b,d,g,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",
-this.fixedSize)))):c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,e)],this.isRounded,g,!0)};mxCellRenderer.registerShape("trapezoid",A);mxUtils.extend(F,mxActor);F.prototype.size=.5;F.prototype.redrawPath=function(b,d,g,c,e){b.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,e/2),new mxPoint(0,e/2),new mxPoint(d,e/2),new mxPoint(d,e),new mxPoint(c,e)],this.isRounded,g,!1);b.end()};mxCellRenderer.registerShape("curlyBracket",F);mxUtils.extend(I,mxActor);I.prototype.redrawPath=function(b,d,g,c,e){b.setStrokeWidth(1);b.setFillColor(this.stroke);d=c/5;b.rect(0,0,d,e);b.fillAndStroke();b.rect(2*d,0,d,e);
-b.fillAndStroke();b.rect(4*d,0,d,e);b.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",I);L.prototype.moveTo=function(b,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d;this.firstX=b;this.firstY=d};L.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};L.prototype.quadTo=function(b,d,g,c){this.originalQuadTo.apply(this.canvas,
-arguments);this.lastX=g;this.lastY=c};L.prototype.curveTo=function(b,d,g,c,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};L.prototype.arcTo=function(b,d,g,c,e,f,l){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=l};L.prototype.lineTo=function(b,d){if(null!=this.lastX&&null!=this.lastY){var g=function(b){return"number"===typeof b?b?0>b?-1:1:b===b?0:NaN:NaN},c=Math.abs(b-this.lastX),e=Math.abs(d-this.lastY),z=Math.sqrt(c*c+e*e);if(2>z){this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=b;this.lastY=d;return}var f=Math.round(z/10),l=this.defaultVariation;5>f&&(f=5,l/=3);for(var k=g(b-this.lastX)*c/f,g=g(d-this.lastY)*e/f,c=c/z,e=e/z,z=0;z<f;z++){var m=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,k*z+this.lastX-m*e,g*z+this.lastY-m*c)}this.originalLineTo.call(this.canvas,b,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};L.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;
+6;e.prototype.paintVertexShape=function(b,d,f,c,e){b.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(d+.5*(c-z),f+.5*(e-z),z,z);b.fill();b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};mxCellRenderer.registerShape("waypoint",e);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/Sa);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ja);
+b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ja)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(g,mxCylinder);g.prototype.size=20;g.prototype.redrawPath=function(b,d,f,c,e,g){d=Math.min(c,e/(.5+Sa));g?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ja)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ja)*d),b.lineTo(.5*d,(1-Ja)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ja),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ja)*d),b.lineTo(0,.75*
+d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",g);mxUtils.extend(p,mxCylinder);p.prototype.redrawPath=function(b,d,f,c,e,g){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(g&&null!=this.fill||!g&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,-d);g||(b.moveTo(0,
+d),b.curveTo(0,-d/3,c,-d/3,c,d),b.lineTo(c,e-d),b.curveTo(c,e+d/3,0,e+d/3,0,e-d),b.close())};p.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",p);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=
+Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(0,e);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.close(),b.fill()),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.end(),b.stroke())};
+mxCellRenderer.registerShape("note",t);mxUtils.extend(d,t);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*
+Math.PI/200,z=Math.min(c*Math.tan(z),.5*e);b.translate(d,f);b.begin();b.moveTo(.5*c,0);b.lineTo(c,z);b.lineTo(c,e-z);b.lineTo(.5*c,e);b.lineTo(0,e-z);b.lineTo(0,z);b.close();b.fillAndStroke();b.setShadow(!1);b.begin();b.moveTo(0,z);b.lineTo(.5*c,2*z);b.lineTo(c,z);b.moveTo(.5*c,2*z);b.lineTo(.5*c,e);b.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(l,mxShape);l.prototype.size=15;l.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(b,
+d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"lid",!0);b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),g?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),g&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*
+c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c/2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",q);mxUtils.extend(n,mxCylinder);n.prototype.tabWidth=60;n.prototype.tabHeight=20;n.prototype.tabPosition="right";n.prototype.arcSize=.1;n.prototype.paintVertexShape=function(b,
+d,f,c,e){b.translate(d,f);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),g=mxUtils.getValue(this.style,"rounded",!1),l=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));l||(k*=Math.min(c,e));k=Math.min(k,.5*c,.5*(e-f));d=Math.max(d,
+k);d=Math.min(c-k,d);g||(k=0);b.begin();"left"==z?(b.moveTo(Math.max(k,0),f),b.lineTo(Math.max(k,0),0),b.lineTo(d,0),b.lineTo(d,f)):(b.moveTo(c-d,f),b.lineTo(c-d,0),b.lineTo(c-Math.max(k,0),0),b.lineTo(c-Math.max(k,0),f));g?(b.moveTo(0,k+f),b.arcTo(k,k,0,0,1,k,f),b.lineTo(c-k,f),b.arcTo(k,k,0,0,1,c,k+f),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,f),b.lineTo(c,f),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,
+"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,f+20),b.lineTo(c-20,f+10),b.lineTo(c-10,f+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",n);n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,
+"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};
+mxUtils.extend(v,mxCylinder);v.prototype.arcSize=.1;v.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);var z=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1);d=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f=mxUtils.getValue(this.style,"umlStateConnection",null);g||(d*=Math.min(c,e));d=Math.min(d,.5*c,.5*e);z||(d=0);z=0;null!=f&&(z=10);b.begin();b.moveTo(z,d);b.arcTo(d,d,0,0,1,z+d,0);b.lineTo(c-d,0);b.arcTo(d,d,0,0,1,c,
+d);b.lineTo(c,e-d);b.arcTo(d,d,0,0,1,c-d,e);b.lineTo(z+d,e);b.arcTo(d,d,0,0,1,z,e-d);b.close();b.fillAndStroke();b.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(b.roundrect(c-40,e-20,10,10,3,3),b.stroke(),b.roundrect(c-20,e-20,10,10,3,3),b.stroke(),b.begin(),b.moveTo(c-30,e-15),b.lineTo(c-20,e-15),b.stroke());"connPointRefEntry"==f?(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke()):"connPointRefExit"==f&&(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke(),b.begin(),b.moveTo(5,
+.5*e-5),b.lineTo(15,.5*e+5),b.moveTo(15,.5*e-5),b.lineTo(5,.5*e+5),b.stroke())};v.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",v);mxUtils.extend(u,mxActor);u.prototype.size=30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,d/2);b.quadTo(c/4,1.4*d,c/2,d/2);b.quadTo(3*
+c/4,d*(1-1.4),c,d/2);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};y.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),f=b.width,c=b.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(b.x,b.y+d,f,c-2*d);d*=f;return new mxRectangle(b.x+d,b.y,f-
+2*d,c)}return b};mxCellRenderer.registerShape("tape",y);mxUtils.extend(x,mxActor);x.prototype.size=.3;x.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*b.height):null};x.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,0);b.lineTo(c,0);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/
+4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};mxCellRenderer.registerShape("document",x);var $a=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,d,f,c){var e=mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*
+this.scale,b.height*d),0,0)}return null};m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,
+"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-
+f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};v.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",
+15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,Math.max(0,d*this.scale))}return null};mxUtils.extend(H,mxActor);H.prototype.size=.2;H.prototype.fixedSize=20;H.prototype.isRoundable=function(){return!0};H.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("parallelogram",H);mxUtils.extend(D,mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",
+this.fixedSize)))):c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("trapezoid",D);mxUtils.extend(E,mxActor);E.prototype.size=.5;E.prototype.redrawPath=function(b,d,f,c,e){b.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,e/2),new mxPoint(0,e/2),new mxPoint(d,e/2),new mxPoint(d,e),new mxPoint(c,e)],this.isRounded,f,!1);b.end()};mxCellRenderer.registerShape("curlyBracket",E);mxUtils.extend(J,mxActor);J.prototype.redrawPath=function(b,d,f,c,e){b.setStrokeWidth(1);b.setFillColor(this.stroke);d=c/5;b.rect(0,0,d,e);b.fillAndStroke();b.rect(2*d,0,d,e);
+b.fillAndStroke();b.rect(4*d,0,d,e);b.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",J);L.prototype.moveTo=function(b,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d;this.firstX=b;this.firstY=d};L.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};L.prototype.quadTo=function(b,d,f,c){this.originalQuadTo.apply(this.canvas,
+arguments);this.lastX=f;this.lastY=c};L.prototype.curveTo=function(b,d,f,c,e,g){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};L.prototype.arcTo=function(b,d,f,c,e,g,l){this.originalArcTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=l};L.prototype.lineTo=function(b,d){if(null!=this.lastX&&null!=this.lastY){var f=function(b){return"number"===typeof b?b?0>b?-1:1:b===b?0:NaN:NaN},c=Math.abs(b-this.lastX),e=Math.abs(d-this.lastY),z=Math.sqrt(c*c+e*e);if(2>z){this.originalLineTo.apply(this.canvas,
+arguments);this.lastX=b;this.lastY=d;return}var g=Math.round(z/10),l=this.defaultVariation;5>g&&(g=5,l/=3);for(var k=f(b-this.lastX)*c/g,f=f(d-this.lastY)*e/g,c=c/z,e=e/z,z=0;z<g;z++){var m=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,k*z+this.lastX-m*e,f*z+this.lastY-m*c)}this.originalLineTo.call(this.canvas,b,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};L.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;
this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var ab=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(b){ab.apply(this,arguments);null==b.handJiggle&&(b.handJiggle=this.createHandJiggle(b))};var bb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(b){bb.apply(this,arguments);null!=b.handJiggle&&(b.handJiggle.destroy(),
delete b.handJiggle)};mxShape.prototype.createComicCanvas=function(b){return new L(b,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(b)};mxRhombus.prototype.defaultJiggle=2;var cb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,
-"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&cb.apply(this,arguments)};var fb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(b,d,g,c,e){if(null==b.handJiggle||b.handJiggle.constructor!=L)fb.apply(this,arguments);else{var z=!0;null!=this.style&&(z="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(z||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)z||
-null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=!1),b.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?z=Math.min(c/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,z=Math.min(c*z,e*z)),b.moveTo(d+z,g),b.lineTo(d+c-z,g),b.quadTo(d+c,g,d+c,g+z),b.lineTo(d+c,g+e-z),b.quadTo(d+c,g+e,d+c-z,
-g+e),b.lineTo(d+z,g+e),b.quadTo(d,g+e,d,g+e-z),b.lineTo(d,g+z),b.quadTo(d,g,d+z,g)):(b.moveTo(d,g),b.lineTo(d+c,g),b.lineTo(d+c,g+e),b.lineTo(d,g+e),b.lineTo(d,g)),b.close(),b.end(),b.fillAndStroke()}};mxUtils.extend(H,mxRectangleShape);H.prototype.size=.1;H.prototype.fixedSize=!1;H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
-this.direction==mxConstants.DIRECTION_WEST)){var d=b.width,g=b.height;b=new mxRectangle(b.x,b.y,d,g);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*e,g*e));b.x+=Math.round(c);b.width-=Math.round(2*c)}return b};H.prototype.paintForeground=function(b,d,g,c,e){var z=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),
-f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),f=z?Math.max(0,Math.min(c,f)):c*Math.max(0,Math.min(1,f));this.isRounded&&(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*z,e*z)));f=Math.round(f);b.begin();b.moveTo(d+f,g);b.lineTo(d+f,g+e);b.moveTo(d+c-f,g);b.lineTo(d+c-f,g+e);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",H);mxCellRenderer.registerShape("process2",
-H);mxUtils.extend(K,mxRectangleShape);K.prototype.paintBackground=function(b,d,g,c,e){b.setFillColor(mxConstants.NONE);b.rect(d,g,c,e);b.fill()};K.prototype.paintForeground=function(b,d,g,c,e){};mxCellRenderer.registerShape("transparent",K);mxUtils.extend(C,mxHexagon);C.prototype.size=30;C.prototype.position=.5;C.prototype.position2=.5;C.prototype.base=20;C.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};C.prototype.isRoundable=
-function(){return!0};C.prototype.redrawPath=function(b,d,g,c,e){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var z=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
-this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-g),new mxPoint(Math.min(c,z+l),e-g),new mxPoint(f,e),new mxPoint(Math.max(0,z),e-g),new mxPoint(0,e-g)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",C);mxUtils.extend(N,mxActor);N.prototype.size=.2;N.prototype.fixedSize=20;N.prototype.isRoundable=function(){return!0};N.prototype.redrawPath=function(b,d,g,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(0,e),new mxPoint(d,e/2)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("step",N);mxUtils.extend(S,mxHexagon);S.prototype.size=.25;S.prototype.fixedSize=20;S.prototype.isRoundable=function(){return!0};
-S.prototype.redrawPath=function(b,d,g,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*e),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(0,.5*e)],this.isRounded,g,
-!0)};mxCellRenderer.registerShape("hexagon",S);mxUtils.extend(R,mxRectangleShape);R.prototype.isHtmlAllowed=function(){return!1};R.prototype.paintForeground=function(b,d,g,c,e){var z=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,g+z);b.lineTo(d+c/2,g+e-z);b.moveTo(d+z,g+e/2);b.lineTo(d+c-z,g+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",R);var Ya=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==
-this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};mxRhombus.prototype.paintVertexShape=function(b,d,g,c,e){Ya.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var z=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=z;g+=z;c-=2*z;e-=2*z;0<c&&0<e&&(b.setShadow(!1),Ya.apply(this,[b,d,g,c,e]))}};mxUtils.extend(M,
-mxRectangleShape);M.prototype.isHtmlAllowed=function(){return!1};M.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};M.prototype.paintForeground=function(b,d,g,c,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);d+=f;g+=f;c-=2*f;e-=2*f;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var f=0,z;do{z=mxCellRenderer.defaultShapes[this.style["symbol"+f]];if(null!=z){var l=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],m=this.style["symbol"+f+"Width"],q=this.style["symbol"+f+"Height"],p=this.style["symbol"+f+"Spacing"]||0,Fa=this.style["symbol"+f+"VSpacing"]||p,sa=this.style["symbol"+f+"ArcSpacing"];null!=sa&&(sa*=this.getArcSize(c+this.strokewidth,
-e+this.strokewidth),p+=sa,Fa+=sa);var sa=d,G=g,sa=l==mxConstants.ALIGN_CENTER?sa+(c-m)/2:l==mxConstants.ALIGN_RIGHT?sa+(c-m-p):sa+p,G=k==mxConstants.ALIGN_MIDDLE?G+(e-q)/2:k==mxConstants.ALIGN_BOTTOM?G+(e-q-Fa):G+Fa;b.save();l=new z;l.style=this.style;z.prototype.paintVertexShape.call(l,b,sa,G,m,q);b.restore()}f++}while(null!=z)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",M);mxUtils.extend(P,mxCylinder);P.prototype.redrawPath=function(b,d,g,
-c,e,f){f?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",P);mxUtils.extend(G,mxShape);G.prototype.paintBackground=function(b,d,g,c,e){b.translate(d,g);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();
-b.stroke()};mxCellRenderer.registerShape("umlActor",G);mxUtils.extend(D,mxShape);D.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};D.prototype.paintBackground=function(b,d,g,c,e){b.translate(d,g);b.begin();b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",D);mxUtils.extend(y,mxEllipse);y.prototype.paintVertexShape=function(b,
-d,g,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/8,g+e);b.lineTo(d+7*c/8,g+e);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",y);mxUtils.extend(W,mxShape);W.prototype.paintVertexShape=function(b,d,g,c,e){b.translate(d,g);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",W);mxUtils.extend(J,mxShape);J.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+
-b.height/8,b.width,7*b.height/8)};J.prototype.paintBackground=function(b,d,g,c,e){b.translate(d,g);b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};J.prototype.paintForeground=function(b,d,g,c,e){b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,e/4);b.end();b.stroke()};mxCellRenderer.registerShape("umlControl",J);mxUtils.extend(O,mxRectangleShape);O.prototype.size=40;O.prototype.isHtmlAllowed=function(){return!1};O.prototype.getLabelBounds=
-function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,d)};O.prototype.paintBackground=function(b,d,g,c,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),z=mxUtils.getValue(this.style,"participant");null==z||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,d,g,c,f):(z=this.state.view.graph.cellRenderer.getShape(z),null!=z&&z!=O&&(z=new z,
-z.apply(this.state),b.save(),z.paintVertexShape(b,d,g,c,f),b.restore()));f<e&&(b.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),b.begin(),b.moveTo(d+c/2,g+f),b.lineTo(d+c/2,g+e),b.end(),b.stroke())};O.prototype.paintForeground=function(b,d,g,c,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,b,d,g,c,Math.min(e,f))};mxCellRenderer.registerShape("umlLifeline",O);mxUtils.extend(aa,mxShape);
-aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.getLabelMargins=function(b){return new mxRectangle(0,0,b.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),b.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};aa.prototype.paintBackground=function(b,d,g,c,e){var f=this.corner,z=Math.min(c,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,
-"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(b.setFillColor(k),b.rect(d,g,c,e),b.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(b,d,g,c,e),b.setGradient(this.fill,this.gradient,d,g,c,e,this.gradientDirection)):b.setFillColor(this.fill);b.begin();b.moveTo(d,g);b.lineTo(d+z,g);b.lineTo(d+z,g+Math.max(0,l-1.5*f));b.lineTo(d+Math.max(0,z-
-f),g+l);b.lineTo(d,g+l);b.close();b.fillAndStroke();b.begin();b.moveTo(d+z,g);b.lineTo(d+c,g);b.lineTo(d+c,g+e);b.lineTo(d,g+e);b.lineTo(d,g+l);b.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(b,d,g,c){return new mxPoint(b.getCenterX(),b.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(b,d,g,c){c=O.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||
-1)*d.view.scale/2-1;g.x<b.getCenterX()&&(d=-1*(d+1));return new mxPoint(b.getCenterX()+d,Math.min(b.y+b.height,Math.max(b.y+c,g.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(b,d,g,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,d,g,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||
-1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return g.x<b.getCenterX()&&(c=-1*(c+1)),new mxPoint(b.getCenterX()+c,Math.min(b.y+b.height,Math.max(b.y,g.y)));g.y<b.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,g.x)),b.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=
-function(b,d,g,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(b,new mxRectangle(0,0,0,Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(d.style,"size",C.prototype.size))*d.view.scale))),d.style),d,g,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(b,d,g,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),f=e?E.prototype.fixedSize:E.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));
-e&&(f*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),z=[new mxPoint(l,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]):(e=e?Math.max(0,Math.min(.5*k,f)):k*Math.max(0,Math.min(1,f)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),
-new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(g.x<l||g.x>l+k?b.y=g.y:b.x=g.x);return mxUtils.getPerimeterPoint(z,b,g)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,g,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),f=e?A.prototype.fixedSize:A.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));e&&(f*=d.view.scale);var l=b.x,
-z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,f)):k*Math.max(0,Math.min(1,f)),z=[new mxPoint(l+e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),z=[new mxPoint(l,z),new mxPoint(l+k,z),new mxPoint(l+k-e,z+m),new mxPoint(l+
-e,z+m),new mxPoint(l,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),z=[new mxPoint(l,z+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),z=[new mxPoint(l,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(g.x<l||g.x>l+k?b.y=g.y:b.x=g.x);return mxUtils.getPerimeterPoint(z,
-b,g)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(b,d,g,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),f=e?N.prototype.fixedSize:N.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));e&&(f*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?
-(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),z=[new mxPoint(l,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,b),new mxPoint(l,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),new mxPoint(l+k-e,b),new mxPoint(l+k,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,f)):m*Math.max(0,
-Math.min(1,f)),z=[new mxPoint(l,z+e),new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(q,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),z=[new mxPoint(l,z),new mxPoint(q,z+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]);q=new mxPoint(q,b);c&&(g.x<l||g.x>l+k?q.y=g.y:q.x=g.x);return mxUtils.getPerimeterPoint(z,q,g)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);
-mxPerimeter.HexagonPerimeter2=function(b,d,g,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),f=e?S.prototype.fixedSize:S.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));e&&(f*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,f)):m*Math.max(0,
-Math.min(1,f)),z=[new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e),new mxPoint(q,z)]):(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),z=[new mxPoint(l+e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]);q=new mxPoint(q,b);c&&(g.x<l||g.x>l+k?q.y=g.y:q.x=g.x);return mxUtils.getPerimeterPoint(z,q,g)};mxStyleRegistry.putValue("hexagonPerimeter2",
-mxPerimeter.HexagonPerimeter2);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.paintBackground=function(b,d,g,c,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,g);b.ellipse((c-f)/2,0,f,f);b.fillAndStroke();b.begin();b.moveTo(c/2,f);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",ma);mxUtils.extend(ga,mxShape);ga.prototype.size=10;ga.prototype.inset=2;ga.prototype.paintBackground=function(b,d,g,c,e){var f=parseFloat(mxUtils.getValue(this.style,
-"size",this.size)),l=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,g);b.begin();b.moveTo(c/2,f+l);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-f)/2-l,f/2);b.quadTo((c-f)/2-l,f+l,c/2,f+l);b.quadTo((c+f)/2+l,f+l,(c+f)/2+l,f/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",ga);mxUtils.extend(ha,mxShape);ha.prototype.paintBackground=function(b,d,g,c,e){b.translate(d,g);b.begin();b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);
-b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",ha);mxUtils.extend(na,mxShape);na.prototype.inset=2;na.prototype.paintBackground=function(b,d,g,c,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,g);b.ellipse(0,f,c-2*f,e-2*f);b.fillAndStroke();b.begin();b.moveTo(c/2,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",na);mxUtils.extend(X,mxCylinder);X.prototype.jettyWidth=
-20;X.prototype.jettyHeight=10;X.prototype.redrawPath=function(b,d,g,c,e,f){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));g=l/2;var l=g+l/2,z=Math.min(d,e-d),k=Math.min(z+2*d,e-d);f?(b.moveTo(g,z),b.lineTo(l,z),b.lineTo(l,z+d),b.lineTo(g,z+d),b.moveTo(g,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(g,k+d)):(b.moveTo(g,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(g,e),b.lineTo(g,k+d),b.lineTo(0,k+d),b.lineTo(0,
-k),b.lineTo(g,k),b.lineTo(g,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(g,z),b.close());b.end()};mxCellRenderer.registerShape("module",X);mxUtils.extend(ca,mxCylinder);ca.prototype.jettyWidth=32;ca.prototype.jettyHeight=12;ca.prototype.redrawPath=function(b,d,g,c,e,f){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));g=l/2;var l=g+l/2,z=.3*e-d/2,k=.7*e-d/2;f?(b.moveTo(g,z),b.lineTo(l,z),b.lineTo(l,
-z+d),b.lineTo(g,z+d),b.moveTo(g,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(g,k+d)):(b.moveTo(g,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(g,e),b.lineTo(g,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(g,k),b.lineTo(g,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(g,z),b.close());b.end()};mxCellRenderer.registerShape("component",ca);mxUtils.extend(oa,mxRectangleShape);oa.prototype.paintForeground=function(b,d,g,c,e){var f=c/2,l=e/2,z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;b.begin();this.addPoints(b,[new mxPoint(d+f,g),new mxPoint(d+c,g+l),new mxPoint(d+f,g+e),new mxPoint(d,g+l)],this.isRounded,z,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",oa);mxUtils.extend(V,mxDoubleEllipse);V.prototype.outerStroke=!0;V.prototype.paintVertexShape=function(b,d,g,c,e){var f=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(d+f,g+f,c-2*f,e-2*f),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&
-(b.ellipse(d,g,c,e),b.stroke())};mxCellRenderer.registerShape("endState",V);mxUtils.extend(Q,V);Q.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Q);mxUtils.extend(ra,mxArrowConnector);ra.prototype.defaultWidth=4;ra.prototype.isOpenEnded=function(){return!0};ra.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ra.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
-ra);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=10;Y.prototype.defaultArrowWidth=20;Y.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Y.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
-Y);mxUtils.extend(fa,mxActor);fa.prototype.size=30;fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(b,d,g,c,e){d=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("manualInput",fa);mxUtils.extend(ia,mxRectangleShape);ia.prototype.dx=
-20;ia.prototype.dy=20;ia.prototype.isHtmlAllowed=function(){return!1};ia.prototype.paintForeground=function(b,d,g,c,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*l,e*l));l=Math.max(f,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
-b.begin();b.moveTo(d,g+f);b.lineTo(d+c,g+f);b.end();b.stroke();b.begin();b.moveTo(d+l,g);b.lineTo(d+l,g+e);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",ia);mxUtils.extend(pa,mxActor);pa.prototype.dx=20;pa.prototype.dy=20;pa.prototype.redrawPath=function(b,d,g,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));
-var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,g),new mxPoint(d,g),new mxPoint(d,e),new mxPoint(0,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("corner",pa);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(b,d,g,c,e){b.moveTo(0,0);b.lineTo(0,e);b.end();b.moveTo(c,0);b.lineTo(c,e);b.end();b.moveTo(0,e/2);b.lineTo(c,e/2);b.end()};mxCellRenderer.registerShape("crossbar",
-U);mxUtils.extend(ja,mxActor);ja.prototype.dx=20;ja.prototype.dy=20;ja.prototype.redrawPath=function(b,d,g,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,g),new mxPoint((c+
-d)/2,g),new mxPoint((c+d)/2,e),new mxPoint((c-d)/2,e),new mxPoint((c-d)/2,g),new mxPoint(0,g)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("tee",ja);mxUtils.extend(ba,mxActor);ba.prototype.arrowWidth=.3;ba.prototype.arrowSize=.2;ba.prototype.redrawPath=function(b,d,g,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));g=(e-f)/2;var f=
-g+f,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,g),new mxPoint(c-d,g),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,f),new mxPoint(0,f)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("singleArrow",ba);mxUtils.extend(la,mxActor);la.prototype.redrawPath=function(b,d,g,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ba.prototype.arrowWidth))));d=c*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ba.prototype.arrowSize))));g=(e-f)/2;var f=g+f,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e/2),new mxPoint(d,0),new mxPoint(d,g),new mxPoint(c-d,g),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,f),new mxPoint(d,f),new mxPoint(d,e)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",la);mxUtils.extend(da,mxActor);da.prototype.size=
-.1;da.prototype.fixedSize=20;da.prototype.redrawPath=function(b,d,g,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(d,0);b.lineTo(c,0);b.quadTo(c-2*d,e/2,c,e);b.lineTo(d,e);b.quadTo(d-2*d,e/2,d,0);b.close();b.end()};mxCellRenderer.registerShape("dataStorage",da);mxUtils.extend(ua,mxActor);ua.prototype.redrawPath=
-function(b,d,g,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.registerShape("or",ua);mxUtils.extend(ya,mxActor);ya.prototype.redrawPath=function(b,d,g,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.registerShape("xor",ya);mxUtils.extend(ta,mxActor);ta.prototype.size=20;ta.prototype.isRoundable=function(){return!0};ta.prototype.redrawPath=function(b,d,g,c,e){d=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*d)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("loopLimit",ta);mxUtils.extend(qa,mxActor);qa.prototype.size=.375;qa.prototype.isRoundable=function(){return!0};qa.prototype.redrawPath=function(b,d,g,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-d),new mxPoint(c/2,e),new mxPoint(0,e-d)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("offPageConnector",qa);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(b,d,g,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/2,g+e);b.lineTo(d+c,g+e);b.end();b.stroke()};
-mxCellRenderer.registerShape("tapeData",za);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(b,d,g,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,g+e/2);b.lineTo(d+c,g+e/2);b.end();b.stroke();b.begin();b.moveTo(d+c/2,g);b.lineTo(d+c/2,g+e);b.end();b.stroke()};mxCellRenderer.registerShape("orEllipse",va);mxUtils.extend(T,mxEllipse);T.prototype.paintVertexShape=function(b,d,g,c,e){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);b.setShadow(!1);b.begin();b.moveTo(d+.145*c,g+.145*e);b.lineTo(d+.855*c,g+.855*e);b.end();b.stroke();b.begin();b.moveTo(d+.855*c,g+.145*e);b.lineTo(d+.145*c,g+.855*e);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",T);mxUtils.extend(Aa,mxRhombus);Aa.prototype.paintVertexShape=function(b,d,g,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,g+e/2);b.lineTo(d+c,g+e/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",
-Aa);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(b,d,g,c,e){b.begin();b.moveTo(d,g);b.lineTo(d+c,g);b.lineTo(d+c/2,g+e/2);b.close();b.fillAndStroke();b.begin();b.moveTo(d,g+e);b.lineTo(d+c,g+e);b.lineTo(d+c/2,g+e/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",ka);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(b,d,g,c,e){var f=g+e-5;b.begin();b.moveTo(d,g);b.lineTo(d,g+e);b.moveTo(d,f);b.lineTo(d+10,f-5);b.moveTo(d,f);b.lineTo(d+10,
-f+5);b.moveTo(d,f);b.lineTo(d+c,f);b.moveTo(d+c,g);b.lineTo(d+c,g+e);b.moveTo(d+c,f);b.lineTo(d+c-10,f-5);b.moveTo(d+c,f);b.lineTo(d+c-10,f+5);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(b,d,g,c,e){this.outline||b.setStrokeColor(null);if(null!=this.style){var f=b.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=
-!1);b.rect(d,g,c,e);b.fill();b.pointerEvents=f;b.setStrokeColor(this.stroke);b.begin();b.moveTo(d,g);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?b.lineTo(d+c,g):b.moveTo(d+c,g);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?b.lineTo(d+c,g+e):b.moveTo(d+c,g+e);this.outline||"1"==mxUtils.getValue(this.style,"bottom","1")?b.lineTo(d,g+e):b.moveTo(d,g+e);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&b.lineTo(d,g);b.end();b.stroke()}};mxCellRenderer.registerShape("partialRectangle",
-wa);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(b,d,g,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(d+c/2,g),b.lineTo(d+c/2,g+e)):(b.moveTo(d,g+e/2),b.lineTo(d+c,g+e/2));b.end();b.stroke()};mxCellRenderer.registerShape("lineEllipse",Ca);mxUtils.extend(Da,mxActor);Da.prototype.redrawPath=function(b,d,g,c,e){d=Math.min(c,e/2);b.moveTo(0,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);
-b.quadTo(c,e,c-d,e);b.lineTo(0,e);b.close();b.end()};mxCellRenderer.registerShape("delay",Da);mxUtils.extend(xa,mxActor);xa.prototype.size=.2;xa.prototype.redrawPath=function(b,d,g,c,e){d=Math.min(e,c);var f=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(e-f)/2;g=d+f;var l=(c-f)/2,f=l+f;b.moveTo(0,d);b.lineTo(l,d);b.lineTo(l,0);b.lineTo(f,0);b.lineTo(f,d);b.lineTo(c,d);b.lineTo(c,g);b.lineTo(f,g);b.lineTo(f,e);b.lineTo(l,e);b.lineTo(l,g);b.lineTo(0,g);b.close();
-b.end()};mxCellRenderer.registerShape("cross",xa);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.25;Ea.prototype.redrawPath=function(b,d,g,c,e){d=Math.min(c,e/2);g=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);b.moveTo(0,e/2);b.lineTo(g,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c-d,e);b.lineTo(g,e);b.close();b.end()};mxCellRenderer.registerShape("display",Ea);mxUtils.extend(Z,mxActor);Z.prototype.cst={RECT2:"mxgraph.basic.rect"};Z.prototype.customProperties=
+"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&cb.apply(this,arguments)};var fb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(b,d,f,c,e){if(null==b.handJiggle||b.handJiggle.constructor!=L)fb.apply(this,arguments);else{var z=!0;null!=this.style&&(z="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(z||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)z||
+null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=!1),b.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?z=Math.min(c/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,z=Math.min(c*z,e*z)),b.moveTo(d+z,f),b.lineTo(d+c-z,f),b.quadTo(d+c,f,d+c,f+z),b.lineTo(d+c,f+e-z),b.quadTo(d+c,f+e,d+c-z,
+f+e),b.lineTo(d+z,f+e),b.quadTo(d,f+e,d,f+e-z),b.lineTo(d,f+z),b.quadTo(d,f,d+z,f)):(b.moveTo(d,f),b.lineTo(d+c,f),b.lineTo(d+c,f+e),b.lineTo(d,f+e),b.lineTo(d,f)),b.close(),b.end(),b.fillAndStroke()}};mxUtils.extend(G,mxRectangleShape);G.prototype.size=.1;G.prototype.fixedSize=!1;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
+this.direction==mxConstants.DIRECTION_WEST)){var d=b.width,f=b.height;b=new mxRectangle(b.x,b.y,d,f);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*e,f*e));b.x+=Math.round(c);b.width-=Math.round(2*c)}return b};G.prototype.paintForeground=function(b,d,f,c,e){var z=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),
+g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=z?Math.max(0,Math.min(c,g)):c*Math.max(0,Math.min(1,g));this.isRounded&&(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(c*z,e*z)));g=Math.round(g);b.begin();b.moveTo(d+g,f);b.lineTo(d+g,f+e);b.moveTo(d+c-g,f);b.lineTo(d+c-g,f+e);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",G);mxCellRenderer.registerShape("process2",
+G);mxUtils.extend(K,mxRectangleShape);K.prototype.paintBackground=function(b,d,f,c,e){b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};K.prototype.paintForeground=function(b,d,f,c,e){};mxCellRenderer.registerShape("transparent",K);mxUtils.extend(C,mxHexagon);C.prototype.size=30;C.prototype.position=.5;C.prototype.position2=.5;C.prototype.base=20;C.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};C.prototype.isRoundable=
+function(){return!0};C.prototype.redrawPath=function(b,d,f,c,e){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var z=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
+this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-f),new mxPoint(Math.min(c,z+l),e-f),new mxPoint(g,e),new mxPoint(Math.max(0,z),e-f),new mxPoint(0,e-f)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",C);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(0,e),new mxPoint(d,e/2)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("step",M);mxUtils.extend(P,mxHexagon);P.prototype.size=.25;P.prototype.fixedSize=20;P.prototype.isRoundable=function(){return!0};
+P.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*e),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(0,.5*e)],this.isRounded,f,
+!0)};mxCellRenderer.registerShape("hexagon",P);mxUtils.extend(S,mxRectangleShape);S.prototype.isHtmlAllowed=function(){return!1};S.prototype.paintForeground=function(b,d,f,c,e){var z=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,f+z);b.lineTo(d+c/2,f+e-z);b.moveTo(d+z,f+e/2);b.lineTo(d+c-z,f+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",S);var Ya=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==
+this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};mxRhombus.prototype.paintVertexShape=function(b,d,f,c,e){Ya.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var z=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=z;f+=z;c-=2*z;e-=2*z;0<c&&0<e&&(b.setShadow(!1),Ya.apply(this,[b,d,f,c,e]))}};mxUtils.extend(N,
+mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};N.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);d+=g;f+=g;c-=2*g;e-=2*g;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var g=0,z;do{z=mxCellRenderer.defaultShapes[this.style["symbol"+g]];if(null!=z){var l=this.style["symbol"+g+"Align"],k=this.style["symbol"+g+"VerticalAlign"],m=this.style["symbol"+g+"Width"],q=this.style["symbol"+g+"Height"],n=this.style["symbol"+g+"Spacing"]||0,Ga=this.style["symbol"+g+"VSpacing"]||n,la=this.style["symbol"+g+"ArcSpacing"];null!=la&&(la*=this.getArcSize(c+this.strokewidth,
+e+this.strokewidth),n+=la,Ga+=la);var la=d,F=f,la=l==mxConstants.ALIGN_CENTER?la+(c-m)/2:l==mxConstants.ALIGN_RIGHT?la+(c-m-n):la+n,F=k==mxConstants.ALIGN_MIDDLE?F+(e-q)/2:k==mxConstants.ALIGN_BOTTOM?F+(e-q-Ga):F+Ga;b.save();l=new z;l.style=this.style;z.prototype.paintVertexShape.call(l,b,la,F,m,q);b.restore()}g++}while(null!=z)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(b,d,f,
+c,e,g){g?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(F,mxShape);F.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();
+b.stroke()};mxCellRenderer.registerShape("umlActor",F);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};B.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(A,mxEllipse);A.prototype.paintVertexShape=function(b,
+d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/8,f+e);b.lineTo(d+7*c/8,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",A);mxUtils.extend(W,mxShape);W.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",W);mxUtils.extend(I,mxShape);I.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+
+b.height/8,b.width,7*b.height/8)};I.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};I.prototype.paintForeground=function(b,d,f,c,e){b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,e/4);b.end();b.stroke()};mxCellRenderer.registerShape("umlControl",I);mxUtils.extend(O,mxRectangleShape);O.prototype.size=40;O.prototype.isHtmlAllowed=function(){return!1};O.prototype.getLabelBounds=
+function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,d)};O.prototype.paintBackground=function(b,d,f,c,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),z=mxUtils.getValue(this.style,"participant");null==z||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,d,f,c,g):(z=this.state.view.graph.cellRenderer.getShape(z),null!=z&&z!=O&&(z=new z,
+z.apply(this.state),b.save(),z.paintVertexShape(b,d,f,c,g),b.restore()));g<e&&(b.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),b.begin(),b.moveTo(d+c/2,f+g),b.lineTo(d+c/2,f+e),b.end(),b.stroke())};O.prototype.paintForeground=function(b,d,f,c,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,b,d,f,c,Math.min(e,g))};mxCellRenderer.registerShape("umlLifeline",O);mxUtils.extend(aa,mxShape);
+aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.getLabelMargins=function(b){return new mxRectangle(0,0,b.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),b.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};aa.prototype.paintBackground=function(b,d,f,c,e){var g=this.corner,z=Math.min(c,Math.max(g,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(e,Math.max(1.5*g,parseFloat(mxUtils.getValue(this.style,
+"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(b.setFillColor(k),b.rect(d,f,c,e),b.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(b,d,f,c,e),b.setGradient(this.fill,this.gradient,d,f,c,e,this.gradientDirection)):b.setFillColor(this.fill);b.begin();b.moveTo(d,f);b.lineTo(d+z,f);b.lineTo(d+z,f+Math.max(0,l-1.5*g));b.lineTo(d+Math.max(0,z-
+g),f+l);b.lineTo(d,f+l);b.close();b.fillAndStroke();b.begin();b.moveTo(d+z,f);b.lineTo(d+c,f);b.lineTo(d+c,f+e);b.lineTo(d,f+e);b.lineTo(d,f+l);b.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(b,d,f,c){return new mxPoint(b.getCenterX(),b.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(b,d,f,c){c=O.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||
+1)*d.view.scale/2-1;f.x<b.getCenterX()&&(d=-1*(d+1));return new mxPoint(b.getCenterX()+d,Math.min(b.y+b.height,Math.max(b.y+c,f.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(b,d,f,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,d,f,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||
+1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return f.x<b.getCenterX()&&(c=-1*(c+1)),new mxPoint(b.getCenterX()+c,Math.min(b.y+b.height,Math.max(b.y,f.y)));f.y<b.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,f.x)),b.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=
+function(b,d,f,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(b,new mxRectangle(0,0,0,Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(d.style,"size",C.prototype.size))*d.view.scale))),d.style),d,f,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?H.prototype.fixedSize:H.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));
+e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]):(e=e?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),
+new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<l||f.x>l+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,b,f)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?D.prototype.fixedSize:D.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,
+z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z),new mxPoint(l+k-e,z+m),new mxPoint(l+
+e,z+m),new mxPoint(l,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<l||f.x>l+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,
+b,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?M.prototype.fixedSize:M.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?
+(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,b),new mxPoint(l,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),new mxPoint(l+k-e,b),new mxPoint(l+k,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,
+Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(q,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(q,z+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]);q=new mxPoint(q,b);c&&(f.x<l||f.x>l+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);
+mxPerimeter.HexagonPerimeter2=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?P.prototype.fixedSize:P.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,
+Math.min(1,g)),z=[new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e),new mxPoint(q,z)]):(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]);q=new mxPoint(q,b);c&&(f.x<l||f.x>l+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("hexagonPerimeter2",
+mxPerimeter.HexagonPerimeter2);mxUtils.extend(na,mxShape);na.prototype.size=10;na.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,f);b.ellipse((c-g)/2,0,g,g);b.fillAndStroke();b.begin();b.moveTo(c/2,g);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",na);mxUtils.extend(ga,mxShape);ga.prototype.size=10;ga.prototype.inset=2;ga.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,
+"size",this.size)),l=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.begin();b.moveTo(c/2,g+l);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-g)/2-l,g/2);b.quadTo((c-g)/2-l,g+l,c/2,g+l);b.quadTo((c+g)/2+l,g+l,(c+g)/2+l,g/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",ga);mxUtils.extend(ha,mxShape);ha.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);
+b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",ha);mxUtils.extend(oa,mxShape);oa.prototype.inset=2;oa.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.ellipse(0,g,c-2*g,e-2*g);b.fillAndStroke();b.begin();b.moveTo(c/2,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",oa);mxUtils.extend(X,mxCylinder);X.prototype.jettyWidth=
+20;X.prototype.jettyHeight=10;X.prototype.redrawPath=function(b,d,f,c,e,g){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=l/2;var l=f+l/2,z=Math.min(d,e-d),k=Math.min(z+2*d,e-d);g?(b.moveTo(f,z),b.lineTo(l,z),b.lineTo(l,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,
+k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("module",X);mxUtils.extend(ca,mxCylinder);ca.prototype.jettyWidth=32;ca.prototype.jettyHeight=12;ca.prototype.redrawPath=function(b,d,f,c,e,g){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=l/2;var l=f+l/2,z=.3*e-d/2,k=.7*e-d/2;g?(b.moveTo(f,z),b.lineTo(l,z),b.lineTo(l,
+z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("component",ca);mxUtils.extend(pa,mxRectangleShape);pa.prototype.paintForeground=function(b,d,f,c,e){var g=c/2,l=e/2,z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;b.begin();this.addPoints(b,[new mxPoint(d+g,f),new mxPoint(d+c,f+l),new mxPoint(d+g,f+e),new mxPoint(d,f+l)],this.isRounded,z,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",pa);mxUtils.extend(V,mxDoubleEllipse);V.prototype.outerStroke=!0;V.prototype.paintVertexShape=function(b,d,f,c,e){var g=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(d+g,f+g,c-2*g,e-2*g),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&
+(b.ellipse(d,f,c,e),b.stroke())};mxCellRenderer.registerShape("endState",V);mxUtils.extend(Q,V);Q.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Q);mxUtils.extend(ta,mxArrowConnector);ta.prototype.defaultWidth=4;ta.prototype.isOpenEnded=function(){return!0};ta.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ta.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
+ta);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=10;Y.prototype.defaultArrowWidth=20;Y.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Y.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
+Y);mxUtils.extend(fa,mxActor);fa.prototype.size=30;fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("manualInput",fa);mxUtils.extend(ia,mxRectangleShape);ia.prototype.dx=
+20;ia.prototype.dy=20;ia.prototype.isHtmlAllowed=function(){return!1};ia.prototype.paintForeground=function(b,d,f,c,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(c*l,e*l));l=Math.max(g,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
+b.begin();b.moveTo(d,f+g);b.lineTo(d+c,f+g);b.end();b.stroke();b.begin();b.moveTo(d+l,f);b.lineTo(d+l,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",ia);mxUtils.extend(ra,mxActor);ra.prototype.dx=20;ra.prototype.dy=20;ra.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));
+var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(d,f),new mxPoint(d,e),new mxPoint(0,e)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("corner",ra);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.lineTo(0,e);b.end();b.moveTo(c,0);b.lineTo(c,e);b.end();b.moveTo(0,e/2);b.lineTo(c,e/2);b.end()};mxCellRenderer.registerShape("crossbar",
+U);mxUtils.extend(ja,mxActor);ja.prototype.dx=20;ja.prototype.dy=20;ja.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint((c+
+d)/2,f),new mxPoint((c+d)/2,e),new mxPoint((c-d)/2,e),new mxPoint((c-d)/2,f),new mxPoint(0,f)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("tee",ja);mxUtils.extend(ba,mxActor);ba.prototype.arrowWidth=.3;ba.prototype.arrowSize=.2;ba.prototype.redrawPath=function(b,d,f,c,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));f=(e-g)/2;var g=
+f+g,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,f),new mxPoint(c-d,f),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,g),new mxPoint(0,g)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("singleArrow",ba);mxUtils.extend(ma,mxActor);ma.prototype.redrawPath=function(b,d,f,c,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ba.prototype.arrowWidth))));d=c*Math.max(0,
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ba.prototype.arrowSize))));f=(e-g)/2;var g=f+g,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e/2),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(c-d,f),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,g),new mxPoint(d,g),new mxPoint(d,e)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",ma);mxUtils.extend(da,mxActor);da.prototype.size=
+.1;da.prototype.fixedSize=20;da.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(d,0);b.lineTo(c,0);b.quadTo(c-2*d,e/2,c,e);b.lineTo(d,e);b.quadTo(d-2*d,e/2,d,0);b.close();b.end()};mxCellRenderer.registerShape("dataStorage",da);mxUtils.extend(qa,mxActor);qa.prototype.redrawPath=
+function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.registerShape("or",qa);mxUtils.extend(ya,mxActor);ya.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.registerShape("xor",ya);mxUtils.extend(ua,mxActor);ua.prototype.size=20;ua.prototype.isRoundable=function(){return!0};ua.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("loopLimit",ua);mxUtils.extend(sa,mxActor);sa.prototype.size=.375;sa.prototype.isRoundable=function(){return!0};sa.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-d),new mxPoint(c/2,e),new mxPoint(0,e-d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("offPageConnector",sa);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/2,f+e);b.lineTo(d+c,f+e);b.end();b.stroke()};
+mxCellRenderer.registerShape("tapeData",za);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke();b.begin();b.moveTo(d+c/2,f);b.lineTo(d+c/2,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("orEllipse",va);mxUtils.extend(T,mxEllipse);T.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);b.setShadow(!1);b.begin();b.moveTo(d+.145*c,f+.145*e);b.lineTo(d+.855*c,f+.855*e);b.end();b.stroke();b.begin();b.moveTo(d+.855*c,f+.145*e);b.lineTo(d+.145*c,f+.855*e);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",T);mxUtils.extend(Aa,mxRhombus);Aa.prototype.paintVertexShape=function(b,d,f,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",
+Aa);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(b,d,f,c,e){b.begin();b.moveTo(d,f);b.lineTo(d+c,f);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke();b.begin();b.moveTo(d,f+e);b.lineTo(d+c,f+e);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",ka);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(b,d,f,c,e){var g=f+e-5;b.begin();b.moveTo(d,f);b.lineTo(d,f+e);b.moveTo(d,g);b.lineTo(d+10,g-5);b.moveTo(d,g);b.lineTo(d+10,
+g+5);b.moveTo(d,g);b.lineTo(d+c,g);b.moveTo(d+c,f);b.lineTo(d+c,f+e);b.moveTo(d+c,g);b.lineTo(d+c-10,g-5);b.moveTo(d+c,g);b.lineTo(d+c-10,g+5);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(b,d,f,c,e){this.outline||b.setStrokeColor(null);if(null!=this.style){var g=b.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=
+!1);b.rect(d,f,c,e);b.fill();b.pointerEvents=g;b.setStrokeColor(this.stroke);b.begin();b.moveTo(d,f);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?b.lineTo(d+c,f):b.moveTo(d+c,f);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?b.lineTo(d+c,f+e):b.moveTo(d+c,f+e);this.outline||"1"==mxUtils.getValue(this.style,"bottom","1")?b.lineTo(d,f+e):b.moveTo(d,f+e);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&b.lineTo(d,f);b.end();b.stroke()}};mxCellRenderer.registerShape("partialRectangle",
+wa);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(d+c/2,f),b.lineTo(d+c/2,f+e)):(b.moveTo(d,f+e/2),b.lineTo(d+c,f+e/2));b.end();b.stroke()};mxCellRenderer.registerShape("lineEllipse",Ca);mxUtils.extend(Da,mxActor);Da.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);b.moveTo(0,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);
+b.quadTo(c,e,c-d,e);b.lineTo(0,e);b.close();b.end()};mxCellRenderer.registerShape("delay",Da);mxUtils.extend(xa,mxActor);xa.prototype.size=.2;xa.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,c);var g=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(e-g)/2;f=d+g;var l=(c-g)/2,g=l+g;b.moveTo(0,d);b.lineTo(l,d);b.lineTo(l,0);b.lineTo(g,0);b.lineTo(g,d);b.lineTo(c,d);b.lineTo(c,f);b.lineTo(g,f);b.lineTo(g,e);b.lineTo(l,e);b.lineTo(l,f);b.lineTo(0,f);b.close();
+b.end()};mxCellRenderer.registerShape("cross",xa);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.25;Ea.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);f=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);b.moveTo(0,e/2);b.lineTo(f,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c-d,e);b.lineTo(f,e);b.close();b.end()};mxCellRenderer.registerShape("display",Ea);mxUtils.extend(Z,mxActor);Z.prototype.cst={RECT2:"mxgraph.basic.rect"};Z.prototype.customProperties=
[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",
dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",
defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",
type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},
-{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Z.prototype.paintVertexShape=function(b,d,g,c,e){b.translate(d,g);this.strictDrawShape(b,0,0,c,e)};Z.prototype.strictDrawShape=function(b,d,g,c,e,f){var l=f&&f.rectStyle?f.rectStyle:
-mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=f&&f.absoluteCornerSize?f.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=f&&f.size?f.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),q=f&&f.rectOutline?f.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),p=f&&f.indent?f.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=f&&f.dashed?f.dashed:
-mxUtils.getValue(this.style,"dashed",!1),G=f&&f.dashPattern?f.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),u=f&&f.relIndent?f.relIndent:Math.max(0,Math.min(50,p)),y=f&&f.top?f.top:mxUtils.getValue(this.style,"top",!0),n=f&&f.right?f.right:mxUtils.getValue(this.style,"right",!0),D=f&&f.bottom?f.bottom:mxUtils.getValue(this.style,"bottom",!0),v=f&&f.left?f.left:mxUtils.getValue(this.style,"left",!0),x=f&&f.topLeftStyle?f.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),
-J=f&&f.topRightStyle?f.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),t=f&&f.bottomRightStyle?f.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),A=f&&f.bottomLeftStyle?f.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),B=f&&f.fillColor?f.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");f&&f.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var W=f&&f.strokeWidth?f.strokeWidth:mxUtils.getValue(this.style,
-"strokeWidth","1"),C=f&&f.fillColor2?f.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),O=f&&f.gradientColor2?f.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),sa=f&&f.gradientDirection2?f.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),M=f&&f.opacity?f.opacity:mxUtils.getValue(this.style,"opacity","100"),Fa=Math.max(0,Math.min(50,m));f=Z.prototype;b.setDashed(z);G&&""!=G&&b.setDashPattern(G);b.setStrokeWidth(W);m=Math.min(.5*e,.5*c,m);k||
-(m=Fa*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(p=Math.min(u*Math.min(c,e)/100));p=Math.min(p,.5*Math.min(c,e)-m);(y||n||D||v)&&"frame"!=q&&(b.begin(),y?f.moveNW(b,d,g,c,e,l,x,m,v):b.moveTo(0,0),y&&f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),n&&f.paintNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),D&&f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),v&&f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(C),
-z=k=M,"none"==C&&(k=0),"none"==O&&(z=0),b.setGradient(C,O,0,0,c,e,sa,k,z),b.begin(),y?f.moveNWInner(b,d,g,c,e,l,x,m,p,y,v):b.moveTo(p,0),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),v&&D&&f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),D&&n&&f.paintSEInner(b,d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),n&&y&&f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),y&&v&&f.paintNWInner(b,d,g,c,e,l,x,m,p),b.fill(),"none"==B&&(b.begin(),f.paintFolds(b,
-d,g,c,e,l,x,J,t,A,m,y,n,D,v),b.stroke()));y||n||D||!v?y||n||!D||v?!y&&!n&&D&&v?"frame"!=q?(b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),"double"==q&&(f.moveNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D)),b.stroke()):(b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,
-D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.lineNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),b.close(),b.fillAndStroke()):y||!n||D||v?!y&&n&&!D&&v?"frame"!=q?(b.begin(),f.moveSW(b,d,g,c,e,l,x,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),"double"==q&&(f.moveNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v)),b.stroke(),b.begin(),f.moveNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),"double"==
-q&&(f.moveSEInner(b,d,g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n)),b.stroke()):(b.begin(),f.moveSW(b,d,g,c,e,l,x,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.lineNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),b.close(),b.fillAndStroke(),b.begin(),f.moveNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.lineSEInner(b,d,g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),b.close(),b.fillAndStroke()):!y&&n&&D&&!v?"frame"!=q?(b.begin(),f.moveNE(b,d,g,c,e,l,J,
-m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),"double"==q&&(f.moveSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n)),b.stroke()):(b.begin(),f.moveNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.lineSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,
-d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),b.close(),b.fillAndStroke()):!y&&n&&D&&v?"frame"!=q?(b.begin(),f.moveNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),"double"==q&&(f.moveNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,d,g,c,e,l,t,
-m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n)),b.stroke()):(b.begin(),f.moveNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.lineNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),b.close(),b.fillAndStroke()):
-!y||n||D||v?y&&!n&&!D&&v?"frame"!=q?(b.begin(),f.moveSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),"double"==q&&(f.moveNEInner(b,d,g,c,e,l,J,m,p,n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v)),b.stroke()):(b.begin(),f.moveSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.lineNEInner(b,d,g,c,e,l,J,m,p,
-n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),b.close(),b.fillAndStroke()):y&&!n&&D&&!v?"frame"!=q?(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),"double"==q&&(f.moveNEInner(b,d,g,c,e,l,J,m,p,n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y)),b.stroke(),b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),"double"==q&&(f.moveSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D)),
-b.stroke()):(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.lineNEInner(b,d,g,c,e,l,J,m,p,n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),b.close(),b.fillAndStroke(),b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.lineSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),b.close(),b.fillAndStroke()):y&&!n&&D&&v?"frame"!=q?(b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,
-c,e,l,x,m,y),f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),"double"==q&&(f.moveNEInner(b,d,g,c,e,l,J,m,p,n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D)),b.stroke()):(b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,
-g,c,e,l,J,m,n),f.lineNEInner(b,d,g,c,e,l,J,m,p,n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),b.close(),b.fillAndStroke()):y&&n&&!D&&!v?"frame"!=q?(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),"double"==q&&(f.moveSEInner(b,d,g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,
-l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y)),b.stroke()):(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.lineSEInner(b,d,g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),b.close(),b.fillAndStroke()):y&&n&&!D&&v?"frame"!=q?(b.begin(),f.moveSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.paintNW(b,
-d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),"double"==q&&(f.moveSEInner(b,d,g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v)),b.stroke()):(b.begin(),f.moveSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,
-g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.lineSEInner(b,d,g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),b.close(),b.fillAndStroke()):y&&n&&D&&!v?"frame"!=q?(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,
-c,e,l,A,m,v),"double"==q&&(f.moveSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y)),b.stroke()):(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.lineSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,
-d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),b.close(),b.fillAndStroke()):y&&n&&D&&v&&("frame"!=q?(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),
-b.close(),"double"==q&&(f.moveSWInner(b,d,g,c,e,l,A,m,p,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),b.close()),b.stroke()):(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.paintNE(b,d,g,c,e,l,
-J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.paintSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),f.paintSW(b,d,g,c,e,l,A,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),b.close(),f.moveSWInner(b,d,g,c,e,l,A,m,p,v),f.paintSWInner(b,d,g,c,e,l,A,m,p,D),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),f.paintSEInner(b,d,g,c,e,l,t,m,p),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),f.paintNEInner(b,d,g,c,e,l,J,m,p),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),f.paintNWInner(b,d,g,c,e,l,x,m,p),f.paintLeftInner(b,d,g,c,e,l,A,m,p,
-D,v),b.close(),b.fillAndStroke())):"frame"!=q?(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),"double"==q&&(f.moveNEInner(b,d,g,c,e,l,J,m,p,n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y)),b.stroke()):(b.begin(),f.moveNW(b,d,g,c,e,l,x,m,v),f.paintTop(b,d,g,c,e,l,J,m,n),f.lineNEInner(b,d,g,c,e,l,J,m,p,n),f.paintTopInner(b,d,g,c,e,l,x,m,p,v,y),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),f.moveNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),"double"==q&&(f.moveSEInner(b,d,
-g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n)),b.stroke()):(b.begin(),f.moveNE(b,d,g,c,e,l,J,m,y),f.paintRight(b,d,g,c,e,l,t,m,D),f.lineSEInner(b,d,g,c,e,l,t,m,p,D),f.paintRightInner(b,d,g,c,e,l,J,m,p,y,n),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,m,v),"double"==q&&(f.moveSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D)),b.stroke()):(b.begin(),f.moveSE(b,d,g,c,e,l,t,m,n),f.paintBottom(b,d,g,c,e,l,A,
-m,v),f.lineSWInner(b,d,g,c,e,l,A,m,p,v),f.paintBottomInner(b,d,g,c,e,l,t,m,p,n,D),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),f.moveSW(b,d,g,c,e,l,x,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),"double"==q&&(f.moveNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v)),b.stroke()):(b.begin(),f.moveSW(b,d,g,c,e,l,x,m,D),f.paintLeft(b,d,g,c,e,l,x,m,y),f.lineNWInner(b,d,g,c,e,l,x,m,p,y,v),f.paintLeftInner(b,d,g,c,e,l,A,m,p,D,v),b.close(),b.fillAndStroke());b.begin();f.paintFolds(b,d,g,
-c,e,l,x,J,t,A,m,y,n,D,v);b.stroke()};Z.prototype.moveNW=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==f||!k?b.moveTo(0,0):b.moveTo(0,m)};Z.prototype.moveNE=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==f||!k?b.moveTo(c,0):b.moveTo(c-m,0)};Z.prototype.moveSE=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==f||!k?b.moveTo(c,e):b.moveTo(c,e-m)};Z.prototype.moveSW=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==f||!k?b.moveTo(0,e):
-b.moveTo(m,e)};Z.prototype.paintNW=function(b,d,g,c,e,f,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==f||"invRound"==l||"default"==l&&"invRound"==f){d=0;if("rounded"==l||"default"==l&&"rounded"==f)d=1;b.arcTo(m,m,0,0,d,m,0)}else("snip"==l||"default"==l&&"snip"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(m,0);else b.lineTo(0,0)};Z.prototype.paintTop=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==f||!k?b.lineTo(c,0):b.lineTo(c-m,0)};Z.prototype.paintNE=function(b,d,g,
-c,e,f,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==f||"invRound"==l||"default"==l&&"invRound"==f){d=0;if("rounded"==l||"default"==l&&"rounded"==f)d=1;b.arcTo(m,m,0,0,d,c,m)}else("snip"==l||"default"==l&&"snip"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(c,m);else b.lineTo(c,0)};Z.prototype.paintRight=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==f||!k?b.lineTo(c,e):b.lineTo(c,e-m)};Z.prototype.paintLeft=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==
-f||!k?b.lineTo(0,0):b.lineTo(0,m)};Z.prototype.paintSE=function(b,d,g,c,e,f,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==f||"invRound"==l||"default"==l&&"invRound"==f){d=0;if("rounded"==l||"default"==l&&"rounded"==f)d=1;b.arcTo(m,m,0,0,d,c-m,e)}else("snip"==l||"default"==l&&"snip"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(c-m,e);else b.lineTo(c,e)};Z.prototype.paintBottom=function(b,d,g,c,e,f,l,m,k){"square"==l||"default"==l&&"square"==f||!k?b.lineTo(0,e):b.lineTo(m,e)};Z.prototype.paintSW=
-function(b,d,g,c,e,f,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==f||"invRound"==l||"default"==l&&"invRound"==f){d=0;if("rounded"==l||"default"==l&&"rounded"==f)d=1;b.arcTo(m,m,0,0,d,0,e-m)}else("snip"==l||"default"==l&&"snip"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(0,e-m);else b.lineTo(0,e)};Z.prototype.paintNWInner=function(b,d,g,c,e,f,l,m,k){if("rounded"==l||"default"==l&&"rounded"==f)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==l||"default"==l&&"invRound"==f)b.arcTo(m+
-k,m+k,0,0,1,k,k+m);else if("snip"==l||"default"==l&&"snip"==f)b.lineTo(k,.5*k+m);else if("fold"==l||"default"==l&&"fold"==f)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};Z.prototype.paintTopInner=function(b,d,g,c,e,f,l,m,k,p,q){p||q?!p&&q?b.lineTo(0,k):p&&!q?b.lineTo(k,0):p?"square"==l||"default"==l&&"square"==f?b.lineTo(k,k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(m+.5*k,k):b.lineTo(m+k,k):b.lineTo(0,k):b.lineTo(0,0)};Z.prototype.paintNEInner=function(b,d,g,c,e,
-f,l,m,k){if("rounded"==l||"default"==l&&"rounded"==f)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-m-.5*k,k);else if("invRound"==l||"default"==l&&"invRound"==f)b.arcTo(m+k,m+k,0,0,1,c-m-k,k);else if("snip"==l||"default"==l&&"snip"==f)b.lineTo(c-m-.5*k,k);else if("fold"==l||"default"==l&&"fold"==f)b.lineTo(c-m-k,m+k),b.lineTo(c-m-k,k)};Z.prototype.paintRightInner=function(b,d,g,c,e,f,l,m,k,p,q){p||q?!p&&q?b.lineTo(c-k,0):p&&!q?b.lineTo(c,k):p?"square"==l||"default"==l&&"square"==f?b.lineTo(c-k,k):"rounded"==l||"default"==
-l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};Z.prototype.paintLeftInner=function(b,d,g,c,e,f,l,m,k,p,q){p||q?!p&&q?b.lineTo(k,e):p&&!q?b.lineTo(0,e-k):p?"square"==l||"default"==l&&"square"==f?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,e)};Z.prototype.paintSEInner=function(b,d,g,c,e,f,l,m,k){if("rounded"==l||"default"==
-l&&"rounded"==f)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-k,e-m-.5*k);else if("invRound"==l||"default"==l&&"invRound"==f)b.arcTo(m+k,m+k,0,0,1,c-k,e-m-k);else if("snip"==l||"default"==l&&"snip"==f)b.lineTo(c-k,e-m-.5*k);else if("fold"==l||"default"==l&&"fold"==f)b.lineTo(c-m-k,e-m-k),b.lineTo(c-k,e-m-k)};Z.prototype.paintBottomInner=function(b,d,g,c,e,f,l,m,k,p,q){p||q?!p&&q?b.lineTo(c,e-k):p&&!q?b.lineTo(c-k,e):"square"==l||"default"==l&&"square"==f||!p?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==
-f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};Z.prototype.paintSWInner=function(b,d,g,c,e,f,l,m,k,p){if(!p)b.lineTo(k,e);else if("square"==l||"default"==l&&"square"==f)b.lineTo(k,e-k);else if("rounded"==l||"default"==l&&"rounded"==f)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==l||"default"==l&&"invRound"==f)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==l||"default"==l&&"snip"==f)b.lineTo(m+.5*k,e-k);else if("fold"==l||"default"==l&&
-"fold"==f)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};Z.prototype.moveSWInner=function(b,d,g,c,e,f,l,m,k,p){p?"square"==l||"default"==l&&"square"==f?b.moveTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.moveTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.moveTo(k,e-m-k):b.moveTo(0,e-k)};Z.prototype.lineSWInner=function(b,d,g,c,e,f,l,m,k,p){p?"square"==l||"default"==l&&"square"==f?b.lineTo(k,e-k):"rounded"==l||"default"==
-l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};Z.prototype.moveSEInner=function(b,d,g,c,e,f,l,m,k,p){p?"square"==l||"default"==l&&"square"==f?b.moveTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.moveTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.moveTo(c-k,e-m-
-k):b.moveTo(c-k,e)};Z.prototype.lineSEInner=function(b,d,g,c,e,f,l,m,k,p){p?"square"==l||"default"==l&&"square"==f?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(c-k,e-m-k):b.lineTo(c-k,e)};Z.prototype.moveNEInner=function(b,d,g,c,e,f,l,m,k,p){p?"square"==l||"default"==l&&"square"==f||p?b.moveTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==
-f||"snip"==l||"default"==l&&"snip"==f?b.moveTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};Z.prototype.lineNEInner=function(b,d,g,c,e,f,l,m,k,p){p?"square"==l||"default"==l&&"square"==f||p?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(c-k,m+k):b.lineTo(c,k)};
-Z.prototype.moveNWInner=function(b,d,g,c,e,f,l,m,k,p,q){p||q?!p&&q?b.moveTo(k,0):p&&!q?b.moveTo(0,k):"square"==l||"default"==l&&"square"==f?b.moveTo(k,k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.moveTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.moveTo(k,m+k):b.moveTo(0,0)};Z.prototype.lineNWInner=function(b,d,g,c,e,f,l,m,k,p,q){p||q?!p&&q?b.lineTo(k,0):p&&!q?b.lineTo(0,k):"square"==l||"default"==l&&"square"==
-f?b.lineTo(k,k):"rounded"==l||"default"==l&&"rounded"==f||"snip"==l||"default"==l&&"snip"==f?b.lineTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==f||"fold"==l||"default"==l&&"fold"==f)&&b.lineTo(k,m+k):b.lineTo(0,0)};Z.prototype.paintFolds=function(b,d,g,c,e,f,l,m,k,p,q,G,u,y,v){if("fold"==f||"fold"==l||"fold"==m||"fold"==k||"fold"==p)("fold"==l||"default"==l&&"fold"==f)&&G&&v&&(b.moveTo(0,q),b.lineTo(q,q),b.lineTo(q,0)),("fold"==m||"default"==m&&"fold"==f)&&G&&u&&(b.moveTo(c-q,0),b.lineTo(c-
-q,q),b.lineTo(c,q)),("fold"==k||"default"==k&&"fold"==f)&&y&&u&&(b.moveTo(c-q,e),b.lineTo(c-q,e-q),b.lineTo(c,e-q)),("fold"==p||"default"==p&&"fold"==f)&&y&&v&&(b.moveTo(0,e-q),b.lineTo(q,e-q),b.lineTo(q,e))};mxCellRenderer.registerShape(Z.prototype.cst.RECT2,Z);Z.prototype.constraints=null;mxUtils.extend(Ia,mxConnector);Ia.prototype.origPaintEdgeShape=Ia.prototype.paintEdgeShape;Ia.prototype.paintEdgeShape=function(b,d,g){for(var c=[],e=0;e<d.length;e++)c.push(mxUtils.clone(d[e]));var e=b.state.dashed,
-f=b.state.fixDash;Ia.prototype.origPaintEdgeShape.apply(this,[b,c,g]);3<=b.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(b.setStrokeColor(c),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(e,f),Ia.prototype.origPaintEdgeShape.apply(this,[b,d,g])))};mxCellRenderer.registerShape("filledEdge",Ia);"undefined"!==typeof StyleFormatPanel&&function(){var b=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),
-g=b.apply(this,arguments);"umlFrame"==d.style.shape&&g.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return g}}();mxMarker.addMarker("dash",function(b,d,g,c,e,f,l,m,k,p){var q=e*(l+k+1),G=f*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-G/2,c.y-G/2+q/2);b.lineTo(c.x+G/2-3*q/2,c.y-3*G/2-q/2);b.stroke()}});mxMarker.addMarker("box",function(b,d,g,c,e,f,l,m,k,p){var q=e*(l+k+1),G=f*(l+k+1),u=c.x+q/2,y=c.y+G/2;c.x-=q;c.y-=G;return function(){b.begin();
-b.moveTo(u-q/2-G/2,y-G/2+q/2);b.lineTo(u-q/2+G/2,y-G/2-q/2);b.lineTo(u+G/2-3*q/2,y-3*G/2-q/2);b.lineTo(u-G/2-3*q/2,y-3*G/2+q/2);b.close();p?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,g,c,e,f,l,m,k,p){var q=e*(l+k+1),G=f*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-G/2,c.y-G/2+q/2);b.lineTo(c.x+G/2-3*q/2,c.y-3*G/2-q/2);b.moveTo(c.x-q/2+G/2,c.y-G/2-q/2);b.lineTo(c.x-G/2-3*q/2,c.y-3*G/2+q/2);b.stroke()}});mxMarker.addMarker("circle",Va);mxMarker.addMarker("circlePlus",
-function(b,d,g,c,e,f,l,m,k,p){var q=c.clone(),G=Va.apply(this,arguments),u=e*(l+2*k),y=f*(l+2*k);return function(){G.apply(this,arguments);b.begin();b.moveTo(q.x-e*k,q.y-f*k);b.lineTo(q.x-2*u+e*k,q.y-2*y+f*k);b.moveTo(q.x-u-y+f*k,q.y-y+u-e*k);b.lineTo(q.x+y-u-f*k,q.y-y-u+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,g,c,e,f,l,m,k,p){var q=e*(l+k+1),G=f*(l+k+1),u=c.clone();c.x-=q;c.y-=G;return function(){b.begin();b.moveTo(u.x-G,u.y+q);b.quadTo(c.x-G,c.y+q,c.x,c.y);b.quadTo(c.x+G,
-c.y-q,u.x+G,u.y-q);b.stroke()}});mxMarker.addMarker("async",function(b,d,g,c,e,f,l,m,k,p){d=e*k*1.118;g=f*k*1.118;e*=l+k;f*=l+k;var q=c.clone();q.x-=d;q.y-=g;c.x+=1*-e-d;c.y+=1*-f-g;return function(){b.begin();b.moveTo(q.x,q.y);m?b.lineTo(q.x-e-f/2,q.y-f+e/2):b.lineTo(q.x+f/2-e,q.y-f-e/2);b.lineTo(q.x-e,q.y-f);b.close();p?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",function(b){b=null!=b?b:2;return function(d,g,c,e,f,l,m,k,q,p){f*=m+q;l*=m+q;var G=e.clone();return function(){d.begin();
-d.moveTo(G.x,G.y);k?d.lineTo(G.x-f-l/b,G.y-l+f/b):d.lineTo(G.x+l/b-f,G.y-l-f/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Za=function(b,d,g){return La(b,["width"],d,function(d,c,e,f,l){l=b.shape.getEdgeWidth()*b.view.scale+g;return new mxPoint(f.x+c*d/4+e*l/2,f.y+e*d/4-c*l/2)},function(d,c,e,f,l,m){d=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,l.x,l.y,m.x,m.y));b.style.width=Math.round(2*d)/b.view.scale-g})},La=function(b,d,g,c,e){return ea(b,d,function(d){var e=b.absolutePoints,f=
-e.length-1;d=b.view.translate;var l=b.view.scale,m=g?e[0]:e[f],e=g?e[1]:e[f-1],f=e.x-m.x,k=e.y-m.y,q=Math.sqrt(f*f+k*k),m=c.call(this,q,f/q,k/q,m,e);return new mxPoint(m.x/l-d.x,m.y/l-d.y)},function(d,c,f){var l=b.absolutePoints,m=l.length-1;d=b.view.translate;var k=b.view.scale,q=g?l[0]:l[m],l=g?l[1]:l[m-1],m=l.x-q.x,p=l.y-q.y,G=Math.sqrt(m*m+p*p);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,G,m/G,p/G,q,l,c,f)})},Ha=function(b){return function(d){return[ea(d,["arrowWidth","arrowSize"],function(d){var g=
-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ba.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ba.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-g)*d.height/2)},function(d,g){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-g.y)/d.height*2));this.state.style.arrowSize=Math.max(0,Math.min(b,(d.x+d.width-g.x)/d.width))})]}},Wa=function(b){return function(d){return[ea(d,["size"],function(d){var g=
-Math.max(0,Math.min(.5*d.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(d.x,d.y+g)},function(b,d){this.state.style.size=Math.max(0,d.y-b.y)},!0)]}},Ta=function(b,d,g){return function(c){var e=[ea(c,["size"],function(g){var c=Math.max(0,Math.min(g.width,Math.min(g.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*b;return new mxPoint(g.x+c,g.y+c)},function(d,g){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,g.x-d.x),Math.min(d.height,
-g.y-d.y)))/b)},!1)];g&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Ga(c));return e}},Ma=function(b,d,g,c,e){g=null!=g?g:.5;return function(f){var l=[ea(f,["size"],function(d){var g=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",g?e:b));return new mxPoint(d.x+Math.max(0,Math.min(.5*d.width,c*(g?1:d.width))),d.getCenterY())},function(b,d,c){b=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?
-d.x-b.x:Math.max(0,Math.min(g,(d.x-b.x)/b.width));this.state.style.size=b},!1,c)];d&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(Ga(f));return l}},Xa=function(b,d,g){b=null!=b?b:.5;return function(c){var e=[ea(c,["size"],function(c){var e=null!=g?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,f=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",e?g:d)));return new mxPoint(c.x+Math.min(.75*c.width*b,f*(e?.75:.75*c.width)),c.y+c.height/4)},function(d,c){var e=
-null!=g&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-d.x:Math.max(0,Math.min(b,(c.x-d.x)/d.width*.75));this.state.style.size=e},!1,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Ga(c));return e}},Ka=function(){return function(b){var d=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ga(b));return d}},Ga=function(b,d){return ea(b,[mxConstants.STYLE_ARCSIZE],function(g){var c=null!=d?d:g.height/8;if("1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
-0)){var e=mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(g.x+g.width-Math.min(g.width/2,e),g.y+c)}e=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(g.x+g.width-Math.min(Math.max(g.width/2,g.height/2),Math.min(g.width,g.height)*e),g.y+c)},function(d,g,c){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-g.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-g.x+d.x)/Math.min(d.width,d.height))))})},ea=function(b,d,g,c,e,f,l){var m=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);m.execute=function(b){for(var g=0;g<d.length;g++)this.copyStyle(d[g]);l&&l(b)};m.getPosition=g;m.setPosition=c;m.ignoreGrid=null!=e?e:!0;if(f){var k=m.positionChanged;m.positionChanged=function(){k.apply(this,
-arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return m},Na={link:function(b){return[Za(b,!0,10),Za(b,!1,10)]},flexArrow:function(b){var d=b.view.graph.gridSize/b.view.scale,g=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(g.push(La(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,g,c,e,f){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,
-mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+g*(f+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(f+b.shape.strokewidth*b.view.scale)-g*d/2)},function(g,c,e,f,l,m,k){g=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,l.x,l.y,m.x,m.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-c,m.x,m.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*g)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=
-b.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),g.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,g,c,e,f){d=(b.shape.getStartArrowWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*b.view.scale;return new mxPoint(e.x+g*(f+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(f+b.shape.strokewidth*b.view.scale)-g*d/2)},function(g,c,e,f,l,m,k){g=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,l.x,l.y,m.x,m.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-c,m.x,m.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.startWidth=Math.max(0,Math.round(2*g)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=
-b.style[mxConstants.STYLE_STARTSIZE],b.style.endWidth=b.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(b.style.startWidth)-parseFloat(b.style.endWidth))<d&&(b.style.startWidth=b.style.endWidth))})));mxUtils.getValue(b.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(g.push(La(b,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,g,c,e,f){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+g*(f+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(f+b.shape.strokewidth*b.view.scale)+g*d/2)},function(g,c,e,f,l,m,k){g=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,l.x,l.y,m.x,m.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=
-Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*g)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),g.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!1,function(d,g,c,e,f){d=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+g*(f+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(f+b.shape.strokewidth*b.view.scale)+g*d/2)},function(g,c,e,f,l,m,k){g=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,l.x,l.y,m.x,m.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-b.shape.strokewidth)/
-3)/100/b.view.scale;b.style.endWidth=Math.max(0,Math.round(2*g)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE],b.style.startWidth=b.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-
-parseFloat(b.style.startWidth))<d&&(b.style.endWidth=b.style.startWidth))})));return g},swimlane:function(b){var d=[];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var g=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(Ga(b,g/2))}d.push(ea(b,[mxConstants.STYLE_STARTSIZE],function(d){var g=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,
-1)?new mxPoint(d.getCenterX(),d.y+Math.max(0,Math.min(d.height,g))):new mxPoint(d.x+Math.max(0,Math.min(d.width,g)),d.getCenterY())},function(d,g){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,g.y-d.y))):Math.round(Math.max(0,Math.min(d.width,g.x-d.x)))},!1,null,function(d){if(mxEvent.isControlDown(d.getEvent())&&(d=b.view.graph,d.isTableRow(b.cell)||d.isTableCell(b.cell))){for(var g=d.getSwimlaneDirection(b.style),
-c=d.model.getParent(b.cell),c=d.model.getChildCells(c,!0),e=[],f=0;f<c.length;f++)c[f]!=b.cell&&d.isSwimlane(c[f])&&d.getSwimlaneDirection(d.getCurrentCellStyle(c[f]))==g&&e.push(c[f]);d.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],e)}}));return d},label:Ka(),ext:Ka(),rectangle:Ka(),triangle:Ka(),rhombus:Ka(),umlLifeline:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));
-return new mxPoint(b.getCenterX(),b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},umlFrame:function(b){return[ea(b,["width","height"],function(b){var d=Math.max(aa.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),g=Math.max(1.5*aa.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(b.x+d,b.y+g)},function(b,d){this.state.style.width=
-Math.round(Math.max(aa.prototype.corner,Math.min(b.width,d.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(b.height,d.y-b.y)))},!1)]},process:function(b){var d=[ea(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),g=parseFloat(mxUtils.getValue(this.state.style,"size",H.prototype.size));return d?new mxPoint(b.x+g,b.y+b.height/4):new mxPoint(b.x+b.width*g,b.y+b.height/4)},function(b,d){var g="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(.5*b.width,d.x-b.x)):Math.max(0,Math.min(.5,(d.x-b.x)/b.width));this.state.style.size=g},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ga(b));return d},cross:function(b){return[ea(b,["size"],function(b){var d=Math.min(b.width,b.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",xa.prototype.size)))*d/2;return new mxPoint(b.getCenterX()-d,b.getCenterY()-d)},function(b,d){var g=Math.min(b.width,b.height);this.state.style.size=
-Math.max(0,Math.min(1,Math.min(Math.max(0,b.getCenterY()-d.y)/g*2,Math.max(0,b.getCenterX()-d.x)/g*2)))})]},note:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size)))));return new mxPoint(b.x+b.width-d,b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},note2:function(b){return[ea(b,["size"],function(b){var g=
-Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(b.x+b.width-g,b.y+g)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},manualInput:function(b){var d=[ea(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*d/4)},function(b,
-d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(d.y-b.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ga(b));return d},dataStorage:function(b){return[ea(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),g=parseFloat(mxUtils.getValue(this.state.style,"size",d?da.prototype.fixedSize:da.prototype.size));return new mxPoint(b.x+b.width-g*(d?1:b.width),b.getCenterY())},function(b,d){var g="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(b.width,b.x+b.width-d.x)):Math.max(0,Math.min(1,(b.x+b.width-d.x)/b.width));this.state.style.size=g},!1)]},callout:function(b){var d=[ea(b,["size","position"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",C.prototype.size))),g=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position)));mxUtils.getValue(this.state.style,"base",C.prototype.base);return new mxPoint(b.x+g*b.width,b.y+b.height-
+{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Z.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);this.strictDrawShape(b,0,0,c,e)};Z.prototype.strictDrawShape=function(b,d,f,c,e,g){var l=g&&g.rectStyle?g.rectStyle:
+mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=g&&g.absoluteCornerSize?g.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=g&&g.size?g.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),q=g&&g.rectOutline?g.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),n=g&&g.indent?g.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=g&&g.dashed?g.dashed:
+mxUtils.getValue(this.style,"dashed",!1),F=g&&g.dashPattern?g.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),u=g&&g.relIndent?g.relIndent:Math.max(0,Math.min(50,n)),p=g&&g.top?g.top:mxUtils.getValue(this.style,"top",!0),v=g&&g.right?g.right:mxUtils.getValue(this.style,"right",!0),A=g&&g.bottom?g.bottom:mxUtils.getValue(this.style,"bottom",!0),B=g&&g.left?g.left:mxUtils.getValue(this.style,"left",!0),x=g&&g.topLeftStyle?g.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),
+I=g&&g.topRightStyle?g.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),t=g&&g.bottomRightStyle?g.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),y=g&&g.bottomLeftStyle?g.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),D=g&&g.fillColor?g.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");g&&g.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var W=g&&g.strokeWidth?g.strokeWidth:mxUtils.getValue(this.style,
+"strokeWidth","1"),C=g&&g.fillColor2?g.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),N=g&&g.gradientColor2?g.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),la=g&&g.gradientDirection2?g.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),O=g&&g.opacity?g.opacity:mxUtils.getValue(this.style,"opacity","100"),aa=Math.max(0,Math.min(50,m));g=Z.prototype;b.setDashed(z);F&&""!=F&&b.setDashPattern(F);b.setStrokeWidth(W);m=Math.min(.5*e,.5*c,m);k||
+(m=aa*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(n=Math.min(u*Math.min(c,e)/100));n=Math.min(n,.5*Math.min(c,e)-m);(p||v||A||B)&&"frame"!=q&&(b.begin(),p?g.moveNW(b,d,f,c,e,l,x,m,B):b.moveTo(0,0),p&&g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),v&&g.paintNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),A&&g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),B&&g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(C),
+z=k=O,"none"==C&&(k=0),"none"==N&&(z=0),b.setGradient(C,N,0,0,c,e,la,k,z),b.begin(),p?g.moveNWInner(b,d,f,c,e,l,x,m,n,p,B):b.moveTo(n,0),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),B&&A&&g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),A&&v&&g.paintSEInner(b,d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),v&&p&&g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),p&&B&&g.paintNWInner(b,d,f,c,e,l,x,m,n),b.fill(),"none"==D&&(b.begin(),g.paintFolds(b,
+d,f,c,e,l,x,I,t,y,m,p,v,A,B),b.stroke()));p||v||A||!B?p||v||!A||B?!p&&!v&&A&&B?"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,
+A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.lineNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),b.close(),b.fillAndStroke()):p||!v||A||B?!p&&v&&!A&&B?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B)),b.stroke(),b.begin(),g.moveNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),"double"==
+q&&(g.moveSEInner(b,d,f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.lineNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),b.close(),b.fillAndStroke(),b.begin(),g.moveNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.lineSEInner(b,d,f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),b.close(),b.fillAndStroke()):!p&&v&&A&&!B?"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,I,
+m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.lineSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,
+d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),b.close(),b.fillAndStroke()):!p&&v&&A&&B?"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,d,f,c,e,l,t,
+m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.lineNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),b.close(),b.fillAndStroke()):
+!p||v||A||B?p&&!v&&!A&&B?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,I,m,n,v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.lineNEInner(b,d,f,c,e,l,I,m,n,
+v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),b.close(),b.fillAndStroke()):p&&!v&&A&&!B?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,I,m,n,v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p)),b.stroke(),b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A)),
+b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.lineNEInner(b,d,f,c,e,l,I,m,n,v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),b.close(),b.fillAndStroke(),b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.lineSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),b.close(),b.fillAndStroke()):p&&!v&&A&&B?"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,
+c,e,l,x,m,p),g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,I,m,n,v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,
+f,c,e,l,I,m,v),g.lineNEInner(b,d,f,c,e,l,I,m,n,v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),b.close(),b.fillAndStroke()):p&&v&&!A&&!B?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,
+l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.lineSEInner(b,d,f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),b.close(),b.fillAndStroke()):p&&v&&!A&&B?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.paintNW(b,
+d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,
+f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.lineSEInner(b,d,f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),b.close(),b.fillAndStroke()):p&&v&&A&&!B?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,
+c,e,l,y,m,B),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.lineSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,
+d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),b.close(),b.fillAndStroke()):p&&v&&A&&B&&("frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),
+b.close(),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),b.close()),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.paintNE(b,d,f,c,e,l,
+I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.paintSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),b.close(),g.moveSWInner(b,d,f,c,e,l,y,m,n,B),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),g.paintSEInner(b,d,f,c,e,l,t,m,n),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),g.paintNEInner(b,d,f,c,e,l,I,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,
+A,B),b.close(),b.fillAndStroke())):"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,I,m,n,v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,B),g.paintTop(b,d,f,c,e,l,I,m,v),g.lineNEInner(b,d,f,c,e,l,I,m,n,v),g.paintTopInner(b,d,f,c,e,l,x,m,n,B,p),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),"double"==q&&(g.moveSEInner(b,d,
+f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,I,m,p),g.paintRight(b,d,f,c,e,l,t,m,A),g.lineSEInner(b,d,f,c,e,l,t,m,n,A),g.paintRightInner(b,d,f,c,e,l,I,m,n,p,v),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,m,B),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,t,m,v),g.paintBottom(b,d,f,c,e,l,y,
+m,B),g.lineSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,t,m,n,v,A),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,A),g.paintLeft(b,d,f,c,e,l,x,m,p),g.lineNWInner(b,d,f,c,e,l,x,m,n,p,B),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,B),b.close(),b.fillAndStroke());b.begin();g.paintFolds(b,d,f,
+c,e,l,x,I,t,y,m,p,v,A,B);b.stroke()};Z.prototype.moveNW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,0):b.moveTo(0,m)};Z.prototype.moveNE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(c,0):b.moveTo(c-m,0)};Z.prototype.moveSE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(c,e):b.moveTo(c,e-m)};Z.prototype.moveSW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,e):
+b.moveTo(m,e)};Z.prototype.paintNW=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,m,0)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(m,0);else b.lineTo(0,0)};Z.prototype.paintTop=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(c,0):b.lineTo(c-m,0)};Z.prototype.paintNE=function(b,d,f,
+c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c,m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c,m);else b.lineTo(c,0)};Z.prototype.paintRight=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(c,e):b.lineTo(c,e-m)};Z.prototype.paintLeft=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==
+g||!k?b.lineTo(0,0):b.lineTo(0,m)};Z.prototype.paintSE=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c-m,e)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-m,e);else b.lineTo(c,e)};Z.prototype.paintBottom=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(0,e):b.lineTo(m,e)};Z.prototype.paintSW=
+function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,0,e-m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(0,e-m);else b.lineTo(0,e)};Z.prototype.paintNWInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+
+k,m+k,0,0,1,k,k+m);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(k,.5*k+m);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};Z.prototype.paintTopInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(0,k):n&&!q?b.lineTo(k,0):n?"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(m+.5*k,k):b.lineTo(m+k,k):b.lineTo(0,k):b.lineTo(0,0)};Z.prototype.paintNEInner=function(b,d,f,c,e,
+g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-m-.5*k,k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-m-k,k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-m-.5*k,k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,m+k),b.lineTo(c-m-k,k)};Z.prototype.paintRightInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(c-k,0):n&&!q?b.lineTo(c,k):n?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,k):"rounded"==l||"default"==
+l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};Z.prototype.paintLeftInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(k,e):n&&!q?b.lineTo(0,e-k):n?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,e)};Z.prototype.paintSEInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==
+l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-k,e-m-.5*k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-k,e-m-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-k,e-m-.5*k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,e-m-k),b.lineTo(c-k,e-m-k)};Z.prototype.paintBottomInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(c,e-k):n&&!q?b.lineTo(c-k,e):"square"==l||"default"==l&&"square"==g||!n?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==
+g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};Z.prototype.paintSWInner=function(b,d,f,c,e,g,l,m,k,n){if(!n)b.lineTo(k,e);else if("square"==l||"default"==l&&"square"==g)b.lineTo(k,e-k);else if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(m+.5*k,e-k);else if("fold"==l||"default"==l&&
+"fold"==g)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};Z.prototype.moveSWInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g?b.moveTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,e-m-k):b.moveTo(0,e-k)};Z.prototype.lineSWInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==
+l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};Z.prototype.moveSEInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g?b.moveTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,e-m-
+k):b.moveTo(c-k,e)};Z.prototype.lineSEInner=function(b,d,f,c,e,g,l,k,m,n){n?"square"==l||"default"==l&&"square"==g?b.lineTo(c-m,e-m):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-m,e-k-.5*m):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-m,e-k-m):b.lineTo(c-m,e)};Z.prototype.moveNEInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g||n?b.moveTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==
+g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};Z.prototype.lineNEInner=function(b,d,f,c,e,g,l,k,m,n){n?"square"==l||"default"==l&&"square"==g||n?b.lineTo(c-m,m):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-m,k+.5*m):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-m,k+m):b.lineTo(c,m)};
+Z.prototype.moveNWInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.moveTo(k,0):n&&!q?b.moveTo(0,k):"square"==l||"default"==l&&"square"==g?b.moveTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,m+k):b.moveTo(0,0)};Z.prototype.lineNWInner=function(b,d,f,c,e,g,l,k,m,n,q){n||q?!n&&q?b.lineTo(m,0):n&&!q?b.lineTo(0,m):"square"==l||"default"==l&&"square"==
+g?b.lineTo(m,m):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(m,k+.5*m):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(m,k+m):b.lineTo(0,0)};Z.prototype.paintFolds=function(b,d,f,c,e,g,l,m,k,n,q,F,p,B,v){if("fold"==g||"fold"==l||"fold"==m||"fold"==k||"fold"==n)("fold"==l||"default"==l&&"fold"==g)&&F&&v&&(b.moveTo(0,q),b.lineTo(q,q),b.lineTo(q,0)),("fold"==m||"default"==m&&"fold"==g)&&F&&p&&(b.moveTo(c-q,0),b.lineTo(c-
+q,q),b.lineTo(c,q)),("fold"==k||"default"==k&&"fold"==g)&&B&&p&&(b.moveTo(c-q,e),b.lineTo(c-q,e-q),b.lineTo(c,e-q)),("fold"==n||"default"==n&&"fold"==g)&&B&&v&&(b.moveTo(0,e-q),b.lineTo(q,e-q),b.lineTo(q,e))};mxCellRenderer.registerShape(Z.prototype.cst.RECT2,Z);Z.prototype.constraints=null;mxUtils.extend(Ia,mxConnector);Ia.prototype.origPaintEdgeShape=Ia.prototype.paintEdgeShape;Ia.prototype.paintEdgeShape=function(b,d,f){for(var c=[],e=0;e<d.length;e++)c.push(mxUtils.clone(d[e]));var e=b.state.dashed,
+g=b.state.fixDash;Ia.prototype.origPaintEdgeShape.apply(this,[b,c,f]);3<=b.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(b.setStrokeColor(c),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(e,g),Ia.prototype.origPaintEdgeShape.apply(this,[b,d,f])))};mxCellRenderer.registerShape("filledEdge",Ia);"undefined"!==typeof StyleFormatPanel&&function(){var b=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),
+f=b.apply(this,arguments);"umlFrame"==d.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(b,d,f,c,e,g,l,m,k,n){var q=e*(l+k+1),F=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-F/2,c.y-F/2+q/2);b.lineTo(c.x+F/2-3*q/2,c.y-3*F/2-q/2);b.stroke()}});mxMarker.addMarker("box",function(b,d,f,c,e,g,l,m,k,n){var q=e*(l+k+1),F=g*(l+k+1),p=c.x+q/2,B=c.y+F/2;c.x-=q;c.y-=F;return function(){b.begin();
+b.moveTo(p-q/2-F/2,B-F/2+q/2);b.lineTo(p-q/2+F/2,B-F/2-q/2);b.lineTo(p+F/2-3*q/2,B-3*F/2-q/2);b.lineTo(p-F/2-3*q/2,B-3*F/2+q/2);b.close();n?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,f,c,e,g,l,k,m,n){var q=e*(l+m+1),F=g*(l+m+1);return function(){b.begin();b.moveTo(c.x-q/2-F/2,c.y-F/2+q/2);b.lineTo(c.x+F/2-3*q/2,c.y-3*F/2-q/2);b.moveTo(c.x-q/2+F/2,c.y-F/2-q/2);b.lineTo(c.x-F/2-3*q/2,c.y-3*F/2+q/2);b.stroke()}});mxMarker.addMarker("circle",Va);mxMarker.addMarker("circlePlus",
+function(b,d,f,c,e,g,l,m,k,n){var q=c.clone(),F=Va.apply(this,arguments),p=e*(l+2*k),B=g*(l+2*k);return function(){F.apply(this,arguments);b.begin();b.moveTo(q.x-e*k,q.y-g*k);b.lineTo(q.x-2*p+e*k,q.y-2*B+g*k);b.moveTo(q.x-p-B+g*k,q.y-B+p-e*k);b.lineTo(q.x+B-p-g*k,q.y-B-p+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,g,l,k,m,n){var q=e*(l+m+1),F=g*(l+m+1),p=c.clone();c.x-=q;c.y-=F;return function(){b.begin();b.moveTo(p.x-F,p.y+q);b.quadTo(c.x-F,c.y+q,c.x,c.y);b.quadTo(c.x+F,
+c.y-q,p.x+F,p.y-q);b.stroke()}});mxMarker.addMarker("async",function(b,d,f,c,e,g,l,k,m,n){d=e*m*1.118;f=g*m*1.118;e*=l+m;g*=l+m;var q=c.clone();q.x-=d;q.y-=f;c.x+=1*-e-d;c.y+=1*-g-f;return function(){b.begin();b.moveTo(q.x,q.y);k?b.lineTo(q.x-e-g/2,q.y-g+e/2):b.lineTo(q.x+g/2-e,q.y-g-e/2);b.lineTo(q.x-e,q.y-g);b.close();n?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",function(b){b=null!=b?b:2;return function(d,f,c,e,g,l,k,m,n,q){g*=k+n;l*=k+n;var F=e.clone();return function(){d.begin();
+d.moveTo(F.x,F.y);m?d.lineTo(F.x-g-l/b,F.y-l+g/b):d.lineTo(F.x+l/b-g,F.y-l-g/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Za=function(b,d,f){return La(b,["width"],d,function(d,c,e,g,l){l=b.shape.getEdgeWidth()*b.view.scale+f;return new mxPoint(g.x+c*d/4+e*l/2,g.y+e*d/4-c*l/2)},function(d,c,e,g,l,k){d=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,k.x,k.y));b.style.width=Math.round(2*d)/b.view.scale-f})},La=function(b,d,f,c,e){return ea(b,d,function(d){var e=b.absolutePoints,g=
+e.length-1;d=b.view.translate;var l=b.view.scale,k=f?e[0]:e[g],e=f?e[1]:e[g-1],g=e.x-k.x,m=e.y-k.y,n=Math.sqrt(g*g+m*m),k=c.call(this,n,g/n,m/n,k,e);return new mxPoint(k.x/l-d.x,k.y/l-d.y)},function(d,c,g){var l=b.absolutePoints,k=l.length-1;d=b.view.translate;var m=b.view.scale,n=f?l[0]:l[k],l=f?l[1]:l[k-1],k=l.x-n.x,q=l.y-n.y,F=Math.sqrt(k*k+q*q);c.x=(c.x+d.x)*m;c.y=(c.y+d.y)*m;e.call(this,F,k/F,q/F,n,l,c,g)})},Ha=function(b){return function(d){return[ea(d,["arrowWidth","arrowSize"],function(d){var f=
+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ba.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ba.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-f)*d.height/2)},function(d,f){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-f.y)/d.height*2));this.state.style.arrowSize=Math.max(0,Math.min(b,(d.x+d.width-f.x)/d.width))})]}},Wa=function(b){return function(d){return[ea(d,["size"],function(d){var f=
+Math.max(0,Math.min(.5*d.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(d.x,d.y+f)},function(b,d){this.state.style.size=Math.max(0,d.y-b.y)},!0)]}},Ta=function(b,d,f){return function(c){var e=[ea(c,["size"],function(f){var c=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*b;return new mxPoint(f.x+c,f.y+c)},function(d,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,f.x-d.x),Math.min(d.height,
+f.y-d.y)))/b)},!1)];f&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Fa(c));return e}},Ma=function(b,d,f,c,e){f=null!=f?f:.5;return function(g){var l=[ea(g,["size"],function(d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",f?e:b));return new mxPoint(d.x+Math.max(0,Math.min(.5*d.width,c*(f?1:d.width))),d.getCenterY())},function(b,d,c){b=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?
+d.x-b.x:Math.max(0,Math.min(f,(d.x-b.x)/b.width));this.state.style.size=b},!1,c)];d&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(Fa(g));return l}},Xa=function(b,d,f){b=null!=b?b:.5;return function(c){var e=[ea(c,["size"],function(c){var e=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,g=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",e?f:d)));return new mxPoint(c.x+Math.min(.75*c.width*b,g*(e?.75:.75*c.width)),c.y+c.height/4)},function(d,c){var e=
+null!=f&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-d.x:Math.max(0,Math.min(b,(c.x-d.x)/d.width*.75));this.state.style.size=e},!1,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Fa(c));return e}},Ka=function(){return function(b){var d=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Fa(b));return d}},Fa=function(b,d){return ea(b,[mxConstants.STYLE_ARCSIZE],function(f){var c=null!=d?d:f.height/8;if("1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
+0)){var e=mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(f.x+f.width-Math.min(f.width/2,e),f.y+c)}e=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(f.x+f.width-Math.min(Math.max(f.width/2,f.height/2),Math.min(f.width,f.height)*e),f.y+c)},function(d,f,c){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=
+Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-f.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-f.x+d.x)/Math.min(d.width,d.height))))})},ea=function(b,d,f,c,e,g,l){var k=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);k.execute=function(b){for(var f=0;f<d.length;f++)this.copyStyle(d[f]);l&&l(b)};k.getPosition=f;k.setPosition=c;k.ignoreGrid=null!=e?e:!0;if(g){var m=k.positionChanged;k.positionChanged=function(){m.apply(this,
+arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return k},Na={link:function(b){return[Za(b,!0,10),Za(b,!1,10)]},flexArrow:function(b){var d=b.view.graph.gridSize/b.view.scale,f=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(La(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,f,c,e,g){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;g=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,
+mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(g+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(g+b.shape.strokewidth*b.view.scale)-f*d/2)},function(f,c,e,g,l,k,m){f=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,k.x,k.y));c=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-c,k.x,k.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(m.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=
+b.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),f.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,f,c,e,g){d=(b.shape.getStartArrowWidth()-b.shape.strokewidth)*b.view.scale;g=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+5)*b.view.scale;return new mxPoint(e.x+f*(g+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(g+b.shape.strokewidth*b.view.scale)-f*d/2)},function(f,c,e,g,l,k,m){f=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,k.x,k.y));c=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-c,k.x,k.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.startWidth=Math.max(0,Math.round(2*f)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(m.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=
+b.style[mxConstants.STYLE_STARTSIZE],b.style.endWidth=b.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(b.style.startWidth)-parseFloat(b.style.endWidth))<d&&(b.style.startWidth=b.style.endWidth))})));mxUtils.getValue(b.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(La(b,
+["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,f,c,e,g){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;g=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(g+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(g+b.shape.strokewidth*b.view.scale)+f*d/2)},function(f,c,e,g,l,k,m){f=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,k.x,k.y));c=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-c,k.x,k.y);b.style[mxConstants.STYLE_ENDSIZE]=
+Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(m.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),f.push(La(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!1,function(d,f,c,e,g){d=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;g=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(g+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(g+b.shape.strokewidth*b.view.scale)+f*d/2)},function(f,c,e,g,l,k,m){f=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,k.x,k.y));c=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-c,k.x,k.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-b.shape.strokewidth)/
+3)/100/b.view.scale;b.style.endWidth=Math.max(0,Math.round(2*f)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(m.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE],b.style.startWidth=b.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-
+parseFloat(b.style.startWidth))<d&&(b.style.endWidth=b.style.startWidth))})));return f},swimlane:function(b){var d=[];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(Fa(b,f/2))}d.push(ea(b,[mxConstants.STYLE_STARTSIZE],function(d){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,
+1)?new mxPoint(d.getCenterX(),d.y+Math.max(0,Math.min(d.height,f))):new mxPoint(d.x+Math.max(0,Math.min(d.width,f)),d.getCenterY())},function(d,f){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,f.y-d.y))):Math.round(Math.max(0,Math.min(d.width,f.x-d.x)))},!1,null,function(d){if(mxEvent.isControlDown(d.getEvent())&&(d=b.view.graph,d.isTableRow(b.cell)||d.isTableCell(b.cell))){for(var f=d.getSwimlaneDirection(b.style),
+c=d.model.getParent(b.cell),c=d.model.getChildCells(c,!0),e=[],g=0;g<c.length;g++)c[g]!=b.cell&&d.isSwimlane(c[g])&&d.getSwimlaneDirection(d.getCurrentCellStyle(c[g]))==f&&e.push(c[g]);d.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],e)}}));return d},label:Ka(),ext:Ka(),rectangle:Ka(),triangle:Ka(),rhombus:Ka(),umlLifeline:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));
+return new mxPoint(b.getCenterX(),b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},umlFrame:function(b){return[ea(b,["width","height"],function(b){var d=Math.max(aa.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),f=Math.max(1.5*aa.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.width=
+Math.round(Math.max(aa.prototype.corner,Math.min(b.width,d.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(b.height,d.y-b.y)))},!1)]},process:function(b){var d=[ea(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size));return d?new mxPoint(b.x+f,b.y+b.height/4):new mxPoint(b.x+b.width*f,b.y+b.height/4)},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(.5*b.width,d.x-b.x)):Math.max(0,Math.min(.5,(d.x-b.x)/b.width));this.state.style.size=f},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Fa(b));return d},cross:function(b){return[ea(b,["size"],function(b){var d=Math.min(b.width,b.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",xa.prototype.size)))*d/2;return new mxPoint(b.getCenterX()-d,b.getCenterY()-d)},function(b,d){var f=Math.min(b.width,b.height);this.state.style.size=
+Math.max(0,Math.min(1,Math.min(Math.max(0,b.getCenterY()-d.y)/f*2,Math.max(0,b.getCenterX()-d.x)/f*2)))})]},note:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size)))));return new mxPoint(b.x+b.width-d,b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},note2:function(b){return[ea(b,["size"],function(b){var f=
+Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(b.x+b.width-f,b.y+f)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},manualInput:function(b){var d=[ea(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*d/4)},function(b,
+d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(d.y-b.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Fa(b));return d},dataStorage:function(b){return[ea(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",d?da.prototype.fixedSize:da.prototype.size));return new mxPoint(b.x+b.width-f*(d?1:b.width),b.getCenterY())},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(b.width,b.x+b.width-d.x)):Math.max(0,Math.min(1,(b.x+b.width-d.x)/b.width));this.state.style.size=f},!1)]},callout:function(b){var d=[ea(b,["size","position"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",C.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position)));mxUtils.getValue(this.state.style,"base",C.prototype.base);return new mxPoint(b.x+f*b.width,b.y+b.height-
d)},function(b,d){mxUtils.getValue(this.state.style,"base",C.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(b.height,b.y+b.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),ea(b,["position2"],function(b){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",C.prototype.position2)));return new mxPoint(b.x+d*b.width,b.y+b.height)},function(b,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(d.x-b.x)/b.width)))/100},!1),ea(b,["base"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",C.prototype.size))),g=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position))),c=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"base",C.prototype.base)));return new mxPoint(b.x+Math.min(b.width,g*b.width+c),b.y+b.height-d)},function(b,d){var g=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(b.width,d.x-b.x-g*b.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ga(b));return d},internalStorage:function(b){var d=[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ia.prototype.dx))),g=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ia.prototype.dy)));return new mxPoint(b.x+d,b.y+g)},function(b,d){this.state.style.dx=Math.round(Math.max(0,
-Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ga(b));return d},module:function(b){return[ea(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",X.prototype.jettyWidth))),g=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"jettyHeight",X.prototype.jettyHeight)));return new mxPoint(b.x+d/2,b.y+
-2*g)},function(b,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y))/2)})]},corner:function(b){return[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",pa.prototype.dx))),g=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",pa.prototype.dy)));return new mxPoint(b.x+d,b.y+g)},function(b,d){this.state.style.dx=Math.round(Math.max(0,
-Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},tee:function(b){return[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ja.prototype.dx))),g=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ja.prototype.dy)));return new mxPoint(b.x+(b.width+d)/2,b.y+g)},function(b,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=
-Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Ha(1),doubleArrow:Ha(.5),folder:function(b){return[ea(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",m.prototype.tabWidth))),g=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",m.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",m.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+
-d,b.y+g)},function(b,d){var g=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",m.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(g=b.width-g);this.state.style.tabWidth=Math.round(g);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-
-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},tape:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d*b.height/2)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-b.y)/b.height*2))},!1)]},isoCube2:function(b){return[ea(b,["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,
-"isoAngle",g.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Wa(l.prototype.size),cylinder3:Wa(q.prototype.size),offPageConnector:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",qa.prototype.size))));return new mxPoint(b.getCenterX(),b.y+(1-d)*b.height)},function(b,d){this.state.style.size=
+(d.x-b.x)/b.width)))/100},!1),ea(b,["base"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",C.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position))),c=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"base",C.prototype.base)));return new mxPoint(b.x+Math.min(b.width,f*b.width+c),b.y+b.height-d)},function(b,d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",C.prototype.position)));
+this.state.style.base=Math.round(Math.max(0,Math.min(b.width,d.x-b.x-f*b.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Fa(b));return d},internalStorage:function(b){var d=[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ia.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ia.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,
+Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Fa(b));return d},module:function(b){return[ea(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",X.prototype.jettyWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"jettyHeight",X.prototype.jettyHeight)));return new mxPoint(b.x+d/2,b.y+
+2*f)},function(b,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y))/2)})]},corner:function(b){return[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ra.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ra.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,
+Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},tee:function(b){return[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ja.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ja.prototype.dy)));return new mxPoint(b.x+(b.width+d)/2,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=
+Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Ha(1),doubleArrow:Ha(.5),folder:function(b){return[ea(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",n.prototype.tabWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",n.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+
+d,b.y+f)},function(b,d){var f=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=b.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-
+d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},tape:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d*b.height/2)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-b.y)/b.height*2))},!1)]},isoCube2:function(b){return[ea(b,["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,
+"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Wa(l.prototype.size),cylinder3:Wa(m.prototype.size),offPageConnector:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",sa.prototype.size))));return new mxPoint(b.getCenterX(),b.y+(1-d)*b.height)},function(b,d){this.state.style.size=
Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},"mxgraph.basic.rect":function(b){var d=[Graph.createHandle(b,["size"],function(b){var d=Math.max(0,Math.min(b.width/2,b.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(b.x+d,b.y+d)},function(b,d){this.state.style.size=Math.round(100*Math.max(0,Math.min(b.height/2,b.width/2,d.x-b.x)))/100})];b=Graph.createHandle(b,["indent"],function(b){var d=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,
-"indent",this.dx2))));return new mxPoint(b.x+.75*b.width,b.y+d*b.height/200)},function(b,d){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(d.y-b.y)/b.height)))/100});d.push(b);return d},step:Ma(N.prototype.size,!0,null,!0,N.prototype.fixedSize),hexagon:Ma(S.prototype.size,!0,.5,!0,S.prototype.fixedSize),curlyBracket:Ma(F.prototype.size,!1),display:Ma(Ea.prototype.size,!1),cube:Ta(1,c.prototype.size,!1),card:Ta(.5,u.prototype.size,!0),loopLimit:Ta(.5,ta.prototype.size,!0),trapezoid:Xa(.5,
-A.prototype.size,A.prototype.fixedSize),parallelogram:Xa(1,E.prototype.size,E.prototype.fixedSize)};Graph.createHandle=ea;Graph.handleFactory=Na;var db=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=db.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)?d=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&
+"indent",this.dx2))));return new mxPoint(b.x+.75*b.width,b.y+d*b.height/200)},function(b,d){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(d.y-b.y)/b.height)))/100});d.push(b);return d},step:Ma(M.prototype.size,!0,null,!0,M.prototype.fixedSize),hexagon:Ma(P.prototype.size,!0,.5,!0,P.prototype.fixedSize),curlyBracket:Ma(E.prototype.size,!1),display:Ma(Ea.prototype.size,!1),cube:Ta(1,c.prototype.size,!1),card:Ta(.5,u.prototype.size,!0),loopLimit:Ta(.5,ua.prototype.size,!0),trapezoid:Xa(.5,
+D.prototype.size,D.prototype.fixedSize),parallelogram:Xa(1,H.prototype.size,H.prototype.fixedSize)};Graph.createHandle=ea;Graph.handleFactory=Na;var db=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=db.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)?d=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&
(d=mxConstants.SHAPE_SWIMLANE);d=Na[d];null==d&&null!=this.state.shape&&this.state.shape.isRoundable()&&(d=Na[mxConstants.SHAPE_RECTANGLE]);null!=d&&(d=d(this.state),null!=d&&(b=null==b?d:b.concat(d)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);b=Na[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory=
-{};var Oa=new mxPoint(1,0),Pa=new mxPoint(1,0),Ha=mxUtils.toRadians(-30),Oa=mxUtils.getRotatedPoint(Oa,Math.cos(Ha),Math.sin(Ha)),Ha=mxUtils.toRadians(-150),Pa=mxUtils.getRotatedPoint(Pa,Math.cos(Ha),Math.sin(Ha));mxEdgeStyle.IsometricConnector=function(b,d,g,c,e){var f=b.view;c=null!=c&&0<c.length?c[0]:null;var l=b.absolutePoints,m=l[0],l=l[l.length-1];null!=c&&(c=f.transformControlPoint(b,c));null==m&&null!=d&&(m=new mxPoint(d.getCenterX(),d.getCenterY()));null==l&&null!=g&&(l=new mxPoint(g.getCenterX(),
-g.getCenterY()));var k=Oa.x,q=Oa.y,p=Pa.x,G=Pa.y,u="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=l&&null!=m){b=function(b,d,g){b-=y.x;var c=d-y.y;d=(G*b-p*c)/(k*G-q*p);b=(q*b-k*c)/(q*p-k*G);u?(g&&(y=new mxPoint(y.x+k*d,y.y+q*d),e.push(y)),y=new mxPoint(y.x+p*b,y.y+G*b)):(g&&(y=new mxPoint(y.x+p*b,y.y+G*b),e.push(y)),y=new mxPoint(y.x+k*d,y.y+q*d));e.push(y)};var y=m;null==c&&(c=new mxPoint(m.x+(l.x-m.x)/2,m.y+(l.y-m.y)/2));b(c.x,c.y,!0);b(l.x,l.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
-mxEdgeStyle.IsometricConnector);var eb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,d){if(d==mxEdgeStyle.IsometricConnector){var g=new mxElbowEdgeHandler(b);g.snapToTerminals=!1;return g}return eb.apply(this,arguments)};k.prototype.constraints=[];f.prototype.getConstraints=function(b,d,g){b=[];var c=Math.tan(mxUtils.toRadians(30)),e=(.5-c)/2,c=Math.min(d,g/(.5+c));d=(d-c)/2;g=(g-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d+.5*c,g+c*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,g+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,g+.75*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,g+(1-e)*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g+.75*c));return b};g.prototype.getConstraints=function(b,d,g){b=[];var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,c=Math.min(d*
-Math.tan(c),.5*g);b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g-c));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g-c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-0,c));return b};C.prototype.getConstraints=function(b,d,g){b=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1));b.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(g-c)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
-g-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(g-c)));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
+{};var Oa=new mxPoint(1,0),Pa=new mxPoint(1,0),Ha=mxUtils.toRadians(-30),Oa=mxUtils.getRotatedPoint(Oa,Math.cos(Ha),Math.sin(Ha)),Ha=mxUtils.toRadians(-150),Pa=mxUtils.getRotatedPoint(Pa,Math.cos(Ha),Math.sin(Ha));mxEdgeStyle.IsometricConnector=function(b,d,f,c,e){var g=b.view;c=null!=c&&0<c.length?c[0]:null;var l=b.absolutePoints,k=l[0],l=l[l.length-1];null!=c&&(c=g.transformControlPoint(b,c));null==k&&null!=d&&(k=new mxPoint(d.getCenterX(),d.getCenterY()));null==l&&null!=f&&(l=new mxPoint(f.getCenterX(),
+f.getCenterY()));var m=Oa.x,n=Oa.y,q=Pa.x,F=Pa.y,p="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=l&&null!=k){b=function(b,d,f){b-=B.x;var c=d-B.y;d=(F*b-q*c)/(m*F-n*q);b=(n*b-m*c)/(n*q-m*F);p?(f&&(B=new mxPoint(B.x+m*d,B.y+n*d),e.push(B)),B=new mxPoint(B.x+q*b,B.y+F*b)):(f&&(B=new mxPoint(B.x+q*b,B.y+F*b),e.push(B)),B=new mxPoint(B.x+m*d,B.y+n*d));e.push(B)};var B=k;null==c&&(c=new mxPoint(k.x+(l.x-k.x)/2,k.y+(l.y-k.y)/2));b(c.x,c.y,!0);b(l.x,l.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
+mxEdgeStyle.IsometricConnector);var eb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,d){if(d==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(b);f.snapToTerminals=!1;return f}return eb.apply(this,arguments)};k.prototype.constraints=[];g.prototype.getConstraints=function(b,d,f){b=[];var c=Math.tan(mxUtils.toRadians(30)),e=(.5-c)/2,c=Math.min(d,f/(.5+c));d=(d-c)/2;f=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d+.5*c,f+c*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.75*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+(1-e)*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.75*c));return b};f.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,c=Math.min(d*
+Math.tan(c),.5*f);b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-c));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+0,c));return b};C.prototype.getConstraints=function(b,d,f){b=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1));b.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f-c)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
+f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];wa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
-mxRectangleShape.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(b,d,g){b=[];var c=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
-null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(g+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,
-0),!1));return b};u.prototype.getConstraints=function(b,d,g){b=[];var c=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.5*(g+c)));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};c.prototype.getConstraints=function(b,d,g){b=[];var c=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(g+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),g));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,g-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(g-c)));return b};q.prototype.getConstraints=function(b,d,g){b=[];d=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d+.5*(.5*g-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d+.5*(.5*g-d)));b.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,g-d-.5*(.5*g-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g-d-.5*(.5*g-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};m.prototype.getConstraints=function(b,d,g){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(b.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-.5*(d+c),e))):(b.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.25*(g-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,.5*(g-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(g-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(g-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(g-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(g-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,g));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};ia.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;va.prototype.constraints=mxEllipse.prototype.constraints;T.prototype.constraints=mxEllipse.prototype.constraints;Ca.prototype.constraints=
-mxEllipse.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.getConstraints=function(b,d,g){b=[];var c=Math.min(d,g/2),e=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-.5*(e+d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));return b};X.prototype.getConstraints=function(b,d,g){d=parseFloat(mxUtils.getValue(b,"jettyWidth",X.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,
+mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,
+0),!1));return b};u.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};c.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));return b};m.prototype.getConstraints=function(b,d,f){b=[];d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};n.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
+"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(b.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+.5*(d+c),e))):(b.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,f));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};ia.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;va.prototype.constraints=mxEllipse.prototype.constraints;T.prototype.constraints=mxEllipse.prototype.constraints;Ca.prototype.constraints=
+mxEllipse.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.getConstraints=function(b,d,f){b=[];var c=Math.min(d,f/2),e=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+.5*(e+d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};X.prototype.getConstraints=function(b,d,f){d=parseFloat(mxUtils.getValue(b,"jettyWidth",X.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,
"jettyHeight",X.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,d),
-new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(g-.5*b,1.5*b)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(g-.5*b,3.5*b))];g>5*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,d));g>8*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,d));g>15*
-b&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};ta.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];G.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,
+new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,1.5*b)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,3.5*b))];f>5*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,d));f>8*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,d));f>15*
+b&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};ua.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
+.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];F.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,
1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,
-.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];p.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
-.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,
-1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
+.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
+.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,
+1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
+.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),
new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];E.prototype.constraints=mxRectangleShape.prototype.constraints;A.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ja.prototype.getConstraints=function(b,d,g){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];H.prototype.constraints=mxRectangleShape.prototype.constraints;D.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ja.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d+.25*c,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(d+c),.5*(g+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),g));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),.5*(g+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d-.25*c,e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return b};pa.prototype.getConstraints=function(b,d,g){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,.5*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(g+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,g));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(d+c),.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d-.25*c,e));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return b};ra.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,.5*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
1),!1));return b};U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];ba.prototype.getConstraints=
-function(b,d,g){b=[];var c=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),c=(g-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),g-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g-c));return b};la.prototype.getConstraints=function(b,d,g){b=[];var c=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ba.prototype.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ba.prototype.arrowSize)))),c=(g-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,g-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));return b};xa.prototype.getConstraints=
-function(b,d,g){b=[];var c=Math.min(g,d),e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),c=(g-e)/2,f=c+e,l=(d-e)/2,e=l+e;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,e,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,g-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,g));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),c));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,c));return b};O.prototype.constraints=null;ua.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+function(b,d,f){b=[];var c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),c=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));return b};ma.prototype.getConstraints=function(b,d,f){b=[];var c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ba.prototype.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ba.prototype.arrowSize)))),c=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};xa.prototype.getConstraints=
+function(b,d,f){b=[];var c=Math.min(f,d),e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),c=(f-e)/2,g=c+e,l=(d-e)/2,e=l+e;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,f));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),c));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,c));return b};O.prototype.constraints=null;qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+.9),!1)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(b){f.escape();b=f.deleteCells(f.getDeletableCells(f.getSelectionCells()),b);null!=b&&f.setSelectionCells(b)}function c(){if(!f.isSelectionEmpty()){f.getModel().beginUpdate();try{for(var b=f.getSelectionCells(),d=0;d<b.length;d++)f.cellLabelChanged(b[d],"")}finally{f.getModel().endUpdate()}}}var e=this.editorUi,k=e.editor,f=k.graph,n=function(){return Action.prototype.isEnabled.apply(this,arguments)&&f.isEnabled()};this.addAction("new...",function(){f.openLink(e.getUrl())});
-this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.openFile()});this.addAction("smartFit",function(){f.popupMenuHandler.hideMenu();var b=f.view.scale,d=f.view.translate.x,c=f.view.translate.y;e.actions.get("resetView").funct();1E-5>Math.abs(b-f.view.scale)&&d==f.view.translate.x&&c==f.view.translate.y&&e.actions.get(f.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){f.isEnabled()&&(f.isSelectionEmpty()?e.actions.get("smartFit").funct():
-f.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var g=mxUtils.parseXml(b);k.graph.setSelectionCells(k.graph.importGraphModel(g.documentElement))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+p.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
-null})}).isEnabled=n;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=n;this.addAction("saveAs...",function(){e.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=n;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,304,!0,!0)});this.addAction("editDiagram...",function(){var b=new EditDiagramDialog(e);e.showDialog(b.container,620,420,!0,!1);b.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,
-320,240,!0,!0)}).isEnabled=n;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(f,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var b=null;try{b=e.copyXml(),
-null!=b&&f.removeCells(b,!1)}catch(l){}null==b&&mxClipboard.cut(f)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(g){}try{mxClipboard.copy(f)}catch(g){e.handleError(g)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){var b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){f.getModel().beginUpdate();try{e.pasteXml(b,!0)}finally{f.getModel().endUpdate()}}else mxClipboard.paste(f)}),
-b=!0)}catch(l){}b||mxClipboard.paste(f)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(b){function d(b){if(null!=b){for(var d=!0,g=0;g<b.length&&d;g++)d=d&&f.model.isEdge(b[g]);var c=f.view.translate,g=f.view.scale,e=c.x,l=c.y,c=null;if(1==b.length&&d){var k=f.getCellGeometry(b[0]);null!=k&&(c=k.getTerminalPoint(!0))}c=null!=c?c:f.getBoundingBoxFromGeometry(b,d);null!=c&&(d=Math.round(f.snap(f.popupMenuHandler.triggerX/g-e)),g=Math.round(f.snap(f.popupMenuHandler.triggerY/
-g-l)),f.cellsMoved(b,d-c.x,g-c.y))}}function g(){f.getModel().beginUpdate();try{d(mxClipboard.paste(f))}finally{f.getModel().endUpdate()}}if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){f.getModel().beginUpdate();try{d(e.pasteXml(b,!0))}finally{f.getModel().endUpdate()}}else g()}),b=!0)}catch(p){}b||g()}});this.addAction("copySize",function(){var b=f.getSelectionCell();f.isEnabled()&&null!=b&&f.getModel().isVertex(b)&&
-(b=f.getCellGeometry(b),null!=b&&(e.copiedSize=new mxRectangle(b.x,b.y,b.width,b.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(){if(f.isEnabled()&&!f.isSelectionEmpty()&&null!=e.copiedSize){f.getModel().beginUpdate();try{for(var b=f.getResizableCells(f.getSelectionCells()),d=0;d<b.length;d++)if(f.getModel().isVertex(b[d])){var c=f.getCellGeometry(b[d]);null!=c&&(c=c.clone(),c.width=e.copiedSize.width,c.height=e.copiedSize.height,f.getModel().setGeometry(b[d],c))}}finally{f.getModel().endUpdate()}}},
-null,null,"Alt+Shift+V");this.addAction("copyData",function(){var b=f.getSelectionCell()||f.getModel().getRoot();f.isEnabled()&&null!=b&&(b=b.cloneValue(),null==b||isNaN(b.nodeType)||(e.copiedValue=b))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(b,d){function g(d,g){var e=c.getValue(d);g=d.cloneValue(g);g.removeAttribute("placeholders");null==e||isNaN(e.nodeType)||g.setAttribute("placeholders",e.getAttribute("placeholders"));null!=b&&mxEvent.isShiftDown(b)||g.setAttribute("label",
-f.convertValueToString(d));c.setValue(d,g)}b=null!=d?d:b;var c=f.getModel();if(f.isEnabled()&&!f.isSelectionEmpty()&&null!=e.copiedValue){c.beginUpdate();try{var l=f.getEditableCells(f.getSelectionCells());if(0==l.length)g(c.getRoot(),e.copiedValue);else for(var k=0;k<l.length;k++)g(l[k],e.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,e){d=null!=e?e:d;null!=d&&mxEvent.isShiftDown(d)?c():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||
-mxEvent.isAltDown(d)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){c()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{f.setSelectionCells(f.duplicateCells()),f.scrollCellToVisible(f.getSelectionCell())}catch(g){e.handleError(g)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(b,d){b=null!=d?d:b;f.turnShapes(f.getResizableCells(f.getSelectionCells()),
-null!=b?mxEvent.isShiftDown(b):!1)},null,null,Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(b){b=f.getSelectionCell();f.isEnabled()&&null!=b&&f.addSelectionCells(f.getEdges(b))}));this.addAction("selectVertices",function(){f.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){f.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){f.selectAll(null,!0)},null,
-null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){f.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!f.isSelectionEmpty()){f.getModel().beginUpdate();try{var b=f.getSelectionCells(),d=f.getCurrentCellStyle(f.getSelectionCell()),c=1==mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,1)?0:1;f.setCellStyles(mxConstants.STYLE_MOVABLE,c,b);f.setCellStyles(mxConstants.STYLE_RESIZABLE,c,b);f.setCellStyles(mxConstants.STYLE_ROTATABLE,c,b);f.setCellStyles(mxConstants.STYLE_DELETABLE,
-c,b);f.setCellStyles(mxConstants.STYLE_EDITABLE,c,b);f.setCellStyles("connectable",c,b)}finally{f.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){f.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){f.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){f.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){f.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",
-function(){f.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){f.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){f.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(b){f.orderCells(!1,null,!0)});this.addAction("sendBackward",function(b){f.orderCells(!0,null,!0)});this.addAction("group",function(){if(f.isEnabled()){var b=mxUtils.sortCells(f.getSelectionCells(),!0);1!=b.length||f.isTable(b[0])||
-f.isTableRow(b[0])?(b=f.getCellsForGroup(b),1<b.length&&f.setSelectionCell(f.groupCells(null,0,b))):f.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(f.isEnabled()){var b=f.getEditableCells(f.getSelectionCells());f.model.beginUpdate();try{var d=f.ungroupCells();if(null!=b)for(var c=0;c<b.length;c++)f.model.contains(b[c])&&(0==f.model.getChildCount(b[c])&&f.model.isVertex(b[c])&&f.setCellStyles("container","0",[b[c]]),d.push(b[c]))}finally{f.model.endUpdate()}0<
-d.length&&f.setSelectionCells(d)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(f.isEnabled()){var b=f.getSelectionCells();if(null!=b){for(var d=[],c=0;c<b.length;c++)f.isTableRow(b[c])||f.isTableCell(b[c])||d.push(b[c]);f.removeCellsFromParent(d)}}});this.addAction("edit",function(){f.isEnabled()&&f.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var b=f.getSelectionCell()||f.getModel().getRoot();e.showDataDialog(b)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var b=f.getSelectionCell();if(f.isEnabled()&&null!=b&&f.isCellEditable(b)){var d="";if(mxUtils.isNode(b.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&b.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==c&&(c=b.value.getAttribute("tooltip"));null!=c&&(d=c)}d=new TextareaDialog(e,mxResources.get("editTooltip")+":",d,function(d){f.setTooltipForCell(b,
-d)});e.showDialog(d.container,320,200,!0,!0);d.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var b=f.getLinkForCell(f.getSelectionCell());null!=b&&f.openLink(b)});this.addAction("editLink...",function(){var b=f.getSelectionCell();if(f.isEnabled()&&null!=b&&f.isCellEditable(b)){var d=f.getLinkForCell(b)||"";e.showLinkDialog(d,mxResources.get("apply"),function(d,c,g){d=mxUtils.trim(d);f.setLinkForCell(b,0<d.length?d:null);f.setAttributeForCell(b,"linkTarget",g)},!0,f.getLinkTargetForCell(b))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(f.clearSelection(),e.actions.get("image").funct())})).isEnabled=n;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(b,d,c){b=mxUtils.trim(b);if(0<b.length){var g=null,e=f.getLinkTitle(b);null!=d&&0<d.length&&(g=d[0].iconUrl,
-e=d[0].name||d[0].type,e=e.charAt(0).toUpperCase()+e.substring(1),30<e.length&&(e=e.substring(0,30)+"..."));d=new mxCell(e,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=g?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+g:"spacing=10;"));d.vertex=!0;g=f.getCenterInsertPoint(f.getBoundingBoxFromGeometry([d],!0));d.geometry.x=g.x;d.geometry.y=g.y;f.setAttributeForCell(d,"linkTarget",c);f.setLinkForCell(d,b);f.cellSizeUpdated(d,
-!0);f.getModel().beginUpdate();try{d=f.addCell(d),f.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{f.getModel().endUpdate()}f.setSelectionCell(d);f.scrollCellToVisible(f.getSelectionCell())}},!0)})).isEnabled=n;this.addAction("link...",mxUtils.bind(this,function(){if(f.isEnabled())if(f.cellEditor.isContentEditing()){var b=f.getSelectedElement(),d=f.getParentByName(b,"A",f.cellEditor.textarea),c="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var k=b.getElementsByTagName("a"),
-m=0;m<k.length&&null==d;m++)k[m].textContent==b.textContent&&(d=k[m]);null!=d&&"A"==d.nodeName&&(c=d.getAttribute("href")||"",f.selectNode(d));var v=f.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){f.cellEditor.restoreSelection(v);null!=b&&f.insertLink(b)}))}else f.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=n;this.addAction("autosize",function(){var b=f.getSelectionCells();if(null!=b){f.getModel().beginUpdate();
-try{for(var d=0;d<b.length;d++){var c=b[d];0<f.getModel().getChildCount(c)?f.updateGroupBounds([c],20):f.updateCellSize(c)}}finally{f.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){f.stopEditing();var b=f.getCommonStyle(f.getSelectionCells()),b="1"==mxUtils.getValue(b,"html","0")?null:"1";f.getModel().beginUpdate();try{for(var d=f.getEditableCells(f.getSelectionCells()),c=0;c<d.length;c++)if(state=f.getView().getState(d[c]),null!=state){var k=
-mxUtils.getValue(state.style,"html","0");if("1"==k&&null==b){var m=f.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(m=m.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var v=document.createElement("div");v.innerHTML=f.sanitizeHtml(m);m=mxUtils.extractTextWithWhitespace(v.childNodes);f.cellLabelChanged(state.cell,m);f.setCellStyles("html",b,[d[c]])}else"0"==k&&"1"==b&&(m=mxUtils.htmlEntities(f.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
-"1")&&(m=m.replace(/\n/g,"<br/>")),f.cellLabelChanged(state.cell,f.sanitizeHtml(m)),f.setCellStyles("html",b,[d[c]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=b?b:"0"],"cells",d))}finally{f.getModel().endUpdate()}});this.addAction("wordWrap",function(){var b=f.getView().getState(f.getSelectionCell()),d="wrap";f.stopEditing();null!=b&&"wrap"==b.style[mxConstants.STYLE_WHITE_SPACE]&&(d=null);f.setCellStyles(mxConstants.STYLE_WHITE_SPACE,d)});this.addAction("rotation",
-function(){var b="0",d=f.getView().getState(f.getSelectionCell());null!=d&&(b=d.style[mxConstants.STYLE_ROTATION]||b);b=new FilenameDialog(e,b,mxResources.get("apply"),function(b){null!=b&&0<b.length&&f.setCellStyles(mxConstants.STYLE_ROTATION,b)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(b.container,375,80,!0,!0);b.init()});this.addAction("resetView",function(){f.zoomTo(1);e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(b){f.isFastZoomEnabled()?
-f.lazyZoom(!0,!0,e.buttonZoomDelay):f.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(b){f.isFastZoomEnabled()?f.lazyZoom(!1,!0,e.buttonZoomDelay):f.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var b=f.isSelectionEmpty()?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells()),d=f.view.translate,c=f.view.scale;b.x=b.x/c-d.x;b.y=b.y/c-d.y;b.width/=c;b.height/=c;null!=f.backgroundImage&&
-b.add(new mxRectangle(0,0,f.backgroundImage.width,f.backgroundImage.height));0==b.width||0==b.height?(f.zoomTo(1),e.resetScrollbars()):(d=Editor.fitWindowBorders,null!=d&&(b.x-=d.x,b.y-=d.y,b.width+=d.width+d.x,b.height+=d.height+d.y),f.fitWindow(b))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){f.pageVisible||this.get("pageView").funct();var b=f.pageFormat,d=f.pageScale;f.zoomTo(Math.floor(20*Math.min((f.container.clientWidth-10)/b.width/d,(f.container.clientHeight-
-10)/b.height/d))/20);mxUtils.hasScrollbars(f.container)&&(b=f.getPagePadding(),f.container.scrollTop=b.y*f.view.scale-1,f.container.scrollLeft=Math.min(b.x*f.view.scale,(f.container.scrollWidth-f.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){f.pageVisible||this.get("pageView").funct();var b=f.pageFormat,d=f.pageScale;f.zoomTo(Math.floor(20*Math.min((f.container.clientWidth-10)/(2*b.width)/d,(f.container.clientHeight-10)/b.height/
-d))/20);mxUtils.hasScrollbars(f.container)&&(b=f.getPagePadding(),f.container.scrollTop=Math.min(b.y,(f.container.scrollHeight-f.container.clientHeight)/2),f.container.scrollLeft=Math.min(b.x,(f.container.scrollWidth-f.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){f.pageVisible||this.get("pageView").funct();f.zoomTo(Math.floor(20*(f.container.clientWidth-10)/f.pageFormat.width/f.pageScale)/20);if(mxUtils.hasScrollbars(f.container)){var b=
-f.getPagePadding();f.container.scrollLeft=Math.min(b.x*f.view.scale,(f.container.scrollWidth-f.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.editorUi,parseInt(100*f.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(b){b=parseInt(b);!isNaN(b)&&0<b&&f.zoomTo(b/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(b.container,300,80,!0,!0);b.init()}),null,null,
-Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.editorUi,parseInt(100*f.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(b){b=parseInt(b);!isNaN(b)&&0<b&&(b=new ChangePageSetup(e,null,null,null,b/100),b.ignoreColor=!0,b.ignoreImage=!0,f.model.execute(b))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(b.container,300,80,!0,!0);b.init()}));var t=null,t=this.addAction("grid",function(){f.setGridEnabled(!f.isGridEnabled());
-e.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");t.setToggleAction(!0);t.setSelectedCallback(function(){return f.isGridEnabled()});t.setEnabled(!1);t=this.addAction("guides",function(){f.graphHandler.guidesEnabled=!f.graphHandler.guidesEnabled;e.fireEvent(new mxEventObject("guidesEnabledChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return f.graphHandler.guidesEnabled});t.setEnabled(!1);t=this.addAction("tooltips",function(){f.tooltipHandler.setEnabled(!f.tooltipHandler.isEnabled());
-e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return f.tooltipHandler.isEnabled()});t=this.addAction("collapseExpand",function(){var b=new ChangePageSetup(e);b.ignoreColor=!0;b.ignoreImage=!0;b.foldingEnabled=!f.foldingEnabled;f.model.execute(b)});t.setToggleAction(!0);t.setSelectedCallback(function(){return f.foldingEnabled});t.isEnabled=n;t=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});t.setToggleAction(!0);
-t.setSelectedCallback(function(){return f.scrollbars});t=this.addAction("pageView",mxUtils.bind(this,function(){e.setPageVisible(!f.pageVisible)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return f.pageVisible});t=this.addAction("connectionArrows",function(){f.connectionArrowsEnabled=!f.connectionArrowsEnabled;e.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");t.setToggleAction(!0);t.setSelectedCallback(function(){return f.connectionArrowsEnabled});t=
-this.addAction("connectionPoints",function(){f.setConnectable(!f.connectionHandler.isEnabled());e.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");t.setToggleAction(!0);t.setSelectedCallback(function(){return f.connectionHandler.isEnabled()});t=this.addAction("copyConnect",function(){f.connectionHandler.setCreateTarget(!f.connectionHandler.isCreateTarget());e.fireEvent(new mxEventObject("copyConnectChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return f.connectionHandler.isCreateTarget()});
-t.isEnabled=n;t=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});t.setToggleAction(!0);t.setSelectedCallback(function(){return e.editor.autosave});t.isEnabled=n;t.visible=!1;this.addAction("help",function(){var b="";mxResources.isLanguageSupported(mxClient.language)&&(b="_"+mxClient.language);f.openLink(RESOURCES_PATH+"/help"+b+".html")});var d=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){d||(e.showDialog((new AboutDialog(e)).container,
-320,280,!0,!0,function(){d=!1}),d=!0)}));t=mxUtils.bind(this,function(b,d,c,e){return this.addAction(b,function(){if(null!=c&&f.cellEditor.isContentEditing())c();else{f.stopEditing(!1);f.getModel().beginUpdate();try{var b=f.getEditableCells(f.getSelectionCells());f.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,d,b);(d&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?f.updateLabelElements(b,function(b){b.style.fontWeight=null;"B"==b.nodeName&&f.replaceElement(b)}):(d&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?
-f.updateLabelElements(b,function(b){b.style.fontStyle=null;"I"==b.nodeName&&f.replaceElement(b)}):(d&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&f.updateLabelElements(b,function(b){b.style.textDecoration=null;"U"==b.nodeName&&f.replaceElement(b)});for(var g=0;g<b.length;g++)0==f.model.getChildCount(b[g])&&f.autoSizeCell(b[g],!1)}finally{f.getModel().endUpdate()}}},null,null,e)});t("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");t("italic",
+Actions.prototype.init=function(){function b(b){g.escape();b=g.deleteCells(g.getDeletableCells(g.getSelectionCells()),b);null!=b&&g.setSelectionCells(b)}function c(){if(!g.isSelectionEmpty()){g.getModel().beginUpdate();try{for(var b=g.getSelectionCells(),d=0;d<b.length;d++)g.cellLabelChanged(b[d],"")}finally{g.getModel().endUpdate()}}}var e=this.editorUi,k=e.editor,g=k.graph,p=function(){return Action.prototype.isEnabled.apply(this,arguments)&&g.isEnabled()};this.addAction("new...",function(){g.openLink(e.getUrl())});
+this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.openFile()});this.addAction("smartFit",function(){g.popupMenuHandler.hideMenu();var b=g.view.scale,d=g.view.translate.x,c=g.view.translate.y;e.actions.get("resetView").funct();1E-5>Math.abs(b-g.view.scale)&&d==g.view.translate.x&&c==g.view.translate.y&&e.actions.get(g.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){g.isEnabled()&&(g.isSelectionEmpty()?e.actions.get("smartFit").funct():
+g.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var f=mxUtils.parseXml(b);k.graph.setSelectionCells(k.graph.importGraphModel(f.documentElement))}catch(q){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+q.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
+null})}).isEnabled=p;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=p;this.addAction("saveAs...",function(){e.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=p;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,304,!0,!0)});this.addAction("editDiagram...",function(){var b=new EditDiagramDialog(e);e.showDialog(b.container,620,420,!0,!1);b.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,
+320,240,!0,!0)}).isEnabled=p;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(g,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var b=null;try{b=e.copyXml(),
+null!=b&&g.removeCells(b,!1)}catch(l){}null==b&&mxClipboard.cut(g)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(f){}try{mxClipboard.copy(g)}catch(f){e.handleError(f)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{e.pasteXml(b,!0)}finally{g.getModel().endUpdate()}}else mxClipboard.paste(g)}),
+b=!0)}catch(l){}b||mxClipboard.paste(g)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(b){function d(b){if(null!=b){for(var d=!0,f=0;f<b.length&&d;f++)d=d&&g.model.isEdge(b[f]);var c=g.view.translate,f=g.view.scale,e=c.x,l=c.y,c=null;if(1==b.length&&d){var k=g.getCellGeometry(b[0]);null!=k&&(c=k.getTerminalPoint(!0))}c=null!=c?c:g.getBoundingBoxFromGeometry(b,d);null!=c&&(d=Math.round(g.snap(g.popupMenuHandler.triggerX/f-e)),f=Math.round(g.snap(g.popupMenuHandler.triggerY/
+f-l)),g.cellsMoved(b,d-c.x,f-c.y))}}function f(){g.getModel().beginUpdate();try{d(mxClipboard.paste(g))}finally{g.getModel().endUpdate()}}if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{d(e.pasteXml(b,!0))}finally{g.getModel().endUpdate()}}else f()}),b=!0)}catch(q){}b||f()}});this.addAction("copySize",function(){var b=g.getSelectionCell();g.isEnabled()&&null!=b&&g.getModel().isVertex(b)&&
+(b=g.getCellGeometry(b),null!=b&&(e.copiedSize=new mxRectangle(b.x,b.y,b.width,b.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(){if(g.isEnabled()&&!g.isSelectionEmpty()&&null!=e.copiedSize){g.getModel().beginUpdate();try{for(var b=g.getResizableCells(g.getSelectionCells()),d=0;d<b.length;d++)if(g.getModel().isVertex(b[d])){var c=g.getCellGeometry(b[d]);null!=c&&(c=c.clone(),c.width=e.copiedSize.width,c.height=e.copiedSize.height,g.getModel().setGeometry(b[d],c))}}finally{g.getModel().endUpdate()}}},
+null,null,"Alt+Shift+V");this.addAction("copyData",function(){var b=g.getSelectionCell()||g.getModel().getRoot();g.isEnabled()&&null!=b&&(b=b.cloneValue(),null==b||isNaN(b.nodeType)||(e.copiedValue=b))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(b,d){function f(d,f){var e=c.getValue(d);f=d.cloneValue(f);f.removeAttribute("placeholders");null==e||isNaN(e.nodeType)||f.setAttribute("placeholders",e.getAttribute("placeholders"));null!=b&&mxEvent.isShiftDown(b)||f.setAttribute("label",
+g.convertValueToString(d));c.setValue(d,f)}b=null!=d?d:b;var c=g.getModel();if(g.isEnabled()&&!g.isSelectionEmpty()&&null!=e.copiedValue){c.beginUpdate();try{var l=g.getEditableCells(g.getSelectionCells());if(0==l.length)f(c.getRoot(),e.copiedValue);else for(var k=0;k<l.length;k++)f(l[k],e.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,e){d=null!=e?e:d;null!=d&&mxEvent.isShiftDown(d)?c():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||
+mxEvent.isAltDown(d)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){c()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{g.setSelectionCells(g.duplicateCells()),g.scrollCellToVisible(g.getSelectionCell())}catch(f){e.handleError(f)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(b,d){b=null!=d?d:b;g.turnShapes(g.getResizableCells(g.getSelectionCells()),
+null!=b?mxEvent.isShiftDown(b):!1)},null,null,Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(b){b=g.getSelectionCell();g.isEnabled()&&null!=b&&g.addSelectionCells(g.getEdges(b))}));this.addAction("selectVertices",function(){g.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){g.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){g.selectAll(null,!0)},null,
+null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){g.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!g.isSelectionEmpty()){g.getModel().beginUpdate();try{var b=g.getSelectionCells(),d=g.getCurrentCellStyle(g.getSelectionCell()),c=1==mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,1)?0:1;g.setCellStyles(mxConstants.STYLE_MOVABLE,c,b);g.setCellStyles(mxConstants.STYLE_RESIZABLE,c,b);g.setCellStyles(mxConstants.STYLE_ROTATABLE,c,b);g.setCellStyles(mxConstants.STYLE_DELETABLE,
+c,b);g.setCellStyles(mxConstants.STYLE_EDITABLE,c,b);g.setCellStyles("connectable",c,b)}finally{g.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){g.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){g.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){g.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){g.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",
+function(){g.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){g.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){g.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(b){g.orderCells(!1,null,!0)});this.addAction("sendBackward",function(b){g.orderCells(!0,null,!0)});this.addAction("group",function(){if(g.isEnabled()){var b=mxUtils.sortCells(g.getSelectionCells(),!0);1!=b.length||g.isTable(b[0])||
+g.isTableRow(b[0])?(b=g.getCellsForGroup(b),1<b.length&&g.setSelectionCell(g.groupCells(null,0,b))):g.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(g.isEnabled()){var b=g.getEditableCells(g.getSelectionCells());g.model.beginUpdate();try{var d=g.ungroupCells();if(null!=b)for(var c=0;c<b.length;c++)g.model.contains(b[c])&&(0==g.model.getChildCount(b[c])&&g.model.isVertex(b[c])&&g.setCellStyles("container","0",[b[c]]),d.push(b[c]))}finally{g.model.endUpdate()}0<
+d.length&&g.setSelectionCells(d)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(g.isEnabled()){var b=g.getSelectionCells();if(null!=b){for(var d=[],c=0;c<b.length;c++)g.isTableRow(b[c])||g.isTableCell(b[c])||d.push(b[c]);g.removeCellsFromParent(d)}}});this.addAction("edit",function(){g.isEnabled()&&g.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var b=g.getSelectionCell()||g.getModel().getRoot();e.showDataDialog(b)},null,
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var b=g.getSelectionCell();if(g.isEnabled()&&null!=b&&g.isCellEditable(b)){var d="";if(mxUtils.isNode(b.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&b.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==c&&(c=b.value.getAttribute("tooltip"));null!=c&&(d=c)}d=new TextareaDialog(e,mxResources.get("editTooltip")+":",d,function(d){g.setTooltipForCell(b,
+d)});e.showDialog(d.container,320,200,!0,!0);d.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var b=g.getLinkForCell(g.getSelectionCell());null!=b&&g.openLink(b)});this.addAction("editLink...",function(){var b=g.getSelectionCell();if(g.isEnabled()&&null!=b&&g.isCellEditable(b)){var d=g.getLinkForCell(b)||"";e.showLinkDialog(d,mxResources.get("apply"),function(d,c,f){d=mxUtils.trim(d);g.setLinkForCell(b,0<d.length?d:null);g.setAttributeForCell(b,"linkTarget",f)},!0,g.getLinkTargetForCell(b))}},
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(g.clearSelection(),e.actions.get("image").funct())})).isEnabled=p;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(b,d,c){b=mxUtils.trim(b);if(0<b.length){var f=null,e=g.getLinkTitle(b);null!=d&&0<d.length&&(f=d[0].iconUrl,
+e=d[0].name||d[0].type,e=e.charAt(0).toUpperCase()+e.substring(1),30<e.length&&(e=e.substring(0,30)+"..."));d=new mxCell(e,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=f?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+f:"spacing=10;"));d.vertex=!0;f=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry([d],!0));d.geometry.x=f.x;d.geometry.y=f.y;g.setAttributeForCell(d,"linkTarget",c);g.setLinkForCell(d,b);g.cellSizeUpdated(d,
+!0);g.getModel().beginUpdate();try{d=g.addCell(d),g.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{g.getModel().endUpdate()}g.setSelectionCell(d);g.scrollCellToVisible(g.getSelectionCell())}},!0)})).isEnabled=p;this.addAction("link...",mxUtils.bind(this,function(){if(g.isEnabled())if(g.cellEditor.isContentEditing()){var b=g.getSelectedElement(),d=g.getParentByName(b,"A",g.cellEditor.textarea),c="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var k=b.getElementsByTagName("a"),
+n=0;n<k.length&&null==d;n++)k[n].textContent==b.textContent&&(d=k[n]);null!=d&&"A"==d.nodeName&&(c=d.getAttribute("href")||"",g.selectNode(d));var p=g.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){g.cellEditor.restoreSelection(p);null!=b&&g.insertLink(b)}))}else g.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=p;this.addAction("autosize",function(){var b=g.getSelectionCells();if(null!=b){g.getModel().beginUpdate();
+try{for(var d=0;d<b.length;d++){var c=b[d];0<g.getModel().getChildCount(c)?g.updateGroupBounds([c],20):g.updateCellSize(c)}}finally{g.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){g.stopEditing();var b=g.getCommonStyle(g.getSelectionCells()),b="1"==mxUtils.getValue(b,"html","0")?null:"1";g.getModel().beginUpdate();try{for(var d=g.getEditableCells(g.getSelectionCells()),c=0;c<d.length;c++)if(state=g.getView().getState(d[c]),null!=state){var k=
+mxUtils.getValue(state.style,"html","0");if("1"==k&&null==b){var n=g.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(n=n.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var p=document.createElement("div");p.innerHTML=g.sanitizeHtml(n);n=mxUtils.extractTextWithWhitespace(p.childNodes);g.cellLabelChanged(state.cell,n);g.setCellStyles("html",b,[d[c]])}else"0"==k&&"1"==b&&(n=mxUtils.htmlEntities(g.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
+"1")&&(n=n.replace(/\n/g,"<br/>")),g.cellLabelChanged(state.cell,g.sanitizeHtml(n)),g.setCellStyles("html",b,[d[c]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=b?b:"0"],"cells",d))}finally{g.getModel().endUpdate()}});this.addAction("wordWrap",function(){var b=g.getView().getState(g.getSelectionCell()),d="wrap";g.stopEditing();null!=b&&"wrap"==b.style[mxConstants.STYLE_WHITE_SPACE]&&(d=null);g.setCellStyles(mxConstants.STYLE_WHITE_SPACE,d)});this.addAction("rotation",
+function(){var b="0",d=g.getView().getState(g.getSelectionCell());null!=d&&(b=d.style[mxConstants.STYLE_ROTATION]||b);b=new FilenameDialog(e,b,mxResources.get("apply"),function(b){null!=b&&0<b.length&&g.setCellStyles(mxConstants.STYLE_ROTATION,b)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(b.container,375,80,!0,!0);b.init()});this.addAction("resetView",function(){g.zoomTo(1);e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(b){g.isFastZoomEnabled()?
+g.lazyZoom(!0,!0,e.buttonZoomDelay):g.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(b){g.isFastZoomEnabled()?g.lazyZoom(!1,!0,e.buttonZoomDelay):g.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var b=g.isSelectionEmpty()?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells()),d=g.view.translate,c=g.view.scale;b.x=b.x/c-d.x;b.y=b.y/c-d.y;b.width/=c;b.height/=c;null!=g.backgroundImage&&
+b.add(new mxRectangle(0,0,g.backgroundImage.width,g.backgroundImage.height));0==b.width||0==b.height?(g.zoomTo(1),e.resetScrollbars()):(d=Editor.fitWindowBorders,null!=d&&(b.x-=d.x,b.y-=d.y,b.width+=d.width+d.x,b.height+=d.height+d.y),g.fitWindow(b))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){g.pageVisible||this.get("pageView").funct();var b=g.pageFormat,d=g.pageScale;g.zoomTo(Math.floor(20*Math.min((g.container.clientWidth-10)/b.width/d,(g.container.clientHeight-
+10)/b.height/d))/20);mxUtils.hasScrollbars(g.container)&&(b=g.getPagePadding(),g.container.scrollTop=b.y*g.view.scale-1,g.container.scrollLeft=Math.min(b.x*g.view.scale,(g.container.scrollWidth-g.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){g.pageVisible||this.get("pageView").funct();var b=g.pageFormat,d=g.pageScale;g.zoomTo(Math.floor(20*Math.min((g.container.clientWidth-10)/(2*b.width)/d,(g.container.clientHeight-10)/b.height/
+d))/20);mxUtils.hasScrollbars(g.container)&&(b=g.getPagePadding(),g.container.scrollTop=Math.min(b.y,(g.container.scrollHeight-g.container.clientHeight)/2),g.container.scrollLeft=Math.min(b.x,(g.container.scrollWidth-g.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){g.pageVisible||this.get("pageView").funct();g.zoomTo(Math.floor(20*(g.container.clientWidth-10)/g.pageFormat.width/g.pageScale)/20);if(mxUtils.hasScrollbars(g.container)){var b=
+g.getPagePadding();g.container.scrollLeft=Math.min(b.x*g.view.scale,(g.container.scrollWidth-g.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.editorUi,parseInt(100*g.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(b){b=parseInt(b);!isNaN(b)&&0<b&&g.zoomTo(b/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(b.container,300,80,!0,!0);b.init()}),null,null,
+Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.editorUi,parseInt(100*g.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(b){b=parseInt(b);!isNaN(b)&&0<b&&(b=new ChangePageSetup(e,null,null,null,b/100),b.ignoreColor=!0,b.ignoreImage=!0,g.model.execute(b))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(b.container,300,80,!0,!0);b.init()}));var t=null,t=this.addAction("grid",function(){g.setGridEnabled(!g.isGridEnabled());
+e.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");t.setToggleAction(!0);t.setSelectedCallback(function(){return g.isGridEnabled()});t.setEnabled(!1);t=this.addAction("guides",function(){g.graphHandler.guidesEnabled=!g.graphHandler.guidesEnabled;e.fireEvent(new mxEventObject("guidesEnabledChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.graphHandler.guidesEnabled});t.setEnabled(!1);t=this.addAction("tooltips",function(){g.tooltipHandler.setEnabled(!g.tooltipHandler.isEnabled());
+e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.tooltipHandler.isEnabled()});t=this.addAction("collapseExpand",function(){var b=new ChangePageSetup(e);b.ignoreColor=!0;b.ignoreImage=!0;b.foldingEnabled=!g.foldingEnabled;g.model.execute(b)});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.foldingEnabled});t.isEnabled=p;t=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});t.setToggleAction(!0);
+t.setSelectedCallback(function(){return g.scrollbars});t=this.addAction("pageView",mxUtils.bind(this,function(){e.setPageVisible(!g.pageVisible)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return g.pageVisible});t=this.addAction("connectionArrows",function(){g.connectionArrowsEnabled=!g.connectionArrowsEnabled;e.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");t.setToggleAction(!0);t.setSelectedCallback(function(){return g.connectionArrowsEnabled});t=
+this.addAction("connectionPoints",function(){g.setConnectable(!g.connectionHandler.isEnabled());e.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");t.setToggleAction(!0);t.setSelectedCallback(function(){return g.connectionHandler.isEnabled()});t=this.addAction("copyConnect",function(){g.connectionHandler.setCreateTarget(!g.connectionHandler.isCreateTarget());e.fireEvent(new mxEventObject("copyConnectChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.connectionHandler.isCreateTarget()});
+t.isEnabled=p;t=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});t.setToggleAction(!0);t.setSelectedCallback(function(){return e.editor.autosave});t.isEnabled=p;t.visible=!1;this.addAction("help",function(){var b="";mxResources.isLanguageSupported(mxClient.language)&&(b="_"+mxClient.language);g.openLink(RESOURCES_PATH+"/help"+b+".html")});var d=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){d||(e.showDialog((new AboutDialog(e)).container,
+320,280,!0,!0,function(){d=!1}),d=!0)}));t=mxUtils.bind(this,function(b,d,c,e){return this.addAction(b,function(){if(null!=c&&g.cellEditor.isContentEditing())c();else{g.stopEditing(!1);g.getModel().beginUpdate();try{var b=g.getEditableCells(g.getSelectionCells());g.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,d,b);(d&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?g.updateLabelElements(b,function(b){b.style.fontWeight=null;"B"==b.nodeName&&g.replaceElement(b)}):(d&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?
+g.updateLabelElements(b,function(b){b.style.fontStyle=null;"I"==b.nodeName&&g.replaceElement(b)}):(d&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&g.updateLabelElements(b,function(b){b.style.textDecoration=null;"U"==b.nodeName&&g.replaceElement(b)});for(var f=0;f<b.length;f++)0==g.model.getChildCount(b[f])&&g.autoSizeCell(b[f],!1)}finally{g.getModel().endUpdate()}}},null,null,e)});t("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");t("italic",
mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");t("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){e.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){e.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){e.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});
this.addAction("gradientColor...",function(){e.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){e.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){e.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",
-function(){f.getModel().beginUpdate();try{f.setCellStyles(mxConstants.STYLE_DASHED,null),f.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("dashed",function(){f.getModel().beginUpdate();try{f.setCellStyles(mxConstants.STYLE_DASHED,"1"),f.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),
-e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("dotted",function(){f.getModel().beginUpdate();try{f.setCellStyles(mxConstants.STYLE_DASHED,"1"),f.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",
-f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("sharp",function(){f.getModel().beginUpdate();try{f.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),f.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("rounded",function(){f.getModel().beginUpdate();try{f.setCellStyles(mxConstants.STYLE_ROUNDED,
-"1"),f.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!f.isSelectionEmpty()&&f.isEnabled()){f.getModel().beginUpdate();try{var b=f.getSelectionCells(),d=f.getCurrentCellStyle(b[0]),c="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")?"0":"1";f.setCellStyles(mxConstants.STYLE_ROUNDED,
-c);f.setCellStyles(mxConstants.STYLE_CURVED,null);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}}});this.addAction("curved",function(){f.getModel().beginUpdate();try{f.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),f.setCellStyles(mxConstants.STYLE_CURVED,"1"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
-"values",["0","1"],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}});this.addAction("collapsible",function(){var b=f.view.getState(f.getSelectionCell()),d="1";null!=b&&null!=f.getFoldingImage(b)&&(d="0");f.setCellStyles("collapsible",d);e.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[d],"cells",f.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var b=f.getEditableCells(f.getSelectionCells());if(null!=b&&0<b.length){var d=
-f.getModel(),d=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",d.getStyle(b[0])||"",function(d){null!=d&&f.setCellStyle(mxUtils.trim(d),b)},null,null,400,220);this.editorUi.showDialog(d.container,420,300,!0,!0);d.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){f.isEnabled()&&!f.isSelectionEmpty()&&e.setDefaultStyle(f.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){f.isEnabled()&&e.clearDefaultStyle()},
-null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var b=f.getSelectionCell();if(null!=b&&f.getModel().isEdge(b)){var d=k.graph.selectionCellsHandler.getHandler(b);if(d instanceof mxEdgeHandler){for(var c=f.view.translate,e=f.view.scale,m=c.x,c=c.y,b=f.getModel().getParent(b),n=f.getCellGeometry(b);f.getModel().isVertex(b)&&null!=n;)m+=n.x,c+=n.y,b=f.getModel().getParent(b),n=f.getCellGeometry(b);m=Math.round(f.snap(f.popupMenuHandler.triggerX/e-m));e=Math.round(f.snap(f.popupMenuHandler.triggerY/
-e-c));d.addPointAt(d.state,m,e)}}});this.addAction("removeWaypoint",function(){var b=e.actions.get("removeWaypoint");null!=b.handler&&b.handler.removePoint(b.handler.state,b.index)});this.addAction("clearWaypoints",function(b,d){b=null!=d?d:b;var c=f.getSelectionCells();if(null!=c){c=f.getEditableCells(f.addAllEdges(c));f.getModel().beginUpdate();try{for(var g=0;g<c.length;g++){var e=c[g];if(f.getModel().isEdge(e)){var l=f.getCellGeometry(e);mxEvent.isShiftDown(b)?(f.setCellStyles(mxConstants.STYLE_EXIT_X,
-null,[e]),f.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[e]),f.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[e]),f.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[e])):null!=l&&(l=l.clone(),l.points=null,l.x=0,l.y=0,l.offset=null,f.getModel().setGeometry(e,l))}}}finally{f.getModel().endUpdate()}}},null,null,"Alt+Shift+C");t=this.addAction("subscript",mxUtils.bind(this,function(){f.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");t=this.addAction("superscript",
-mxUtils.bind(this,function(){f.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())){var b=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=f.getView().getState(f.getSelectionCell()),c="";null!=d&&(c=d.style[mxConstants.STYLE_IMAGE]||c);var k=f.cellEditor.saveSelection();e.showImageDialog(b,c,function(b,d,c){if(f.cellEditor.isContentEditing())f.cellEditor.restoreSelection(k),
-f.insertImage(b,d,c);else{var g=f.getSelectionCells();if(null!=b&&(0<b.length||0<g.length)){var e=null;f.getModel().beginUpdate();try{if(0==g.length){var g=[f.insertVertex(f.getDefaultParent(),null,"",0,0,d,c,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],l=f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(g,!0));g[0].geometry.x=l.x;g[0].geometry.y=l.y;e=g;f.fireEvent(new mxEventObject("cellsInserted","cells",e))}f.setCellStyles(mxConstants.STYLE_IMAGE,
-0<b.length?b:null,g);var m=f.getCurrentCellStyle(g[0]);"image"!=m[mxConstants.STYLE_SHAPE]&&"label"!=m[mxConstants.STYLE_SHAPE]?f.setCellStyles(mxConstants.STYLE_SHAPE,"image",g):0==b.length&&f.setCellStyles(mxConstants.STYLE_SHAPE,null,g);if(1==f.getSelectionCount()&&null!=d&&null!=c){var p=g[0],q=f.getModel().getGeometry(p);null!=q&&(q=q.clone(),q.width=d,q.height=c,f.getModel().setGeometry(p,q))}}finally{f.getModel().endUpdate()}null!=e&&(f.setSelectionCells(e),f.scrollCellToVisible(e[0]))}}},
-f.cellEditor.isContentEditing(),!f.cellEditor.isContentEditing())}}).isEnabled=n;t=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),
+function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_DASHED,null),g.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("dashed",function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_DASHED,"1"),g.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),
+e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("dotted",function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_DASHED,"1"),g.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",
+g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("sharp",function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),g.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("rounded",function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_ROUNDED,
+"1"),g.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!g.isSelectionEmpty()&&g.isEnabled()){g.getModel().beginUpdate();try{var b=g.getSelectionCells(),d=g.getCurrentCellStyle(b[0]),c="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")?"0":"1";g.setCellStyles(mxConstants.STYLE_ROUNDED,
+c);g.setCellStyles(mxConstants.STYLE_CURVED,null);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}}});this.addAction("curved",function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),g.setCellStyles(mxConstants.STYLE_CURVED,"1"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
+"values",["0","1"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("collapsible",function(){var b=g.view.getState(g.getSelectionCell()),d="1";null!=b&&null!=g.getFoldingImage(b)&&(d="0");g.setCellStyles("collapsible",d);e.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[d],"cells",g.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var b=g.getEditableCells(g.getSelectionCells());if(null!=b&&0<b.length){var d=
+g.getModel(),d=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",d.getStyle(b[0])||"",function(d){null!=d&&g.setCellStyle(mxUtils.trim(d),b)},null,null,400,220);this.editorUi.showDialog(d.container,420,300,!0,!0);d.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){g.isEnabled()&&!g.isSelectionEmpty()&&e.setDefaultStyle(g.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){g.isEnabled()&&e.clearDefaultStyle()},
+null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var b=g.getSelectionCell();if(null!=b&&g.getModel().isEdge(b)){var d=k.graph.selectionCellsHandler.getHandler(b);if(d instanceof mxEdgeHandler){for(var c=g.view.translate,e=g.view.scale,n=c.x,c=c.y,b=g.getModel().getParent(b),p=g.getCellGeometry(b);g.getModel().isVertex(b)&&null!=p;)n+=p.x,c+=p.y,b=g.getModel().getParent(b),p=g.getCellGeometry(b);n=Math.round(g.snap(g.popupMenuHandler.triggerX/e-n));e=Math.round(g.snap(g.popupMenuHandler.triggerY/
+e-c));d.addPointAt(d.state,n,e)}}});this.addAction("removeWaypoint",function(){var b=e.actions.get("removeWaypoint");null!=b.handler&&b.handler.removePoint(b.handler.state,b.index)});this.addAction("clearWaypoints",function(b,d){b=null!=d?d:b;var c=g.getSelectionCells();if(null!=c){c=g.getEditableCells(g.addAllEdges(c));g.getModel().beginUpdate();try{for(var f=0;f<c.length;f++){var e=c[f];if(g.getModel().isEdge(e)){var l=g.getCellGeometry(e);mxEvent.isShiftDown(b)?(g.setCellStyles(mxConstants.STYLE_EXIT_X,
+null,[e]),g.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[e]),g.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[e]),g.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[e])):null!=l&&(l=l.clone(),l.points=null,l.x=0,l.y=0,l.offset=null,g.getModel().setGeometry(e,l))}}}finally{g.getModel().endUpdate()}}},null,null,"Alt+Shift+C");t=this.addAction("subscript",mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");t=this.addAction("superscript",
+mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=g.getView().getState(g.getSelectionCell()),c="";null!=d&&(c=d.style[mxConstants.STYLE_IMAGE]||c);var k=g.cellEditor.saveSelection();e.showImageDialog(b,c,function(b,d,c){if(g.cellEditor.isContentEditing())g.cellEditor.restoreSelection(k),
+g.insertImage(b,d,c);else{var f=g.getSelectionCells();if(null!=b&&(0<b.length||0<f.length)){var e=null;g.getModel().beginUpdate();try{if(0==f.length){var f=[g.insertVertex(g.getDefaultParent(),null,"",0,0,d,c,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],l=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry(f,!0));f[0].geometry.x=l.x;f[0].geometry.y=l.y;e=f;g.fireEvent(new mxEventObject("cellsInserted","cells",e))}g.setCellStyles(mxConstants.STYLE_IMAGE,
+0<b.length?b:null,f);var m=g.getCurrentCellStyle(f[0]);"image"!=m[mxConstants.STYLE_SHAPE]&&"label"!=m[mxConstants.STYLE_SHAPE]?g.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==b.length&&g.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==g.getSelectionCount()&&null!=d&&null!=c){var n=f[0],q=g.getModel().getGeometry(n);null!=q&&(q=q.clone(),q.width=d,q.height=c,g.getModel().setGeometry(n,q))}}finally{g.getModel().endUpdate()}null!=e&&(g.setSelectionCells(e),g.scrollCellToVisible(e[0]))}}},
+g.cellEditor.isContentEditing(),!g.cellEditor.isContentEditing())}}).isEnabled=p;t=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),
this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));t=this.addAction("formatPanel",mxUtils.bind(this,function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return 0<e.formatWidth}));
t=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(e,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
-null,null,Editor.ctrlKey+"+Shift+O");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(b,c,e,k,f){var n;"..."==b.substring(b.length-3)?(b=b.substring(0,b.length-3),n=mxResources.get(b)+"..."):n=mxResources.get(b);return this.put(b,new Action(n,c,e,k,f))};Actions.prototype.put=function(b,c){return this.actions[b]=c};Actions.prototype.get=function(b){return this.actions[b]};
-function Action(b,c,e,k,f){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(c);this.enabled=null!=e?e:!0;this.iconCls=k;this.shortcut=f;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+null,null,Editor.ctrlKey+"+Shift+O");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(b,c,e,k,g){var p;"..."==b.substring(b.length-3)?(b=b.substring(0,b.length-3),p=mxResources.get(b)+"..."):p=mxResources.get(b);return this.put(b,new Action(p,c,e,k,g))};Actions.prototype.put=function(b,c){return this.actions[b]=c};Actions.prototype.get=function(b){return this.actions[b]};
+function Action(b,c,e,k,g){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(c);this.enabled=null!=e?e:!0;this.iconCls=k;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,c){mxEventSource.call(this);this.ui=b;this.shadowData=this.data=c||"";this.shadowPages=null;this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;
DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(b,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(b,c):this.updateFile(b,c)};
-DrawioFile.prototype.updateFile=function(b,c,e,k){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(f){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=f?this.mergeFile(f,b,c,k):this.reloadFile(b,c))}catch(n){null!=c&&c(n)}}),c))};
-DrawioFile.prototype.mergeFile=function(b,c,e,k){var f=!0;try{this.stats.fileMerged++;var n=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),t=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=t&&0<t.length){this.shadowPages=t;this.backupPatch=this.isModified()?this.ui.diffPages(n,this.ui.pages):null;var d=[this.ui.diffPages(null!=k?k:n,this.shadowPages)];if(!this.ignorePatches(d)){var g=this.ui.patchPages(n,
-d[0]);k={};var l=this.ui.getHashValueForPages(g,k),n={},q=this.ui.getHashValueForPages(this.shadowPages,n);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",q==l,l);if(null!=l&&l!=q){var p=this.compressReportData(this.getAnonymizedXmlForPages(t)),m=this.compressReportData(this.getAnonymizedXmlForPages(g)),v=this.ui.hashValue(b.getCurrentEtag()),u=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
-"\nChecksum: "+l+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(n)+"\nFrom: "+v+"\nTo: "+u+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+m,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw f=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(E){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=e&&e(E);try{if(f)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,E);else{var B=this.getCurrentUser(),x=null!=B?B.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,E)}}catch(A){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var c=new mxCodec(mxUtils.createXmlDocument()),e=c.document.createElement("mxfile");if(null!=b)for(var k=0;k<b.length;k++){var f=c.encode(new mxGraphModel(b[k].root));"1"!=urlParams.dev&&(f=this.ui.anonymizeNode(f,!0));f.setAttribute("id",b[k].getId());b[k].viewState&&this.ui.editor.graph.saveViewState(b[k].viewState,f,!0);e.appendChild(f)}return mxUtils.getPrettyXml(e)};
+DrawioFile.prototype.updateFile=function(b,c,e,k){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=g?this.mergeFile(g,b,c,k):this.reloadFile(b,c))}catch(p){null!=c&&c(p)}}),c))};
+DrawioFile.prototype.mergeFile=function(b,c,e,k){var g=!0;try{this.stats.fileMerged++;var p=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),t=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=t&&0<t.length){this.shadowPages=t;this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;var d=[this.ui.diffPages(null!=k?k:p,this.shadowPages)];if(!this.ignorePatches(d)){var f=this.ui.patchPages(p,
+d[0]);k={};var l=this.ui.getHashValueForPages(f,k),p={},m=this.ui.getHashValueForPages(this.shadowPages,p);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",m==l,l);if(null!=l&&l!=m){var q=this.compressReportData(this.getAnonymizedXmlForPages(t)),n=this.compressReportData(this.getAnonymizedXmlForPages(f)),v=this.ui.hashValue(b.getCurrentEtag()),u=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
+"\nChecksum: "+l+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(p)+"\nFrom: "+v+"\nTo: "+u+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+n,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(H){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=e&&e(H);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,H);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,H)}}catch(D){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var c=new mxCodec(mxUtils.createXmlDocument()),e=c.document.createElement("mxfile");if(null!=b)for(var k=0;k<b.length;k++){var g=c.encode(new mxGraphModel(b[k].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",b[k].getId());b[k].viewState&&this.ui.editor.graph.saveViewState(b[k].viewState,g,!0);e.appendChild(g)}return mxUtils.getPrettyXml(e)};
DrawioFile.prototype.compressReportData=function(b,c,e){c=null!=c?c:1E4;null!=e&&null!=b&&b.length>e?b=b.substring(0,e)+"[...]":null!=b&&b.length>c&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,c,e,k,f){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=c)for(b=0;b<c.length;b++)this.ui.anonymizePatch(c[b]);var n=mxUtils.bind(this,function(b){var d=this.compressReportData(JSON.stringify(c,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+f+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=b?"\n\nRemote:\n"+b:""),null,7E4)});null==k?n(null):this.getLatestVersion(mxUtils.bind(this,function(b){null!=b&&b.getCurrentEtag()==k?n(b):n(null)}),function(){})}else{var t=this.getCurrentUser(),d=null!=t?t.id:"unknown";EditorUi.logError("Checksum Error in "+f+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
-try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:f,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(g){}}}catch(g){}};
-DrawioFile.prototype.sendErrorReport=function(b,c,e,k){try{var f=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),d=null!=t?this.ui.hashValue(t.id):"unknown",g=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",l=this.getTitle(),q=l.lastIndexOf("."),t="xml";0<q&&(t=l.substring(q));var p=null!=e?e.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+t+")\nUser="+d+g+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:
-"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+f+"\n\nData:\n"+n,k)}catch(m){}};
-DrawioFile.prototype.reloadFile=function(b,c){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),n=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(n,c,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var f=this.ui.getCurrentFile();null!=f&&(f.stats=this.stats);null!=b&&
+DrawioFile.prototype.checksumError=function(b,c,e,k,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=c)for(b=0;b<c.length;b++)this.ui.anonymizePatch(c[b]);var p=mxUtils.bind(this,function(b){var d=this.compressReportData(JSON.stringify(c,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=b?"\n\nRemote:\n"+b:""),null,7E4)});null==k?p(null):this.getLatestVersion(mxUtils.bind(this,function(b){null!=b&&b.getCurrentEtag()==k?p(b):p(null)}),function(){})}else{var t=this.getCurrentUser(),d=null!=t?t.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(f){}}}catch(f){}};
+DrawioFile.prototype.sendErrorReport=function(b,c,e,k){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),d=null!=t?this.ui.hashValue(t.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",l=this.getTitle(),m=l.lastIndexOf("."),t="xml";0<m&&(t=l.substring(m));var q=null!=e?e.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+t+")\nUser="+d+f+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:
+"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+q+"\n\nShadow:\n"+g+"\n\nData:\n"+p,k)}catch(n){}};
+DrawioFile.prototype.reloadFile=function(b,c){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),p=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(p,c,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var g=this.ui.getCurrentFile();null!=g&&(g.stats=this.stats);null!=b&&
b()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(k){null!=c&&c(k)}};DrawioFile.prototype.copyFile=function(b,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(b){for(var c=!0,e=0;e<b.length&&c;e++)c=c&&0==Object.keys(b[e]).length;return c};
-DrawioFile.prototype.patch=function(b,c,e){var k=this.ui.editor.undoManager,f=k.history.slice(),n=k.indexOfNextAdd,t=this.ui.editor.graph;t.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=e;var g=t.foldingEnabled,l=t.mathEnabled,q=t.cellRenderer.redraw;t.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());q.apply(this,arguments)};t.model.beginUpdate();try{for(var p=
-0;p<b.length;p++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[p],!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{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=q;this.changeListenerEnabled=d;e||(k.history=f,k.indexOfNextAdd=n,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)l!=
-t.mathEnabled?(this.ui.editor.updateGraphComponents(),t.refresh()):(g!=t.foldingEnabled?t.view.revalidate():t.view.validate(),t.sizeDidChange());this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}};
-DrawioFile.prototype.save=function(b,c,e,k,f,n){try{if(this.isEditable())if(!f&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=e)e(t);else throw t;}};
+DrawioFile.prototype.patch=function(b,c,e){var k=this.ui.editor.undoManager,g=k.history.slice(),p=k.indexOfNextAdd,t=this.ui.editor.graph;t.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=e;var f=t.foldingEnabled,l=t.mathEnabled,m=t.cellRenderer.redraw;t.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());m.apply(this,arguments)};t.model.beginUpdate();try{for(var q=
+0;q<b.length;q++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[q],!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{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=m;this.changeListenerEnabled=d;e||(k.history=g,k.indexOfNextAdd=p,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)l!=
+t.mathEnabled?(this.ui.editor.updateGraphComponents(),t.refresh()):(f!=t.foldingEnabled?t.view.revalidate():t.view.validate(),t.sizeDidChange());this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}};
+DrawioFile.prototype.save=function(b,c,e,k,g,p){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=e)e(t);else throw t;}};
DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,c,e){};DrawioFile.prototype.saveFile=function(b,c,e,k){};
DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};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(b,c,e){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,c,e){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -3033,32 +3036,32 @@ DrawioFile.prototype.showRefreshDialog=function(b,c,e){null==e&&(e=mxResources.g
c)}),null,mxResources.get("synchronize"),mxUtils.bind(this,function(){this.reloadFile(b,c)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150))};
DrawioFile.prototype.showCopyDialog=function(b,c,e){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,c)}),null,mxResources.get("overwrite"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150)};
DrawioFile.prototype.showConflictDialog=function(b,c){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("synchronize"),c,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),340,150)};
-DrawioFile.prototype.redirectToNewApp=function(b,c){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var e=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),k=mxResources.get("redirectToNewApp");null!=c&&(k+=" ("+c+")");var f=mxUtils.bind(this,function(){var c=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==e?window.location.reload():
-window.location.href=e});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()});null!=b?this.isModified()?this.ui.confirm(k,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(k,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-f)}};DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
+DrawioFile.prototype.redirectToNewApp=function(b,c){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var e=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),k=mxResources.get("redirectToNewApp");null!=c&&(k+=" ("+c+")");var g=mxUtils.bind(this,function(){var c=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==e?window.location.reload():
+window.location.href=e});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()});null!=b?this.isModified()?this.ui.confirm(k,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),g,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(k,g,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+g)}};DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(b,c){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(b,c);else if(this.isModified()&&this.addUnsavedStatus(b),c)this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var e=this.getErrorMessage(b);null!=e&&60<e.length&&(e=e.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("error"))+
(null!=e?" ("+mxUtils.htmlEntities(e)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(b,c){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),k=mxUtils.bind(this,function(b){this.handleFileError(b,!0)}),f=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,e,k,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),n=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,
-mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,e,k,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),k)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,k,f):this.invalidChecksum?this.showRefreshDialog(e,k,this.getErrorMessage(b)):c?this.showConflictDialog(f,n):this.addConflictStatus(mxUtils.bind(this,
+DrawioFile.prototype.handleConflictError=function(b,c){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),k=mxUtils.bind(this,function(b){this.handleFileError(b,!0)}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,e,k,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,
+mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,e,k,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),k)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,k,g):this.invalidChecksum?this.showRefreshDialog(e,k,this.getErrorMessage(b)):c?this.showConflictDialog(g,p):this.addConflictStatus(mxUtils.bind(this,
function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(e,k)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var c=null!=b?null!=b.error?b.error.message:b.message:null;null==c&&null!=b&&b.code==App.ERROR_TIMEOUT&&(c=mxResources.get("timeout"));return c};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.sendFileChanges(),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(b){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=
null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(b){this.handleFileError(b)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.isOptimisticSync=function(){return!1};
DrawioFile.prototype.createSecret=function(b){var c=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(c):this.sync.createToken(c,mxUtils.bind(this,function(e){b(c,e)}),mxUtils.bind(this,function(){b(c)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.isOptimisticSync()&&this.sync.fileSaving();"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaving",[this])};
DrawioFile.prototype.sendFileChanges=function(){try{null!=this.p2pCollab&&null!=this.sync&&(this.updateFileData(),this.sync.sendFileChanges(this.ui.getPagesForNode(mxUtils.parseXml(this.getData()).documentElement),this.desc),"1"==urlParams.test&&EditorUi.debug("DrawioFile.sendFileChanges",[this]))}catch(b){console.log(b)}};
-DrawioFile.prototype.fileSaved=function(b,c,e,k,f){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=b,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(b).documentElement),c,e,k,f)}catch(d){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=k&&k(d);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,d);else{var n=this.getCurrentUser(),t=null!=n?n.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),t,d)}}catch(g){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
-DrawioFile.prototype.autosave=function(b,c,e,k){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<c?b:0;this.clearAutosave();var f=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==f&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var b=this.isAutosaveRevision();b&&(this.lastAutosaveRevision=(new Date).getTime());this.save(b,mxUtils.bind(this,function(b){this.autosaveCompleted();null!=e&&e(b)}),mxUtils.bind(this,
-function(b){null!=k&&k(b)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),b);this.autosaveThread=f};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
+DrawioFile.prototype.fileSaved=function(b,c,e,k,g){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=b,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(b).documentElement),c,e,k,g)}catch(d){this.invalidChecksum=this.inConflictState=
+!0;this.descriptorChanged();null!=k&&k(d);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,d);else{var p=this.getCurrentUser(),t=null!=p?p.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),t,d)}}catch(f){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
+DrawioFile.prototype.autosave=function(b,c,e,k){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<c?b:0;this.clearAutosave();var g=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==g&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var b=this.isAutosaveRevision();b&&(this.lastAutosaveRevision=(new Date).getTime());this.save(b,mxUtils.bind(this,function(b){this.autosaveCompleted();null!=e&&e(b)}),mxUtils.bind(this,
+function(b){null!=k&&k(b)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),b);this.autosaveThread=g};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,c){if(null!=b&&null!=c){var e=b.lastIndexOf("."),k=0<e?b.substring(e):"",e=c.lastIndexOf(".");return k===(0<e?c.substring(e):"")}return b==c};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,c){b([])};DrawioFile.prototype.addComment=function(b,c,e){c(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,c){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};LocalFile=function(b,c,e,k,f,n){DrawioFile.call(this,b,c);this.title=e;this.mode=k?null:App.MODE_DEVICE;this.fileHandle=f;this.desc=n};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,c){b([])};DrawioFile.prototype.addComment=function(b,c,e){c(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,c){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};LocalFile=function(b,c,e,k,g,p){DrawioFile.call(this,b,c);this.title=e;this.mode=k?null:App.MODE_DEVICE;this.fileHandle=g;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,c,e){this.saveAs(this.title,c,e)};LocalFile.prototype.saveAs=function(b,c,e){this.saveFile(b,!1,c,e)};LocalFile.prototype.saveAs=function(b,c,e){this.saveFile(b,!1,c,e)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,c){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,c)};
-LocalFile.prototype.saveFile=function(b,c,e,k,f){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;f||this.updateFileData();var n=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var t=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),g=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var g=mxUtils.bind(this,
-function(b){this.savingFile=!1;null!=k&&k({error:b})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(b){this.fileHandle.getFile().then(mxUtils.bind(this,function(e){this.invalidFileHandle=null;this.desc.lastModified==e.lastModified?b.write(n?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){b.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){try{var c=this.desc;this.savingFile=!1;this.desc=
-b;this.fileSaved(t,c,d,g);this.removeDraft()}catch(x){g(x)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(b){this.invalidFileHandle=!0;g(b)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,n?"image/png":"text/xml",n);else if(c.length<MAX_REQUEST_SIZE){var e=b.lastIndexOf("."),e=0<e?b.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(n?"&binary=1":""))).simulate(document,
-"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));d()}});n?(c=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){g(b)}),k,this.ui.getCurrentFile()!=this?t:null,c.scale,c.border)):g(t)};LocalFile.prototype.rename=function(b,c,e){this.title=b;this.descriptorChanged();null!=c&&c()};
+LocalFile.prototype.saveFile=function(b,c,e,k,g){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;g||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var t=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),f=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
+function(b){this.savingFile=!1;null!=k&&k({error:b})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(b){this.fileHandle.getFile().then(mxUtils.bind(this,function(e){this.invalidFileHandle=null;this.desc.lastModified==e.lastModified?b.write(p?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){b.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){try{var c=this.desc;this.savingFile=!1;this.desc=
+b;this.fileSaved(t,c,d,f);this.removeDraft()}catch(x){f(x)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(b){this.invalidFileHandle=!0;f(b)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,p?"image/png":"text/xml",p);else if(c.length<MAX_REQUEST_SIZE){var e=b.lastIndexOf("."),e=0<e?b.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,
+"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));d()}});p?(c=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){f(b)}),k,this.ui.getCurrentFile()!=this?t:null,c.scale,c.border)):f(t)};LocalFile.prototype.rename=function(b,c,e){this.title=b;this.descriptorChanged();null!=c&&c()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
@@ -3066,8 +3069,8 @@ graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFA
edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",
fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},
edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTkgMTJ2N0g1di03SDN2N2MwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0yem0tNiAuNjdsMi41OS0yLjU4TDE3IDExLjVsLTUgNS01LTUgMS40MS0xLjQxTDExIDEyLjY3VjNoMnoiLz48L3N2Zz4=";
-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=":
+Editor.closeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjZweCI+PGVsbGlwc2UgY3g9IjEyIiBjeT0iMTIiIHJ4PSI5IiByeT0iOSIgc3Ryb2tlPSJub25lIiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE0LjU5IDhMMTIgMTAuNTkgOS40MSA4IDggOS40MSAxMC41OSAxMiA4IDE0LjU5IDkuNDEgMTYgMTIgMTMuNDEgMTQuNTkgMTYgMTYgMTQuNTkgMTMuNDEgMTIgMTYgOS40MSAxNC41OSA4ek0xMiAyQzYuNDcgMiAyIDYuNDcgMiAxMnM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTBTMTcuNTMgMiAxMiAyem0wIDE4Yy00LjQxIDAtOC0zLjU5LTgtOHMzLjU5LTggOC04IDggMy41OSA4IDgtMy41OSA4LTggOHoiLz48L3N2Zz4=";
+Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
IMAGE_PATH+"/spin.gif";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMjEuOTkgNGMwLTEuMS0uODktMi0xLjk5LTJINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNGw0IDQtLjAxLTE4ek0xOCAxNEg2di0yaDEydjJ6bTAtM0g2VjloMTJ2MnptMC0zSDZWNmgxMnYyeiIvPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4=";Editor.commentImageInverted="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABLElEQVRYR+2Wvy4FQRjFf4dINAq9XqtSaVRqXArPINEodUqlhxC5/pU6nYdQSHQeQTRHNtmVuXuXrIxv1k1sN5vMOb85c75kxMCfBvZnCsD2ErAGzAfAvUt6THUnAGwfAWfAQoB5I3kh6aBZfALYXgGeg80b31VJT9UiBRgB48CTp9Lbku7aAPvAZSGAHUm3swEgKWtUbbsj1f4JDA4AbGb24iErgUzzr7bvSrrpVcKgK5ghgKAO9E/gvwNBJRxJuu41BUEd+BFARA3+JsAWcB9x3A7NzgSqt+ALsFwAYhqgMrW9Ub8J14G5QJBugAhD2yfAaUt7T9LVxBhGmDeato/rZJtfZQHq600hygPUEIfAOTAMQALxWrQD7X7ZXpT0VqyE3xU868n9G5PzASPvpiHavBAUAAAAAElFTkSuQmCC";
@@ -3079,10 +3082,8 @@ Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/face
IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMzZweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE0LjEyIDRsMS44MyAySDIwdjEySDRWNmg0LjA1bDEuODMtMmg0LjI0TTE1IDJIOUw3LjE3IDRINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNmMxLjEgMCAyLS45IDItMlY2YzAtMS4xLS45LTItMi0yaC0zLjE3TDE1IDJ6bS0zIDdjMS42NSAwIDMgMS4zNSAzIDNzLTEuMzUgMy0zIDMtMy0xLjM1LTMtMyAxLjM1LTMgMy0zbTAtMmMtMi43NiAwLTUgMi4yNC01IDVzMi4yNCA1IDUgNSA1LTIuMjQgNS01LTIuMjQtNS01LTV6Ii8+PC9zdmc+";
Editor.tagsLargeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjM2cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjM2cHgiIGZpbGw9IiNGRkZGRkYiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
-Editor.visibleImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNUMxOS4xNyAxNC44NyAxNS43OSAxNyAxMiAxN3MtNy4xNy0yLjEzLTguODItNS41QzQuODMgOC4xMyA4LjIxIDYgMTIgNm0wLTJDNyA0IDIuNzMgNy4xMSAxIDExLjUgMi43MyAxNS44OSA3IDE5IDEyIDE5czkuMjctMy4xMSAxMS03LjVDMjEuMjcgNy4xMSAxNyA0IDEyIDR6bTAgNWMxLjM4IDAgMi41IDEuMTIgMi41IDIuNVMxMy4zOCAxNCAxMiAxNHMtMi41LTEuMTItMi41LTIuNVMxMC42MiA5IDEyIDltMC0yYy0yLjQ4IDAtNC41IDIuMDItNC41IDQuNVM5LjUyIDE2IDEyIDE2czQuNS0yLjAyIDQuNS00LjVTMTQuNDggNyAxMiA3eiIvPjwvc3ZnPg==";
-Editor.hiddenImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNS0uNTkgMS4yMi0xLjQyIDIuMjctMi40MSAzLjEybDEuNDEgMS40MWMxLjM5LTEuMjMgMi40OS0yLjc3IDMuMTgtNC41M0MyMS4yNyA3LjExIDE3IDQgMTIgNGMtMS4yNyAwLTIuNDkuMi0zLjY0LjU3bDEuNjUgMS42NUMxMC42NiA2LjA5IDExLjMyIDYgMTIgNnptLTEuMDcgMS4xNEwxMyA5LjIxYy41Ny4yNSAxLjAzLjcxIDEuMjggMS4yOGwyLjA3IDIuMDdjLjA4LS4zNC4xNC0uNy4xNC0xLjA3QzE2LjUgOS4wMSAxNC40OCA3IDEyIDdjLS4zNyAwLS43Mi4wNS0xLjA3LjE0ek0yLjAxIDMuODdsMi42OCAyLjY4QzMuMDYgNy44MyAxLjc3IDkuNTMgMSAxMS41IDIuNzMgMTUuODkgNyAxOSAxMiAxOWMxLjUyIDAgMi45OC0uMjkgNC4zMi0uODJsMy40MiAzLjQyIDEuNDEtMS40MUwzLjQyIDIuNDUgMi4wMSAzLjg3em03LjUgNy41bDIuNjEgMi42MWMtLjA0LjAxLS4wOC4wMi0uMTIuMDItMS4zOCAwLTIuNS0xLjEyLTIuNS0yLjUgMC0uMDUuMDEtLjA4LjAxLS4xM3ptLTMuNC0zLjRsMS43NSAxLjc1Yy0uMjMuNTUtLjM2IDEuMTUtLjM2IDEuNzggMCAyLjQ4IDIuMDIgNC41IDQuNSA0LjUuNjMgMCAxLjIzLS4xMyAxLjc3LS4zNmwuOTguOThjLS44OC4yNC0xLjguMzgtMi43NS4zOC0zLjc5IDAtNy4xNy0yLjEzLTguODItNS41LjctMS40MyAxLjcyLTIuNjEgMi45My0zLjUzeiIvPjwvc3ZnPg==";
-Editor.clearImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDYuNDFMMTcuNTkgNSAxMiAxMC41OSA2LjQxIDUgNSA2LjQxIDEwLjU5IDEyIDUgMTcuNTkgNi40MSAxOSAxMiAxMy40MSAxNy41OSAxOSAxOSAxNy41OSAxMy40MSAxMiAxOSA2LjQxeiIvPjwvc3ZnPg==";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');
-Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
+Editor.tagsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE4cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
+Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=
null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(b,d){return"1"!=mxUtils.getValue(b.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"comic","0")||"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(b,d){return"1"==
mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(b,d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(b,d){return"1"==
@@ -3099,90 +3100,90 @@ type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opac
dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",
dispName:"Connectable",type:"bool",getDefaultValue:function(b,d){return d.editorUi.editor.graph.isCellConnectable(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",
dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",
-dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,g=d.editorUi.editor.graph;return null!=
-c&&(g.isSwimlane(c)||0<g.model.getChildCount(c))},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,g=d.editorUi.editor.graph;return null!=c&&(g.isContainer(c)&&"0"!=b.style.collapsible||!g.isContainer(c)&&"1"==b.style.collapsible)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",
+dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=
+c&&(f.isSwimlane(c)||0<f.model.getChildCount(c))},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=c&&(f.isContainer(c)&&"0"!=b.style.collapsible||!f.isContainer(c)&&"1"==b.style.collapsible)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",
dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length&&!d.editorUi.editor.graph.isSwimlane(b.vertices[0])&&null==mxUtils.getValue(b.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(b,d){var c=d.editorUi.editor.graph.model;return 0<b.vertices.length?c.isVertex(c.getParent(b.vertices[0])):!1}},{name:"editable",dispName:"Editable",
type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(b,d){var c=0<b.vertices.length?d.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=c&&!c.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",
dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,
isVisible:function(b,d){var c=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return d.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==c||c==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(b,d){return 0<b.vertices.length&&d.editorUi.editor.graph.isContainer(b.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(b){var d=rough.canvas({getContext:function(){return b}});d.draw=function(d){var c=d.sets||[];d=d.options||this.getDefaultOptions();for(var g=0;g<c.length;g++){var e=c[g];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(b,e,d);break;case "fillPath":this._drawToContext(b,e,d);break;case "fillSketch":this.fillSketch(b,e,d)}}};d.fillSketch=function(d,c,g){var e=b.state.strokeColor,f=b.state.strokeWidth,l=b.state.strokeAlpha,k=b.state.dashed,m=g.fillWeight;
-0>m&&(m=g.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(g.fill||"");b.setStrokeWidth(m);b.setDashed(!1);this._drawToContext(d,c,g);b.setDashed(k);b.setStrokeWidth(f);b.setStrokeColor(e);b.setStrokeAlpha(l)};d._drawToContext=function(b,d,c){b.begin();for(var g=0;g<d.ops.length;g++){var e=d.ops[g],f=e.data;switch(e.op){case "move":b.moveTo(f[0],f[1]);break;case "bcurveTo":b.curveTo(f[0],f[1],f[2],f[3],f[4],f[5]);break;case "lineTo":b.lineTo(f[0],f[1])}}b.end();"fillPath"===d.type&&
-c.filled?b.fill():b.stroke()};return d};(function(){function b(d,c,g){this.canvas=d;this.rc=c;this.shape=g;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,b.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,b.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,b.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+Editor.createRoughCanvas=function(b){var d=rough.canvas({getContext:function(){return b}});d.draw=function(d){var c=d.sets||[];d=d.options||this.getDefaultOptions();for(var f=0;f<c.length;f++){var e=c[f];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(b,e,d);break;case "fillPath":this._drawToContext(b,e,d);break;case "fillSketch":this.fillSketch(b,e,d)}}};d.fillSketch=function(d,c,f){var e=b.state.strokeColor,g=b.state.strokeWidth,l=b.state.strokeAlpha,k=b.state.dashed,m=f.fillWeight;
+0>m&&(m=f.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(f.fill||"");b.setStrokeWidth(m);b.setDashed(!1);this._drawToContext(d,c,f);b.setDashed(k);b.setStrokeWidth(g);b.setStrokeColor(e);b.setStrokeAlpha(l)};d._drawToContext=function(b,d,c){b.begin();for(var f=0;f<d.ops.length;f++){var e=d.ops[f],g=e.data;switch(e.op){case "move":b.moveTo(g[0],g[1]);break;case "bcurveTo":b.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":b.lineTo(g[0],g[1])}}b.end();"fillPath"===d.type&&
+c.filled?b.fill():b.stroke()};return d};(function(){function b(d,c,f){this.canvas=d;this.rc=c;this.shape=f;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,b.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,b.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,b.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,b.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,b.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,b.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,b.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,b.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
b.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,b.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,b.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,b.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,b.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,b.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}b.prototype.moveOp="M";b.prototype.lineOp="L";b.prototype.quadOp="Q";b.prototype.curveOp="C";b.prototype.closeOp="Z";b.prototype.getStyle=function(b,d){var c=1;if(null!=this.shape.state){var g=this.shape.state.cell.id;if(null!=g)for(var e=0;e<g.length;e++)c=(c<<5)-c+g.charCodeAt(e)<<0}c={strokeWidth:this.canvas.state.strokeWidth,seed:c,preserveVertices:!0};g=this.rc.getDefaultOptions();b?c.stroke="none"===this.canvas.state.strokeColor?"transparent":this.canvas.state.strokeColor:
-delete c.stroke;e=null;(c.filled=d)?(c.fill="none"===this.canvas.state.fillColor?"":this.canvas.state.fillColor,e="none"===this.canvas.state.gradientColor?null:this.canvas.state.gradientColor):c.fill="";c.bowing=mxUtils.getValue(this.shape.style,"bowing",g.bowing);c.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",g.hachureAngle);c.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",g.curveFitting);c.roughness=mxUtils.getValue(this.shape.style,"jiggle",g.roughness);c.simplification=
-mxUtils.getValue(this.shape.style,"simplification",g.simplification);c.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",g.disableMultiStroke);c.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",g.disableMultiStrokeFill);var f=mxUtils.getValue(this.shape.style,"hachureGap",-1);c.hachureGap="auto"==f?-1:f;c.dashGap=mxUtils.getValue(this.shape.style,"dashGap",f);c.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",f);c.zigzagOffset=mxUtils.getValue(this.shape.style,
-"zigzagOffset",f);f=mxUtils.getValue(this.shape.style,"fillWeight",-1);c.fillWeight="auto"==f?-1:f;f=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==f&&(f=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",f=null!=c.fill&&(null!=e||null!=f&&c.fill.toLowerCase()==f.toLowerCase())?"solid":g.fillStyle);c.fillStyle=f;return c};b.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};b.prototype.end=function(){this.passThrough&&
+this.path=[];this.passThrough=!1}b.prototype.moveOp="M";b.prototype.lineOp="L";b.prototype.quadOp="Q";b.prototype.curveOp="C";b.prototype.closeOp="Z";b.prototype.getStyle=function(b,d){var c=1;if(null!=this.shape.state){var f=this.shape.state.cell.id;if(null!=f)for(var e=0;e<f.length;e++)c=(c<<5)-c+f.charCodeAt(e)<<0}c={strokeWidth:this.canvas.state.strokeWidth,seed:c,preserveVertices:!0};f=this.rc.getDefaultOptions();b?c.stroke="none"===this.canvas.state.strokeColor?"transparent":this.canvas.state.strokeColor:
+delete c.stroke;e=null;(c.filled=d)?(c.fill="none"===this.canvas.state.fillColor?"":this.canvas.state.fillColor,e="none"===this.canvas.state.gradientColor?null:this.canvas.state.gradientColor):c.fill="";c.bowing=mxUtils.getValue(this.shape.style,"bowing",f.bowing);c.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",f.hachureAngle);c.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",f.curveFitting);c.roughness=mxUtils.getValue(this.shape.style,"jiggle",f.roughness);c.simplification=
+mxUtils.getValue(this.shape.style,"simplification",f.simplification);c.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",f.disableMultiStroke);c.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",f.disableMultiStrokeFill);var g=mxUtils.getValue(this.shape.style,"hachureGap",-1);c.hachureGap="auto"==g?-1:g;c.dashGap=mxUtils.getValue(this.shape.style,"dashGap",g);c.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",g);c.zigzagOffset=mxUtils.getValue(this.shape.style,
+"zigzagOffset",g);g=mxUtils.getValue(this.shape.style,"fillWeight",-1);c.fillWeight="auto"==g?-1:g;g=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==g&&(g=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",g=null!=c.fill&&(null!=e||null!=g&&c.fill.toLowerCase()==g.toLowerCase())?"solid":f.fillStyle);c.fillStyle=g;return c};b.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};b.prototype.end=function(){this.passThrough&&
this.originalEnd.apply(this.canvas,arguments)};b.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};b.prototype.lineTo=function(b,d){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,b,d),this.lastX=b,this.lastY=d)};b.prototype.moveTo=
-function(b,d){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,d),this.lastX=b,this.lastY=d,this.firstX=b,this.firstY=d)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,d,c,g){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,b,d,c,g),this.lastX=c,this.lastY=g)};b.prototype.curveTo=function(b,d,c,g,e,f){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,d,c,g,e,f),this.lastX=e,this.lastY=f)};b.prototype.arcTo=function(b,d,c,g,e,f,l){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var k=mxUtils.arcToCurves(this.lastX,this.lastY,b,d,c,g,e,f,l);if(null!=k)for(var m=0;m<k.length;m+=6)this.curveTo(k[m],k[m+1],k[m+2],k[m+3],k[m+4],k[m+5]);this.lastX=f;this.lastY=l}};b.prototype.rect=function(b,d,c,g){this.passThrough?this.originalRect.apply(this.canvas,
-arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,d,c,g,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,d,c,g){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+c/2,d+g/2,c,g,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,d,c,g,e,f){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(b+e,d),this.lineTo(b+c-e,d),this.quadTo(b+c,d,b+c,d+f),this.lineTo(b+
-c,d+g-f),this.quadTo(b+c,d+g,b+c-e,d+g),this.lineTo(b+e,d+g),this.quadTo(b,d+g,b,d+g-f),this.lineTo(b,d+f),this.quadTo(b,d,b+e,d))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var d in b)this.nextShape.options[d]=b[d];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
+function(b,d){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,d),this.lastX=b,this.lastY=d,this.firstX=b,this.firstY=d)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,d,c,f){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,b,d,c,f),this.lastX=c,this.lastY=f)};b.prototype.curveTo=function(b,d,c,f,e,g){this.passThrough?
+this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,d,c,f,e,g),this.lastX=e,this.lastY=g)};b.prototype.arcTo=function(b,d,c,f,e,g,l){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var k=mxUtils.arcToCurves(this.lastX,this.lastY,b,d,c,f,e,g,l);if(null!=k)for(var m=0;m<k.length;m+=6)this.curveTo(k[m],k[m+1],k[m+2],k[m+3],k[m+4],k[m+5]);this.lastX=g;this.lastY=l}};b.prototype.rect=function(b,d,c,f){this.passThrough?this.originalRect.apply(this.canvas,
+arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,d,c,f,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,d,c,f){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+c/2,d+f/2,c,f,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,d,c,f,e,g){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(b+e,d),this.lineTo(b+c-e,d),this.quadTo(b+c,d,b+c,d+g),this.lineTo(b+
+c,d+f-g),this.quadTo(b+c,d+f,b+c-e,d+f),this.lineTo(b+e,d+f),this.quadTo(b,d+f,b,d+f-g),this.lineTo(b,d+g),this.quadTo(b,d,b+e,d))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var d in b)this.nextShape.options[d]=b[d];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};b.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};b.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};b.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};b.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;
this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;
this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(d){return new b(d,Editor.createRoughCanvas(d),this)};var d=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?d.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(b):this.createRoughCanvas(b)};var c=mxShape.prototype.paint;
-mxShape.prototype.paint=function(d){var g=d.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=d.handJiggle&&d.handJiggle.constructor==b&&!this.outline){d.save();var f=this.fill,l=this.stroke;this.stroke=this.fill=null;var k=this.configurePointerEvents,m=d.setStrokeColor;d.setStrokeColor=function(){};var p=d.setFillColor;d.setFillColor=function(){};e||null==f||(this.configurePointerEvents=function(){});d.handJiggle.passThrough=!0;
-c.apply(this,arguments);d.handJiggle.passThrough=!1;d.setFillColor=p;d.setStrokeColor=m;this.configurePointerEvents=k;this.stroke=l;this.fill=f;d.restore();e&&null!=f&&(d.addTolerance=function(){})}c.apply(this,arguments);d.addTolerance=g};var g=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(d,c,e,f,l,k){null!=d.handJiggle&&d.handJiggle.constructor==b?(d.handJiggle.passThrough=!0,g.apply(this,arguments),d.handJiggle.passThrough=!1):g.apply(this,arguments)}})();Editor.fastCompress=
-function(b){return null==b||0==b.length||"undefined"===typeof pako?b:Graph.arrayBufferToString(pako.deflateRaw(b))};Editor.fastDecompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:pako.inflateRaw(Graph.stringToArrayBuffer(atob(b)),{to:"string"})};Editor.extractGraphModel=function(b,d,c){if(null!=b&&"undefined"!==typeof pako){var g=b.ownerDocument.getElementsByTagName("div"),e=[];if(null!=g&&0<g.length)for(var f=0;f<g.length;f++)if("mxgraph"==g[f].getAttribute("class")){e.push(g[f]);
-break}0<e.length&&(g=e[0].getAttribute("data-mxgraph"),null!=g?(e=JSON.parse(g),null!=e&&null!=e.xml&&(b=mxUtils.parseXml(e.xml),b=b.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(g=mxUtils.getTextContent(e[0]),g=Graph.decompress(g,null,c),0<g.length&&(b=mxUtils.parseXml(g),b=b.documentElement))))}if(null!=b&&"svg"==b.nodeName)if(g=b.getAttribute("content"),null!=g&&"<"!=g.charAt(0)&&"%"!=g.charAt(0)&&(g=unescape(window.atob?atob(g):Base64.decode(cont,g))),null!=g&&"%"==g.charAt(0)&&
-(g=decodeURIComponent(g)),null!=g&&0<g.length)b=mxUtils.parseXml(g).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||d||(e=null,"diagram"==b.nodeName?e=b:"mxfile"==b.nodeName&&(g=b.getElementsByTagName("diagram"),0<g.length&&(e=g[Math.max(0,Math.min(g.length-1,urlParams.page||0))])),null!=e&&(b=Editor.parseDiagramNode(e,c)));null==b||"mxGraphModel"==b.nodeName||d&&"mxfile"==b.nodeName||(b=null);return b};Editor.parseDiagramNode=function(b,d){var c=mxUtils.trim(mxUtils.getTextContent(b)),
-g=null;0<c.length?(c=Graph.decompress(c,null,d),null!=c&&0<c.length&&(g=mxUtils.parseXml(c).documentElement)):(c=mxUtils.getChildNodes(b),0<c.length&&(g=mxUtils.createXmlDocument(),g.appendChild(g.importNode(c[0],!0)),g=g.documentElement));return g};Editor.getDiagramNodeXml=function(b){var d=mxUtils.getTextContent(b),c=null;0<d.length?c=Graph.decompress(d):null!=b.firstChild&&(c=mxUtils.getXml(b.firstChild));return c};Editor.extractGraphModelFromPdf=function(b){b=b.substring(b.indexOf(",")+1);b=window.atob&&
-!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var d=b.indexOf("EmbeddedFile");if(-1<d){var c=b.indexOf("stream",d)+9;if(0<b.substring(d,c).indexOf("application#2Fvnd.jgraph.mxfile"))return d=b.indexOf("endstream",c-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(c,d)),{to:"string"})}return null}for(var c=null,d="",g=0,e=0,f=[],l=null;e<b.length;){var k=b.charCodeAt(e),e=e+1;10!=k&&(d+=String.fromCharCode(k));k=="/Subject (%3Cmxfile".charCodeAt(g)?g++:g=0;if(19==
-g){var m=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(m>e){c=b.substring(e,m);break}}10==k&&("endobj"==d?l=null:"obj"==d.substring(d.length-3,d.length)||"xref"==d||"trailer"==d?(l=[],f[d.split(" ")[0]]=l):null!=l&&l.push(d),d="")}null==c&&(c=Editor.extractGraphModelFromXref(f));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(b){var d=b.trailer,c=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<
-d.length&&(d=b[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(b=b[d[1]],null!=b&&(b=b.join("\n"),c=b.substring(1,b.length-1))))));return c};Editor.extractGraphModelFromPng=function(b){var d=null;try{var c=b.substring(b.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(g,mxUtils.bind(this,function(b,c,e){b=g.substring(b+8,b+8+e);"zTXt"==c?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+
-2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(d=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(d=b[1]));if(null!=d||"IDAT"==c)return!0}))}catch(J){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(b,d){var c=null,g=null!=b?b.getElementsByTagName("parsererror"):null;null!=g&&0<g.length&&(c=d||mxResources.get("invalidChars"),g=g[0].getElementsByTagName("div"),
-0<g.length&&(c=mxUtils.getTextContent(g[0])));return null!=c?mxUtils.trim(c):c};Editor.addRetryToError=function(b,d){if(null!=b){var c=null!=b.error?b.error:b;null==c.retry&&(c.retry=d)}};Editor.configure=function(b,d){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;
+mxShape.prototype.paint=function(d){var f=d.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=d.handJiggle&&d.handJiggle.constructor==b&&!this.outline){d.save();var g=this.fill,l=this.stroke;this.stroke=this.fill=null;var k=this.configurePointerEvents,m=d.setStrokeColor;d.setStrokeColor=function(){};var n=d.setFillColor;d.setFillColor=function(){};e||null==g||(this.configurePointerEvents=function(){});d.handJiggle.passThrough=!0;
+c.apply(this,arguments);d.handJiggle.passThrough=!1;d.setFillColor=n;d.setStrokeColor=m;this.configurePointerEvents=k;this.stroke=l;this.fill=g;d.restore();e&&null!=g&&(d.addTolerance=function(){})}c.apply(this,arguments);d.addTolerance=f};var f=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(d,c,e,g,l,k){null!=d.handJiggle&&d.handJiggle.constructor==b?(d.handJiggle.passThrough=!0,f.apply(this,arguments),d.handJiggle.passThrough=!1):f.apply(this,arguments)}})();Editor.fastCompress=
+function(b){return null==b||0==b.length||"undefined"===typeof pako?b:Graph.arrayBufferToString(pako.deflateRaw(b))};Editor.fastDecompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:pako.inflateRaw(Graph.stringToArrayBuffer(atob(b)),{to:"string"})};Editor.extractGraphModel=function(b,d,c){if(null!=b&&"undefined"!==typeof pako){var f=b.ownerDocument.getElementsByTagName("div"),e=[];if(null!=f&&0<f.length)for(var g=0;g<f.length;g++)if("mxgraph"==f[g].getAttribute("class")){e.push(f[g]);
+break}0<e.length&&(f=e[0].getAttribute("data-mxgraph"),null!=f?(e=JSON.parse(f),null!=e&&null!=e.xml&&(b=mxUtils.parseXml(e.xml),b=b.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(f=mxUtils.getTextContent(e[0]),f=Graph.decompress(f,null,c),0<f.length&&(b=mxUtils.parseXml(f),b=b.documentElement))))}if(null!=b&&"svg"==b.nodeName)if(f=b.getAttribute("content"),null!=f&&"<"!=f.charAt(0)&&"%"!=f.charAt(0)&&(f=unescape(window.atob?atob(f):Base64.decode(cont,f))),null!=f&&"%"==f.charAt(0)&&
+(f=decodeURIComponent(f)),null!=f&&0<f.length)b=mxUtils.parseXml(f).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||d||(e=null,"diagram"==b.nodeName?e=b:"mxfile"==b.nodeName&&(f=b.getElementsByTagName("diagram"),0<f.length&&(e=f[Math.max(0,Math.min(f.length-1,urlParams.page||0))])),null!=e&&(b=Editor.parseDiagramNode(e,c)));null==b||"mxGraphModel"==b.nodeName||d&&"mxfile"==b.nodeName||(b=null);return b};Editor.parseDiagramNode=function(b,d){var c=mxUtils.trim(mxUtils.getTextContent(b)),
+f=null;0<c.length?(c=Graph.decompress(c,null,d),null!=c&&0<c.length&&(f=mxUtils.parseXml(c).documentElement)):(c=mxUtils.getChildNodes(b),0<c.length&&(f=mxUtils.createXmlDocument(),f.appendChild(f.importNode(c[0],!0)),f=f.documentElement));return f};Editor.getDiagramNodeXml=function(b){var d=mxUtils.getTextContent(b),c=null;0<d.length?c=Graph.decompress(d):null!=b.firstChild&&(c=mxUtils.getXml(b.firstChild));return c};Editor.extractGraphModelFromPdf=function(b){b=b.substring(b.indexOf(",")+1);b=window.atob&&
+!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var d=b.indexOf("EmbeddedFile");if(-1<d){var c=b.indexOf("stream",d)+9;if(0<b.substring(d,c).indexOf("application#2Fvnd.jgraph.mxfile"))return d=b.indexOf("endstream",c-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(c,d)),{to:"string"})}return null}for(var c=null,d="",f=0,e=0,g=[],l=null;e<b.length;){var k=b.charCodeAt(e),e=e+1;10!=k&&(d+=String.fromCharCode(k));k=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==
+f){var m=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(m>e){c=b.substring(e,m);break}}10==k&&("endobj"==d?l=null:"obj"==d.substring(d.length-3,d.length)||"xref"==d||"trailer"==d?(l=[],g[d.split(" ")[0]]=l):null!=l&&l.push(d),d="")}null==c&&(c=Editor.extractGraphModelFromXref(g));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(b){var d=b.trailer,c=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<
+d.length&&(d=b[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(b=b[d[1]],null!=b&&(b=b.join("\n"),c=b.substring(1,b.length-1))))));return c};Editor.extractGraphModelFromPng=function(b){var d=null;try{var c=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(b,c,e){b=f.substring(b+8,b+8+e);"zTXt"==c?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+
+2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(d=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(d=b[1]));if(null!=d||"IDAT"==c)return!0}))}catch(I){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(b,d){var c=null,f=null!=b?b.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(c=d||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),
+0<f.length&&(c=mxUtils.getTextContent(f[0])));return null!=c?mxUtils.trim(c):c};Editor.addRetryToError=function(b,d){if(null!=b){var c=null!=b.error?b.error:b;null==c.retry&&(c.retry=d)}};Editor.configure=function(b,d){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;
ColorDialog.prototype.colorNames=b.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=b.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=b.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=b.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=b.templateFile&&(EditorUi.templateFile=b.templateFile);null!=b.styles&&(Editor.styles=b.styles);null!=b.globalVars&&(Editor.globalVars=
b.globalVars);null!=b.compressXml&&(Editor.compressXml=b.compressXml);null!=b.includeDiagram&&(Editor.defaultIncludeDiagram=b.includeDiagram);null!=b.simpleLabels&&(Editor.simpleLabels=b.simpleLabels);b.customFonts&&(Menus.prototype.defaultFonts=b.customFonts.concat(Menus.prototype.defaultFonts));b.customPresetColors&&(ColorDialog.prototype.presetColors=b.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=b.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=b.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
-if(null!=b.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b.css));var g=document.getElementsByTagName("script")[0];g.parentNode.insertBefore(c,g)}null!=b.libraries&&(Sidebar.prototype.customEntries=b.libraries);null!=b.enabledLibraries&&(Sidebar.prototype.enabledLibraries=b.enabledLibraries);null!=b.defaultLibraries&&(Sidebar.prototype.defaultEntries=b.defaultLibraries);null!=b.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
+if(null!=b.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b.css));var f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(c,f)}null!=b.libraries&&(Sidebar.prototype.customEntries=b.libraries);null!=b.enabledLibraries&&(Sidebar.prototype.enabledLibraries=b.enabledLibraries);null!=b.defaultLibraries&&(Sidebar.prototype.defaultEntries=b.defaultLibraries);null!=b.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
b.defaultCustomLibraries);null!=b.enableCustomLibraries&&(Editor.enableCustomLibraries=b.enableCustomLibraries);null!=b.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=b.defaultVertexStyle);null!=b.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=b.defaultEdgeStyle);null!=b.zoomWheel&&(Graph.zoomWheel=b.zoomWheel);null!=b.zoomFactor&&(c=parseFloat(b.zoomFactor),!isNaN(c)&&1<c&&(Graph.prototype.zoomFactor=c));null!=b.gridSteps&&(c=parseInt(b.gridSteps),!isNaN(c)&&0<c&&(mxGraphView.prototype.gridSteps=
-c));null!=b.pageFormat&&(c=parseInt(b.pageFormat.width),g=parseInt(b.pageFormat.height),!isNaN(c)&&0<c&&!isNaN(g)&&0<g&&(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,c,g),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat));b.thumbWidth&&(Sidebar.prototype.thumbWidth=b.thumbWidth);b.thumbHeight&&(Sidebar.prototype.thumbHeight=b.thumbHeight);b.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=b.emptyLibraryXml);b.sidebarWidth&&(EditorUi.prototype.hsplitPosition=b.sidebarWidth);
+c));null!=b.pageFormat&&(c=parseInt(b.pageFormat.width),f=parseInt(b.pageFormat.height),!isNaN(c)&&0<c&&!isNaN(f)&&0<f&&(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,c,f),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat));b.thumbWidth&&(Sidebar.prototype.thumbWidth=b.thumbWidth);b.thumbHeight&&(Sidebar.prototype.thumbHeight=b.thumbHeight);b.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=b.emptyLibraryXml);b.sidebarWidth&&(EditorUi.prototype.hsplitPosition=b.sidebarWidth);
b.fontCss&&Editor.configureFontCss(b.fontCss);null!=b.autosaveDelay&&(c=parseInt(b.autosaveDelay),!isNaN(c)&&0<c?DrawioFile.prototype.autosaveDelay=c:EditorUi.debug("Invalid autosaveDelay: "+b.autosaveDelay));if(null!=b.plugins&&!d)for(App.initPluginCallback(),c=0;c<b.plugins.length;c++)mxscript(b.plugins[c]);null!=b.maxImageBytes&&(EditorUi.prototype.maxImageBytes=b.maxImageBytes);null!=b.maxImageSize&&(EditorUi.prototype.maxImageSize=b.maxImageSize)}};Editor.configureFontCss=function(b){if(null!=
-b){Editor.prototype.fontCss=b;var d=document.getElementsByTagName("script")[0];if(null!=d&&null!=d.parentNode){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b));d.parentNode.insertBefore(c,d);b=b.split("url(");for(c=1;c<b.length;c++){var g=b[c].indexOf(")"),g=Editor.trimCssUrl(b[c].substring(0,g)),e=document.createElement("link");e.setAttribute("rel","preload");e.setAttribute("href",g);e.setAttribute("as","font");e.setAttribute("crossorigin",
+b){Editor.prototype.fontCss=b;var d=document.getElementsByTagName("script")[0];if(null!=d&&null!=d.parentNode){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b));d.parentNode.insertBefore(c,d);b=b.split("url(");for(c=1;c<b.length;c++){var f=b[c].indexOf(")"),f=Editor.trimCssUrl(b[c].substring(0,f)),e=document.createElement("link");e.setAttribute("rel","preload");e.setAttribute("href",f);e.setAttribute("as","font");e.setAttribute("crossorigin",
"");d.parentNode.insertBefore(e,d)}}}};Editor.trimCssUrl=function(b){return b.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(b){b=null!=b?b:Editor.GUID_LENGTH;for(var d=[],c=0;c<b;c++)d.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return d.join("")};
-Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(d){d=null!=d&&"mxlibrary"!=d.nodeName?this.extractGraphModel(d):null;if(null!=d){var c=d.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],g=c.getElementsByTagName("div");null!=g&&0<g.length&&
-(c=g[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==d.nodeName){c=d.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(g=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=g&&(e=new mxCodec(g.ownerDocument),e.decode(g,this.graph.getStylesheet())));else if(g=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),
-null!=g){var e=new mxCodec(g.ownerDocument);e.decode(g,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");c=d.getAttribute("backgroundImage");null!=c?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(c)):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"==d.getAttribute("shadow"),!1);if(c=d.getAttribute("extFonts"))try{for(c=c.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}}),g=0;g<c.length;g++)this.graph.addExtFont(c[g].name,c[g].url)}catch(J){console.log("ExtFonts format error: "+J.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.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(b,d){b=null!=b?b:!0;var g=c.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&g.setAttribute("style",this.graph.currentStyle);var e=this.graph.getBackgroundImageObject(this.graph.backgroundImage,d);null!=e&&g.setAttribute("backgroundImage",JSON.stringify(e));g.setAttribute("math",this.graph.mathEnabled?"1":"0");g.setAttribute("shadow",this.graph.shadowVisible?
-"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(e=this.graph.extFonts.map(function(b){return b.name+"^"+b.url}),g.setAttribute("extFonts",e.join("|")));return g};Editor.prototype.isDataSvg=function(b){try{var d=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=d&&(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)){var c=mxUtils.parseXml(d).documentElement;
+Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(d){d=null!=d&&"mxlibrary"!=d.nodeName?this.extractGraphModel(d):null;if(null!=d){var c=d.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],f=c.getElementsByTagName("div");null!=f&&0<f.length&&
+(c=f[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==d.nodeName){c=d.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=f&&(e=new mxCodec(f.ownerDocument),e.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),
+null!=f){var e=new mxCodec(f.ownerDocument);e.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");c=d.getAttribute("backgroundImage");null!=c?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(c)):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"==d.getAttribute("shadow"),!1);if(c=d.getAttribute("extFonts"))try{for(c=c.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}}),f=0;f<c.length;f++)this.graph.addExtFont(c[f].name,c[f].url)}catch(I){console.log("ExtFonts format error: "+I.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.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(b,d){b=null!=b?b:!0;var f=c.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&f.setAttribute("style",this.graph.currentStyle);var e=this.graph.getBackgroundImageObject(this.graph.backgroundImage,d);null!=e&&f.setAttribute("backgroundImage",JSON.stringify(e));f.setAttribute("math",this.graph.mathEnabled?"1":"0");f.setAttribute("shadow",this.graph.shadowVisible?
+"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(e=this.graph.extFonts.map(function(b){return b.name+"^"+b.url}),f.setAttribute("extFonts",e.join("|")));return f};Editor.prototype.isDataSvg=function(b){try{var d=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=d&&(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)){var c=mxUtils.parseXml(d).documentElement;
return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(W){}return!1};Editor.prototype.extractGraphModel=function(b,d,c){return Editor.extractGraphModel.apply(this,arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&
this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var k=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){k.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss=
"div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(b,d){if("undefined"===typeof window.MathJax){b=(null!=b?b:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(b){window.setTimeout(function(){"hidden"!=b.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,b])},0)};var c=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):
"TeX";d=null!=d?d:{"HTML-CSS":{availableFonts:[c],imageFont:null},SVG:{font:c,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d);MathJax.Hub.Register.StartupHook("Begin",function(){for(var b=0;b<Editor.mathJaxQueue.length;b++)Editor.doMathJaxRender(Editor.mathJaxQueue[b])})}};Editor.MathJaxRender=function(b){"undefined"!==typeof MathJax&&
-"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var g=Editor.prototype.init;Editor.prototype.init=function(){g.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var e=document.createElement("script");
-e.setAttribute("type","text/javascript");e.setAttribute("src",b);c[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var f=document.createElement("style");f.type="text/css";f.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(f)}}catch(aa){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;
-var d=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(b,c,g,e){void 0!==c?d.push(c.replace(/\\'/g,"'")):void 0!==g?d.push(g.replace(/\\"/g,'"')):void 0!==e&&d.push(e);return""});/,\s*$/.test(b)&&d.push("");return d};Editor.prototype.isCorsEnabledForUrl=function(b){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
-return null!=this.corsRegExp&&this.corsRegExp.test(b)||"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var d=b.convert,c=this;b.convert=function(g){if(null!=g){var e="http://"==g.substring(0,7)||"https://"==g.substring(0,8);e&&!navigator.onLine?g=Editor.svgBrokenImage.src:!e||g.substring(0,b.baseUrl.length)==b.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(g)?"chrome-extension://"==g.substring(0,
-19)||mxClient.IS_CHROMEAPP||(g=d.apply(this,arguments)):g=PROXY_URL+"?url="+encodeURIComponent(g)}return g};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,d){try{var c=!0,g=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,mxUtils.bind(this,function(b){window.clearTimeout(g);c&&d(Editor.createSvgDataUri(b.getText()))}),
-function(){window.clearTimeout(g);c&&d(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(g);if(c)try{var b=document.createElement("canvas"),f=b.getContext("2d");b.height=e.height;b.width=e.width;f.drawImage(e,0,0);d(b.toDataURL())}catch(ma){d(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(g);c&&d(Editor.svgBrokenImage.src)};e.src=b}}catch(O){d(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
-function(b,d,c,g){null==g&&(g=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,l){for(var k=b.getElementsByTagName(c),m=0;m<k.length;m++)mxUtils.bind(this,function(c){try{if(null!=c){var k=g.convert(c.getAttribute(l));if(null!=k&&"data:"!=k.substring(0,5)){var m=f[k];null==m?(e++,this.convertImageToDataUri(k,function(g){null!=g&&(f[k]=g,c.setAttribute(l,g));e--;0==e&&d(b)})):c.setAttribute(l,m)}else null!=k&&c.setAttribute(l,k)}}catch(oa){}})(k[m])});c("image","xlink:href");
-c("img","src");0==e&&d(b)};Editor.base64Encode=function(b){for(var d="",c=0,g=b.length,e,f,l;c<g;){e=b.charCodeAt(c++)&255;if(c==g){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}f=b.charCodeAt(c++);if(c==g){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
-3)<<4|(f&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);d+="=";break}l=b.charCodeAt(c++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(l&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return d};
-Editor.prototype.loadUrl=function(b,d,c,g,e,f,l,k){try{var m=!l&&(g||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=d){var g=b.getText();if(m){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();
-for(var g=Array(b.length),e=0;e<b.length;e++)g[e]=String.fromCharCode(b[e]);g=g.join("")}f=null!=f?f:"data:image/png;base64,";g=f+Editor.base64Encode(g)}d(g)}}else null!=c&&(0==b.getStatus()?c({message:mxResources.get("accessDenied")},b):c({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=c&&c({message:mxResources.get("error")+" "+b.getStatus()})},m,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:p})},k)});p()}catch(na){null!=c&&c(na)}};Editor.prototype.absoluteCssFonts=
-function(b){var d=null;if(null!=b){var c=b.split("url(");if(0<c.length){d=[c[0]];b=window.location.pathname;var g=null!=b?b.lastIndexOf("/"):-1;0<=g&&(b=b.substring(0,g+1));var g=document.getElementsByTagName("base"),e=null;null!=g&&0<g.length&&(e=g[0].getAttribute("href"));for(var f=1;f<c.length;f++)if(g=c[f].indexOf(")"),0<g){var l=Editor.trimCssUrl(c[f].substring(0,g));this.graph.isRelativeUrl(l)&&(l=null!=e?e+l:window.location.protocol+"//"+window.location.hostname+("/"==l.charAt(0)?"":b)+l);
-d.push('url("'+l+'"'+c[f].substring(g))}else d.push(c[f])}else d=[b]}return null!=d?d.join(""):null};Editor.prototype.embedCssFonts=function(b,d){var c=b.split("url("),g=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==g){for(var b=[c[0]],e=1;e<c.length;e++){var f=c[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(c[e].substring(0,f))]);b.push('"'+c[e].substring(f))}d(b.join(""))}});if(0<c.length){for(var f=1;f<c.length;f++){var l=c[f].indexOf(")"),
-k=null,m=c[f].indexOf("format(",l);0<m&&(k=Editor.trimCssUrl(c[f].substring(m+7,c[f].indexOf(")",m))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;g++;var d="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(b))d="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(b))d="application/x-font-opentype";else if("woff"==k||/(\.woff)($|\?)/i.test(b))d="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(b))d="application/font-woff2";
-else if("eot"==k||/(\.eot)($|\?)/i.test(b))d="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(b))d="application/font-sfnt";var c=b;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(c,mxUtils.bind(this,function(d){this.cachedFonts[b]=d;g--;e()}),mxUtils.bind(this,function(b){g--;e()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(Editor.trimCssUrl(c[f].substring(0,l)),k)}e()}else d(b)};Editor.prototype.loadFonts=
-function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;b()})):b()};Editor.prototype.embedExtFonts=function(b){var d=this.graph.getCustomFonts();if(0<d.length){var c="",g=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==g&&this.embedCssFonts(c,b)}),f=0;f<d.length;f++)mxUtils.bind(this,function(b,d){Graph.isCssFontUrl(d)?null==this.cachedGoogleFonts[d]?(g++,this.loadUrl(d,
-mxUtils.bind(this,function(b){this.cachedGoogleFonts[d]=b;c+=b;g--;e()}),mxUtils.bind(this,function(b){g--;c+="@import url("+d+");";e()}))):c+=this.cachedGoogleFonts[d]:c+='@font-face {font-family: "'+b+'";src: url("'+d+'")}'})(d[f].name,d[f].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&0<b.length)for(var d=document.getElementsByTagName("style"),c=0;c<d.length;c++)0<mxUtils.getTextContent(d[c]).indexOf("MathJax")&&b[0].appendChild(d[c].cloneNode(!0))};
-Editor.prototype.addFontCss=function(b,d){d=null!=d?d:this.absoluteCssFonts(this.fontCss);if(null!=d){var c=b.getElementsByTagName("defs"),g=b.ownerDocument;0==c.length?(c=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"defs"):g.createElement("defs"),null!=b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)):c=c[0];g=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"style"):g.createElement("style");g.setAttribute("type","text/css");mxUtils.setTextContent(g,d);c.appendChild(g)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var g=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(g/b,g/d))};Editor.prototype.exportToCanvas=function(b,d,c,g,e,f,l,k,m,p,q,u,n,v,x,t,A,B){try{f=null!=f?f:!0;l=null!=l?l:!0;u=null!=u?u:this.graph;n=null!=n?n:0;var y=m?null:u.background;y==mxConstants.NONE&&(y=null);null==y&&(y=g);null==y&&0==m&&(y=t?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(u.getSvg(null,null,n,v,null,l,null,null,null,p,null,t,A,B),mxUtils.bind(this,function(c){try{var g=new Image;g.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){v.drawImage(g,0,0);b(m,c)},0):(v.drawImage(g,0,0),b(m,c))},m=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=d&&(k=f?Math.min(1,Math.min(3*d/(4*q),d/p)):d/p);k=this.getMaxCanvasScale(p,q,k);p=
-Math.ceil(k*p);q=Math.ceil(k*q);m.setAttribute("width",p);m.setAttribute("height",q);var v=m.getContext("2d");null!=y&&(v.beginPath(),v.rect(0,0,p,q),v.fillStyle=y,v.fill());1!=k&&v.scale(k,k);if(x){var t=u.view,A=t.scale;t.scale=1;var G=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=A;var G="data:image/svg+xml;base64,"+G,D=u.gridSize*t.gridSteps*k,B=u.getGraphBounds(),C=t.translate.x*A,J=t.translate.y*A,M=C+(B.x-C)/A-n,F=J+(B.y-J)/A-n,E=new Image;E.onload=function(){try{for(var b=
--Math.round(D-mxUtils.mod((C-M)*k,D)),d=-Math.round(D-mxUtils.mod((J-F)*k,D));b<p;b+=D)for(var c=d;c<q;c+=D)v.drawImage(E,b/k,c/k);l()}catch(Ea){null!=e&&e(Ea)}};E.onerror=function(b){null!=e&&e(b)};E.src=G}else l()}catch(Ca){null!=e&&e(Ca)}});g.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);var l=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),g.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(ja){null!=
-e&&e(ja)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ba){null!=e&&e(ba)}}))}catch(ja){null!=e&&e(ja)}}),c,q)}catch(ia){null!=e&&e(ia)}};Editor.crcTable=[];for(var f=0;256>f;f++)for(var n=f,t=0;8>t;t++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[f]=n;Editor.updateCRC=function(b,d,c,g){for(var e=0;e<g;e++)b=Editor.crcTable[(b^d.charCodeAt(c+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c<b.length;c++)d=d>>>
-8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,g,e){function f(b,d){var c=m;m+=d;return b.substring(c,m)}function l(b){b=f(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function k(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var m=0;if(f(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
-10))null!=e&&e();else if(f(b,4),"IHDR"!=f(b,4))null!=e&&e();else{f(b,17);e=b.substring(0,m);do{var p=l(b);if("IDAT"==f(b,4)){e=b.substring(0,m-8);"pHYs"==d&&"dpi"==c?(c=Math.round(g/.0254),c=k(c)+k(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+g;g=4294967295;g=Editor.updateCRC(g,d,0,4);g=Editor.updateCRC(g,c,0,c.length);e+=k(c.length)+d+c+k(g^4294967295);e+=b.substring(m-8,b.length);break}e+=b.substring(m-8,m-4+p);f(b,p);f(b,4)}while(p);return"data:image/png;base64,"+
-(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&
-(EditDataDialog.getDisplayIdForCell=function(b,d){var c=null;null!=b.editor.graph.getModel().getParent(d)?c=d.getId():null!=b.currentPage&&(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
-q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=p.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,g=this.createOption(mxResources.get("shadow"),
-function(){return c.shadowVisible},function(b){var g=new ChangePageSetup(d);g.ignoreColor=!0;g.ignoreImage=!0;g.shadowVisible=b;c.model.execute(g)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.shadowOptionEnabled||(g.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(g,60));b.appendChild(g)}return b};var m=DiagramFormatPanel.prototype.addOptions;
-DiagramFormatPanel.prototype.addOptions=function(b){b=m.apply(this,arguments);var d=this.editorUi,c=d.editor.graph;if(c.isEnabled()){var g=d.getCurrentFile();if(null!=g&&g.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(b){d.editor.setAutosave(b);d.editor.autosave&&g.isModified()&&g.fileChanged()},{install:function(b){this.listener=function(){b(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});
-b.appendChild(e)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(b){d.actions.get("mathematicalTypesetting").funct()},{install:function(b){this.listener=function(){b(c.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});e.style.paddingTop="5px";b.appendChild(e);var f=d.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");
-f.style.position="relative";f.style.marginLeft="6px";f.style.top="2px";e.appendChild(f)}return b};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
+"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var f=Editor.prototype.init;Editor.prototype.init=function(){f.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var e=document.createElement("script");
+e.setAttribute("type","text/javascript");e.setAttribute("src",b);c[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var g=document.createElement("style");g.type="text/css";g.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(g)}}catch(aa){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;
+var d=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(b,c,f,e){void 0!==c?d.push(c.replace(/\\'/g,"'")):void 0!==f?d.push(f.replace(/\\"/g,'"')):void 0!==e&&d.push(e);return""});/,\s*$/.test(b)&&d.push("");return d};Editor.prototype.isCorsEnabledForUrl=function(b){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
+return null!=this.corsRegExp&&this.corsRegExp.test(b)||"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var d=b.convert,c=this;b.convert=function(f){if(null!=f){var e="http://"==f.substring(0,7)||"https://"==f.substring(0,8);e&&!navigator.onLine?f=Editor.svgBrokenImage.src:!e||f.substring(0,b.baseUrl.length)==b.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,
+19)||mxClient.IS_CHROMEAPP||(f=d.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,d){try{var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,mxUtils.bind(this,function(b){window.clearTimeout(f);c&&d(Editor.createSvgDataUri(b.getText()))}),
+function(){window.clearTimeout(f);c&&d(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(f);if(c)try{var b=document.createElement("canvas"),g=b.getContext("2d");b.height=e.height;b.width=e.width;g.drawImage(e,0,0);d(b.toDataURL())}catch(na){d(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(f);c&&d(Editor.svgBrokenImage.src)};e.src=b}}catch(O){d(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
+function(b,d,c,f){null==f&&(f=this.createImageUrlConverter());var e=0,g=c||{};c=mxUtils.bind(this,function(c,l){for(var k=b.getElementsByTagName(c),m=0;m<k.length;m++)mxUtils.bind(this,function(c){try{if(null!=c){var k=f.convert(c.getAttribute(l));if(null!=k&&"data:"!=k.substring(0,5)){var m=g[k];null==m?(e++,this.convertImageToDataUri(k,function(f){null!=f&&(g[k]=f,c.setAttribute(l,f));e--;0==e&&d(b)})):c.setAttribute(l,m)}else null!=k&&c.setAttribute(l,k)}}catch(pa){}})(k[m])});c("image","xlink:href");
+c("img","src");0==e&&d(b)};Editor.base64Encode=function(b){for(var d="",c=0,f=b.length,e,g,l;c<f;){e=b.charCodeAt(c++)&255;if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}g=b.charCodeAt(c++);if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
+3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);d+="=";break}l=b.charCodeAt(c++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(l&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return d};
+Editor.prototype.loadUrl=function(b,d,c,f,e,g,l,k){try{var m=!l&&(f||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var n=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=d){var f=b.getText();if(m){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();
+for(var f=Array(b.length),e=0;e<b.length;e++)f[e]=String.fromCharCode(b[e]);f=f.join("")}g=null!=g?g:"data:image/png;base64,";f=g+Editor.base64Encode(f)}d(f)}}else null!=c&&(0==b.getStatus()?c({message:mxResources.get("accessDenied")},b):c({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=c&&c({message:mxResources.get("error")+" "+b.getStatus()})},m,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:n})},k)});n()}catch(oa){null!=c&&c(oa)}};Editor.prototype.absoluteCssFonts=
+function(b){var d=null;if(null!=b){var c=b.split("url(");if(0<c.length){d=[c[0]];b=window.location.pathname;var f=null!=b?b.lastIndexOf("/"):-1;0<=f&&(b=b.substring(0,f+1));var f=document.getElementsByTagName("base"),e=null;null!=f&&0<f.length&&(e=f[0].getAttribute("href"));for(var g=1;g<c.length;g++)if(f=c[g].indexOf(")"),0<f){var l=Editor.trimCssUrl(c[g].substring(0,f));this.graph.isRelativeUrl(l)&&(l=null!=e?e+l:window.location.protocol+"//"+window.location.hostname+("/"==l.charAt(0)?"":b)+l);
+d.push('url("'+l+'"'+c[g].substring(f))}else d.push(c[g])}else d=[b]}return null!=d?d.join(""):null};Editor.prototype.embedCssFonts=function(b,d){var c=b.split("url("),f=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==f){for(var b=[c[0]],e=1;e<c.length;e++){var g=c[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(c[e].substring(0,g))]);b.push('"'+c[e].substring(g))}d(b.join(""))}});if(0<c.length){for(var g=1;g<c.length;g++){var l=c[g].indexOf(")"),
+k=null,m=c[g].indexOf("format(",l);0<m&&(k=Editor.trimCssUrl(c[g].substring(m+7,c[g].indexOf(")",m))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;f++;var d="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(b))d="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(b))d="application/x-font-opentype";else if("woff"==k||/(\.woff)($|\?)/i.test(b))d="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(b))d="application/font-woff2";
+else if("eot"==k||/(\.eot)($|\?)/i.test(b))d="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(b))d="application/font-sfnt";var c=b;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(c,mxUtils.bind(this,function(d){this.cachedFonts[b]=d;f--;e()}),mxUtils.bind(this,function(b){f--;e()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(Editor.trimCssUrl(c[g].substring(0,l)),k)}e()}else d(b)};Editor.prototype.loadFonts=
+function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;b()})):b()};Editor.prototype.embedExtFonts=function(b){var d=this.graph.getCustomFonts();if(0<d.length){var c="",f=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==f&&this.embedCssFonts(c,b)}),g=0;g<d.length;g++)mxUtils.bind(this,function(b,d){Graph.isCssFontUrl(d)?null==this.cachedGoogleFonts[d]?(f++,this.loadUrl(d,
+mxUtils.bind(this,function(b){this.cachedGoogleFonts[d]=b;c+=b;f--;e()}),mxUtils.bind(this,function(b){f--;c+="@import url("+d+");";e()}))):c+=this.cachedGoogleFonts[d]:c+='@font-face {font-family: "'+b+'";src: url("'+d+'")}'})(d[g].name,d[g].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&0<b.length)for(var d=document.getElementsByTagName("style"),c=0;c<d.length;c++)0<mxUtils.getTextContent(d[c]).indexOf("MathJax")&&b[0].appendChild(d[c].cloneNode(!0))};
+Editor.prototype.addFontCss=function(b,d){d=null!=d?d:this.absoluteCssFonts(this.fontCss);if(null!=d){var c=b.getElementsByTagName("defs"),f=b.ownerDocument;0==c.length?(c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)):c=c[0];f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,d);c.appendChild(f)}};
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var f=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(f/b,f/d))};Editor.prototype.exportToCanvas=function(b,d,c,f,e,g,l,k,m,n,q,p,v,u,x,t,y,D){try{g=null!=g?g:!0;l=null!=l?l:!0;p=null!=p?p:this.graph;v=null!=v?v:0;var B=m?null:p.background;B==mxConstants.NONE&&(B=null);null==B&&(B=f);null==B&&0==m&&(B=t?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(p.getSvg(null,null,v,u,null,l,null,null,null,n,null,t,y,D),mxUtils.bind(this,function(c){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){u.drawImage(f,0,0);b(m,c)},0):(u.drawImage(f,0,0),b(m,c))},m=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=d&&(k=g?Math.min(1,Math.min(3*d/(4*q),d/n)):d/n);k=this.getMaxCanvasScale(n,q,k);n=
+Math.ceil(k*n);q=Math.ceil(k*q);m.setAttribute("width",n);m.setAttribute("height",q);var u=m.getContext("2d");null!=B&&(u.beginPath(),u.rect(0,0,n,q),u.fillStyle=B,u.fill());1!=k&&u.scale(k,k);if(x){var t=p.view,y=t.scale;t.scale=1;var F=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var F="data:image/svg+xml;base64,"+F,A=p.gridSize*t.gridSteps*k,D=p.getGraphBounds(),C=t.translate.x*y,I=t.translate.y*y,N=C+(D.x-C)/y-v,E=I+(D.y-I)/y-v,H=new Image;H.onload=function(){try{for(var b=
+-Math.round(A-mxUtils.mod((C-N)*k,A)),d=-Math.round(A-mxUtils.mod((I-E)*k,A));b<n;b+=A)for(var c=d;c<q;c+=A)u.drawImage(H,b/k,c/k);l()}catch(Ea){null!=e&&e(Ea)}};H.onerror=function(b){null!=e&&e(b)};H.src=F}else l()}catch(Ca){null!=e&&e(Ca)}});f.onerror=function(b){null!=e&&e(b)};n&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);var l=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(ja){null!=
+e&&e(ja)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ba){null!=e&&e(ba)}}))}catch(ja){null!=e&&e(ja)}}),c,q)}catch(ia){null!=e&&e(ia)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var p=g,t=0;8>t;t++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[g]=p;Editor.updateCRC=function(b,d,c,f){for(var e=0;e<f;e++)b=Editor.crcTable[(b^d.charCodeAt(c+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c<b.length;c++)d=d>>>
+8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,f,e){function g(b,d){var c=m;m+=d;return b.substring(c,m)}function l(b){b=g(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function k(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var m=0;if(g(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
+10))null!=e&&e();else if(g(b,4),"IHDR"!=g(b,4))null!=e&&e();else{g(b,17);e=b.substring(0,m);do{var n=l(b);if("IDAT"==g(b,4)){e=b.substring(0,m-8);"pHYs"==d&&"dpi"==c?(c=Math.round(f/.0254),c=k(c)+k(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,d,0,4);f=Editor.updateCRC(f,c,0,c.length);e+=k(c.length)+d+c+k(f^4294967295);e+=b.substring(m-8,b.length);break}e+=b.substring(m-8,m-4+n);g(b,n);g(b,4)}while(n);return"data:image/png;base64,"+
+(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&
+(EditDataDialog.getDisplayIdForCell=function(b,d){var c=null;null!=b.editor.graph.getModel().getParent(d)?c=d.getId():null!=b.currentPage&&(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,f=this.createOption(mxResources.get("shadow"),
+function(){return c.shadowVisible},function(b){var f=new ChangePageSetup(d);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=b;c.model.execute(f)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));b.appendChild(f)}return b};var n=DiagramFormatPanel.prototype.addOptions;
+DiagramFormatPanel.prototype.addOptions=function(b){b=n.apply(this,arguments);var d=this.editorUi,c=d.editor.graph;if(c.isEnabled()){var f=d.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(b){d.editor.setAutosave(b);d.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(b){this.listener=function(){b(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});
+b.appendChild(e)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(b){d.actions.get("mathematicalTypesetting").funct()},{install:function(b){this.listener=function(){b(c.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});e.style.paddingTop="5px";b.appendChild(e);var g=d.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");
+g.style.position="relative";g.style.marginLeft="6px";g.style.top="2px";e.appendChild(g)}return b};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
@@ -3203,79 +3204,89 @@ type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.pro
stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},
{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",
stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",
-gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(b,d,c){if(null!=d){var g=function(b){if(null!=b)if(c)for(var g=
-0;g<b.length;g++)d[b[g].name]=b[g];else for(var e in d){for(var f=!1,g=0;g<b.length;g++)if(b[g].name==e&&b[g].type==d[e].type){f=!0;break}f||delete d[e]}},e=this.editorUi.editor.graph.view.getState(b);null!=e&&null!=e.shape&&(e.shape.commonCustomPropAdded||(e.shape.commonCustomPropAdded=!0,e.shape.customProperties=e.shape.customProperties||[],e.cell.vertex?Array.prototype.push.apply(e.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(e.shape.customProperties,Editor.commonEdgeProperties)),
-g(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{g(JSON.parse(b))}catch(O){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var d={},c=b.vertices,g=b.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],d,0==
-e);for(e=0;e<g.length;e++)this.findCommonProperties(g[e],d,0==c.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(d).length&&this.container.appendChild(this.addProperties(this.createPanel(),d,b))}};var u=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var d=this.format.getSelectionState(),c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",
+gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(b,d,c){if(null!=d){var f=function(b){if(null!=b)if(c)for(var f=
+0;f<b.length;f++)d[b[f].name]=b[f];else for(var e in d){for(var g=!1,f=0;f<b.length;f++)if(b[f].name==e&&b[f].type==d[e].type){g=!0;break}g||delete d[e]}},e=this.editorUi.editor.graph.view.getState(b);null!=e&&null!=e.shape&&(e.shape.commonCustomPropAdded||(e.shape.commonCustomPropAdded=!0,e.shape.customProperties=e.shape.customProperties||[],e.cell.vertex?Array.prototype.push.apply(e.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(e.shape.customProperties,Editor.commonEdgeProperties)),
+f(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{f(JSON.parse(b))}catch(O){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var d={},c=b.vertices,f=b.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],d,0==
+e);for(e=0;e<f.length;e++)this.findCommonProperties(f[e],d,0==c.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(d).length&&this.container.appendChild(this.addProperties(this.createPanel(),d,b))}};var u=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var d=this.format.getSelectionState(),c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",
mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";b.appendChild(c);0<d.cells.length?(c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("pasteStyle").funct()})),c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")"),c.style.marginBottom="2px",c.style.width="100px",b.appendChild(c)):
-c.style.width="202px";mxUtils.br(b);return u.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,d,c){function g(b,d,c,g){u.getModel().beginUpdate();try{var e=[],f=[];if(null!=c.index){for(var l=[],k=c.parentRow.nextSibling;k&&k.getAttribute("data-pName")==b;)l.push(k.getAttribute("data-pValue")),k=k.nextSibling;c.index<l.length?null!=g?l.splice(g,1):l[c.index]=d:l.push(d);null!=c.size&&l.length>c.size&&(l=l.slice(0,c.size));d=l.join(",");
-null!=c.countProperty&&(u.setCellStyles(c.countProperty,l.length,u.getSelectionCells()),e.push(c.countProperty),f.push(l.length))}u.setCellStyles(b,d,u.getSelectionCells());e.push(b);f.push(d);if(null!=c.dependentProps)for(b=0;b<c.dependentProps.length;b++){var m=c.dependentPropsDefVal[b],p=c.dependentPropsVals[b];if(p.length>d)p=p.slice(0,d);else for(var n=p.length;n<d;n++)p.push(m);p=p.join(",");u.setCellStyles(c.dependentProps[b],p,u.getSelectionCells());e.push(c.dependentProps[b]);f.push(p)}if("function"==
-typeof c.onChange)c.onChange(u,d);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",f,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function e(d,c,g){var e=mxUtils.getOffset(b,!0),f=mxUtils.getOffset(d,!0);c.style.position="absolute";c.style.left=f.x-e.x+"px";c.style.top=f.y-e.y+"px";c.style.width=d.offsetWidth+"px";c.style.height=d.offsetHeight-(g?4:0)+"px";c.style.zIndex=5}function f(b,d,c){var e=document.createElement("div");e.style.width="32px";e.style.height=
-"4px";e.style.margin="2px";e.style.border="1px solid black";e.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(f){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;g(b,d,c)});mxEvent.consume(f)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function l(b,d,c,e,f,l,k){null!=d&&(d=d.split(","),n.push({name:b,
-values:d,type:c,defVal:e,countProperty:f,parentRow:l,isDeletable:!0,flipBkg:k}));btn=mxUtils.button("+",mxUtils.bind(q,function(d){for(var m=l,q=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==b)m=m.nextSibling,q++;else break;var u={type:c,parentRow:l,index:q,isDeletable:!0,defVal:e,countProperty:f},q=p(b,"",u,0==q%2,k);g(b,e,u);m.parentNode.insertBefore(q,m.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function k(b,d,c,g,e,f,l){if(0<e){var k=Array(e);d=null!=d?d.split(","):[];for(var m=0;m<e;m++)k[m]=null!=d[m]?d[m]:null!=g?g:"";n.push({name:b,values:k,type:c,defVal:g,parentRow:f,flipBkg:l,size:e})}return document.createElement("div")}function m(b,d,c){var e=document.createElement("input");e.type="checkbox";e.checked="1"==d;mxEvent.addListener(e,"change",function(){g(b,e.checked?"1":"0",c)});return e}function p(d,c,p,u,n){var v=p.dispName,x=p.type,t=document.createElement("tr");t.className="gePropRow"+
-(n?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow";t.setAttribute("data-pName",d);t.setAttribute("data-pValue",c);u=!1;null!=p.index&&(t.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",u=!0);var A=document.createElement("td");A.className="gePropRowCell";A.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));u&&(A.style.textAlign="right");t.appendChild(A);A=document.createElement("td");A.className="gePropRowCell";if("color"==x)A.appendChild(f(d,c,p));else if("bool"==x||"boolean"==
-x)A.appendChild(m(d,c,p));else if("enum"==x){var y=p.enumList;for(n=0;n<y.length;n++)if(v=y[n],v.val==c){A.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(A,"click",mxUtils.bind(q,function(){var f=document.createElement("select");e(A,f);for(var l=0;l<y.length;l++){var k=y[l],m=document.createElement("option");m.value=mxUtils.htmlEntities(k.val);m.innerHTML=mxUtils.htmlEntities(mxResources.get(k.dispName,null,k.dispName));f.appendChild(m)}f.value=
-c;b.appendChild(f);mxEvent.addListener(f,"change",function(){var b=mxUtils.htmlEntities(f.value);g(d,b,p)});f.focus();mxEvent.addListener(f,"blur",function(){b.removeChild(f)})}))}else"dynamicArr"==x?A.appendChild(l(d,c,p.subType,p.subDefVal,p.countProperty,t,n)):"staticArr"==x?A.appendChild(k(d,c,p.subType,p.subDefVal,p.size,t,n)):"readOnly"==x?(n=document.createElement("input"),n.setAttribute("readonly",""),n.value=c,n.style.width="96px",n.style.borderWidth="0px",A.appendChild(n)):(A.innerHTML=
-c,mxEvent.addListener(A,"click",mxUtils.bind(q,function(){function f(){var b=l.value,b=0==b.length&&"string"!=x?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",x="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==x?parseInt(b):b)+"");g(d,b,p)}var l=document.createElement("input");e(A,l,!0);l.value=c;l.className="gePropEditor";"int"!=x&&"float"!=x||p.allowAuto||(l.type="number",l.step="int"==
-x?"1":"any",null!=p.min&&(l.min=parseFloat(p.min)),null!=p.max&&(l.max=parseFloat(p.max)));b.appendChild(l);mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&f()});l.focus();mxEvent.addListener(l,"blur",function(){f()})})));p.isDeletable&&(n=mxUtils.button("-",mxUtils.bind(q,function(b){g(d,"",p,p.index);mxEvent.consume(b)})),n.style.height="16px",n.style.width="25px",n.style["float"]="right",n.className="geColorBtn",A.appendChild(n));t.appendChild(A);return t}var q=this,u=this.editorUi.editor.graph,
-n=[];b.style.position="relative";b.style.padding="0";var v=document.createElement("table");v.className="geProperties";v.style.whiteSpace="nowrap";v.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";var t=document.createElement("th");t.className="gePropHeaderCell";var A=document.createElement("img");A.src=Sidebar.prototype.expandedImage;t.appendChild(A);mxUtils.write(t,mxResources.get("property"));x.style.cursor="pointer";var y=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),
-c;if(q.editorUi.propertiesCollapsed){A.src=Sidebar.prototype.collapsedImage;c="none";for(var g=b.childNodes.length-1;0<=g;g--)try{var e=b.childNodes[g],f=e.nodeName.toUpperCase();"INPUT"!=f&&"SELECT"!=f||b.removeChild(e)}catch(va){}}else A.src=Sidebar.prototype.expandedImage,c="";for(g=0;g<d.length;g++)d[g].style.display=c};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;y()});x.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";
-t.innerHTML=mxResources.get("value");x.appendChild(t);v.appendChild(x);var B=!1,D=!1,x=null;1==c.vertices.length&&0==c.edges.length?x=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(x=c.edges[0].id);null!=x&&v.appendChild(p("id",mxUtils.htmlEntities(x),{dispName:"ID",type:"readOnly"},!0,!1));for(var G in d)if(x=d[G],"function"!=typeof x.isVisible||x.isVisible(c,this)){var C=null!=c.style[G]?mxUtils.htmlEntities(c.style[G]+""):null!=x.getDefaultValue?x.getDefaultValue(c,this):x.defVal;if("separator"==
-x.type)D=!D;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var M=x.dependentProps,F=[],E=[],t=0;t<M.length;t++){var I=c.style[M[t]];E.push(d[M[t]].subDefVal);F.push(null!=I?I.split(","):[])}x.dependentPropsDefVal=E;x.dependentPropsVals=F}v.appendChild(p(G,C,x,B,D));B=!B}}for(t=0;t<n.length;t++)for(x=n[t],d=x.parentRow,c=0;c<x.values.length;c++)G=p(x.name,x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,
-index:c,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==c%2,x.flipBkg),d.parentNode.insertBefore(G,d.nextSibling),d=G;b.appendChild(v);y();return b};StyleFormatPanel.prototype.addStyles=function(b){function d(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var c=this.editorUi,g=c.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight=
-"20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var f="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";for(var k=[],m=0;m<this.defaultColorSchemes.length;m++){var p=document.createElement("div");p.style.display=
-"inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight="3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){q(b)}))})(m);k.push(p);l.appendChild(p)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(k[this.format.currentScheme].style.background="transparent");this.format.currentScheme=
-b;n(this.defaultColorSchemes[this.format.currentScheme]);k[this.format.currentScheme].style.background="#84d7ff"}),n=mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(b){var d=mxUtils.button("",mxUtils.bind(this,function(d){g.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,l=0;l<e.length;l++){for(var k=g.getModel().getStyle(e[l]),m=0;m<f.length;m++)k=mxUtils.removeStylename(k,f[m]);var p=g.getModel().isVertex(e[l])?c.initialDefaultVertexStyle:c.initialdefaultEdgeStyle;
-null!=b?(k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(d)||(k=""==b.fill?mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(d)||(k=""==b.stroke?mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,b.stroke||mxUtils.getValue(p,
-mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(d)||mxClient.IS_MAC&&mxEvent.isMetaDown(d)||!g.getModel().isVertex(e[l])||(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(k=mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),k=mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,
-mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),g.getModel().isVertex(e[l])&&(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));g.getModel().setStyle(e[l],k)}}finally{g.getModel().endUpdate()}}));d.className="geStyleButton";d.style.width="36px";d.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";d.style.margin="0px 6px 6px 0px";if(null!=b){var l="1"==urlParams.sketch?"2px solid":"1px solid";null!=b.gradient?mxClient.IS_IE&&
+c.style.width="202px";mxUtils.br(b);return u.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,d,c){function f(b,d,c,f){p.getModel().beginUpdate();try{var e=[],g=[];if(null!=c.index){for(var l=[],k=c.parentRow.nextSibling;k&&k.getAttribute("data-pName")==b;)l.push(k.getAttribute("data-pValue")),k=k.nextSibling;c.index<l.length?null!=f?l.splice(f,1):l[c.index]=d:l.push(d);null!=c.size&&l.length>c.size&&(l=l.slice(0,c.size));d=l.join(",");
+null!=c.countProperty&&(p.setCellStyles(c.countProperty,l.length,p.getSelectionCells()),e.push(c.countProperty),g.push(l.length))}p.setCellStyles(b,d,p.getSelectionCells());e.push(b);g.push(d);if(null!=c.dependentProps)for(b=0;b<c.dependentProps.length;b++){var m=c.dependentPropsDefVal[b],n=c.dependentPropsVals[b];if(n.length>d)n=n.slice(0,d);else for(var u=n.length;u<d;u++)n.push(m);n=n.join(",");p.setCellStyles(c.dependentProps[b],n,p.getSelectionCells());e.push(c.dependentProps[b]);g.push(n)}if("function"==
+typeof c.onChange)c.onChange(p,d);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",g,"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}function e(d,c,f){var e=mxUtils.getOffset(b,!0),g=mxUtils.getOffset(d,!0);c.style.position="absolute";c.style.left=g.x-e.x+"px";c.style.top=g.y-e.y+"px";c.style.width=d.offsetWidth+"px";c.style.height=d.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function g(b,d,c){var e=document.createElement("div");e.style.width="32px";e.style.height=
+"4px";e.style.margin="2px";e.style.border="1px solid black";e.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(g){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;f(b,d,c)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function l(b,d,c,e,g,l,k){null!=d&&(d=d.split(","),v.push({name:b,
+values:d,type:c,defVal:e,countProperty:g,parentRow:l,isDeletable:!0,flipBkg:k}));btn=mxUtils.button("+",mxUtils.bind(q,function(d){for(var m=l,q=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==b)m=m.nextSibling,q++;else break;var p={type:c,parentRow:l,index:q,isDeletable:!0,defVal:e,countProperty:g},q=n(b,"",p,0==q%2,k);f(b,e,p);m.parentNode.insertBefore(q,m.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function k(b,d,c,f,e,g,l){if(0<e){var k=Array(e);d=null!=d?d.split(","):[];for(var m=0;m<e;m++)k[m]=null!=d[m]?d[m]:null!=f?f:"";v.push({name:b,values:k,type:c,defVal:f,parentRow:g,flipBkg:l,size:e})}return document.createElement("div")}function m(b,d,c){var e=document.createElement("input");e.type="checkbox";e.checked="1"==d;mxEvent.addListener(e,"change",function(){f(b,e.checked?"1":"0",c)});return e}function n(d,c,n,p,u){var v=n.dispName,x=n.type,t=document.createElement("tr");t.className="gePropRow"+
+(u?"Dark":"")+(p?"Alt":"")+" gePropNonHeaderRow";t.setAttribute("data-pName",d);t.setAttribute("data-pValue",c);p=!1;null!=n.index&&(t.setAttribute("data-index",n.index),v=(null!=v?v:"")+"["+n.index+"]",p=!0);var y=document.createElement("td");y.className="gePropRowCell";y.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));p&&(y.style.textAlign="right");t.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==x)y.appendChild(g(d,c,n));else if("bool"==x||"boolean"==
+x)y.appendChild(m(d,c,n));else if("enum"==x){var B=n.enumList;for(u=0;u<B.length;u++)if(v=B[u],v.val==c){y.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(q,function(){var g=document.createElement("select");e(y,g);for(var l=0;l<B.length;l++){var k=B[l],m=document.createElement("option");m.value=mxUtils.htmlEntities(k.val);m.innerHTML=mxUtils.htmlEntities(mxResources.get(k.dispName,null,k.dispName));g.appendChild(m)}g.value=
+c;b.appendChild(g);mxEvent.addListener(g,"change",function(){var b=mxUtils.htmlEntities(g.value);f(d,b,n)});g.focus();mxEvent.addListener(g,"blur",function(){b.removeChild(g)})}))}else"dynamicArr"==x?y.appendChild(l(d,c,n.subType,n.subDefVal,n.countProperty,t,u)):"staticArr"==x?y.appendChild(k(d,c,n.subType,n.subDefVal,n.size,t,u)):"readOnly"==x?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=c,u.style.width="96px",u.style.borderWidth="0px",y.appendChild(u)):(y.innerHTML=
+c,mxEvent.addListener(y,"click",mxUtils.bind(q,function(){function g(){var b=l.value,b=0==b.length&&"string"!=x?0:b;n.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",x="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=n.min&&b<n.min?b=n.min:null!=n.max&&b>n.max&&(b=n.max);b=mxUtils.htmlEntities(("int"==x?parseInt(b):b)+"");f(d,b,n)}var l=document.createElement("input");e(y,l,!0);l.value=c;l.className="gePropEditor";"int"!=x&&"float"!=x||n.allowAuto||(l.type="number",l.step="int"==
+x?"1":"any",null!=n.min&&(l.min=parseFloat(n.min)),null!=n.max&&(l.max=parseFloat(n.max)));b.appendChild(l);mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&g()});l.focus();mxEvent.addListener(l,"blur",function(){g()})})));n.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(b){f(d,"",n,n.index);mxEvent.consume(b)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",y.appendChild(u));t.appendChild(y);return t}var q=this,p=this.editorUi.editor.graph,
+v=[];b.style.position="relative";b.style.padding="0";var u=document.createElement("table");u.className="geProperties";u.style.whiteSpace="nowrap";u.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";var t=document.createElement("th");t.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;t.appendChild(y);mxUtils.write(t,mxResources.get("property"));x.style.cursor="pointer";var B=function(){var d=u.querySelectorAll(".gePropNonHeaderRow"),
+c;if(q.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;c="none";for(var f=b.childNodes.length-1;0<=f;f--)try{var e=b.childNodes[f],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||b.removeChild(e)}catch(va){}}else y.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<d.length;f++)d[f].style.display=c};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;B()});x.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";
+t.innerHTML=mxResources.get("value");x.appendChild(t);u.appendChild(x);var D=!1,F=!1,x=null;1==c.vertices.length&&0==c.edges.length?x=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(x=c.edges[0].id);null!=x&&u.appendChild(n("id",mxUtils.htmlEntities(x),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(x=d[A],"function"!=typeof x.isVisible||x.isVisible(c,this)){var C=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=x.getDefaultValue?x.getDefaultValue(c,this):x.defVal;if("separator"==
+x.type)F=!F;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var N=x.dependentProps,E=[],H=[],t=0;t<N.length;t++){var P=c.style[N[t]];H.push(d[N[t]].subDefVal);E.push(null!=P?P.split(","):[])}x.dependentPropsDefVal=H;x.dependentPropsVals=E}u.appendChild(n(A,C,x,D,F));D=!D}}for(t=0;t<v.length;t++)for(x=v[t],d=x.parentRow,c=0;c<x.values.length;c++)A=n(x.name,x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,
+index:c,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==c%2,x.flipBkg),d.parentNode.insertBefore(A,d.nextSibling),d=A;b.appendChild(u);B();return b};StyleFormatPanel.prototype.addStyles=function(b){function d(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var c=this.editorUi,f=c.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight=
+"20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var g="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";for(var k=[],m=0;m<this.defaultColorSchemes.length;m++){var n=document.createElement("div");n.style.display=
+"inline-block";n.style.width="6px";n.style.height="6px";n.style.marginLeft="4px";n.style.marginRight="3px";n.style.borderRadius="3px";n.style.cursor="pointer";n.style.background="transparent";n.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(n,"click",mxUtils.bind(this,function(){q(b)}))})(m);k.push(n);l.appendChild(n)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(k[this.format.currentScheme].style.background="transparent");this.format.currentScheme=
+b;p(this.defaultColorSchemes[this.format.currentScheme]);k[this.format.currentScheme].style.background="#84d7ff"}),p=mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(b){var d=mxUtils.button("",mxUtils.bind(this,function(d){f.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,l=0;l<e.length;l++){for(var k=f.getModel().getStyle(e[l]),m=0;m<g.length;m++)k=mxUtils.removeStylename(k,g[m]);var n=f.getModel().isVertex(e[l])?c.initialDefaultVertexStyle:c.initialdefaultEdgeStyle;
+null!=b?(k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(d)||(k=""==b.fill?mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(d)||(k=""==b.stroke?mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,b.stroke||mxUtils.getValue(n,
+mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(d)||mxClient.IS_MAC&&mxEvent.isMetaDown(d)||!f.getModel().isVertex(e[l])||(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null)))):(k=mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,"#ffffff")),k=mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,"#000000")),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,
+mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(e[l])&&(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(e[l],k)}}finally{f.getModel().endUpdate()}}));d.className="geStyleButton";d.style.width="36px";d.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";d.style.margin="0px 6px 6px 0px";if(null!=b){var l="1"==urlParams.sketch?"2px solid":"1px solid";null!=b.gradient?mxClient.IS_IE&&
10>document.documentMode?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":b.fill==mxConstants.NONE?d.style.background="url('"+Dialog.prototype.noColorImage+"')":d.style.backgroundColor=""==b.fill?mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff"):b.fill||mxUtils.getValue(c.initialDefaultVertexStyle,
-mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");d.style.border=b.stroke==mxConstants.NONE?l+" transparent":""==b.stroke?l+" "+mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):l+" "+(b.stroke||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=b.title&&d.setAttribute("title",b.title)}else{var l=mxUtils.getValue(g.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,
-"#ffffff"),k=mxUtils.getValue(g.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=l;d.style.border="1px solid "+k}d.style.borderRadius="0";e.appendChild(d)});e.innerHTML="";for(var l=0;l<b.length;l++)0<l&&0==mxUtils.mod(l,4)&&mxUtils.br(e),d(b[l])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var m=10>=this.defaultColorSchemes.length?28:8,u=document.createElement("div");u.style.cssText="position:absolute;left:10px;top:8px;bottom:"+
+mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");d.style.border=b.stroke==mxConstants.NONE?l+" transparent":""==b.stroke?l+" "+mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):l+" "+(b.stroke||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=b.title&&d.setAttribute("title",b.title)}else{var l=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,
+"#ffffff"),k=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=l;d.style.border="1px solid "+k}d.style.borderRadius="0";e.appendChild(d)});e.innerHTML="";for(var l=0;l<b.length;l++)0<l&&0==mxUtils.mod(l,4)&&mxUtils.br(e),d(b[l])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var m=10>=this.defaultColorSchemes.length?28:8,u=document.createElement("div");u.style.cssText="position:absolute;left:10px;top:8px;bottom:"+
m+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";mxEvent.addListener(u,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));
var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+m+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";1<this.defaultColorSchemes.length&&
-(b.appendChild(u),b.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));d(u);d(v);n(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&b.appendChild(l);return b};StyleFormatPanel.prototype.addEditOps=function(b){var d=this.format.getSelectionState(),c=null;1==d.cells.length&&(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editStyle").funct()})),
-c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",b.appendChild(c));var g=this.editorUi.editor.graph,g=1==d.cells.length?g.view.getState(d.cells[0]):null;null!=g&&null!=g.shape&&null!=g.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editShape").funct()})),d.setAttribute("title",mxResources.get("editShape")),d.style.marginBottom=
+(b.appendChild(u),b.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));d(u);d(v);p(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&b.appendChild(l);return b};StyleFormatPanel.prototype.addEditOps=function(b){var d=this.format.getSelectionState(),c=null;1==d.cells.length&&(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editStyle").funct()})),
+c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",b.appendChild(c));var f=this.editorUi.editor.graph,f=1==d.cells.length?f.view.getState(d.cells[0]):null;null!=f&&null!=f.shape&&null!=f.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editShape").funct()})),d.setAttribute("title",mxResources.get("editShape")),d.style.marginBottom=
"2px",null==c?d.style.width="202px":(c.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),b.appendChild(d)):d.image&&0<d.cells.length&&(d=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(b){this.editorUi.actions.get("image").funct()})),d.setAttribute("title",mxResources.get("editImage")),d.style.marginBottom="2px",null==c?d.style.width="202px":(c.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),b.appendChild(d));return b}}Graph.customFontElements=
{};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(b){return b.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(b){return Graph.isGoogleFontUrl(b)};Graph.createFontElement=function(b,d){var c;Graph.isCssFontUrl(d)?(c=document.createElement("link"),c.setAttribute("rel","stylesheet"),c.setAttribute("type","text/css"),c.setAttribute("charset","UTF-8"),c.setAttribute("href",d)):(c=document.createElement("style"),mxUtils.write(c,'@font-face {\nfont-family: "'+
-b+'";\nsrc: url("'+d+'");\n}'));return c};Graph.addFont=function(b,d,c){if(null!=b&&0<b.length&&null!=d&&0<d.length){var g=b.toLowerCase();if("helvetica"!=g&&"arial"!=b&&"sans-serif"!=g){var e=Graph.customFontElements[g];null!=e&&e.url!=d&&(e.elt.parentNode.removeChild(e.elt),e=null);null==e?(e=d,"http:"==d.substring(0,5)&&(e=PROXY_URL+"?url="+encodeURIComponent(d)),e={name:b,url:d,elt:Graph.createFontElement(b,e)},Graph.customFontElements[g]=e,Graph.recentCustomFonts[g]=e,d=document.getElementsByTagName("head")[0],
-null!=c&&("link"==e.elt.nodeName.toLowerCase()?(e.elt.onload=c,e.elt.onerror=c):c()),null!=d&&d.appendChild(e.elt)):null!=c&&c()}else null!=c&&c()}else null!=c&&c();return b};Graph.getFontUrl=function(b,d){var c=Graph.customFontElements[b.toLowerCase()];null!=c&&(d=c.url);return d};Graph.processFontAttributes=function(b){b=b.getElementsByTagName("*");for(var d=0;d<b.length;d++){var c=b[d].getAttribute("data-font-src");if(null!=c){var g="FONT"==b[d].nodeName?b[d].getAttribute("face"):b[d].style.fontFamily;
-null!=g&&Graph.addFont(g,c)}}};Graph.processFontStyle=function(b){if(null!=b){var d=mxUtils.getValue(b,"fontSource",null);if(null!=d){var c=mxUtils.getValue(b,mxConstants.STYLE_FONTFAMILY,null);null!=c&&Graph.addFont(c,decodeURIComponent(d))}}return b};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";
-Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=urlParams.edge;Graph.prototype.hiddenTags=null;var B=Graph.prototype.init;Graph.prototype.init=function(){function b(b){d=b}B.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var d=null;mxEvent.addListener(this.container,"mouseenter",b);mxEvent.addListener(this.container,
-"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){d=null});this.isMouseInsertPoint=function(){return null!=d};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):c.apply(this,arguments)};var g=this.layoutManager.getLayout;this.layoutManager.getLayout=function(b){var d=this.graph.getCellStyle(b);if(null!=d){if("rack"==d.childLayout){var c=new mxStackLayout(this.graph,!1);c.gridSize=null!=d.rackUnitSize?parseFloat(d.rackUnitSize):
+b+'";\nsrc: url("'+d+'");\n}'));return c};Graph.addFont=function(b,d,c){if(null!=b&&0<b.length&&null!=d&&0<d.length){var f=b.toLowerCase();if("helvetica"!=f&&"arial"!=b&&"sans-serif"!=f){var e=Graph.customFontElements[f];null!=e&&e.url!=d&&(e.elt.parentNode.removeChild(e.elt),e=null);null==e?(e=d,"http:"==d.substring(0,5)&&(e=PROXY_URL+"?url="+encodeURIComponent(d)),e={name:b,url:d,elt:Graph.createFontElement(b,e)},Graph.customFontElements[f]=e,Graph.recentCustomFonts[f]=e,d=document.getElementsByTagName("head")[0],
+null!=c&&("link"==e.elt.nodeName.toLowerCase()?(e.elt.onload=c,e.elt.onerror=c):c()),null!=d&&d.appendChild(e.elt)):null!=c&&c()}else null!=c&&c()}else null!=c&&c();return b};Graph.getFontUrl=function(b,d){var c=Graph.customFontElements[b.toLowerCase()];null!=c&&(d=c.url);return d};Graph.processFontAttributes=function(b){b=b.getElementsByTagName("*");for(var d=0;d<b.length;d++){var c=b[d].getAttribute("data-font-src");if(null!=c){var f="FONT"==b[d].nodeName?b[d].getAttribute("face"):b[d].style.fontFamily;
+null!=f&&Graph.addFont(f,c)}}};Graph.processFontStyle=function(b){if(null!=b){var d=mxUtils.getValue(b,"fontSource",null);if(null!=d){var c=mxUtils.getValue(b,mxConstants.STYLE_FONTFAMILY,null);null!=c&&Graph.addFont(c,decodeURIComponent(d))}}return b};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";
+Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=urlParams.edge;Graph.prototype.hiddenTags=null;var y=Graph.prototype.init;Graph.prototype.init=function(){function b(b){d=b}y.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var d=null;mxEvent.addListener(this.container,"mouseenter",b);mxEvent.addListener(this.container,
+"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){d=null});this.isMouseInsertPoint=function(){return null!=d};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):c.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(b){var d=this.graph.getCellStyle(b);if(null!=d){if("rack"==d.childLayout){var c=new mxStackLayout(this.graph,!1);c.gridSize=null!=d.rackUnitSize?parseFloat(d.rackUnitSize):
"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;c.marginLeft=d.marginLeft||0;c.marginRight=d.marginRight||0;c.marginTop=d.marginTop||0;c.marginBottom=d.marginBottom||0;c.allowGaps=d.allowGaps||0;c.horizontal="1"==mxUtils.getValue(d,"horizontalRack","0");c.resizeParent=!1;c.fill=!0;return c}if("undefined"!==typeof mxTableLayout&&"tableLayout"==d.childLayout)return c=new mxTableLayout(this.graph),c.rows=d.tableRows||2,c.columns=d.tableColumns||2,c.colPercentages=d.colPercentages,c.rowPercentages=
d.rowPercentages,c.equalColumns="1"==mxUtils.getValue(d,"equalColumns",c.colPercentages?"0":"1"),c.equalRows="1"==mxUtils.getValue(d,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),c.border=d.tableBorder||c.border,c.marginLeft=d.marginLeft||0,c.marginRight=d.marginRight||0,c.marginTop=d.marginTop||0,c.marginBottom=d.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(d,"autoAddCol","0"),c.autoAddRow="1"==mxUtils.getValue(d,"autoAddRow",c.autoAddCol?
-"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return g.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var E=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,g,e,f,l,k,m,p,q){E.apply(this,arguments);Graph.processFontAttributes(q)};var A=mxText.prototype.redraw;mxText.prototype.redraw=
-function(){A.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],d;for(d in Graph.customFontElements){var c=Graph.customFontElements[d];b.push({name:c.name,url:c.url})}return b};Graph.prototype.setFont=function(b,d){Graph.addFont(b,d);document.execCommand("fontname",!1,b);if(null!=d){var c=this.cellEditor.textarea.getElementsByTagName("font");d=Graph.getFontUrl(b,
-d);for(var g=0;g<c.length;g++)c[g].getAttribute("face")==b&&c[g].getAttribute("data-font-src")!=d&&c[g].setAttribute("data-font-src",d)}};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var b=JSON.parse(decodeURIComponent(urlParams.vars));
-if(null!=b)for(var d in b)this.globalVars[d]=b[d]}catch(y){null!=window.console&&console.log("Error in vars URL parameter: "+y)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var I=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var d=I.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[b]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=function(b,d,c,g,e,f,l,k,m,p,q,u,n,v){var x=null,t=null;u||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=
-this.getDefaultStylesheet(),this.refresh());var A=L.apply(this,arguments),B=this.getCustomFonts();if(q&&0<B.length){var y=A.ownerDocument,C=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"style"):y.createElement("style");null!=y.setAttributeNS?C.setAttributeNS("type","text/css"):C.setAttribute("type","text/css");for(var D="",G="",M=0;M<B.length;M++){var F=B[M].name,J=B[M].url;Graph.isCssFontUrl(J)?D+="@import url("+J+");\n":G+='@font-face {\nfont-family: "'+F+'";\nsrc: url("'+J+'");\n}\n'}C.appendChild(y.createTextNode(D+
-G));A.getElementsByTagName("defs")[0].appendChild(C)}null!=x&&(this.defaultPageBackgroundColor=t,this.stylesheet=x,this.refresh());return A};var H=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var b=H.apply(this,arguments);if(this.mathEnabled){var d=b.drawText;b.drawText=function(b,c){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var g=b.text.getContentNode();if(null!=
-g){g=g.cloneNode(!0);if(g.getElementsByTagNameNS)for(var e=g.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=g.innerHTML&&(e=b.text.value,b.text.value=g.innerHTML,d.apply(this,arguments),b.text.value=e)}}else d.apply(this,arguments)}}return b};var K=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){K.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=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;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&this.setBackgroundImage(this.backgroundImage)};var C=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){C.apply(this,arguments);this.currentStyle="default-style2"};
-Graph.prototype.handleCustomLink=function(b){"data:action/json,"==b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=function(b,d){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=
-!0;var c=!1,g=0,e=0,f=mxUtils.bind(this,function(){c||(c=!0,this.model.beginUpdate())}),l=mxUtils.bind(this,function(){c&&(c=!1,this.model.endUpdate())}),k=mxUtils.bind(this,function(){0<g&&g--;0==g&&m()}),m=mxUtils.bind(this,function(){if(e<b.length){var c=this.stoppingCustomActions,p=b[e++],q=[];if(null!=p.open)if(l(),this.isCustomLink(p.open)){if(!this.customLinkClicked(p.open))return}else this.openLink(p.open);null==p.wait||c||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=
-this.pendingExecuteNextAction=null;k()}),g++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=p.wait?parseInt(p.wait):1E3),l());null!=p.opacity&&null!=p.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(p.opacity,!0)),p.opacity.value);null!=p.fadeIn&&(g++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeIn,!0)),0,1,k,c?0:p.fadeIn.delay));null!=p.fadeOut&&(g++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeOut,
-!0)),1,0,k,c?0:p.fadeOut.delay));null!=p.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeIn,!0),!0)));null!=p.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeOut,!0),!1)));null!=p.toggle&&(f(),this.toggleCells(this.getCellsForAction(p.toggle,!0)));if(null!=p.show){f();var u=this.getCellsForAction(p.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(u),1);this.setCellsVisible(u,!0)}null!=p.hide&&(f(),u=this.getCellsForAction(p.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(u),
-0),this.setCellsVisible(u,!1));null!=p.toggleStyle&&null!=p.toggleStyle.key&&(f(),this.toggleCellStyles(p.toggleStyle.key,null!=p.toggleStyle.defaultValue?p.toggleStyle.defaultValue:"0",this.getCellsForAction(p.toggleStyle,!0)));null!=p.style&&null!=p.style.key&&(f(),this.setCellStyles(p.style.key,p.style.value,this.getCellsForAction(p.style,!0)));u=[];null!=p.select&&this.isEnabled()&&(u=this.getCellsForAction(p.select),this.setSelectionCells(u));null!=p.highlight&&(u=this.getCellsForAction(p.highlight),
-this.highlightCells(u,p.highlight.color,p.highlight.duration,p.highlight.opacity));null!=p.scroll&&(u=this.getCellsForAction(p.scroll));null!=p.viewbox&&this.fitWindow(p.viewbox,p.viewbox.border);0<u.length&&this.scrollCellToVisible(u[0]);if(null!=p.tags){u=[];null!=p.tags.hidden&&(u=u.concat(p.tags.hidden));if(null!=p.tags.visible)for(var n=this.getAllTags(),v=0;v<n.length;v++)0>mxUtils.indexOf(p.tags.visible,n[v])&&0>mxUtils.indexOf(u,n[v])&&u.push(n[v]);this.hiddenTags=u;this.refresh()}0<q.length&&
-(g++,this.executeAnimations(q,k,c?1:p.steps,c?0:p.delay));0==g?m():l()}else this.stoppingCustomActions=this.executingCustomActions=!1,l(),null!=d&&d()});m()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,d){var c=this.getLinkForCell(d);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(b,c));if(this.isHtmlLabel(d)){var g=document.createElement("div");g.innerHTML=this.sanitizeHtml(this.getLabel(d));for(var e=g.getElementsByTagName("a"),f=!1,l=0;l<
-e.length;l++)c=e[l].getAttribute("href"),null!=c&&"data:action/json,"==c.substring(0,17)&&(e[l].setAttribute("href",this.updateCustomLink(b,c)),f=!0);f&&this.labelChanged(d,g.innerHTML)}};Graph.prototype.updateCustomLink=function(b,d){if("data:action/json,"==d.substring(0,17))try{var c=JSON.parse(d.substring(17));null!=c.actions&&(this.updateCustomLinkActions(b,c.actions),d="data:action/json,"+JSON.stringify(c))}catch(W){}return d};Graph.prototype.updateCustomLinkActions=function(b,d){for(var c=0;c<
-d.length;c++){var g=d[c],e;for(e in g)this.updateCustomLinkAction(b,g[e],"cells"),this.updateCustomLinkAction(b,g[e],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(b,d,c){if(null!=d&&null!=d[c]){for(var g=[],e=0;e<d[c].length;e++)if("*"==d[c][e])g.push(d[c][e]);else{var f=b[d[c][e]];null!=f?""!=f&&g.push(f):g.push(d[c][e])}d[c]=g}};Graph.prototype.getCellsForAction=function(b,d){var c=this.getCellsById(b.cells).concat(this.getCellsForTags(b.tags,null,d));if(null!=b.excludeCells){for(var g=
-[],e=0;e<c.length;e++)0>b.excludeCells.indexOf(c[e].id)&&g.push(c[e]);c=g}return c};Graph.prototype.getCellsById=function(b){var d=[];if(null!=b)for(var c=0;c<b.length;c++)if("*"==b[c])var g=this.model.getRoot(),d=d.concat(this.model.filterDescendants(function(b){return b!=g},g));else{var e=this.model.getCell(b[c]);null!=e&&d.push(e)}return d};var N=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(b){return N.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(b))};
-Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var d=0;d<b.length;d++)if(0>mxUtils.indexOf(this.hiddenTags,b[d]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,d,c,g){var e=[];if(null!=b){d=null!=d?d:this.model.getDescendants(this.model.getRoot());for(var f=0,l={},k=0;k<b.length;k++)0<b[k].length&&(l[b[k]]=!0,f++);for(k=0;k<d.length;k++)if(c&&this.model.getParent(d[k])==
-this.model.root||this.model.isVertex(d[k])||this.model.isEdge(d[k])){var m=this.getTagsForCell(d[k]),p=!1;if(0<m.length&&(m=m.split(" "),m.length>=b.length)){for(var q=p=0;q<m.length&&p<f;q++)null!=l[m[q]]&&p++;p=p==f}p&&(1!=g||this.isCellVisible(d[k]))&&e.push(d[k])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var d=null,c=[],g=0;g<b.length;g++){var e=this.getTagsForCell(b[g]),
-c=[];if(0<e.length){for(var e=e.split(" "),f={},l=0;l<e.length;l++)if(null==d||null!=d[e[l]])f[e[l]]=!0,c.push(e[l]);d=f}else return[]}return c};Graph.prototype.getTagsForCells=function(b){for(var d=[],c={},g=0;g<b.length;g++){var e=this.getTagsForCell(b[g]);if(0<e.length)for(var e=e.split(" "),f=0;f<e.length;f++)null==c[e[f]]&&(c[e[f]]=!0,d.push(e[f]))}return d};Graph.prototype.getTagsForCell=function(b){return this.getAttributeForCell(b,"tags","")};Graph.prototype.addTagsForCells=function(b,d){if(0<
-b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){for(var g=this.getTagsForCell(b[c]),e=g.split(" "),f=!1,l=0;l<d.length;l++){var k=mxUtils.trim(d[l]);""!=k&&0>mxUtils.indexOf(e,k)&&(g=0<g.length?g+" "+k:k,f=!0)}f&&this.setAttributeForCell(b[c],"tags",g)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,d){if(0<b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var g=this.getTagsForCell(b[c]);if(0<g.length){for(var e=
-g.split(" "),f=!1,l=0;l<d.length;l++){var k=mxUtils.indexOf(e,d[l]);0<=k&&(e.splice(k,1),f=!0)}f&&this.setAttributeForCell(b[c],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var d=0;d<b.length;d++)this.model.setVisible(b[d],!this.model.isVisible(b[d]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,d){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],d)}finally{this.model.endUpdate()}};
-Graph.prototype.highlightCells=function(b,d,c,g){for(var e=0;e<b.length;e++)this.highlightCell(b[e],d,c,g)};Graph.prototype.highlightCell=function(b,d,c,g){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;b=this.view.getState(b);if(null!=b){var e=Math.max(5,mxUtils.getValue(b.style,mxConstants.STYLE_STROKEWIDTH,1)+4),f=new mxCellHighlight(this,d,e,!1);null!=g&&(f.opacity=g);f.highlight(b);window.setTimeout(function(){null!=f.shape&&(mxUtils.setPrefixedStyle(f.shape.node.style,"transition",
-"all 1200ms ease-in-out"),f.shape.node.style.opacity=0);window.setTimeout(function(){f.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(b,d,c){c=null!=c?c:!1;var g=b.ownerDocument,e=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"filter"):g.createElement("filter");e.setAttribute("id",this.shadowId);var f=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):g.createElement("feGaussianBlur");f.setAttribute("in","SourceAlpha");f.setAttribute("stdDeviation",
-this.svgShadowBlur);f.setAttribute("result","blur");e.appendChild(f);f=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feOffset"):g.createElement("feOffset");f.setAttribute("in","blur");f.setAttribute("dx",this.svgShadowSize);f.setAttribute("dy",this.svgShadowSize);f.setAttribute("result","offsetBlur");e.appendChild(f);f=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feFlood"):g.createElement("feFlood");f.setAttribute("flood-color",this.svgShadowColor);f.setAttribute("flood-opacity",
-this.svgShadowOpacity);f.setAttribute("result","offsetColor");e.appendChild(f);f=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feComposite"):g.createElement("feComposite");f.setAttribute("in","offsetColor");f.setAttribute("in2","offsetBlur");f.setAttribute("operator","in");f.setAttribute("result","offsetBlur");e.appendChild(f);f=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feBlend"):g.createElement("feBlend");f.setAttribute("in","SourceGraphic");f.setAttribute("in2",
-"offsetBlur");e.appendChild(f);f=b.getElementsByTagName("defs");0==f.length?(g=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"defs"):g.createElement("defs"),null!=b.firstChild?b.insertBefore(g,b.firstChild):b.appendChild(g)):g=f[0];g.appendChild(e);c||(d=null!=d?d:b.getElementsByTagName("g")[0],null!=d&&(d.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(b.getAttribute("width")))||(b.setAttribute("width",parseInt(b.getAttribute("width"))+6),b.setAttribute("height",parseInt(b.getAttribute("height"))+
+"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var H=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,k,m,n,q){H.apply(this,arguments);Graph.processFontAttributes(q)};var D=mxText.prototype.redraw;mxText.prototype.redraw=
+function(){D.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,d,c){function f(){for(var b=l.getSelectionCells(),d=[],c=0;c<b.length;c++)l.isCellVisible(b[c])&&d.push(b[c]);l.setSelectionCells(d)}function e(b){l.hiddenTags=b?[]:k.slice();f();l.refresh()}function g(b,c){n.innerHTML="";if(0<b.length){var g=document.createElement("table");g.setAttribute("cellpadding","2");g.style.boxSizing="border-box";
+g.style.tableLayout="fixed";g.style.width="100%";var m=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){function g(){var d=k.slice(),c=mxUtils.indexOf(d,b);d.splice(c,1);l.hiddenTags=d;f();l.refresh()}function n(){var d=l.getCellsForTags([b],null,null,!0);l.isEnabled()?l.setSelectionCells(d):l.highlightCells(d)}var q=0>mxUtils.indexOf(l.hiddenTags,b),p=document.createElement("tr"),u=document.createElement("td");u.style.align="center";u.style.width="16px";
+var v=document.createElement("img");v.setAttribute("src",q?Editor.visibleImage:Editor.hiddenImage);v.setAttribute("title",mxResources.get(q?"hideIt":"show",[b]));mxUtils.setOpacity(v,q?75:25);v.style.verticalAlign="middle";v.style.cursor="pointer";v.style.width="16px";if(d||Editor.isDarkMode())v.style.filter="invert(100%)";u.appendChild(v);mxEvent.addListener(v,"click",function(d){var c=mxUtils.indexOf(l.hiddenTags,b);mxEvent.isShiftDown(d)?e(0<=mxUtils.indexOf(l.hiddenTags,b)):(0>c?l.hiddenTags.push(b):
+0<=c&&l.hiddenTags.splice(c,1),f(),l.refresh());mxEvent.consume(d)});mxEvent.addListener(v,"dblclick",function(b){mxEvent.isShiftDown(b)||(!q&&0<l.hiddenTags.length?e(!0):g());mxEvent.consume(b)});p.appendChild(u);u=document.createElement("td");u.style.overflow="hidden";u.style.whiteSpace="nowrap";u.style.textOverflow="ellipsis";u.style.verticalAlign="middle";u.style.cursor="pointer";u.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position=
+"relative";mxUtils.setOpacity(a,q?100:40);u.appendChild(a);mxEvent.addListener(u,"click",function(b){mxEvent.isShiftDown(b)?(e(!0),n()):q&&0<l.hiddenTags.length?e(!0):g();mxEvent.consume(b)});mxEvent.addListener(u,"dblclick",function(b){e(!0);n();mxEvent.consume(b)});p.appendChild(u);if(l.isEnabled()){u=document.createElement("td");u.style.verticalAlign="middle";u.style.textAlign="center";u.style.width="18px";if(null==c){u.style.align="center";u.style.width="16px";v=document.createElement("img");
+v.setAttribute("src",Editor.crossImage);v.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(v,q?75:25);v.style.verticalAlign="middle";v.style.cursor="pointer";v.style.width="16px";if(d||Editor.isDarkMode())v.style.filter="invert(100%)";mxEvent.addListener(v,"click",function(d){var c=mxUtils.indexOf(k,b);0<=c&&k.splice(c,1);l.removeTagsForCells(l.model.getDescendants(l.model.getRoot()),[b]);l.refresh();mxEvent.consume(d)});u.appendChild(v)}else{var x=document.createElement("input");
+x.setAttribute("type","checkbox");x.style.margin="0px";x.defaultChecked=null!=c&&0<=mxUtils.indexOf(c,b);x.checked=x.defaultChecked;x.style.background="transparent";x.setAttribute("title",mxResources.get(x.defaultChecked?"removeIt":"add",[b]));mxEvent.addListener(x,"change",function(d){x.checked?l.addTagsForCells(l.getSelectionCells(),[b]):l.removeTagsForCells(l.getSelectionCells(),[b]);mxEvent.consume(d)});u.appendChild(x)}p.appendChild(u)}m.appendChild(p)})(b[q]);g.appendChild(m);n.appendChild(g)}}
+var l=this,k=l.hiddenTags.slice(),m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.style.height="100%";var n=document.createElement("div");n.style.boxSizing="border-box";n.style.borderRadius="4px";n.style.userSelect="none";n.style.overflow="auto";n.style.position="absolute";n.style.left="10px";n.style.right="10px";n.style.top="10px";n.style.border=l.isEnabled()?"1px solid #808080":"none";n.style.bottom=l.isEnabled()?"48px":"10px";m.appendChild(n);
+var q=mxUtils.button(mxResources.get("reset"),function(b){l.hiddenTags=[];mxEvent.isShiftDown(b)||(k=l.hiddenTags.slice());f();l.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";q.style.margin="0 4px 0 0";var p=mxUtils.button(mxResources.get("add"),function(){null!=c&&c(k,function(b){k=b;u()})});p.setAttribute("title",mxResources.get("add"));p.className="geBtn";p.style.margin="0";l.addListener(mxEvent.ROOT,function(){k=l.hiddenTags.slice()});var u=mxUtils.bind(this,
+function(d,c){if(b()){for(var f=l.getAllTags(),e=0;e<f.length;e++)0>mxUtils.indexOf(k,f[e])&&k.push(f[e]);k.sort();l.isSelectionEmpty()?g(k):g(k,l.getCommonTagsForCells(l.getSelectionCells()))}});l.selectionModel.addListener(mxEvent.CHANGE,u);l.model.addListener(mxEvent.CHANGE,u);l.addListener(mxEvent.REFRESH,u);var v=document.createElement("div");v.style.boxSizing="border-box";v.style.whiteSpace="nowrap";v.style.position="absolute";v.style.overflow="hidden";v.style.bottom="0px";v.style.height="42px";
+v.style.right="10px";v.style.left="10px";l.isEnabled()&&(v.appendChild(q),v.appendChild(p),m.appendChild(v));return{div:m,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],d;for(d in Graph.customFontElements){var c=Graph.customFontElements[d];b.push({name:c.name,url:c.url})}return b};Graph.prototype.setFont=function(b,d){Graph.addFont(b,d);document.execCommand("fontname",!1,b);if(null!=d){var c=this.cellEditor.textarea.getElementsByTagName("font");d=
+Graph.getFontUrl(b,d);for(var f=0;f<c.length;f++)c[f].getAttribute("face")==b&&c[f].getAttribute("data-font-src")!=d&&c[f].setAttribute("data-font-src",d)}};var E=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return E.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var b=
+JSON.parse(decodeURIComponent(urlParams.vars));if(null!=b)for(var d in b)this.globalVars[d]=b[d]}catch(A){null!=window.console&&console.log("Error in vars URL parameter: "+A)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var J=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var d=J.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[b]);return d};Graph.prototype.getDefaultStylesheet=
+function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=function(b,d,c,f,e,g,l,k,m,n,q,p,u,v){var x=null,t=null;p||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?
+"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=L.apply(this,arguments),D=this.getCustomFonts();if(q&&0<D.length){var B=y.ownerDocument,C=null!=B.createElementNS?B.createElementNS(mxConstants.NS_SVG,"style"):B.createElement("style");null!=B.setAttributeNS?C.setAttributeNS("type","text/css"):C.setAttribute("type","text/css");for(var N="",A="",F=0;F<D.length;F++){var E=D[F].name,I=D[F].url;Graph.isCssFontUrl(I)?N+="@import url("+I+");\n":A+='@font-face {\nfont-family: "'+
+E+'";\nsrc: url("'+I+'");\n}\n'}C.appendChild(B.createTextNode(N+A));y.getElementsByTagName("defs")[0].appendChild(C)}null!=x&&(this.defaultPageBackgroundColor=t,this.stylesheet=x,this.refresh());return y};var G=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var b=G.apply(this,arguments);if(this.mathEnabled){var d=b.drawText;b.drawText=function(b,c){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var f=
+b.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var e=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=f.innerHTML&&(e=b.text.value,b.text.value=f.innerHTML,d.apply(this,arguments),b.text.value=e)}}else d.apply(this,arguments)}}return b};var K=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){K.apply(this,arguments);if(mxClient.IS_GC&&null!=
+this.getDrawPane()){var b=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;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&this.setBackgroundImage(this.backgroundImage)};var C=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){C.apply(this,
+arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=function(b,d){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));
+else{this.executingCustomActions=!0;var c=!1,f=0,e=0,g=mxUtils.bind(this,function(){c||(c=!0,this.model.beginUpdate())}),l=mxUtils.bind(this,function(){c&&(c=!1,this.model.endUpdate())}),k=mxUtils.bind(this,function(){0<f&&f--;0==f&&m()}),m=mxUtils.bind(this,function(){if(e<b.length){var c=this.stoppingCustomActions,n=b[e++],q=[];if(null!=n.open)if(l(),this.isCustomLink(n.open)){if(!this.customLinkClicked(n.open))return}else this.openLink(n.open);null==n.wait||c||(this.pendingExecuteNextAction=mxUtils.bind(this,
+function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;k()}),f++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=n.wait?parseInt(n.wait):1E3),l());null!=n.opacity&&null!=n.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(n.opacity,!0)),n.opacity.value);null!=n.fadeIn&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeIn,!0)),0,1,k,c?0:n.fadeIn.delay));null!=n.fadeOut&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeOut,
+!0)),1,0,k,c?0:n.fadeOut.delay));null!=n.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeIn,!0),!0)));null!=n.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeOut,!0),!1)));null!=n.toggle&&(g(),this.toggleCells(this.getCellsForAction(n.toggle,!0)));if(null!=n.show){g();var p=this.getCellsForAction(n.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(p),1);this.setCellsVisible(p,!0)}null!=n.hide&&(g(),p=this.getCellsForAction(n.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(p),
+0),this.setCellsVisible(p,!1));null!=n.toggleStyle&&null!=n.toggleStyle.key&&(g(),this.toggleCellStyles(n.toggleStyle.key,null!=n.toggleStyle.defaultValue?n.toggleStyle.defaultValue:"0",this.getCellsForAction(n.toggleStyle,!0)));null!=n.style&&null!=n.style.key&&(g(),this.setCellStyles(n.style.key,n.style.value,this.getCellsForAction(n.style,!0)));p=[];null!=n.select&&this.isEnabled()&&(p=this.getCellsForAction(n.select),this.setSelectionCells(p));null!=n.highlight&&(p=this.getCellsForAction(n.highlight),
+this.highlightCells(p,n.highlight.color,n.highlight.duration,n.highlight.opacity));null!=n.scroll&&(p=this.getCellsForAction(n.scroll));null!=n.viewbox&&this.fitWindow(n.viewbox,n.viewbox.border);0<p.length&&this.scrollCellToVisible(p[0]);if(null!=n.tags){p=[];null!=n.tags.hidden&&(p=p.concat(n.tags.hidden));if(null!=n.tags.visible)for(var u=this.getAllTags(),v=0;v<u.length;v++)0>mxUtils.indexOf(n.tags.visible,u[v])&&0>mxUtils.indexOf(p,u[v])&&p.push(u[v]);this.hiddenTags=p;this.refresh()}0<q.length&&
+(f++,this.executeAnimations(q,k,c?1:n.steps,c?0:n.delay));0==f?m():l()}else this.stoppingCustomActions=this.executingCustomActions=!1,l(),null!=d&&d()});m()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,d){var c=this.getLinkForCell(d);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(b,c));if(this.isHtmlLabel(d)){var f=document.createElement("div");f.innerHTML=this.sanitizeHtml(this.getLabel(d));for(var e=f.getElementsByTagName("a"),g=!1,l=0;l<
+e.length;l++)c=e[l].getAttribute("href"),null!=c&&"data:action/json,"==c.substring(0,17)&&(e[l].setAttribute("href",this.updateCustomLink(b,c)),g=!0);g&&this.labelChanged(d,f.innerHTML)}};Graph.prototype.updateCustomLink=function(b,d){if("data:action/json,"==d.substring(0,17))try{var c=JSON.parse(d.substring(17));null!=c.actions&&(this.updateCustomLinkActions(b,c.actions),d="data:action/json,"+JSON.stringify(c))}catch(W){}return d};Graph.prototype.updateCustomLinkActions=function(b,d){for(var c=0;c<
+d.length;c++){var f=d[c],e;for(e in f)this.updateCustomLinkAction(b,f[e],"cells"),this.updateCustomLinkAction(b,f[e],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(b,d,c){if(null!=d&&null!=d[c]){for(var f=[],e=0;e<d[c].length;e++)if("*"==d[c][e])f.push(d[c][e]);else{var g=b[d[c][e]];null!=g?""!=g&&f.push(g):f.push(d[c][e])}d[c]=f}};Graph.prototype.getCellsForAction=function(b,d){var c=this.getCellsById(b.cells).concat(this.getCellsForTags(b.tags,null,d));if(null!=b.excludeCells){for(var f=
+[],e=0;e<c.length;e++)0>b.excludeCells.indexOf(c[e].id)&&f.push(c[e]);c=f}return c};Graph.prototype.getCellsById=function(b){var d=[];if(null!=b)for(var c=0;c<b.length;c++)if("*"==b[c])var f=this.model.getRoot(),d=d.concat(this.model.filterDescendants(function(b){return b!=f},f));else{var e=this.model.getCell(b[c]);null!=e&&d.push(e)}return d};var M=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(b){return M.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(b))};
+Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var d=0;d<b.length;d++)if(0>mxUtils.indexOf(this.hiddenTags,b[d]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,d,c,f){var e=[];if(null!=b){d=null!=d?d:this.model.getDescendants(this.model.getRoot());for(var g=0,l={},k=0;k<b.length;k++)0<b[k].length&&(l[b[k]]=!0,g++);for(k=0;k<d.length;k++)if(c&&this.model.getParent(d[k])==
+this.model.root||this.model.isVertex(d[k])||this.model.isEdge(d[k])){var m=this.getTagsForCell(d[k]),n=!1;if(0<m.length&&(m=m.split(" "),m.length>=b.length)){for(var q=n=0;q<m.length&&n<g;q++)null!=l[m[q]]&&n++;n=n==g}n&&(1!=f||this.isCellVisible(d[k]))&&e.push(d[k])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var d=null,c=[],f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]),
+c=[];if(0<e.length){for(var e=e.split(" "),g={},l=0;l<e.length;l++)if(null==d||null!=d[e[l]])g[e[l]]=!0,c.push(e[l]);d=g}else return[]}return c};Graph.prototype.getTagsForCells=function(b){for(var d=[],c={},f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]);if(0<e.length)for(var e=e.split(" "),g=0;g<e.length;g++)null==c[e[g]]&&(c[e[g]]=!0,d.push(e[g]))}return d};Graph.prototype.getTagsForCell=function(b){return this.getAttributeForCell(b,"tags","")};Graph.prototype.addTagsForCells=function(b,d){if(0<
+b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){for(var f=this.getTagsForCell(b[c]),e=f.split(" "),g=!1,l=0;l<d.length;l++){var k=mxUtils.trim(d[l]);""!=k&&0>mxUtils.indexOf(e,k)&&(f=0<f.length?f+" "+k:k,g=!0)}g&&this.setAttributeForCell(b[c],"tags",f)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,d){if(0<b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var f=this.getTagsForCell(b[c]);if(0<f.length){for(var e=
+f.split(" "),g=!1,l=0;l<d.length;l++){var k=mxUtils.indexOf(e,d[l]);0<=k&&(e.splice(k,1),g=!0)}g&&this.setAttributeForCell(b[c],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var d=0;d<b.length;d++)this.model.setVisible(b[d],!this.model.isVisible(b[d]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,d){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],d)}finally{this.model.endUpdate()}};
+Graph.prototype.highlightCells=function(b,d,c,f){for(var e=0;e<b.length;e++)this.highlightCell(b[e],d,c,f)};Graph.prototype.highlightCell=function(b,d,c,f){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;b=this.view.getState(b);if(null!=b){var e=Math.max(5,mxUtils.getValue(b.style,mxConstants.STYLE_STROKEWIDTH,1)+4),g=new mxCellHighlight(this,d,e,!1);null!=f&&(g.opacity=f);g.highlight(b);window.setTimeout(function(){null!=g.shape&&(mxUtils.setPrefixedStyle(g.shape.node.style,"transition",
+"all 1200ms ease-in-out"),g.shape.node.style.opacity=0);window.setTimeout(function(){g.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(b,d,c){c=null!=c?c:!1;var f=b.ownerDocument,e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");e.setAttribute("id",this.shadowId);var g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");g.setAttribute("in","SourceAlpha");g.setAttribute("stdDeviation",
+this.svgShadowBlur);g.setAttribute("result","blur");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");g.setAttribute("in","blur");g.setAttribute("dx",this.svgShadowSize);g.setAttribute("dy",this.svgShadowSize);g.setAttribute("result","offsetBlur");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");g.setAttribute("flood-color",this.svgShadowColor);g.setAttribute("flood-opacity",
+this.svgShadowOpacity);g.setAttribute("result","offsetColor");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");g.setAttribute("in","offsetColor");g.setAttribute("in2","offsetBlur");g.setAttribute("operator","in");g.setAttribute("result","offsetBlur");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");g.setAttribute("in","SourceGraphic");g.setAttribute("in2",
+"offsetBlur");e.appendChild(g);g=b.getElementsByTagName("defs");0==g.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=b.firstChild?b.insertBefore(f,b.firstChild):b.appendChild(f)):f=g[0];f.appendChild(e);c||(d=null!=d?d:b.getElementsByTagName("g")[0],null!=d&&(d.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(b.getAttribute("width")))||(b.setAttribute("width",parseInt(b.getAttribute("width"))+6),b.setAttribute("height",parseInt(b.getAttribute("height"))+
6),d=b.getAttribute("viewBox"),null!=d&&0<d.length&&(d=d.split(" "),3<d.length&&(w=parseFloat(d[2])+6,h=parseFloat(d[3])+6,b.setAttribute("viewBox",d[0]+" "+d[1]+" "+w+" "+h))))));return e};Graph.prototype.setShadowVisible=function(b,d){mxClient.IS_SVG&&!mxClient.IS_SF&&(d=null!=d?d:!0,(this.shadowVisible=b)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),d&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
function(){if(null==this.defaultParent){var b=this.model.getChildCount(this.model.root),d,c=0;do d=this.model.getChildAt(this.model.root,c);while(c++<b&&"1"==mxUtils.getValue(this.getCellStyle(d),"locked","0"));null!=d&&this.setDefaultParent(d)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",
@@ -3288,308 +3299,299 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
"/mxBasic.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.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",
STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+
-"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(b){var d=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?d="mxgraph.er":"sysML"==b.substring(0,5)&&(d="mxgraph.sysml"));return d};var S=mxMarker.createMarker;mxMarker.createMarker=function(b,d,c,g,e,f,l,k,m,p){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&
-mxStencilRegistry.getStencil(q)}return S.apply(this,arguments)};PrintDialog.prototype.create=function(b,d){function c(){v.value=Math.max(1,Math.min(k,Math.max(parseInt(v.value),parseInt(n.value))));n.value=Math.max(1,Math.min(k,Math.min(parseInt(v.value),parseInt(n.value))))}function g(d){function c(d,c,f){var l=d.useCssTransforms,k=d.currentTranslate,m=d.currentScale,p=d.view.translate,q=d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,
-d.view.translate=new mxPoint(0,0),d.view.scale=1);var u=d.getGraphBounds(),n=0,v=0,x=R.get(),t=1/d.pageScale,C=B.checked;if(C)var t=parseInt(P.value),M=parseInt(N.value),t=Math.min(x.height*M/(u.height/d.view.scale),x.width*t/(u.width/d.view.scale));else t=parseInt(A.value)/(100*d.pageScale),isNaN(t)&&(g=1/d.pageScale,A.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*g);x.height=Math.ceil(x.height*g);t*=g;!C&&d.pageVisible?(u=d.getPageLayout(),n-=u.x*x.width,v-=u.y*x.height):
-C=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,n,v,C);c.pageSelector=!1;c.mathEnabled=!1;n=b.getCurrentFile();null!=n&&(c.title=n.getTitle());var y=c.writeHead;c.writeHead=function(c){y.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('<style type="text/css">'),c.writeln(Editor.mathJaxWebkitCss),c.writeln("</style>");mxClient.IS_GC&&(c.writeln('<style type="text/css">'),c.writeln("@media print {"),c.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),c.writeln("}"),
-c.writeln("</style>"));null!=b.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(b.editor.fontCss),c.writeln("</style>"));for(var g=d.getCustomFonts(),e=0;e<g.length;e++){var f=g[e].name,l=g[e].url;Graph.isCssFontUrl(l)?c.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(c.writeln('<style type="text/css">'),c.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(f)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),c.writeln("</style>"))}};
-if("undefined"!==typeof MathJax){var F=c.renderPage;c.renderPage=function(d,c,g,e,f,l){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var m=F.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}n=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(n=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
-e.refresh());c.open(null,null,f,!0);e.enableFlowAnimation=v;null!=n&&(e.stylesheet=n,e.refresh())}else{x=d.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=C;c.appendGraph(d,t,n,v,f,!0);f=d.getCustomFonts();if(null!=c.wnd)for(n=0;n<f.length;n++)v=f[n].name,C=f[n].url,Graph.isCssFontUrl(C)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(C)+'" charset="UTF-8" type="text/css">'):(c.wnd.document.writeln('<style type="text/css">'),
-c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(C)+'");\n}'),c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=k,d.currentScale=m,d.view.translate=p,d.view.scale=q);return c}var g=parseInt(H.value)/100;isNaN(g)&&(g=1,H.value="100 %");var g=.75*g,f=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(f=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=n.value,k=v.value,p=!q.checked,
-u=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,k,B.checked,P.value,N.value,parseInt(A.value)/100,parseInt(H.value)/100,R.get());else{p&&(p=l==m&&k==m);if(!p&&null!=b.pages&&b.pages.length){var x=0,p=b.pages.length-1;q.checked||(x=parseInt(l)-1,p=parseInt(k)-1);for(var t=x;t<=p;t++){var C=b.pages[t],l=C==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=!1,M=null,y=null;null==C.viewState&&null==C.root&&b.updatePageRoot(C);null!=C.viewState&&
-(k=C.viewState.pageVisible,x=C.viewState.mathEnabled,M=C.viewState.background,y=C.viewState.backgroundImage,l.extFonts=C.viewState.extFonts);l.background=M;l.backgroundImage=null!=y?new mxImage(y.src,y.width,y.height):null;l.pageVisible=k;l.mathEnabled=x;var F=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?C.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:F.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(C);l.model.setRoot(C.root)}u=
-c(l,u,t!=p);l!=e&&l.container.parentNode.removeChild(l.container)}}else u=c(e);null==u?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(u.mathEnabled&&(p=u.wnd.document,d&&(u.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),u.closeDocument(),!u.mathEnabled&&d&&PrintDialog.printPreview(u));null!=f&&(e.stylesheet=f,e.refresh())}}var e=b.editor.graph,f=document.createElement("div"),l=document.createElement("h3");
-l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,d||mxResources.get("print"));f.appendChild(l);var k=1,m=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");p.appendChild(q);l=document.createElement("span");
-mxUtils.write(l,mxResources.get("printAllPages"));p.appendChild(l);mxUtils.br(p);var u=q.cloneNode(!0);q.setAttribute("checked","checked");u.setAttribute("value","range");p.appendChild(u);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");p.appendChild(l);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.style.width="50px";p.appendChild(n);l=document.createElement("span");
-mxUtils.write(l,mxResources.get("to"));p.appendChild(l);var v=n.cloneNode(!0);p.appendChild(v);mxEvent.addListener(n,"focus",function(){u.checked=!0});mxEvent.addListener(v,"focus",function(){u.checked=!0});mxEvent.addListener(n,"change",c);mxEvent.addListener(v,"change",c);if(null!=b.pages&&(k=b.pages.length,null!=b.currentPage))for(l=0;l<b.pages.length;l++)if(b.currentPage==b.pages[l]){m=l+1;n.value=m;v.value=m;break}n.setAttribute("max",k);v.setAttribute("max",k);b.isPagesEnabled()?1<k&&(f.appendChild(p),
-u.checked=!0):u.checked=!0;var x=document.createElement("div");x.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");x.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));x.appendChild(l);var A=document.createElement("input");A.style.cssText="margin:0 8px 0 8px;";A.setAttribute("value","100 %");A.style.width="50px";x.appendChild(A);
-mxEvent.addListener(A,"focus",function(){t.checked=!0});f.appendChild(x);var p=p.cloneNode(!1),B=t.cloneNode(!0);B.setAttribute("value","fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(B);p.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var C=document.createElement("tbody"),M=document.createElement("tr"),F=M.cloneNode(!0),E=document.createElement("td"),
-D=E.cloneNode(!0),I=E.cloneNode(!0),S=E.cloneNode(!0),G=E.cloneNode(!0),K=E.cloneNode(!0);E.style.textAlign="right";S.style.textAlign="right";mxUtils.write(E,mxResources.get("fitTo"));var P=document.createElement("input");P.style.cssText="margin:0 8px 0 8px;";P.setAttribute("value","1");P.setAttribute("min","1");P.setAttribute("type","number");P.style.width="40px";D.appendChild(P);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));I.appendChild(l);mxUtils.write(S,
-mxResources.get("fitToBy"));var N=P.cloneNode(!0);G.appendChild(N);mxEvent.addListener(P,"focus",function(){B.checked=!0});mxEvent.addListener(N,"focus",function(){B.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));K.appendChild(l);M.appendChild(E);M.appendChild(D);M.appendChild(I);F.appendChild(S);F.appendChild(G);F.appendChild(K);C.appendChild(M);C.appendChild(F);x.appendChild(C);p.appendChild(x);f.appendChild(p);p=document.createElement("div");l=
-document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));p.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var R=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));p.appendChild(l);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";
-H.setAttribute("value","100 %");H.style.width="60px";p.appendChild(H);f.appendChild(p);l=document.createElement("div");l.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&l.appendChild(p);b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",l.appendChild(x));PrintDialog.previewEnabled&&(x=
-mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();g(!1)}),x.className="geBtn",l.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();g(!0)});x.className="geBtn gePrimaryBtn";l.appendChild(x);b.editor.cancelFirst||l.appendChild(p);f.appendChild(l);this.container=f};var R=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
-this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var b=this.image;null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&(b={originalSrc:b.src});this.page.viewState.backgroundImage=b}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)}}else R.apply(this,arguments),null!=this.mathEnabled&&
-this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var M=document.createElement("canvas"),P=new Image;P.onload=function(){try{M.getContext("2d").drawImage(P,0,0);var b=M.toDataURL("image/png");Editor.prototype.useCanvasForExport=
-null!=b&&6<b.length}catch(D){}};P.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(G){}})();
+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(b){var d=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?d="mxgraph.er":"sysML"==b.substring(0,5)&&(d="mxgraph.sysml"));return d};var P=mxMarker.createMarker;mxMarker.createMarker=function(b,d,c,f,e,g,l,k,m,n){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&
+mxStencilRegistry.getStencil(q)}return P.apply(this,arguments)};PrintDialog.prototype.create=function(b,d){function c(){v.value=Math.max(1,Math.min(k,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(k,Math.min(parseInt(v.value),parseInt(u.value))))}function f(d){function c(d,c,g){var l=d.useCssTransforms,k=d.currentTranslate,m=d.currentScale,n=d.view.translate,q=d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,
+d.view.translate=new mxPoint(0,0),d.view.scale=1);var p=d.getGraphBounds(),u=0,v=0,x=K.get(),t=1/d.pageScale,C=D.checked;if(C)var t=parseInt(M.value),N=parseInt(R.value),t=Math.min(x.height*N/(p.height/d.view.scale),x.width*t/(p.width/d.view.scale));else t=parseInt(y.value)/(100*d.pageScale),isNaN(t)&&(f=1/d.pageScale,y.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*f);x.height=Math.ceil(x.height*f);t*=f;!C&&d.pageVisible?(p=d.getPageLayout(),u-=p.x*x.width,v-=p.y*x.height):
+C=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,u,v,C);c.pageSelector=!1;c.mathEnabled=!1;u=b.getCurrentFile();null!=u&&(c.title=u.getTitle());var E=c.writeHead;c.writeHead=function(c){E.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('<style type="text/css">'),c.writeln(Editor.mathJaxWebkitCss),c.writeln("</style>");mxClient.IS_GC&&(c.writeln('<style type="text/css">'),c.writeln("@media print {"),c.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),c.writeln("}"),
+c.writeln("</style>"));null!=b.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(b.editor.fontCss),c.writeln("</style>"));for(var f=d.getCustomFonts(),e=0;e<f.length;e++){var g=f[e].name,l=f[e].url;Graph.isCssFontUrl(l)?c.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(c.writeln('<style type="text/css">'),c.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(g)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),c.writeln("</style>"))}};
+if("undefined"!==typeof MathJax){var B=c.renderPage;c.renderPage=function(d,c,f,e,g,l){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var m=B.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}u=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
+e.refresh());c.open(null,null,g,!0);e.enableFlowAnimation=v;null!=u&&(e.stylesheet=u,e.refresh())}else{x=d.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=C;c.appendGraph(d,t,u,v,g,!0);g=d.getCustomFonts();if(null!=c.wnd)for(u=0;u<g.length;u++)v=g[u].name,C=g[u].url,Graph.isCssFontUrl(C)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(C)+'" charset="UTF-8" type="text/css">'):(c.wnd.document.writeln('<style type="text/css">'),
+c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(C)+'");\n}'),c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=k,d.currentScale=m,d.view.translate=n,d.view.scale=q);return c}var f=parseInt(G.value)/100;isNaN(f)&&(f=1,G.value="100 %");var f=.75*f,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=u.value,k=v.value,n=!q.checked,
+p=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,k,D.checked,M.value,R.value,parseInt(y.value)/100,parseInt(G.value)/100,K.get());else{n&&(n=l==m&&k==m);if(!n&&null!=b.pages&&b.pages.length){var x=0,n=b.pages.length-1;q.checked||(x=parseInt(l)-1,n=parseInt(k)-1);for(var t=x;t<=n;t++){var C=b.pages[t],l=C==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=!1,N=null,E=null;null==C.viewState&&null==C.root&&b.updatePageRoot(C);null!=C.viewState&&
+(k=C.viewState.pageVisible,x=C.viewState.mathEnabled,N=C.viewState.background,E=C.viewState.backgroundImage,l.extFonts=C.viewState.extFonts);l.background=N;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=k;l.mathEnabled=x;var B=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?C.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:B.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(C);l.model.setRoot(C.root)}p=
+c(l,p,t!=n);l!=e&&l.container.parentNode.removeChild(l.container)}}else p=c(e);null==p?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(p.mathEnabled&&(n=p.wnd.document,d&&(p.wnd.IMMEDIATE_PRINT=!0),n.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),p.closeDocument(),!p.mathEnabled&&d&&PrintDialog.printPreview(p));null!=g&&(e.stylesheet=g,e.refresh())}}var e=b.editor.graph,g=document.createElement("div"),l=document.createElement("h3");
+l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,d||mxResources.get("print"));g.appendChild(l);var k=1,m=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");n.appendChild(q);l=document.createElement("span");
+mxUtils.write(l,mxResources.get("printAllPages"));n.appendChild(l);mxUtils.br(n);var p=q.cloneNode(!0);q.setAttribute("checked","checked");p.setAttribute("value","range");n.appendChild(p);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");n.appendChild(l);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";n.appendChild(u);l=document.createElement("span");
+mxUtils.write(l,mxResources.get("to"));n.appendChild(l);var v=u.cloneNode(!0);n.appendChild(v);mxEvent.addListener(u,"focus",function(){p.checked=!0});mxEvent.addListener(v,"focus",function(){p.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(v,"change",c);if(null!=b.pages&&(k=b.pages.length,null!=b.currentPage))for(l=0;l<b.pages.length;l++)if(b.currentPage==b.pages[l]){m=l+1;u.value=m;v.value=m;break}u.setAttribute("max",k);v.setAttribute("max",k);b.isPagesEnabled()?1<k&&(g.appendChild(n),
+p.checked=!0):p.checked=!0;var x=document.createElement("div");x.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");x.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));x.appendChild(l);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(){t.checked=!0});g.appendChild(x);var n=n.cloneNode(!1),D=t.cloneNode(!0);D.setAttribute("value","fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(D);n.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var C=document.createElement("tbody"),N=document.createElement("tr"),E=N.cloneNode(!0),B=document.createElement("td"),
+H=B.cloneNode(!0),P=B.cloneNode(!0),J=B.cloneNode(!0),S=B.cloneNode(!0),F=B.cloneNode(!0);B.style.textAlign="right";J.style.textAlign="right";mxUtils.write(B,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";H.appendChild(M);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));P.appendChild(l);mxUtils.write(J,
+mxResources.get("fitToBy"));var R=M.cloneNode(!0);S.appendChild(R);mxEvent.addListener(M,"focus",function(){D.checked=!0});mxEvent.addListener(R,"focus",function(){D.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));F.appendChild(l);N.appendChild(B);N.appendChild(H);N.appendChild(P);E.appendChild(J);E.appendChild(S);E.appendChild(F);C.appendChild(N);C.appendChild(E);x.appendChild(C);n.appendChild(x);g.appendChild(n);n=document.createElement("div");l=
+document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));n.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var K=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));n.appendChild(l);var G=document.createElement("input");G.style.cssText="margin:0 8px 0 8px;";
+G.setAttribute("value","100 %");G.style.width="60px";n.appendChild(G);g.appendChild(n);l=document.createElement("div");l.style.cssText="text-align:right;margin:48px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst&&l.appendChild(n);b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",l.appendChild(x));PrintDialog.previewEnabled&&(x=
+mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)}),x.className="geBtn",l.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});x.className="geBtn gePrimaryBtn";l.appendChild(x);b.editor.cancelFirst||l.appendChild(n);g.appendChild(l);this.container=g};var S=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
+this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var b=this.image;null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&(b={originalSrc:b.src});this.page.viewState.backgroundImage=b}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)}}else S.apply(this,arguments),null!=this.mathEnabled&&
+this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var N=document.createElement("canvas"),R=new Image;R.onload=function(){try{N.getContext("2d").drawImage(R,0,0);var b=N.toDataURL("image/png");Editor.prototype.useCanvasForExport=
+null!=b&&6<b.length}catch(B){}};R.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(F){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){k.previousColor=k.color;k.previousImage=k.image;k.previousFormat=k.format;null!=k.foldingEnabled&&(k.foldingEnabled=!k.foldingEnabled);null!=k.mathEnabled&&(k.mathEnabled=!k.mathEnabled);null!=k.shadowVisible&&(k.shadowVisible=!k.shadowVisible);return k};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.1.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.1.4";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=
!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,
-noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,e,f,k,m,n){m=null!=m?m:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
-"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(b!=EditorUi.lastErrorMessage&&(null==b||null==c||-1==b.indexOf("Script error")&&-1==b.indexOf("extension"))&&null!=b&&0>b.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=b;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";k=null!=k?k:Error(b);(new Image).src=d+"/log?severity="+m+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
-encodeURIComponent(e)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(B){}try{n||null==window.console||console.error(m,b,c,e,f,k)}catch(B){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
+noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,e,g,k,n,p){n=null!=n?n:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
+"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(b!=EditorUi.lastErrorMessage&&(null==b||null==c||-1==b.indexOf("Script error")&&-1==b.indexOf("extension"))&&null!=b&&0>b.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=b;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";k=null!=k?k:Error(b);(new Image).src=d+"/log?severity="+n+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
+encodeURIComponent(e)+(null!=g?":colno:"+encodeURIComponent(g):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(y){}try{p||null==window.console||console.error(n,b,c,e,g,k)}catch(y){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
"")}catch(l){}};EditorUi.sendReport=function(b,c){if("1"==urlParams.dev)EditorUi.debug("sendReport",b);else if(EditorUi.enableLogging)try{c=null!=c?c:5E4,b.length>c&&(b=b.substring(0,c)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(b))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var b=[(new Date).toISOString()],c=0;c<arguments.length;c++)null!=
-arguments[c]&&b.push(arguments[c]);console.log.apply(console,b)}}catch(l){}};EditorUi.parsePng=function(b,c,e){function d(b,d){var c=f;f+=d;return b.substring(c,f)}function g(b){b=d(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var f=0;if(d(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(d(b,4),"IHDR"!=d(b,4))null!=e&&e();else{d(b,17);do{e=g(b);var l=d(b,4);if(null!=c&&c(f-8,l,e))break;value=d(b,e);d(b,4);if("IEND"==
+arguments[c]&&b.push(arguments[c]);console.log.apply(console,b)}}catch(l){}};EditorUi.parsePng=function(b,c,e){function d(b,d){var c=g;g+=d;return b.substring(c,g)}function f(b){b=d(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var g=0;if(d(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(d(b,4),"IHDR"!=d(b,4))null!=e&&e();else{d(b,17);do{e=f(b);var l=d(b,4);if(null!=c&&c(g-8,l,e))break;value=d(b,e);d(b,4);if("IEND"==
l)break}while(e)}};EditorUi.removeChildNodes=function(b){for(;null!=b.firstChild;)b.removeChild(b.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var b=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!b.getContext||!b.getContext("2d"))}catch(p){}try{var c=document.createElement("canvas"),e=new Image;e.onload=function(){try{c.getContext("2d").drawImage(e,0,0);var b=c.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=b&&6<b.length}catch(m){}};e.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{c=
-document.createElement("canvas");c.width=c.height=1;var f=c.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==f.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(b,c,e){return this.editor.graph.openLink(b,c,e)};EditorUi.prototype.showSplash=function(b){};EditorUi.prototype.getLocalData=function(b,c){c(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,c,e){localStorage.setItem(b,c);null!=e&&e()};EditorUi.prototype.removeLocalData=function(b,c){localStorage.removeItem(b);
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var b=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!b.getContext||!b.getContext("2d"))}catch(q){}try{var c=document.createElement("canvas"),e=new Image;e.onload=function(){try{c.getContext("2d").drawImage(e,0,0);var b=c.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=b&&6<b.length}catch(n){}};e.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}try{c=
+document.createElement("canvas");c.width=c.height=1;var g=c.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==g.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(b,c,e){return this.editor.graph.openLink(b,c,e)};EditorUi.prototype.showSplash=function(b){};EditorUi.prototype.getLocalData=function(b,c){c(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,c,e){localStorage.setItem(b,c);null!=e&&e()};EditorUi.prototype.removeLocalData=function(b,c){localStorage.removeItem(b);
c()};EditorUi.prototype.setMathEnabled=function(b){this.editor.graph.mathEnabled=b;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(b){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(b){return this.isOfflineApp()||!navigator.onLine||!b&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};
-EditorUi.prototype.createSpinner=function(b,c,e){var d=null==b||null==c;e=null!=e?e:24;var g=new Spinner({lines:12,length:e,width:Math.round(e/3),radius:Math.round(e/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=g.spin;g.spin=function(e,l){var k=!1;this.active||(f.call(this,e),this.active=!0,null!=l&&(d&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),k=document.createElement("div"),
-k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,b)+"px",k.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(k.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&&(l+="..."),k.innerHTML=l,e.appendChild(k),g.status=k),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(e,l)}));this.stop();return b}),k=!0);return k};var l=g.stop;g.stop=function(){l.call(this);this.active=!1;null!=g.status&&null!=g.status.parentNode&&g.status.parentNode.removeChild(g.status);g.status=null};g.pause=function(){return function(){}};
-return g};EditorUi.prototype.isCompatibleString=function(b){try{var d=mxUtils.parseXml(b),c=this.editor.extractGraphModel(d.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&
+EditorUi.prototype.createSpinner=function(b,c,e){var d=null==b||null==c;e=null!=e?e:24;var f=new Spinner({lines:12,length:e,width:Math.round(e/3),radius:Math.round(e/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=f.spin;f.spin=function(e,l){var k=!1;this.active||(g.call(this,e),this.active=!0,null!=l&&(d&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),k=document.createElement("div"),
+k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily=Editor.defaultHtmlFont,k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,b)+"px",k.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(k.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&&(l+="..."),k.innerHTML=l,e.appendChild(k),f.status=k),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(e,l)}));this.stop();return b}),k=!0);return k};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=f.status&&null!=f.status.parentNode&&f.status.parentNode.removeChild(f.status);f.status=null};f.pause=function(){return function(){}};
+return f};EditorUi.prototype.isCompatibleString=function(b){try{var d=mxUtils.parseXml(b),c=this.editor.extractGraphModel(d.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&
3==b.charCodeAt(2)&&4==b.charCodeAt(3)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&3==b.charCodeAt(2)&&6==b.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||60==b.charCodeAt(0)&&63==b.charCodeAt(1)&&120==b.charCodeAt(2)&&109==b.charCodeAt(3)&&108==b.charCodeAt(3))};EditorUi.prototype.isPngData=
-function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var c=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var e=c.getFunction,f=this.editor.graph,k=this;c.getFunction=function(b){if(f.isSelectionEmpty()&&null!=k.pages&&0<k.pages.length){var d=
+function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var c=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var e=c.getFunction,g=this.editor.graph,k=this;c.getFunction=function(b){if(g.isSelectionEmpty()&&null!=k.pages&&0<k.pages.length){var d=
k.getSelectedPageIndex();if(mxEvent.isShiftDown(b)){if(37==b.keyCode)return function(){0<d&&k.movePage(d,d-1)};if(38==b.keyCode)return function(){0<d&&k.movePage(d,0)};if(39==b.keyCode)return function(){d<k.pages.length-1&&k.movePage(d,d+1)};if(40==b.keyCode)return function(){d<k.pages.length-1&&k.movePage(d,k.pages.length-1)}}else if(mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)){if(37==b.keyCode)return function(){0<d&&k.selectNextPage(!1)};if(38==b.keyCode)return function(){0<
-d&&k.selectPage(k.pages[0])};if(39==b.keyCode)return function(){d<k.pages.length-1&&k.selectNextPage(!0)};if(40==b.keyCode)return function(){d<k.pages.length-1&&k.selectPage(k.pages[k.pages.length-1])}}}return e.apply(this,arguments)}}return c};var c=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=c.apply(this,arguments);if(null==d)try{var e=b.indexOf("&lt;mxfile ");if(0<=e){var f=b.lastIndexOf("&lt;/mxfile&gt;");f>e&&(d=b.substring(e,f+
-15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var k=mxUtils.parseXml(b),m=this.editor.extractGraphModel(k.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),d=null!=m?mxUtils.getXml(m):""}catch(v){}return d};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var d=b.indexOf('<meta charset="utf-8">');0<=d&&(b=b.slice(0,d)+'<meta charset="utf-8"/>'+b.slice(d+23-1,b.length));b=Graph.zapGremlins(b)}return b};
-EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b){d=this.editor.graph;d.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,e=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var f=e.length-
-1;0<=f;f--){var k=this.updatePageRoot(new DiagramPage(e[f]));null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[f+1]));d.model.execute(new ChangePage(this,k,0==f?k:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
-this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)d.model.execute(new ChangePage(this,c[f],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,f,k,m,n,u,t,x,E){c=null!=c?c:this.editor.graph;k=null!=k?k:!1;t=null!=t?t:!0;var d,g=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":g=d=f;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(E){var p=
-b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(b)}else{p=Graph.zapGremlins(mxUtils.getXml(b));l=Graph.compress(p);if(Graph.decompress(l)!=p)return p;p=b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,l)}l=b.ownerDocument.createElement("mxfile");l.appendChild(p)}x?(l=l.cloneNode(!0),l.removeAttribute("modified"),l.removeAttribute("host"),l.removeAttribute("agent"),l.removeAttribute("etag"),l.removeAttribute("userAgent"),
+d&&k.selectPage(k.pages[0])};if(39==b.keyCode)return function(){d<k.pages.length-1&&k.selectNextPage(!0)};if(40==b.keyCode)return function(){d<k.pages.length-1&&k.selectPage(k.pages[k.pages.length-1])}}}return e.apply(this,arguments)}}return c};var c=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=c.apply(this,arguments);if(null==d)try{var e=b.indexOf("&lt;mxfile ");if(0<=e){var g=b.lastIndexOf("&lt;/mxfile&gt;");g>e&&(d=b.substring(e,g+
+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var k=mxUtils.parseXml(b),n=this.editor.extractGraphModel(k.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),d=null!=n?mxUtils.getXml(n):""}catch(v){}return d};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var d=b.indexOf('<meta charset="utf-8">');0<=d&&(b=b.slice(0,d)+'<meta charset="utf-8"/>'+b.slice(d+23-1,b.length));b=Graph.zapGremlins(b)}return b};
+EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b){d=this.editor.graph;d.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,e=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var g=e.length-
+1;0<=g;g--){var k=this.updatePageRoot(new DiagramPage(e[g]));null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[g+1]));d.model.execute(new ChangePage(this,k,0==g?k:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
+this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)d.model.execute(new ChangePage(this,c[g],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,g,k,n,p,u,t,x,H){c=null!=c?c:this.editor.graph;k=null!=k?k:!1;t=null!=t?t:!0;var d,f=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":f=d=g;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(H){var m=
+b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());m.appendChild(b)}else{m=Graph.zapGremlins(mxUtils.getXml(b));l=Graph.compress(m);if(Graph.decompress(l)!=m)return m;m=b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());mxUtils.setTextContent(m,l)}l=b.ownerDocument.createElement("mxfile");l.appendChild(m)}x?(l=l.cloneNode(!0),l.removeAttribute("modified"),l.removeAttribute("host"),l.removeAttribute("agent"),l.removeAttribute("etag"),l.removeAttribute("userAgent"),
l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("type")):(l.removeAttribute("userAgent"),l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("pages"),l.removeAttribute("type"),mxClient.IS_CHROMEAPP?l.setAttribute("host","Chrome"):EditorUi.isElectronApp?l.setAttribute("host","Electron"):l.setAttribute("host",window.location.hostname),l.setAttribute("modified",(new Date).toISOString()),l.setAttribute("agent",navigator.appVersion),l.setAttribute("version",
-EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));E=E?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!m&&!k&&(n||null!=e&&/(\.html)$/i.test(e.getTitle())))E=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,g);else if(m||!k&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
-App.MODE_BROWSER||(f=null),E=this.getEmbeddedSvg(E,c,f,null,u,t,g);return E};EditorUi.prototype.getXmlFileData=function(b,c,e,f){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,f);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
-null==c||e?b=b.cloneNode(!0):(b=b.cloneNode(!1),mxUtils.setTextContent(b,Graph.compressNode(c)));d.appendChild(b)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),c)b(this.currentPage.node);else for(c=0;c<this.pages.length;c++){var g=this.pages[c],l=g.node;if(g!=this.currentPage)if(g.needsUpdate){var k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(g.root));this.editor.graph.saveViewState(g.viewState,
-k,null,f);EditorUi.removeChildNodes(l);mxUtils.setTextContent(l,Graph.compressNode(k));delete g.needsUpdate}else f&&(this.updatePageRoot(g),null!=g.viewState.backgroundImage&&(null!=g.viewState.backgroundImage.originalSrc?g.viewState.backgroundImage=this.createImageForPageLink(g.viewState.backgroundImage.originalSrc,g):Graph.isPageLink(g.viewState.backgroundImage.src)&&(g.viewState.backgroundImage=this.createImageForPageLink(g.viewState.backgroundImage.src,g))),null!=g.viewState.backgroundImage&&
-null!=g.viewState.backgroundImage.originalSrc&&(k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(g.root)),this.editor.graph.saveViewState(g.viewState,k,null,f),l=l.cloneNode(!1),mxUtils.setTextContent(l,Graph.compressNode(k))));b(l)}return d};EditorUi.prototype.anonymizeString=function(b,c){for(var d=[],g=0;g<b.length;g++){var e=b.charAt(g);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?d.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?d.push(String.fromCharCode(65+Math.round(25*
+EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));H=H?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!n&&!k&&(p||null!=e&&/(\.html)$/i.test(e.getTitle())))H=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(n||!k&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
+App.MODE_BROWSER||(g=null),H=this.getEmbeddedSvg(H,c,g,null,u,t,f);return H};EditorUi.prototype.getXmlFileData=function(b,c,e,g){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,g);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
+null==c||e?b=b.cloneNode(!0):(b=b.cloneNode(!1),mxUtils.setTextContent(b,Graph.compressNode(c)));d.appendChild(b)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),c)b(this.currentPage.node);else for(c=0;c<this.pages.length;c++){var f=this.pages[c],l=f.node;if(f!=this.currentPage)if(f.needsUpdate){var k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root));this.editor.graph.saveViewState(f.viewState,
+k,null,g);EditorUi.removeChildNodes(l);mxUtils.setTextContent(l,Graph.compressNode(k));delete f.needsUpdate}else g&&(this.updatePageRoot(f),null!=f.viewState.backgroundImage&&(null!=f.viewState.backgroundImage.originalSrc?f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.originalSrc,f):Graph.isPageLink(f.viewState.backgroundImage.src)&&(f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.src,f))),null!=f.viewState.backgroundImage&&
+null!=f.viewState.backgroundImage.originalSrc&&(k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root)),this.editor.graph.saveViewState(f.viewState,k,null,g),l=l.cloneNode(!1),mxUtils.setTextContent(l,Graph.compressNode(k))));b(l)}return d};EditorUi.prototype.anonymizeString=function(b,c){for(var d=[],f=0;f<b.length;f++){var e=b.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?d.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?d.push(String.fromCharCode(65+Math.round(25*
Math.random()))):e.toUpperCase()!=e?d.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(e)?d.push(" "):d.push("?"):d.push(c?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(b){if(null!=b[EditorUi.DIFF_INSERT])for(var d=0;d<b[EditorUi.DIFF_INSERT].length;d++)try{var c=mxUtils.parseXml(b[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=c.getAttribute("name")&&c.setAttribute("name",this.anonymizeString(c.getAttribute("name")));
-b[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(c)}catch(m){b[EditorUi.DIFF_INSERT][d].data=m.message}if(null!=b[EditorUi.DIFF_UPDATE]){for(var e in b[EditorUi.DIFF_UPDATE]){var f=b[EditorUi.DIFF_UPDATE][e];null!=f.name&&(f.name=this.anonymizeString(f.name));null!=f.cells&&(d=mxUtils.bind(this,function(b){var d=f.cells[b];if(null!=d){for(var c in d)null!=d[c].value&&(d[c].value="["+d[c].value.length+"]"),null!=d[c].xmlValue&&(d[c].xmlValue="["+d[c].xmlValue.length+"]"),null!=d[c].style&&(d[c].style=
-"["+d[c].style.length+"]"),0==Object.keys(d[c]).length&&delete d[c];0==Object.keys(d).length&&delete f.cells[b]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete b[EditorUi.DIFF_UPDATE][e]}0==Object.keys(b[EditorUi.DIFF_UPDATE]).length&&delete b[EditorUi.DIFF_UPDATE]}return b};EditorUi.prototype.anonymizeAttributes=function(b,c){if(null!=b.attributes)for(var d=0;d<b.attributes.length;d++)"as"!=b.attributes[d].name&&
-b.setAttribute(b.attributes[d].name,this.anonymizeString(b.attributes[d].value,c));if(null!=b.childNodes)for(d=0;d<b.childNodes.length;d++)this.anonymizeAttributes(b.childNodes[d],c)};EditorUi.prototype.anonymizeNode=function(b,c){for(var d=b.getElementsByTagName("mxCell"),g=0;g<d.length;g++)null!=d[g].getAttribute("value")&&d[g].setAttribute("value","["+d[g].getAttribute("value").length+"]"),null!=d[g].getAttribute("xmlValue")&&d[g].setAttribute("xmlValue","["+d[g].getAttribute("xmlValue").length+
-"]"),null!=d[g].getAttribute("style")&&d[g].setAttribute("style","["+d[g].getAttribute("style").length+"]"),null!=d[g].parentNode&&"root"!=d[g].parentNode.nodeName&&null!=d[g].parentNode.parentNode&&(d[g].setAttribute("id",d[g].parentNode.getAttribute("id")),d[g].parentNode.parentNode.replaceChild(d[g],d[g].parentNode));return b};EditorUi.prototype.synchronizeCurrentFile=function(b){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!b&&d.invalidChecksum?
-d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),b?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,e,f,k,m,n,
-u,t,x,E){k=null!=k?k:!0;m=null!=m?m:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var g=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(g||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),p=this.pages[0];d.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(p.root)}}n=null!=n?n:this.getXmlFileData(k,
-m,x,E);t=null!=t?t:this.getCurrentFile();b=this.createFileData(n,d,t,window.location.href,b,c,e,f,k,u,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,f,k,m){m=null!=m?m:!0;var d=null,g=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=m?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;m=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==k&&
-(c=this.getBasenames().join(";"),0<c.length&&(g=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",m);b.setAttribute("y0",l)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit","0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=f&&b.setAttribute("edit",f));null!=k&&(k=k.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";f=Graph.compress(b);Graph.decompress(f)!=b&&(f=encodeURIComponent(b));return(null==
+b[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(c)}catch(n){b[EditorUi.DIFF_INSERT][d].data=n.message}if(null!=b[EditorUi.DIFF_UPDATE]){for(var e in b[EditorUi.DIFF_UPDATE]){var g=b[EditorUi.DIFF_UPDATE][e];null!=g.name&&(g.name=this.anonymizeString(g.name));null!=g.cells&&(d=mxUtils.bind(this,function(b){var d=g.cells[b];if(null!=d){for(var c in d)null!=d[c].value&&(d[c].value="["+d[c].value.length+"]"),null!=d[c].xmlValue&&(d[c].xmlValue="["+d[c].xmlValue.length+"]"),null!=d[c].style&&(d[c].style=
+"["+d[c].style.length+"]"),0==Object.keys(d[c]).length&&delete d[c];0==Object.keys(d).length&&delete g.cells[b]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),0==Object.keys(g.cells).length&&delete g.cells);0==Object.keys(g).length&&delete b[EditorUi.DIFF_UPDATE][e]}0==Object.keys(b[EditorUi.DIFF_UPDATE]).length&&delete b[EditorUi.DIFF_UPDATE]}return b};EditorUi.prototype.anonymizeAttributes=function(b,c){if(null!=b.attributes)for(var d=0;d<b.attributes.length;d++)"as"!=b.attributes[d].name&&
+b.setAttribute(b.attributes[d].name,this.anonymizeString(b.attributes[d].value,c));if(null!=b.childNodes)for(d=0;d<b.childNodes.length;d++)this.anonymizeAttributes(b.childNodes[d],c)};EditorUi.prototype.anonymizeNode=function(b,c){for(var d=b.getElementsByTagName("mxCell"),f=0;f<d.length;f++)null!=d[f].getAttribute("value")&&d[f].setAttribute("value","["+d[f].getAttribute("value").length+"]"),null!=d[f].getAttribute("xmlValue")&&d[f].setAttribute("xmlValue","["+d[f].getAttribute("xmlValue").length+
+"]"),null!=d[f].getAttribute("style")&&d[f].setAttribute("style","["+d[f].getAttribute("style").length+"]"),null!=d[f].parentNode&&"root"!=d[f].parentNode.nodeName&&null!=d[f].parentNode.parentNode&&(d[f].setAttribute("id",d[f].parentNode.getAttribute("id")),d[f].parentNode.parentNode.replaceChild(d[f],d[f].parentNode));return b};EditorUi.prototype.synchronizeCurrentFile=function(b){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!b&&d.invalidChecksum?
+d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),b?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,e,g,k,n,p,
+u,t,x,H){k=null!=k?k:!0;n=null!=n?n:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var f=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),m=this.pages[0];d.getGlobalVariable=function(b){return"page"==b?m.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(m.root)}}p=null!=p?p:this.getXmlFileData(k,
+n,x,H);t=null!=t?t:this.getCurrentFile();b=this.createFileData(p,d,t,window.location.href,b,c,e,g,k,u,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,k,n){n=null!=n?n:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=n?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;n=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==k&&
+(c=this.getBasenames().join(";"),0<c.length&&(f=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",n);b.setAttribute("y0",l)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit","0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=g&&b.setAttribute("edit",g));null!=k&&(k=k.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";g=Graph.compress(b);Graph.decompress(g)!=b&&(g=encodeURIComponent(b));return(null==
k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=e?"<title>"+mxUtils.htmlEntities(e)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+"</head>\n<body"+(null==k&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
-f+"</div>\n</div>\n"+(null==k?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,e,f,k){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=k&&(k=k.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
+g+"</div>\n</div>\n"+(null==k?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,e,g,k){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=k&&(k=k.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
resize:!0,xml:Graph.zapGremlins(b),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=e?"<title>"+mxUtils.htmlEntities(e)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+
k+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(b))+'"></div>\n'+(null==k?'<script type="text/javascript" src="'+c+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
function(b){b=this.validateFileData(b);this.pages=this.fileNode=this.currentPage=null;b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var d=Editor.extractParserError(b,mxResources.get("invalidOrMissingFile"));if(d)throw Error(mxResources.get("notADiagramFile")+" ("+d+")");d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b&&"mxfile"==b.nodeName&&(d=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){var c=
null;this.fileNode=b;this.pages=[];for(var e=0;e<d.length;e++)null==d[e].getAttribute("id")&&d[e].setAttribute("id",e),b=new DiagramPage(d[e]),null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[e+1])),this.pages.push(b),null!=urlParams["page-id"]&&b.getId()==urlParams["page-id"]&&(c=b);this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),
-this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var f=urlParams["layer-ids"].split(" ");b={};for(e=0;e<f.length;e++)b[f[e]]=!0;for(var k=this.editor.graph.getModel(),n=k.getChildren(k.root),e=0;e<n.length;e++){var u=n[e];k.setVisible(u,b[u.id]||
-!1)}}catch(B){}};EditorUi.prototype.getBaseFilename=function(b){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+
-this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(b,c,e,f,k,m,n,u,t,x,E,A){try{f=null!=f?f:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!k),g=d+("xml"==b||"pdf"==b&&E?".drawio":"")+"."+b;if("xml"==b){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,f,k,null,null,null,c);this.saveData(g,b,l,"text/xml")}else if("html"==b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(g,b,l,"text/html");else if("svg"!=
-b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?g=d+".png":"jpeg"==b&&(g=d+".jpg"),this.saveRequest(g,b,mxUtils.bind(this,function(d,c){try{var g=this.editor.graph.pageVisible;null!=m&&(this.editor.graph.pageVisible=m);var e=this.createDownloadRequest(d,b,f,c,n,k,u,t,x,E,A);this.editor.graph.pageVisible=g;return e}catch(G){this.handleError(G)}}));else{var p=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",b,"image/svg+xml"):
-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==b){var v=this.editor.graph.background;if(n||v==mxConstants.NONE)v=null;var B=this.editor.graph.getSvg(v,null,null,null,null,f);e&&this.editor.graph.addSvgShadow(B);this.editor.convertImages(B,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q('<?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))})))}else g=d+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),f)}}catch(S){this.handleError(S)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,f,k,m,n,u,t,x,E){var d=this.editor.graph,g=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==m?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",p="";if(g.width*g.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==
-c&&(null!=E?p="&from="+E.from+"&to="+E.to:0==m&&(p="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&null!=this.currentPage))for(m=0;m<this.pages.length;m++)if(this.pages[m]==this.currentPage){l="&from="+m;break}m=d.background;"png"!=c&&"pdf"!=c||!k?k||null!=m&&m!=mxConstants.NONE||(m="#ffffff"):m=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);
-return new mxXmlRequest(EXPORT_URL,"format="+c+l+p+"&bg="+(null!=m?m:mxConstants.NONE)+"&base64="+f+"&embedXml="+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+(null!=n?"&scale="+n:"")+(null!=u?"&border="+u:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,e){var d=window.location.hash,g=mxUtils.bind(this,function(g){var e=null!=b.data?b.data:"";null!=g&&0<g.length&&
-(0<e.length&&(e+="\n"),e+=g);g=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);g.getHash=function(){return d};this.fileLoaded(g);"csv"==b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var f=null!=b.interval?parseInt(b.interval):6E4,l=null,k=mxUtils.bind(this,function(){var d=this.currentPage;
-mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){d===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),m()):this.handleError({message:mxResources.get("error")+" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),m=mxUtils.bind(this,function(){window.clearTimeout(l);l=window.setTimeout(k,f)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();
-k()}));m();k()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){g(b)}),mxUtils.bind(this,function(b){null!=e&&e(b)})):g("")};EditorUi.prototype.updateDiagram=function(b){function d(b){var d=new mxCellOverlay(b.image||f.warningImage,b.tooltip,b.align,b.valign,b.offset);d.addListener(mxEvent.CLICK,function(d,c){e.alert(b.tooltip)});return d}var c=null,e=this;if(null!=b&&0<b.length&&(c=mxUtils.parseXml(b),b=null!=c?c.documentElement:null,null!=b&&"updates"==
-b.nodeName)){var f=this.editor.graph,k=f.getModel();k.beginUpdate();var n=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var u=k.getCell(b.getAttribute("id"));if(null!=u){try{var t=b.getAttribute("value");if(null!=t){var x=mxUtils.parseXml(t).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(u,x);else for(var E=x.attributes,A=0;A<E.length;A++)f.setAttributeForCell(u,E[A].nodeName,0<E[A].nodeValue.length?E[A].nodeValue:null)}}catch(S){null!=window.console&&
-console.log("Error in value for "+u.id+": "+S)}try{var F=b.getAttribute("style");null!=F&&f.model.setStyle(u,F)}catch(S){null!=window.console&&console.log("Error in style for "+u.id+": "+S)}try{var I=b.getAttribute("icon");if(null!=I){var L=0<I.length?JSON.parse(I):null;null!=L&&L.append||f.removeCellOverlays(u);null!=L&&f.addCellOverlay(u,d(L))}}catch(S){null!=window.console&&console.log("Error in icon for "+u.id+": "+S)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),K=f.getCellGeometry(u);
-if(null!=K){K=K.clone();for(key in H){var C=parseFloat(H[key]);"dx"==key?K.x+=C:"dy"==key?K.y+=C:"dw"==key?K.width+=C:"dh"==key?K.height+=C:K[key]=parseFloat(H[key])}f.model.setGeometry(u,K)}}}catch(S){null!=window.console&&console.log("Error in icon for "+u.id+": "+S)}}}else if("model"==b.nodeName){for(var N=b.firstChild;null!=N&&N.nodeType!=mxConstants.NODETYPE_ELEMENT;)N=N.nextSibling;null!=N&&(new mxCodec(b.firstChild)).decode(N,k)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(f.view.scale=
-parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(n=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):1);b=b.nextSibling}}finally{k.endUpdate()}null!=n&&this.chromelessResize&&this.chromelessResize(!0,n)}return c};EditorUi.prototype.getCopyFilename=function(b,c){var d=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,
-g="",e=d.lastIndexOf(".");0<=e&&(g=d.substring(e),d=d.substring(0,e));if(c)var f=new Date,e=f.getFullYear(),k=f.getMonth()+1,n=f.getDate(),t=f.getHours(),x=f.getMinutes(),f=f.getSeconds(),d=d+(" "+(e+"-"+k+"-"+n+"-"+t+"-"+x+"-"+f));return d=mxResources.get("copyOf",[d])+g};EditorUi.prototype.fileLoaded=function(b,c){var d=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var e=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),
-d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var g=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!c&&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.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var g=urlParams["layer-ids"].split(" ");b={};for(e=0;e<g.length;e++)b[g[e]]=!0;for(var k=this.editor.graph.getModel(),p=k.getChildren(k.root),e=0;e<p.length;e++){var u=p[e];k.setVisible(u,b[u.id]||
+!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(b){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+
+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(b,c,e,g,k,n,p,u,t,x,H,D){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&H?".drawio":"")+"."+b;if("xml"==b){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,g,k,null,null,null,c);this.saveData(f,b,l,"text/xml")}else if("html"==b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,b,l,"text/html");else if("svg"!=
+b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?f=d+".png":"jpeg"==b&&(f=d+".jpg"),this.saveRequest(f,b,mxUtils.bind(this,function(d,c){try{var f=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var e=this.createDownloadRequest(d,b,g,c,p,k,u,t,x,H,D);this.editor.graph.pageVisible=f;return e}catch(F){this.handleError(F)}}));else{var m=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",b,"image/svg+xml"):
+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==b){var v=this.editor.graph.background;if(p||v==mxConstants.NONE)v=null;var y=this.editor.graph.getSvg(v,null,null,null,null,g);e&&this.editor.graph.addSvgShadow(y);this.editor.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q('<?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))})))}else f=d+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),g)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,n,p,u,t,x,H){var d=this.editor.graph,f=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==n?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",m="";if(f.width*f.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==
+c&&(null!=H?m="&from="+H.from+"&to="+H.to:0==n&&(m="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&null!=this.currentPage))for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){l="&from="+n;break}n=d.background;"png"!=c&&"pdf"!=c||!k?k||null!=n&&n!=mxConstants.NONE||(n="#ffffff"):n=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);
+return new mxXmlRequest(EXPORT_URL,"format="+c+l+m+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+g+"&embedXml="+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+(null!=p?"&scale="+p:"")+(null!=u?"&border="+u:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,e){var d=window.location.hash,f=mxUtils.bind(this,function(f){var e=null!=b.data?b.data:"";null!=f&&0<f.length&&
+(0<e.length&&(e+="\n"),e+=f);f=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return d};this.fileLoaded(f);"csv"==b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var g=null!=b.interval?parseInt(b.interval):6E4,l=null,k=mxUtils.bind(this,function(){var d=this.currentPage;
+mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){d===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),m()):this.handleError({message:mxResources.get("error")+" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),m=mxUtils.bind(this,function(){window.clearTimeout(l);l=window.setTimeout(k,g)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();
+k()}));m();k()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){f(b)}),mxUtils.bind(this,function(b){null!=e&&e(b)})):f("")};EditorUi.prototype.updateDiagram=function(b){function d(b){var d=new mxCellOverlay(b.image||g.warningImage,b.tooltip,b.align,b.valign,b.offset);d.addListener(mxEvent.CLICK,function(d,c){e.alert(b.tooltip)});return d}var c=null,e=this;if(null!=b&&0<b.length&&(c=mxUtils.parseXml(b),b=null!=c?c.documentElement:null,null!=b&&"updates"==
+b.nodeName)){var g=this.editor.graph,k=g.getModel();k.beginUpdate();var p=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var u=k.getCell(b.getAttribute("id"));if(null!=u){try{var t=b.getAttribute("value");if(null!=t){var x=mxUtils.parseXml(t).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(u,x);else for(var H=x.attributes,D=0;D<H.length;D++)g.setAttributeForCell(u,H[D].nodeName,0<H[D].nodeValue.length?H[D].nodeValue:null)}}catch(P){null!=window.console&&
+console.log("Error in value for "+u.id+": "+P)}try{var E=b.getAttribute("style");null!=E&&g.model.setStyle(u,E)}catch(P){null!=window.console&&console.log("Error in style for "+u.id+": "+P)}try{var J=b.getAttribute("icon");if(null!=J){var L=0<J.length?JSON.parse(J):null;null!=L&&L.append||g.removeCellOverlays(u);null!=L&&g.addCellOverlay(u,d(L))}}catch(P){null!=window.console&&console.log("Error in icon for "+u.id+": "+P)}try{var G=b.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),K=g.getCellGeometry(u);
+if(null!=K){K=K.clone();for(key in G){var C=parseFloat(G[key]);"dx"==key?K.x+=C:"dy"==key?K.y+=C:"dw"==key?K.width+=C:"dh"==key?K.height+=C:K[key]=parseFloat(G[key])}g.model.setGeometry(u,K)}}}catch(P){null!=window.console&&console.log("Error in icon for "+u.id+": "+P)}}}else if("model"==b.nodeName){for(var M=b.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(b.firstChild)).decode(M,k)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(g.view.scale=
+parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))g.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(p=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):1);b=b.nextSibling}}finally{k.endUpdate()}null!=p&&this.chromelessResize&&this.chromelessResize(!0,p)}return c};EditorUi.prototype.getCopyFilename=function(b,c){var d=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,
+e="",f=d.lastIndexOf(".");0<=f&&(e=d.substring(f),d=d.substring(0,f));if(c)var g=new Date,f=g.getFullYear(),k=g.getMonth()+1,p=g.getDate(),t=g.getHours(),x=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(f+"-"+k+"-"+p+"-"+t+"-"+x+"-"+g));return d=mxResources.get("copyOf",[d])+e};EditorUi.prototype.fileLoaded=function(b,c){var d=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var e=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),
+d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var f=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!c&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));
this.editor.setStatus("");this.updateUi();c||this.showSplash()});if(null!=b)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(b);b.addListener("descriptorChanged",this.descriptorChangedListener);b.addListener("contentChanged",this.descriptorChangedListener);b.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
this.updateUi();b.isEditable()?b.isModified()?(b.addUnsavedStatus(),null!=b.backupPatch&&b.patch([b.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&
this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));e=!0;this.isOffline()||null==b.getMode()||EditorUi.logEvent({category:b.getMode().toUpperCase()+"-OPEN-FILE-"+b.getHash(),action:"size_"+b.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[b]);if(this.editor.editable&&this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),
-mode:b.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=b?b.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(u){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):
-null!=d?this.fileLoaded(d):g()});c?f():this.handleError(v,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else g();return e};EditorUi.prototype.getHashValueForPages=function(b,c){var d=0,e=new mxGraphModel,g=new mxCodec;null!=c&&(c.byteCount=0,c.attrCount=0,c.eltCount=0,c.nodeCount=0);for(var f=0;f<b.length;f++){this.updatePageRoot(b[f]);var k=b[f].node.cloneNode(!1);k.removeAttribute("name");e.root=b[f].root;var n=g.encode(e);this.editor.graph.saveViewState(b[f].viewState,n,!0);n.removeAttribute("pageWidth");
-n.removeAttribute("pageHeight");k.appendChild(n);null!=c&&(c.eltCount+=k.getElementsByTagName("*").length,c.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(b,d,c,e){return!e||"mxGeometry"!=b.nodeName&&"mxPoint"!=b.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?e&&"mxCell"==b.nodeName&&"previous"==d?null:c:Math.round(c)},c)<<0}return d};EditorUi.prototype.hashValue=function(b,c,e){var d=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===
-typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(d^=this.hashValue(b.nodeName,c,e));if(null!=b.attributes){null!=e&&(e.attrCount+=b.attributes.length);for(var g=0;g<b.attributes.length;g++){var f=b.attributes[g].name,l=null!=c?c(b,f,b.attributes[g].value,!0):b.attributes[g].value;null!=l&&(d^=this.hashValue(f,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(g=0;g<b.childNodes.length;g++)d=(d<<5)-d+this.hashValue(b.childNodes[g],c,e)<<0}else if(null!=b&&"function"!==
-typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(g=0;g<b.length;g++)c=(c<<5)-c+b.charCodeAt(g)<<0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,e,f,k,m,n){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,
+mode:b.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=b?b.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(u){}var g=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):
+null!=d?this.fileLoaded(d):f()});c?g():this.handleError(v,mxResources.get("errorLoadingFile"),g,!0,null,null,!0)}else f();return e};EditorUi.prototype.getHashValueForPages=function(b,c){var d=0,e=new mxGraphModel,f=new mxCodec;null!=c&&(c.byteCount=0,c.attrCount=0,c.eltCount=0,c.nodeCount=0);for(var g=0;g<b.length;g++){this.updatePageRoot(b[g]);var k=b[g].node.cloneNode(!1);k.removeAttribute("name");e.root=b[g].root;var p=f.encode(e);this.editor.graph.saveViewState(b[g].viewState,p,!0);p.removeAttribute("pageWidth");
+p.removeAttribute("pageHeight");k.appendChild(p);null!=c&&(c.eltCount+=k.getElementsByTagName("*").length,c.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(b,d,c,e){return!e||"mxGeometry"!=b.nodeName&&"mxPoint"!=b.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?e&&"mxCell"==b.nodeName&&"previous"==d?null:c:Math.round(c)},c)<<0}return d};EditorUi.prototype.hashValue=function(b,c,e){var d=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===
+typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(d^=this.hashValue(b.nodeName,c,e));if(null!=b.attributes){null!=e&&(e.attrCount+=b.attributes.length);for(var f=0;f<b.attributes.length;f++){var g=b.attributes[f].name,l=null!=c?c(b,g,b.attributes[f].value,!0):b.attributes[f].value;null!=l&&(d^=this.hashValue(g,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)d=(d<<5)-d+this.hashValue(b.childNodes[f],c,e)<<0}else if(null!=b&&"function"!==
+typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(f=0;f<b.length;f++)c=(c<<5)-c+b.charCodeAt(f)<<0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,e,g,k,n,p){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,
".scratchpad",mxUtils.bind(this,function(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var d=mxUtils.createXmlDocument(),c=d.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(b));d.appendChild(c);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&
mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var d=this.sidebar.palettes[b];if(null!=d){for(var c=0;c<d.length;c++)d[c].parentNode.removeChild(d[c]);delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=function(b){var d=this.sidebar.container;if(null==b){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(b=c[c.length-1].nextSibling)}b=null!=
b?b:d.firstChild.nextSibling.nextSibling;var c=d.lastChild,e=c.previousSibling;d.insertBefore(c,b);d.insertBefore(e,c)};EditorUi.prototype.loadLibrary=function(b,c){var d=mxUtils.parseXml(b.getData());if("mxlibrary"==d.documentElement.nodeName){var e=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(b,e,d.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=
-function(b,c,e,f){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var d=this.sidebar.palettes[b.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var g=null,l=mxUtils.bind(this,function(d,c){0==d.length&&b.isEditable()?(null==g&&(g=document.createElement("div"),g.className="geDropTarget",mxUtils.write(g,mxResources.get("dragElementsHere"))),c.appendChild(g)):this.addLibraryEntries(d,
-c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),e,null!=f?f:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var q=k.parentNode.previousSibling;f=q.getAttribute("title");null!=f&&0<f.length&&".scratchpad"!=b.title&&q.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+f);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding=
-"8px";n.style.backgroundColor="inherit";q.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.cursor="pointer";t.style.margin="0 3px";var A=null;if(".scratchpad"!=b.title||this.closableScratchpad)n.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,
-function(){this.closeLibrary(b)});null!=A?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));if(b.isEditable()){var F=this.editor.graph,I=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),H=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=I&&null!=I.parentNode&&I.parentNode.removeChild(I),I=t.cloneNode(!1),I.setAttribute("src",
-Editor.spinImage),I.setAttribute("title",mxResources.get("saving")),I.style.cursor="default",I.style.marginRight="2px",I.style.marginTop="-2px",n.insertBefore(I,n.firstChild),q.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=I&&null!=I.parentNode&&(I.parentNode.removeChild(I),q.style.paddingRight=18*n.childNodes.length+"px")})):null==A&&(A=t.cloneNode(!1),A.setAttribute("src",IMAGE_PATH+"/download.png"),A.setAttribute("title",mxResources.get("save")),
-n.insertBefore(A,n.firstChild),mxEvent.addListener(A,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==A||b.isModified()||(q.style.paddingRight=18*n.childNodes.length+"px",A.parentNode.removeChild(A),A=null)});mxEvent.consume(d)})),q.style.paddingRight=18*n.childNodes.length+"px")}),K=mxUtils.bind(this,function(b,d,e,f){b=F.cloneCells(mxUtils.sortCells(F.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=F.getCellGeometry(b[l]);
-null!=m&&m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,f||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),w:d.width,h:d.height};null!=f&&(b.title=f);c.push(b);H(e);null!=g&&null!=g.parentNode&&0<c.length&&(g.parentNode.removeChild(g),g=null)}),C=mxUtils.bind(this,function(b){if(F.isSelectionEmpty())F.getRubberband().isActive()?(F.getRubberband().execute(b),F.getRubberband().reset()):this.showError(mxResources.get("error"),
-mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=F.getSelectionCells(),c=F.view.getBounds(d),e=F.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=F.view.translate.x;c.y-=F.view.translate.y;K(d,c)}mxEvent.consume(b)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(b){F.isMouseDown&&null!=F.panningManager&&null!=F.graphHandler.first&&(F.graphHandler.suspend(),null!=F.graphHandler.hint&&(F.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor=
-"#f1f3f4",k.style.cursor="copy",F.panningManager.stop(),F.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){F.isMouseDown&&null!=F.panningManager&&null!=F.graphHandler&&(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,F.panningManager.stop(),F.graphHandler.reset(),F.isMouseDown=!1,F.autoScroll=!0,C(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){F.isMouseDown&&null!=F.graphHandler.first&&(F.graphHandler.resume(),
-null!=F.graphHandler.hint&&(F.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",F.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&
-this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,f,m,p,q,n,u,v){if(null!=d&&"image/"==e.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,p,q),d)],d[0].vertex=!0,K(d,new mxRectangle(0,0,p,q),b,mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<c.length&&(g.parentNode.removeChild(g),
-g=null);else{var t=!1,x=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var f=Editor.extractGraphModelFromPdf(d);null!=f&&0<f.length&&(d=f)}if(null!=d)if(f=mxUtils.parseXml(d),"mxlibrary"==f.documentElement.nodeName)try{var m=JSON.parse(mxUtils.getTextContent(f.documentElement));l(m,k);c=c.concat(m);H(b);this.spinner.stop();t=!0}catch(V){}else if("mxfile"==f.documentElement.nodeName)try{for(var p=f.documentElement.getElementsByTagName("diagram"),m=0;m<p.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(p[m])),
-n=this.editor.graph.getBoundingBoxFromGeometry(q);K(q,new mxRectangle(0,0,n.width,n.height),b)}t=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&null!=g.parentNode&&0<c.length&&(g.parentNode.removeChild(g),g=null)});null!=v&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?this.importVisio(v,function(b){x(b,"text/xml")},null,n):!this.isOffline()&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(d,n)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?x(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));
-t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));n.insertBefore(t,n.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==k&&L(b)});f=t.cloneNode(!1);f.setAttribute("src",Editor.plusImage);f.setAttribute("title",mxResources.get("add"));n.insertBefore(f,n.firstChild);mxEvent.addListener(f,"click",C);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(f=document.createElement("span"),
-f.setAttribute("title",mxResources.get("help")),f.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(f,"?"),mxEvent.addGestureListeners(f,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(b)})),n.insertBefore(f,n.firstChild))}q.appendChild(n);q.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],g=e.data;if(null!=g){var g=this.convertDataUri(g),
-f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(f+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(f+"image="+g,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(g=this.stringToCells(Graph.decompress(e.xml)),0<g.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(g,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.main:null};EditorUi.prototype.footerHeight=
+function(b,c,e,g){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var d=this.sidebar.palettes[b.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var f=null,l=mxUtils.bind(this,function(d,c){0==d.length&&b.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(d,
+c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),e,null!=g?g:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var m=k.parentNode.previousSibling;g=m.getAttribute("title");null!=g&&0<g.length&&".scratchpad"!=b.title&&m.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+g);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding=
+"8px";p.style.backgroundColor="inherit";m.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.cursor="pointer";t.style.margin="0 3px";var D=null;if(".scratchpad"!=b.title||this.closableScratchpad)p.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,
+function(){this.closeLibrary(b)});null!=D?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));if(b.isEditable()){var E=this.editor.graph,J=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),G=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=J&&null!=J.parentNode&&J.parentNode.removeChild(J),J=t.cloneNode(!1),J.setAttribute("src",
+Editor.spinImage),J.setAttribute("title",mxResources.get("saving")),J.style.cursor="default",J.style.marginRight="2px",J.style.marginTop="-2px",p.insertBefore(J,p.firstChild),m.style.paddingRight=18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=J&&null!=J.parentNode&&(J.parentNode.removeChild(J),m.style.paddingRight=18*p.childNodes.length+"px")})):null==D&&(D=t.cloneNode(!1),D.setAttribute("src",IMAGE_PATH+"/download.png"),D.setAttribute("title",mxResources.get("save")),
+p.insertBefore(D,p.firstChild),mxEvent.addListener(D,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==D||b.isModified()||(m.style.paddingRight=18*p.childNodes.length+"px",D.parentNode.removeChild(D),D=null)});mxEvent.consume(d)})),m.style.paddingRight=18*p.childNodes.length+"px")}),K=mxUtils.bind(this,function(b,d,e,g){b=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=E.getCellGeometry(b[l]);
+null!=m&&m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,g||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),w:d.width,h:d.height};null!=g&&(b.title=g);c.push(b);G(e);null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)}),C=mxUtils.bind(this,function(b){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(b),E.getRubberband().reset()):this.showError(mxResources.get("error"),
+mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=E.getSelectionCells(),c=E.view.getBounds(d),e=E.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=E.view.translate.x;c.y-=E.view.translate.y;K(d,c)}mxEvent.consume(b)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler.first&&(E.graphHandler.suspend(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor=
+"#f1f3f4",k.style.cursor="copy",E.panningManager.stop(),E.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler&&(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,C(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),
+null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&
+this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,g,m,n,q,p,u,v){if(null!=d&&"image/"==e.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,q),d)],d[0].vertex=!0,K(d,new mxRectangle(0,0,n,q),b,mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),
+f=null);else{var x=!1,t=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var g=Editor.extractGraphModelFromPdf(d);null!=g&&0<g.length&&(d=g)}if(null!=d)if(g=mxUtils.parseXml(d),"mxlibrary"==g.documentElement.nodeName)try{var m=JSON.parse(mxUtils.getTextContent(g.documentElement));l(m,k);c=c.concat(m);G(b);this.spinner.stop();x=!0}catch(V){}else if("mxfile"==g.documentElement.nodeName)try{for(var n=g.documentElement.getElementsByTagName("diagram"),m=0;m<n.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[m])),
+p=this.editor.graph.getBoundingBoxFromGeometry(q);K(q,new mxRectangle(0,0,p.width,p.height),b)}x=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}x||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?this.importVisio(v,function(b){t(b,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(d,p)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?t(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));
+t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));p.insertBefore(t,p.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==k&&L(b)});g=t.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));p.insertBefore(g,p.firstChild);mxEvent.addListener(g,"click",C);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),
+g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(b)})),p.insertBefore(g,p.firstChild))}m.appendChild(p);m.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.data;if(null!=f){var f=this.convertDataUri(f),
+g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(f=this.stringToCells(Graph.decompress(e.xml)),0<f.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(f,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.main:null};EditorUi.prototype.footerHeight=
0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):
Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily=
"Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.zoomWheel=!0,Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},"0"!=urlParams.rough&&(Graph.prototype.defaultVertexStyle.fontFamily=
Editor.sketchFontFamily,Graph.prototype.defaultVertexStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultVertexStyle.fontSize="20",Graph.prototype.defaultVertexStyle.sketch="1",Graph.prototype.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,Graph.prototype.defaultEdgeStyle.fontSource=Editor.sketchFontSource,Graph.prototype.defaultEdgeStyle.fontSize="20",Graph.prototype.defaultEdgeStyle.sketch="1",Menus.prototype.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},
{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(Menus.prototype.defaultFonts)),Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled=!1,Graph.prototype.defaultPageVisible=!1,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=
-function(b,c,e,f,k){b=new ImageDialog(this,b,c,e,f,k);this.showDialog(b.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,d){if(!d){var c=new ChangePageSetup(this,null,b);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var d=new BackgroundImageDialog(this,b,c);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(b,c,e,
-f,k){b=new LibraryDialog(this,b,c,e,f,k);this.showDialog(b.container,640,440,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var d=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var b=
+function(b,c,e,g,k){b=new ImageDialog(this,b,c,e,g,k);this.showDialog(b.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,d){if(!d){var c=new ChangePageSetup(this,null,b);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var d=new BackgroundImageDialog(this,b,c);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(b,c,e,
+g,k){b=new LibraryDialog(this,b,c,e,g,k);this.showDialog(b.container,640,440,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var d=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var b=
this.createDiv("geSidebarContainer geSidebarFooter");b.style.position="absolute";b.style.overflow="hidden";var c=document.createElement("a");c.className="geTitle";c.style.color="#DF6C0C";c.style.fontWeight="bold";c.style.height="100%";c.style.paddingTop="9px";c.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));
-mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,f,k,m,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{n?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,
-b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(I){}if(null!=g||null!=c){n=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),p=null;c=null!=c?c:mxResources.get("error");if(null!=g){null!=g.retry&&(l=mxResources.get("cancel"),p=function(){d();g.retry()});if(404==g.code||404==g.status||403==g.code){n=403==g.code?null!=g.message?mxUtils.htmlEntities(g.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
-(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=k?null:null!=m?m:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==g.code||404==g.status)){q="#U"==q.substring(0,
-2)?q.substring(45,q.lastIndexOf("%26ex")):q.substring(2);this.showError(c,n,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,e,f,k)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){g.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;g.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
-mxUtils.write(c,"<"+d[b].email+">");c.setAttribute("disabled","disabled");g.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=d.length;g.appendChild(c)}var d=this.drive.getUsersList(),c=document.createElement("div"),e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+": ");c.appendChild(e);var g=document.createElement("select");g.style.width="200px";b();mxEvent.addListener(g,"change",mxUtils.bind(this,
-function(){var c=g.value,e=d.length!=c;e&&this.drive.setUser(d[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(g);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=e&&e()}),480,150);return}}null!=g.message?
-n=""==g.message&&null!=g.name?mxUtils.htmlEntities(g.name):mxUtils.htmlEntities(g.message):null!=g.response&&null!=g.response.error?n=mxUtils.htmlEntities(g.response.error):"undefined"!==typeof window.App&&(g.code==App.ERROR_TIMEOUT?n=mxUtils.htmlEntities(mxResources.get("timeout")):g.code==App.ERROR_BUSY?n=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof g&&0<g.length&&(n=mxUtils.htmlEntities(g)))}var v=m=null;null!=g&&null!=g.helpLink&&(m=mxResources.get("help"),v=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(g.helpLink)}));this.showError(c,n,l,e,p,null,null,m,v,null,null,null,f?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,f,k,m){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();
-null!=c&&c()},function(){d();null!=e&&e()},f,k,null,null,null,null,g);this.showDialog(b.container,340,46+g,!0,m);b.init()};EditorUi.prototype.showBanner=function(b,c,e,f){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var g=document.createElement("div");g.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
-mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(g.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(g.style,"transition","all 1s ease");g.className="geBtn gePrimaryBtn";d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";g.appendChild(d);
-d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get(f?"doNotShowAgain":"close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";g.appendChild(d);mxUtils.write(g,c);document.body.appendChild(g);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var l=document.createElement("input");
-l.setAttribute("type","checkbox");l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!f){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);g.style.paddingBottom="30px";g.appendChild(c)}var q=mxUtils.bind(this,function(){null!=g.parentNode&&(g.parentNode.removeChild(g),this.bannerShowing=!1,l.checked||f)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);q()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){q()}),1E3)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),q(),mxEvent.consume(b)):n()}));window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(n,3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,e,f){b=b.toDataURL("image/"+e);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,
-"tEXt","mxfile",encodeURIComponent(c))),0<f&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",f));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,e,f,k){var d="jpeg"==e?"jpg":e;f=this.getBaseFilename(f)+(null!=c?".drawio":"")+"."+d;b=this.createImageDataUri(b,c,e,k);this.saveData(f,d,b.substring(b.lastIndexOf(",")+1),"image/"+e,!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||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var d=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,e,f,
-k,m){"text/xml"!=e||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=m?m:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=f?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank","_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
-null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewWindow(b,e,f);else{var d=document.createElement("a");m=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);m=65==(g?parseInt(g[2],10):!1)?!1:m}if(m||this.isOffline()){d.href=URL.createObjectURL(f?this.base64ToBlob(b,e):new Blob([b],{type:e}));m?d.download=c:d.setAttribute("target",
-"_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(B){}}else this.createEchoRequest(b,c,e,f,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,f,k,m){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=m?"&base64="+m:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
-function(b,c){c=c||"";for(var d=atob(b),e=d.length,g=Math.ceil(e/1024),f=Array(g),k=0;k<g;++k){for(var n=1024*k,t=Math.min(n+1024,e),x=Array(t-n),E=0;n<t;++E,++n)x[E]=d[n].charCodeAt(0);f[k]=new Uint8Array(x)}return new Blob(f,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,f,k,m,n,u){m=null!=m?m:!1;n=null!=n?n:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(m);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==
-c)if(null!=e&&"image/"==e.substring(0,6))this.openInNewWindow(b,e,f);else if(null!=e&&"text/html"==e.substring(0,9)){var g=new EmbedDialog(this,b);this.showDialog(g.container,440,240,!0,!0);g.init()}else{var l=window.open("about:blank");null==l?mxUtils.popup(b,!0):(l.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),l.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(b,d,e,f,null,u):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(g){try{this.exportFile(b,
-d,e,f,c,g)}catch(L){this.handleError(L)}}))}catch(I){this.handleError(I)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,m,n,null,1<k,d,b,e,f);m=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,400,m,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+
+mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,g,k,n,p){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{p?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,
+b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(J){}if(null!=f||null!=c){p=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),m=null;c=null!=c?c:mxResources.get("error");if(null!=f){null!=f.retry&&(l=mxResources.get("cancel"),m=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){p=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+
+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=k?null:null!=n?n:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==f.code||404==f.status)){q="#U"==q.substring(0,
+2)?q.substring(45,q.lastIndexOf("%26ex")):q.substring(2);this.showError(c,p,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,e,g,k)}),m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){f.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
+mxUtils.write(c,"<"+d[b].email+">");c.setAttribute("disabled","disabled");f.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=d.length;f.appendChild(c)}var d=this.drive.getUsersList(),c=document.createElement("div"),e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+": ");c.appendChild(e);var f=document.createElement("select");f.style.width="200px";b();mxEvent.addListener(f,"change",mxUtils.bind(this,
+function(){var c=f.value,e=d.length!=c;e&&this.drive.setUser(d[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=e&&e()}),480,150);return}}null!=f.message?
+p=""==f.message&&null!=f.name?mxUtils.htmlEntities(f.name):mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?p=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?p=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?p=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof f&&0<f.length&&(p=mxUtils.htmlEntities(f)))}var v=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),v=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(c,p,l,e,m,null,null,n,v,null,null,null,g?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,g,k,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();
+null!=c&&c()},function(){d();null!=e&&e()},g,k,null,null,null,null,f);this.showDialog(b.container,340,46+f,!0,n);b.init()};EditorUi.prototype.showBanner=function(b,c,e,g){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var f=document.createElement("div");f.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(f.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.className="geBtn gePrimaryBtn";d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";f.appendChild(d);
+d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get(g?"doNotShowAgain":"close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";f.appendChild(d);mxUtils.write(f,c);document.body.appendChild(f);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var l=document.createElement("input");
+l.setAttribute("type","checkbox");l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!g){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);f.style.paddingBottom="30px";f.appendChild(c)}var m=mxUtils.bind(this,function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,l.checked||g)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=
+mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));var p=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m()}),1E3)});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),m(),mxEvent.consume(b)):p()}));window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(p,3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,e,g){b=b.toDataURL("image/"+e);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,
+"tEXt","mxfile",encodeURIComponent(c))),0<g&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",g));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,e,g,k){var d="jpeg"==e?"jpg":e;g=this.getBaseFilename(g)+(null!=c?".drawio":"")+"."+d;b=this.createImageDataUri(b,c,e,k);this.saveData(g,d,b.substring(b.lastIndexOf(",")+1),"image/"+e,!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||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var d=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,e,g,
+k,n){"text/xml"!=e||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=n?n:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=g?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank","_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
+null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewWindow(b,e,g);else{var d=document.createElement("a");n=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);n=65==(f?parseInt(f[2],10):!1)?!1:n}if(n||this.isOffline()){d.href=URL.createObjectURL(g?this.base64ToBlob(b,e):new Blob([b],{type:e}));n?d.download=c:d.setAttribute("target",
+"_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(b,c,e,g,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,g,k,n){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=n?"&base64="+n:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(g?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
+function(b,c){c=c||"";for(var d=atob(b),e=d.length,f=Math.ceil(e/1024),g=Array(f),k=0;k<f;++k){for(var p=1024*k,t=Math.min(p+1024,e),x=Array(t-p),H=0;p<t;++H,++p)x[H]=d[p].charCodeAt(0);g[k]=new Uint8Array(x)}return new Blob(g,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,g,k,n,p,u){n=null!=n?n:!1;p=null!=p?p:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(n);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==
+c)if(null!=e&&"image/"==e.substring(0,6))this.openInNewWindow(b,e,g);else if(null!=e&&"text/html"==e.substring(0,9)){var f=new EmbedDialog(this,b);this.showDialog(f.container,440,240,!0,!0);f.init()}else{var l=window.open("about:blank");null==l?mxUtils.popup(b,!0):(l.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),l.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(b,d,e,g,null,u):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,
+d,e,g,c,f)}catch(L){this.handleError(L)}}))}catch(J){this.handleError(J)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,p,null,1<k,d,b,e,g);n=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,400,n,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+
b+"</html>"):(b=e?b:btoa(unescape(encodeURIComponent(b))),d.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+b+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(b,!1)+"</pre></html>"),d.document.close())};var k=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};
-EditorUi.prototype.createTagsDialog=function(b,c){function d(){for(var b=f.getSelectionCells(),d=[],c=0;c<b.length;c++)f.isCellVisible(b[c])&&d.push(b[c]);f.setSelectionCells(d)}function e(b){f.hiddenTags=b?[]:n.slice();d();f.refresh()}function g(b,g){x.innerHTML="";if(0<b.length){var l=document.createElement("table");l.setAttribute("cellpadding","2");l.style.boxSizing="border-box";l.style.tableLayout="fixed";l.style.width="100%";var k=document.createElement("tbody");if(null!=b&&0<b.length)for(var m=
-0;m<b.length;m++)(function(b){function l(){var c=n.slice(),e=mxUtils.indexOf(c,b);c.splice(e,1);f.hiddenTags=c;d();f.refresh()}function m(){var d=f.getCellsForTags([b],null,null,!0);f.isEnabled()?f.setSelectionCells(d):f.highlightCells(d)}var p=0>mxUtils.indexOf(f.hiddenTags,b),q=document.createElement("tr"),u=document.createElement("td");u.style.align="center";u.style.width="16px";var t=document.createElement("img");t.setAttribute("src",p?Editor.visibleImage:Editor.hiddenImage);t.setAttribute("title",
-mxResources.get(p?"hideIt":"show",[b]));mxUtils.setOpacity(t,p?75:25);t.style.verticalAlign="middle";t.style.cursor="pointer";t.style.width="16px";if(c||Editor.isDarkMode())t.style.filter="invert(100%)";u.appendChild(t);mxEvent.addListener(t,"click",function(c){var g=mxUtils.indexOf(f.hiddenTags,b);mxEvent.isShiftDown(c)?e(0<=mxUtils.indexOf(f.hiddenTags,b)):(0>g?f.hiddenTags.push(b):0<=g&&f.hiddenTags.splice(g,1),d(),f.refresh());mxEvent.consume(c)});mxEvent.addListener(t,"dblclick",function(b){mxEvent.isShiftDown(b)||
-(!p&&0<f.hiddenTags.length?e(!0):l());mxEvent.consume(b)});q.appendChild(u);u=document.createElement("td");u.style.overflow="hidden";u.style.whiteSpace="nowrap";u.style.textOverflow="ellipsis";u.style.verticalAlign="middle";u.style.cursor="pointer";u.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,p?100:40);u.appendChild(a);mxEvent.addListener(u,"click",function(b){mxEvent.isShiftDown(b)?(e(!0),
-m()):p&&0<f.hiddenTags.length?e(!0):l();mxEvent.consume(b)});mxEvent.addListener(u,"dblclick",function(b){e(!0);m();mxEvent.consume(b)});q.appendChild(u);if(f.isEnabled()){u=document.createElement("td");u.style.verticalAlign="middle";u.style.textAlign="center";u.style.width="18px";if(null==g){u.style.align="center";u.style.width="16px";t=document.createElement("img");t.setAttribute("src",Editor.clearImage);t.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(t,p?75:25);t.style.verticalAlign=
-"middle";t.style.cursor="pointer";t.style.width="16px";if(c||Editor.isDarkMode())t.style.filter="invert(100%)";mxEvent.addListener(t,"click",function(d){var c=mxUtils.indexOf(n,b);0<=c&&n.splice(c,1);f.removeTagsForCells(f.model.getDescendants(f.model.getRoot()),[b]);f.refresh();mxEvent.consume(d)});u.appendChild(t)}else{var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.margin="0px";x.defaultChecked=null!=g&&0<=mxUtils.indexOf(g,b);x.checked=x.defaultChecked;x.style.background=
-"transparent";x.setAttribute("title",mxResources.get(x.defaultChecked?"removeIt":"add",[b]));mxEvent.addListener(x,"change",function(d){x.checked?f.addTagsForCells(f.getSelectionCells(),[b]):f.removeTagsForCells(f.getSelectionCells(),[b]);mxEvent.consume(d)});u.appendChild(x)}q.appendChild(u)}k.appendChild(q)})(b[m]);l.appendChild(k);x.appendChild(l)}}var f=this.editor.graph,k=this,n=f.hiddenTags.slice(),t=document.createElement("div");t.style.userSelect="none";t.style.overflow="hidden";t.style.padding=
-"10px";t.style.height="100%";var x=document.createElement("div");x.style.boxSizing="border-box";x.style.borderRadius="4px";x.style.userSelect="none";x.style.overflow="auto";x.style.position="absolute";x.style.left="10px";x.style.right="10px";x.style.top="10px";x.style.border=f.isEnabled()?"1px solid #808080":"none";x.style.bottom=f.isEnabled()?"48px":"10px";t.appendChild(x);var E=mxUtils.button(mxResources.get("reset"),function(b){f.hiddenTags=[];mxEvent.isShiftDown(b)||(n=f.hiddenTags.slice());d();
-f.refresh()});E.setAttribute("title",mxResources.get("reset"));E.className="geBtn";E.style.marginRight="4px";E.marginTop="8px";var A=mxUtils.button(mxResources.get("add"),function(){if(f.isEnabled()){var b=new FilenameDialog(k,"",mxResources.get("add"),function(b){k.hideDialog();if(null!=b&&0<b.length){b=b.split(" ");for(var d=[],c=0;c<b.length;c++){var e=mxUtils.trim(b[c]);""!=e&&0>mxUtils.indexOf(n,e)&&d.push(e)}0<d.length&&(f.isSelectionEmpty()?(n=n.concat(d),F()):f.addTagsForCells(f.getSelectionCells(),
-d))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");k.showDialog(b.container,300,80,!0,!0);b.init()}});A.setAttribute("title",mxResources.get("add"));A.className="geBtn";A.marginTop="4px";f.addListener(mxEvent.ROOT,function(){n=f.hiddenTags.slice()});var F=mxUtils.bind(this,function(d,c){if(b()){for(var e=f.getAllTags(),l=0;l<e.length;l++)0>mxUtils.indexOf(n,e[l])&&n.push(e[l]);n.sort();f.isSelectionEmpty()?g(n):g(n,f.getCommonTagsForCells(f.getSelectionCells()))}});f.selectionModel.addListener(mxEvent.CHANGE,
-F);f.model.addListener(mxEvent.CHANGE,F);f.addListener(mxEvent.REFRESH,F);var I=document.createElement("div");I.style.boxSizing="border-box";I.style.whiteSpace="nowrap";I.style.position="absolute";I.style.overflow="hidden";I.style.bottom="0px";I.style.height="42px";I.style.right="10px";I.style.left="10px";f.isEnabled()&&(I.appendChild(E),I.appendChild(A),t.appendChild(I));return{div:t,refresh:F}};EditorUi.prototype.addChromelessToolbarItems=function(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=
-null;var d=b(mxUtils.bind(this,function(b){null==this.tagsComponent&&(this.tagsComponent=this.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height=
-"auto");if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var c=d.getBoundingClientRect();mxUtils.setPrefixedStyle(this.tagsDialog.style,"borderRadius","5px");this.tagsDialog.style.position="fixed";this.tagsDialog.style.fontFamily=
-"Helvetica,Arial";this.tagsDialog.style.backgroundColor="#000000";this.tagsDialog.style.color="#ffffff";mxUtils.setOpacity(this.tagsDialog,70);this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh()}mxEvent.consume(b)}),Editor.tagsLargeImage,
-mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();d.style.display=0<b.length?"":"none"}));k.apply(this,arguments)}if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=b(mxUtils.bind(this,function(b){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 e=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding=
-"4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.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.editor.exportToCanvas(mxUtils.bind(this,function(b){g.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(b,null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",c);this.exportDialog.appendChild(b);
-mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);d.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),Editor.cameraLargeImage,mxResources.get("export"))}};EditorUi.prototype.saveData=
-function(b,c,e,f,k){this.isLocalFileSave()?this.saveLocalFile(e,b,f,k,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,d){return this.createEchoRequest(e,b,f,k,c,d)}),e,k,f)};EditorUi.prototype.saveRequest=function(b,c,e,f,k,m,n){n=null!=n?n:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var g=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==d||null!=b&&0<b.length){var g=e("_blank"==d?null:b,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(e){m=null!=m?m:"pdf"==c?"application/pdf":"image/"+c;if(null!=f)try{this.exportFile(f,b,m,!0,d,e)}catch(I){this.handleError(I)}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(),b,m,!0,d,e)}catch(I){this.handleError(I)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,n,null,1<d,g,f,m,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,380,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,f,k,m){};EditorUi.prototype.pickFolder=function(b,
-c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,f,k,m,n,u,t,x,E,A){if(this.spinner.spin(document.body,mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var g=c?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&0==c&&(g=E?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(g,b,n,u,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,E,A);f&&this.editor.graph.addSvgShadow(l);var p=
-this.getBaseFilename()+(k?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",this.getFileData(!0,null,null,null,e,t,null,null,null,!1));var d='<?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);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(l);this.editor.graph.mathEnabled&&this.editor.addMathCss(l);m?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(l,q,this.thumbImageCache)):q(l)}catch(C){this.handleError(C)}};EditorUi.prototype.addRadiobox=function(b,c,e,f,k,m,n){return this.addCheckbox(b,e,f,k,m,n,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,f,k,m,n,u){m=null!=m?m:!0;var d=document.createElement("input");
-d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",n?"radio":"checkbox");n="geCheckbox-"+Editor.guid();d.id=n;null!=u&&d.setAttribute("name",u);e&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);f&&d.setAttribute("disabled","disabled");m&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,c),e.setAttribute("for",n),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+
-":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),g="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.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";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("makeCopy"));f.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,
-mxResources.get("custom")+"...");f.appendChild(e);b.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var b=new FilenameDialog(this,g,mxResources.get("ok"),function(b){null!=b?g=b:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==c||c.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled",
-"disabled")}));mxUtils.br(b);return{getLink:function(){return d.checked?"blank"===f.value?"_blank":g:null},getEditInput:function(){return d},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(b,c){function d(){k.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(b,mxResources.get("links")+":");var e=document.createElement("select");e.style.width="100px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";var g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));e.appendChild(g);g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));e.appendChild(g);g=document.createElement("option");
-g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));e.appendChild(g);c&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),e.appendChild(g));b.appendChild(e);mxUtils.write(b,mxResources.get("borderColor")+":");var f="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(f||"none",function(b){f=b;d()});mxEvent.consume(b)}));d();k.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";b.appendChild(k);mxUtils.br(b);return{getColor:function(){return f},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,e,f,k,m,n){n=null!=n?n:[];f&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&
-"1"!=urlParams.dev||n.push("lightbox=1"),"auto"!=b&&n.push("target="+b),null!=c&&c!=mxConstants.NONE&&n.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=k&&0<k.length&&n.push("edit="+encodeURIComponent(k)),m&&n.push("layers=1"),this.editor.graph.foldingEnabled&&n.push("nav=1"));e&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&n.push("page-id="+this.currentPage.getId());return n};EditorUi.prototype.createLink=function(b,c,e,f,k,m,n,u,t,x){t=this.createUrlParameters(b,
-c,e,f,k,m,t);b=this.getCurrentFile();c=!0;null!=n?e="#U"+encodeURIComponent(n):(b=this.getCurrentFile(),u||null==b||b.constructor!=window.DriveFile?e="#R"+encodeURIComponent(e?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(e="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=this.defaultFilename&&t.push("title="+encodeURIComponent(b.getTitle()));x&&1<e.length&&(t.push("open="+e.substring(1)),e="");return(f&&
-"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<t.length?"?"+t.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,f,k,m,n,u,t,x,E){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==f&&(d.target=f);t||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];n&&(e.push("pages"),
-d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),d.resize=!0);u&&e.push("layers");0<e.length&&(t&&e.push("lightbox"),d.toolbar=e.join(" "));null!=x&&0<x.length&&(d.edit=x);null!=b?d.url=b:d.xml=this.getFileData(!0,null,null,null,null,!n);c='<div class="mxgraph" style="'+(m?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+
-encodeURIComponent(b):"";E(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(b,c,e,f){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,
-mxResources.get("html"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");g=k.cloneNode(!0);g.setAttribute("value",
-"copy");l.appendChild(g);var q=document.createElement("span");mxUtils.write(q,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(q);mxUtils.br(l);l.appendChild(k);q=document.createElement("span");mxUtils.write(q,mxResources.get("publicDiagramUrl"));l.appendChild(q);var n=this.getCurrentFile();null==e&&null!=n&&n.constructor==window.DriveFile&&(q=document.createElement("a"),q.style.paddingLeft="12px",q.style.color="gray",q.style.cursor="pointer",mxUtils.write(q,mxResources.get("share")),l.appendChild(q),
-mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));g.setAttribute("checked","checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),A=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var F=document.createElement("input");F.setAttribute("type","text");F.style.marginRight="16px";F.style.width="60px";F.style.marginLeft="4px";F.style.marginRight="12px";F.value=
-"100%";d.appendChild(F);var I=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,L=L=this.addCheckbox(d,mxResources.get("allPages"),l,!l),H=this.addCheckbox(d,mxResources.get("layers"),!0),K=this.addCheckbox(d,mxResources.get("lightbox"),!0),C=this.addEditButton(d,K),N=C.getEditInput();N.style.marginBottom="16px";mxEvent.addListener(K,"change",function(){K.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");N.checked&&K.checked?C.getEditSelect().removeAttribute("disabled"):
-C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){f(k.checked?e:null,A.checked,F.value,t.getTarget(),t.getColor(),I.checked,L.checked,H.checked,K.checked,C.getLink())}),null,b,c);this.showDialog(b.container,340,380,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,f,k,m){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,b||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://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=l&&l.constructor==window.DriveFile&&!c){b=80;var g="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var q=document.createElement("div");
-q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));p.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));q.style.marginTop="12px";q.className="geBtn";p.appendChild(q);d.appendChild(p);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("check"));p.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(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var n=null,t=null;if(null!=e||null!=f)b+=30,mxUtils.write(d,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),
-n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",d.appendChild(n),mxUtils.write(d,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=f+"px",d.appendChild(t),mxUtils.br(d);var I=this.addLinkSection(d,m);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||
-c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var H=this.addCheckbox(d,mxResources.get("lightbox"),!0,null,null,!m),K=this.addEditButton(d,H),C=K.getEditInput();m&&(C.style.marginLeft=H.style.marginLeft,H.style.display="none",b-=30);var N=this.addCheckbox(d,mxResources.get("layers"),!0);N.style.marginLeft=C.style.marginLeft;N.style.marginTop="8px";var S=this.addCheckbox(d,mxResources.get("tags"),!0);S.style.marginLeft=C.style.marginLeft;S.style.marginBottom="16px";S.style.marginTop="16px";
-mxEvent.addListener(H,"change",function(){H.checked?(N.removeAttribute("disabled"),C.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"));C.checked&&H.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(I.getTarget(),I.getColor(),null==L?!0:L.checked,H.checked,K.getLink(),N.checked,null!=n?n.value:null,null!=t?t.value:null,S.checked)}),
-null,mxResources.get("create"),g);this.showDialog(c.container,340,300+b,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)):I.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,e,f,k){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:"+(k?
-"10":"4")+"px";d.appendChild(g);if(k){mxUtils.write(d,mxResources.get("zoom")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";d.appendChild(l);mxUtils.write(d,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=
-this.lastExportBorder||"0";d.appendChild(p);mxUtils.br(d)}var q=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=f?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),g=this.editor.graph,t=f?null:this.addCheckbox(d,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=t&&(t.style.marginBottom="16px");b=new CustomDialog(this,d,mxUtils.bind(this,function(){var b=parseInt(l.value)/
-100||1,d=parseInt(p.value)||0;e(!q.checked,null!=n?n.checked:!1,null!=t?t.checked:!1,b,d)}),null,b,c);this.showDialog(b.container,300,(k?25:0)+(f?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,e,f,k,m,n,t,B){n=null!=n?n:Editor.defaultIncludeDiagram;var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=this.editor.graph,l="jpeg"==t?200:280,p=document.createElement("h3");mxUtils.write(p,b);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-d.appendChild(p);mxUtils.write(d,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";d.appendChild(q);mxUtils.write(d,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||
-"0";d.appendChild(u);mxUtils.br(d);var v=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),K=document.createElement("input");K.style.marginTop="16px";K.style.marginRight="8px";K.style.marginLeft="24px";K.setAttribute("disabled","disabled");K.setAttribute("type","checkbox");var C=document.createElement("select");C.style.marginTop="16px";C.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(p=0;p<b.length;p++)if(!g.isSelectionEmpty()||"selectionOnly"!=b[p]){var N=
-document.createElement("option");mxUtils.write(N,mxResources.get(b[p]));N.setAttribute("value",b[p]);C.appendChild(N)}B?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(C),mxUtils.br(d),l+=26,mxEvent.addListener(C,"change",function(){"selectionOnly"==C.value&&(v.checked=!0)})):m&&(d.appendChild(K),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=26,mxEvent.addListener(v,"change",function(){v.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}));g.isSelectionEmpty()?
-B&&(v.style.display="none",v.nextSibling.style.display="none",v.nextSibling.nextSibling.style.display="none",l-=26):(C.value="diagram",K.setAttribute("checked","checked"),K.defaultChecked=!0,mxEvent.addListener(v,"change",function(){C.value=v.checked?"selectionOnly":"diagram"}));var S=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),R=null;Editor.isDarkMode()&&(R=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var M=this.addCheckbox(d,mxResources.get("shadow"),
-g.shadowVisible),P=document.createElement("input");P.style.marginTop="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||P.setAttribute("disabled","disabled");c&&(d.appendChild(P),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),l+=26);var G=null;if("png"==t||"jpeg"==t)G=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=26;var D=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
-n,null,null,"jpeg"!=t);D.style.marginBottom="16px";var y=document.createElement("select");y.style.maxWidth="260px";y.style.marginLeft="8px";y.style.marginRight="10px";y.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));y.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));y.appendChild(c);c=document.createElement("option");c.setAttribute("value",
-"self");mxUtils.write(c,mxResources.get("openInThisWindow"));y.appendChild(c);"svg"==t&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(y),mxUtils.br(d),mxUtils.br(d),l+=40);e=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=q.value;k(q.value,S.checked,!v.checked,M.checked,D.checked,P.checked,u.value,K.checked,!1,y.value,null!=G?G.checked:null,null!=R?R.checked:null,C.value)}),null,e,f);this.showDialog(e.container,340,l,!0,!0,null,
-null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,e,f,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=c){var l=document.createElement("h3");mxUtils.write(l,c);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(l)}var p=this.addCheckbox(d,mxResources.get("fit"),!0),
-q=this.addCheckbox(d,mxResources.get("shadow"),g.shadowVisible&&f,!f),n=this.addCheckbox(d,e),t=this.addCheckbox(d,mxResources.get("lightbox"),!0),F=this.addEditButton(d,t),I=F.getEditInput(),L=1<g.model.getChildCount(g.model.getRoot()),H=this.addCheckbox(d,mxResources.get("layers"),L,!L);H.style.marginLeft=I.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(L&&H.removeAttribute("disabled"),I.removeAttribute("disabled")):(H.setAttribute("disabled",
-"disabled"),I.setAttribute("disabled","disabled"));I.checked&&t.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(p.checked,q.checked,n.checked,t.checked,F.getLink(),H.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,290,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,c,e,f,k,m,n,t){function d(d){var c=" ",p="";f&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=l?"&page="+l:"")+(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");b&&(p+="max-width:100%;");var q="";e&&(q=' width="'+Math.round(g.width)+'" height="'+Math.round(g.height)+'"');n('<img src="'+d+'"'+q+(""!=p?' style="'+p+'"':"")+c+"/>")}var g=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=f?this.getFileData(!0):null;b=
-this.createImageDataUri(b,c,"png");d(b)}),null,null,null,mxUtils.bind(this,function(b){t({message:mxResources.get("unknownError")})}),null,!0,e?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),g.width*g.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var p="";e&&(p="&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")+p+"&xml="+encodeURIComponent(c));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&
-299>=q.getStatus()?d("data:image/png;base64,"+q.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(b,c,e,f,k,m,n){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!e),g=d.getElementsByTagName("a");if(null!=g)for(var l=0;l<g.length;l++){var p=g[l].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==g[l].getAttribute("target")&&g[l].removeAttribute("target")}f&&
-d.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(d);if(e){var q=" ",t="";f&&(q="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('"+EditorUi.lightboxHost+"/?client=1"+(k?"&edit=_blank":"")+(m?"&layers=1":
-"")+"');}})(this);\"",t+="cursor:pointer;");b&&(t+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(b){n('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=t?' style="'+t+'"':"")+q+"/>")}))}else t="",f&&(c=this.getSelectedPageIndex(),d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=c?"&page="+c:"")+(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),b&&(b=parseInt(d.getAttribute("width")),k=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+b+" "+k),t+="max-width:100%;max-height:"+k+"px;",d.removeAttribute("height")),""!=t&&d.setAttribute("style",t),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),n(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(b){b=
+EditorUi.prototype.addChromelessToolbarItems=function(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var d=b(mxUtils.bind(this,function(b){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",
+this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,70));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),
+this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var c=d.getBoundingClientRect();this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=
+c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(b)}),Editor.tagsLargeImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();d.style.display=0<b.length?"":"none"}));k.apply(this,arguments)}this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,
+"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=b(mxUtils.bind(this,function(b){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 e=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
+"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(b){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(b,null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));
+b.setAttribute("border","0");b.setAttribute("src",c);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);d.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),
+Editor.cameraLargeImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(b,c,e,g,k){this.isLocalFileSave()?this.saveLocalFile(e,b,g,k,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,d){return this.createEchoRequest(e,b,g,k,c,d)}),e,k,g)};EditorUi.prototype.saveRequest=function(b,c,e,g,k,n,p){p=null!=p?p:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==
+d||null!=b&&0<b.length){var f=e("_blank"==d?null:b,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(e){n=null!=n?n:"pdf"==c?"application/pdf":"image/"+c;if(null!=g)try{this.exportFile(g,b,n,!0,d,e)}catch(J){this.handleError(J)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=
+f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,n,!0,d,e)}catch(J){this.handleError(J)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,p,null,1<d,f,g,n,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,380,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=
+b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,g,k,n){};EditorUi.prototype.pickFolder=function(b,c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,g,k,n,p,u,t,x,H,D){if(this.spinner.spin(document.body,mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var f=c?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==c&&(f=H?this.editor.graph.defaultPageBackgroundColor:
+"#ffffff");var l=this.editor.graph.getSvg(f,b,p,u,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,H,D);g&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+(k?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",this.getFileData(!0,null,null,null,e,t,null,null,null,!1));var d='<?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);
+this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(l);this.editor.graph.mathEnabled&&this.editor.addMathCss(l);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(l,q,this.thumbImageCache)):q(l)}catch(C){this.handleError(C)}};EditorUi.prototype.addRadiobox=function(b,
+c,e,g,k,n,p){return this.addCheckbox(b,e,g,k,n,p,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,g,k,n,p,u){n=null!=n?n:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",p?"radio":"checkbox");p="geCheckbox-"+Editor.guid();d.id=p;null!=u&&d.setAttribute("name",u);e&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);g&&d.setAttribute("disabled","disabled");n&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,
+c),e.setAttribute("for",p),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),f="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";e=document.createElement("option");
+e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("makeCopy"));g.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,mxResources.get("custom")+"...");g.appendChild(e);b.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var b=new FilenameDialog(this,f,mxResources.get("ok"),function(b){null!=b?f=b:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(b.container,
+300,80,!0,!1);b.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==c||c.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return d.checked?"blank"===g.value?"_blank":f:null},getEditInput:function(){return d},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(b,c){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?
+"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var e=document.createElement("select");e.style.width="100px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));e.appendChild(f);f=document.createElement("option");
+f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));e.appendChild(f);c&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),e.appendChild(f));b.appendChild(e);mxUtils.write(b,mxResources.get("borderColor")+":");var g="#0000ff",k=
+null,k=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(g||"none",function(b){g=b;d()});mxEvent.consume(b)}));d();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";b.appendChild(k);mxUtils.br(b);return{getColor:function(){return g},getTarget:function(){return e.value},focus:function(){e.focus()}}};
+EditorUi.prototype.createUrlParameters=function(b,c,e,g,k,n,p){p=null!=p?p:[];g&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||p.push("lightbox=1"),"auto"!=b&&p.push("target="+b),null!=c&&c!=mxConstants.NONE&&p.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=k&&0<k.length&&p.push("edit="+encodeURIComponent(k)),n&&p.push("layers=1"),this.editor.graph.foldingEnabled&&p.push("nav=1"));e&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&
+p.push("page-id="+this.currentPage.getId());return p};EditorUi.prototype.createLink=function(b,c,e,g,k,n,p,u,t,x){t=this.createUrlParameters(b,c,e,g,k,n,t);b=this.getCurrentFile();c=!0;null!=p?e="#U"+encodeURIComponent(p):(b=this.getCurrentFile(),u||null==b||b.constructor!=window.DriveFile?e="#R"+encodeURIComponent(e?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(e="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=
+this.defaultFilename&&t.push("title="+encodeURIComponent(b.getTitle()));x&&1<e.length&&(t.push("open="+e.substring(1)),e="");return(g&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<t.length?"?"+t.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,g,k,n,p,u,t,x,H,D){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==
+g&&(d.target=g);x||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];p&&(e.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),d.resize=!0);u&&e.push("layers");t&&e.push("tags");0<e.length&&(x&&e.push("lightbox"),d.toolbar=e.join(" "));null!=H&&0<H.length&&(d.edit=H);null!=b?d.url=b:d.xml=this.getFileData(!0,null,null,null,null,!p);c='<div class="mxgraph" style="'+
+(n?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";D(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};
+EditorUi.prototype.showHtmlDialog=function(b,c,e,g){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
+k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");l.appendChild(f);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(m);mxUtils.br(l);l.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));l.appendChild(m);var p=this.getCurrentFile();null==e&&null!=p&&p.constructor==window.DriveFile&&(m=
+document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.style.cursor="pointer",mxUtils.write(m,mxResources.get("share")),l.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));f.setAttribute("checked","checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),D=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var E=document.createElement("input");
+E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value="100%";d.appendChild(E);var J=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,L=L=this.addCheckbox(d,mxResources.get("allPages"),l,!l),G=this.addCheckbox(d,mxResources.get("layers"),!0),K=this.addCheckbox(d,mxResources.get("tags"),!0),C=this.addCheckbox(d,mxResources.get("lightbox"),!0),M=this.addEditButton(d,C),P=M.getEditInput();
+P.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");P.checked&&C.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){g(k.checked?e:null,D.checked,E.value,t.getTarget(),t.getColor(),J.checked,L.checked,G.checked,K.checked,C.checked,M.getLink())}),null,b,c);this.showDialog(b.container,340,420,
+!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,g,k,n){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,b||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var l=this.getCurrentFile(),f="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=l&&l.constructor==window.DriveFile&&!c){b=80;var f="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",
+m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));m.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));p.style.marginTop="12px";p.className="geBtn";m.appendChild(p);d.appendChild(m);p=document.createElement("a");
+p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("check"));m.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,
+300,80,!0,!1);b.init()}))}))}var q=null,t=null;if(null!=e||null!=g)b+=30,mxUtils.write(d,mxResources.get("width")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",d.appendChild(q),mxUtils.write(d,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom=
+"10px",t.value=g+"px",d.appendChild(t),mxUtils.br(d);var J=this.addLinkSection(d,n);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var G=this.addCheckbox(d,mxResources.get("lightbox"),!0,null,null,!n),K=this.addEditButton(d,G),C=K.getEditInput();n&&(C.style.marginLeft=G.style.marginLeft,G.style.display="none",b-=30);var M=this.addCheckbox(d,mxResources.get("layers"),!0);M.style.marginLeft=C.style.marginLeft;
+M.style.marginTop="8px";var P=this.addCheckbox(d,mxResources.get("tags"),!0);P.style.marginLeft=C.style.marginLeft;P.style.marginBottom="16px";P.style.marginTop="16px";mxEvent.addListener(G,"change",function(){G.checked?(M.removeAttribute("disabled"),C.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"));C.checked&&G.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,
+d,mxUtils.bind(this,function(){k(J.getTarget(),J.getColor(),null==L?!0:L.checked,G.checked,K.getLink(),M.checked,null!=q?q.value:null,null!=t?t.value:null,P.checked)}),null,mxResources.get("create"),f);this.showDialog(c.container,340,300+b,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):J.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace=
+"nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(k?"10":"4")+"px";d.appendChild(f);if(k){mxUtils.write(d,mxResources.get("zoom")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";d.appendChild(l);mxUtils.write(d,mxResources.get("borderWidth")+
+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";d.appendChild(m);mxUtils.br(d)}var p=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),q=g?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),f=this.editor.graph,t=g?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==
+mxConstants.NONE||null==f.background);null!=t&&(t.style.marginBottom="16px");b=new CustomDialog(this,d,mxUtils.bind(this,function(){var b=parseInt(l.value)/100||1,d=parseInt(m.value)||0;e(!p.checked,null!=q?q.checked:!1,null!=t?t.checked:!1,b,d)}),null,b,c);this.showDialog(b.container,300,(k?25:0)+(g?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,e,g,k,n,p,t,y){p=null!=p?p:Editor.defaultIncludeDiagram;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,
+l="jpeg"==t?200:280,m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(m);mxUtils.write(d,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";d.appendChild(q);mxUtils.write(d,mxResources.get("borderWidth")+":");var u=document.createElement("input");
+u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||"0";d.appendChild(u);mxUtils.br(d);var v=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),K=document.createElement("input");K.style.marginTop="16px";K.style.marginRight="8px";K.style.marginLeft="24px";K.setAttribute("disabled","disabled");K.setAttribute("type","checkbox");var C=document.createElement("select");C.style.marginTop="16px";C.style.marginLeft=
+"8px";b=["selectionOnly","diagram","page"];for(m=0;m<b.length;m++)if(!f.isSelectionEmpty()||"selectionOnly"!=b[m]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(b[m]));M.setAttribute("value",b[m]);C.appendChild(M)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(C),mxUtils.br(d),l+=26,mxEvent.addListener(C,"change",function(){"selectionOnly"==C.value&&(v.checked=!0)})):n&&(d.appendChild(K),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=26,mxEvent.addListener(v,
+"change",function(){v.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}));f.isSelectionEmpty()?y&&(v.style.display="none",v.nextSibling.style.display="none",v.nextSibling.nextSibling.style.display="none",l-=26):(C.value="diagram",K.setAttribute("checked","checked"),K.defaultChecked=!0,mxEvent.addListener(v,"change",function(){C.value=v.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),S=null;Editor.isDarkMode()&&
+(S=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),R=document.createElement("input");R.style.marginTop="16px";R.style.marginRight="8px";R.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||R.setAttribute("disabled","disabled");c&&(d.appendChild(R),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),l+=26);var F=null;if("png"==t||"jpeg"==t)F=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||
+!this.canvasSupported,!1,!0),l+=26;var B=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=t);B.style.marginBottom="16px";var A=document.createElement("select");A.style.maxWidth="260px";A.style.marginLeft="8px";A.style.marginRight="10px";A.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));A.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,
+mxResources.get("openInNewWindow"));A.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));A.appendChild(c);"svg"==t&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(A),mxUtils.br(d),mxUtils.br(d),l+=40);e=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=q.value;k(q.value,P.checked,!v.checked,N.checked,B.checked,R.checked,u.value,K.checked,!1,A.value,
+null!=F?F.checked:null,null!=S?S.checked:null,C.value)}),null,e,g);this.showDialog(e.container,340,l,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=c){var l=document.createElement("h3");mxUtils.write(l,c);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+d.appendChild(l)}var m=this.addCheckbox(d,mxResources.get("fit"),!0),p=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&g,!g),q=this.addCheckbox(d,e),t=this.addCheckbox(d,mxResources.get("lightbox"),!0),E=this.addEditButton(d,t),J=E.getEditInput(),L=1<f.model.getChildCount(f.model.getRoot()),G=this.addCheckbox(d,mxResources.get("layers"),L,!L);G.style.marginLeft=J.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?
+(L&&G.removeAttribute("disabled"),J.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&t.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(m.checked,p.checked,q.checked,t.checked,E.getLink(),G.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,290,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(b,c,e,g,k,n,p,t){function d(d){var c=" ",m="";g&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=l?"&page="+l:"")+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",m+=
+"cursor:pointer;");b&&(m+="max-width:100%;");var q="";e&&(q=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');p('<img src="'+d+'"'+q+(""!=m?' style="'+m+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=g?this.getFileData(!0):null;b=this.createImageDataUri(b,c,"png");d(b)}),null,null,null,mxUtils.bind(this,function(b){t({message:mxResources.get("unknownError")})}),
+null,!0,e?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),f.width*f.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var m="";e&&(m="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(g?"1":"0")+m+"&xml="+encodeURIComponent(c));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?d("data:image/png;base64,"+q.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(b,c,e,g,k,n,p){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!e),f=d.getElementsByTagName("a");if(null!=f)for(var l=0;l<f.length;l++){var m=f[l].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[l].getAttribute("target")&&f[l].removeAttribute("target")}g&&d.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(d);if(e){var q=" ",t="";g&&(q="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('"+
+EditorUi.lightboxHost+"/?client=1"+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");b&&(t+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(b){p('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=t?' style="'+t+'"':"")+q+"/>")}))}else t="",g&&(c=this.getSelectedPageIndex(),d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=c?"&page="+c:"")+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),b&&(b=parseInt(d.getAttribute("width")),k=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+b+" "+k),t+="max-width:100%;max-height:"+k+"px;",d.removeAttribute("height")),""!=t&&d.setAttribute("style",t),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),p(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(b){b=
Math.floor((new Date-b)/1E3);var d=Math.floor(b/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(b/2592E3);if(1<d)return d+" "+mxResources.get("months");d=Math.floor(b/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(b/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(b/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(b,c){if(null!=b){var d=null;if("diagram"==b.nodeName)d=
-b;else if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var d=e[0],g=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:g.apply(this,arguments)}}}null!=d&&(b=Editor.parseDiagramNode(d))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(m){}finally{this.editor.graph=e}return b};EditorUi.prototype.getPngFileProperties=function(b){var d=1,c=0;if(null!=
-b){if(b.hasAttribute("scale")){var e=parseFloat(b.getAttribute("scale"));!isNaN(e)&&0<e&&(d=e)}b.hasAttribute("border")&&(e=parseInt(b.getAttribute("border")),!isNaN(e)&&0<e&&(c=e))}return{scale:d,border:c}};EditorUi.prototype.getEmbeddedPng=function(b,c,e,f,k){try{var d=this.editor.graph,g=null!=d.themes&&"darkTheme"==d.defaultThemeName,l=null;if(null!=e&&0<e.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(e).documentElement,
-!0),d),l=e;else if(g||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),p=d.getGlobalVariable,q=this.pages[0];d.getGlobalVariable=function(b){return"page"==b?q.getName():"pagenumber"==b?1:p.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(q.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==l&&(l=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var g=e.toDataURL("image/png"),g=Editor.writeGraphModelToPng(g,
-"tEXt","mxfile",encodeURIComponent(l));b(g.substring(g.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(F){null!=c&&c(F)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&c(b)}),null,null,f,null,d.shadowVisible,null,d,k)}catch(E){null!=c&&c(E)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,f,k,m,n,t,B,x,E,A,F){t=null!=t?t:!0;n=null!=B?B:c.background;n==mxConstants.NONE&&(n=null);m=c.getSvg(n,x,E,null,null,m,null,null,null,c.shadowVisible||
-A,null,F);(c.shadowVisible||A)&&c.addSvgShadow(m);null!=b&&m.setAttribute("content",b);null!=e&&m.setAttribute("resource",e);if(null!=k)this.embedFonts(m,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){k((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))})):k((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))}));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(m)};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(q){c(b)}}))}catch(l){c(b)}}))};
-EditorUi.prototype.exportImage=function(b,c,e,f,k,m,n,t,B,x,E,A,F){B=null!=B?B:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,t):null,B,null==this.pages||0==this.pages.length,E)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,
-null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,f,null,null,m,n,x,A,F)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,f,k,m,n){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var g=this.editor.graph;if(null!=b&&0<b.length){g.model.beginUpdate();try{var l=mxUtils.parseXml(b);b={};var p=this.editor.extractGraphModel(l.documentElement,
-null!=this.pages);if(null!=p&&"mxfile"==p.nodeName&&null!=this.pages){var q=p.getElementsByTagName("diagram");if(1==q.length&&!m){if(p=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<
-q.length){m=[];var v=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),p=Editor.parseDiagramNode(q[0]),f=!1,v=1);for(;v<q.length;v++){var L=q[v].getAttribute("id");q[v].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(q[v]));b[L]=q[v].getAttribute("id");var K=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[K+1]));g.model.execute(new ChangePage(this,H,H,K,!0));m.push(H)}this.updatePageLinks(b,
-m)}}if(null!=p&&"mxGraphModel"===p.nodeName&&(d=g.importGraphModel(p,c,e,f),null!=d))for(v=0;v<d.length;v++)this.updatePageLinksForCell(b,d[v]);n&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{g.model.endUpdate()}}}catch(C){if(k)throw C;this.handleError(C)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,
-c){var d=document.createElement("div"),e=this.editor.graph,g=e.getLinkForCell(c);null!=g&&e.setLinkForCell(c,this.updatePageLink(b,g));if(e.isHtmlLabel(c)){d.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var f=d.getElementsByTagName("a"),k=!1,n=0;n<f.length;n++)g=f[n].getAttribute("href"),null!=g&&(f[n].setAttribute("href",this.updatePageLink(b,g)),k=!0);k&&e.labelChanged(c,d.innerHTML)}for(n=0;n<e.model.getChildCount(c);n++)this.updatePageLinksForCell(b,e.model.getChildAt(c,n))};EditorUi.prototype.updatePageLink=
-function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var g=0;g<e.actions.length;g++){var f=e.actions[g];if(null!=f.open&&Graph.isPageLink(f.open)){var k=f.open.substring(f.open.indexOf(",")+1),d=b[k];null!=d?f.open="data:page/id,"+d:null==this.getPageById(k)&&delete f.open}}c="data:action/json,"+JSON.stringify(e)}}catch(u){}return c};
-EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,e,f,k){f=null!=f?f:b.name;e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(f);try{var g="UNKNOWN-VISIO",l=f.lastIndexOf(".");if(0<=l&&l<f.length)g=f.substring(l+1).toUpperCase();else{var m=f.lastIndexOf("/");0<=
-m&&m<f.length&&(f=f.substring(m+1))}EditorUi.logEvent({category:g+"-MS-IMPORT-FILE",action:"filename_"+f,label:d?"remote":"local"})}catch(A){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",b,f);var p=new XMLHttpRequest;p.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(f)?"?stencil=1":""));p.responseType="blob";this.addRemoteServiceSecurityCheck(p);
-null!=k&&p.setRequestHeader("x-convert-custom",k);p.onreadystatechange=mxUtils.bind(this,function(){if(4==p.readyState)if(200<=p.status&&299>=p.status)try{var b=p.response;if("text/xml"==b.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(L){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,f)}catch(I){e(I)}else try{""==p.responseType||"text"==p.responseType?e({message:p.responseText}):(d=new FileReader,d.onload=
-function(){e({message:JSON.parse(d.result).Message})},d.readAsText(p.response))}catch(I){e({})}});p.send(d)}else try{this.doImportVisio(b,c,e,f)}catch(A){e(A)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(b,c,e){e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});
-var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(p){e(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||
+b;else if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var d=e[0],f=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:f.apply(this,arguments)}}}null!=d&&(b=Editor.parseDiagramNode(d))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(n){}finally{this.editor.graph=e}return b};EditorUi.prototype.getPngFileProperties=function(b){var d=1,c=0;if(null!=
+b){if(b.hasAttribute("scale")){var e=parseFloat(b.getAttribute("scale"));!isNaN(e)&&0<e&&(d=e)}b.hasAttribute("border")&&(e=parseInt(b.getAttribute("border")),!isNaN(e)&&0<e&&(c=e))}return{scale:d,border:c}};EditorUi.prototype.getEmbeddedPng=function(b,c,e,g,k){try{var d=this.editor.graph,f=null!=d.themes&&"darkTheme"==d.defaultThemeName,l=null;if(null!=e&&0<e.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(e).documentElement,
+!0),d),l=e;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),m=d.getGlobalVariable,p=this.pages[0];d.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(p.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==l&&(l=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=e.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,
+"tEXt","mxfile",encodeURIComponent(l));b(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(E){null!=c&&c(E)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&c(b)}),null,null,g,null,d.shadowVisible,null,d,k)}catch(H){null!=c&&c(H)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,n,p,t,y,x,H,D,E){t=null!=t?t:!0;p=null!=y?y:c.background;p==mxConstants.NONE&&(p=null);n=c.getSvg(p,x,H,null,null,n,null,null,null,c.shadowVisible||
+D,null,E);(c.shadowVisible||D)&&c.addSvgShadow(n);null!=b&&n.setAttribute("content",b);null!=e&&n.setAttribute("resource",e);if(null!=k)this.embedFonts(n,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){k((g?"":'<?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))})):k((g?"":'<?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))}));else return(g?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(n)};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(m){c(b)}}))}catch(l){c(b)}}))};
+EditorUi.prototype.exportImage=function(b,c,e,g,k,n,p,t,y,x,H,D,E){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,t):null,y,null==this.pages||0==this.pages.length,H)}catch(G){this.handleError(G)}}),null,this.thumbImageCache,
+null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,n,p,x,D,E)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,g,k,n,p){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var f=this.editor.graph;if(null!=b&&0<b.length){f.model.beginUpdate();try{var l=mxUtils.parseXml(b);b={};var m=this.editor.extractGraphModel(l.documentElement,
+null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var q=m.getElementsByTagName("diagram");if(1==q.length&&!n){if(m=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<
+q.length){n=[];var v=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(q[0]),g=!1,v=1);for(;v<q.length;v++){var L=q[v].getAttribute("id");q[v].removeAttribute("id");var G=this.updatePageRoot(new DiagramPage(q[v]));b[L]=q[v].getAttribute("id");var K=this.pages.length;null==G.getName()&&G.setName(mxResources.get("pageWithNumber",[K+1]));f.model.execute(new ChangePage(this,G,G,K,!0));n.push(G)}this.updatePageLinks(b,
+n)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,c,e,g),null!=d))for(v=0;v<d.length;v++)this.updatePageLinksForCell(b,d[v]);p&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(C){if(k)throw C;this.handleError(C)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,
+c){var d=document.createElement("div"),e=this.editor.graph,f=e.getLinkForCell(c);null!=f&&e.setLinkForCell(c,this.updatePageLink(b,f));if(e.isHtmlLabel(c)){d.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var g=d.getElementsByTagName("a"),k=!1,p=0;p<g.length;p++)f=g[p].getAttribute("href"),null!=f&&(g[p].setAttribute("href",this.updatePageLink(b,f)),k=!0);k&&e.labelChanged(c,d.innerHTML)}for(p=0;p<e.model.getChildCount(c);p++)this.updatePageLinksForCell(b,e.model.getChildAt(c,p))};EditorUi.prototype.updatePageLink=
+function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var f=0;f<e.actions.length;f++){var g=e.actions[f];if(null!=g.open&&Graph.isPageLink(g.open)){var k=g.open.substring(g.open.indexOf(",")+1),d=b[k];null!=d?g.open="data:page/id,"+d:null==this.getPageById(k)&&delete g.open}}c="data:action/json,"+JSON.stringify(e)}}catch(u){}return c};
+EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,e,g,k){g=null!=g?g:b.name;e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(g);try{var f="UNKNOWN-VISIO",l=g.lastIndexOf(".");if(0<=l&&l<g.length)f=g.substring(l+1).toUpperCase();else{var m=g.lastIndexOf("/");0<=
+m&&m<g.length&&(g=g.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+g,label:d?"remote":"local"})}catch(D){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",b,g);var n=new XMLHttpRequest;n.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(g)?"?stencil=1":""));n.responseType="blob";this.addRemoteServiceSecurityCheck(n);
+null!=k&&n.setRequestHeader("x-convert-custom",k);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var b=n.response;if("text/xml"==b.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(L){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(J){e(J)}else try{""==n.responseType||"text"==n.responseType?e({message:n.responseText}):(d=new FileReader,d.onload=
+function(){e({message:JSON.parse(d.result).Message})},d.readAsText(n.response))}catch(J){e({})}});n.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(D){e(D)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(b,c,e){e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});
+var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(q){e(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||
this.handleError({message:mxResources.get("unknownError")})}catch(l){this.handleError(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.convertLucidChart=function(b,c,e){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
-action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(p){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(p){null!=window.console&&console.error(p),e(p)}}else e({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
-function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",d)})})})}):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(b,c,e,f){var d=this,g=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=
-b.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(b).getElementsByTagName("svg");if(0<c.length){var g=parseFloat(c[0].getAttribute("width")),k=parseFloat(c[0].getAttribute("height"));if(isNaN(g)||isNaN(k))try{var l=c[0].getAttribute("viewBox").split(/\s+/),g=parseFloat(l[2]),k=parseFloat(l[3])}catch(A){g=g||100,k=k||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),g,k)}else f({message:mxResources.get("invalidInput")})}catch(A){f(A)}})}catch(v){f(v)}};
-"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?g():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",g):mxscript("js/extensions.min.js",g))};EditorUi.prototype.generatePlantUmlImage=function(b,c,e,f){function d(b,d,c){c1=b>>2;c2=(b&3)<<4|d>>4;c3=(d&15)<<2|c>>6;c4=c&63;r="";r+=g(c1&63);r+=g(c2&63);r+=g(c3&63);return r+=g(c4&63)}function g(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+
+action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(q){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(q){null!=window.console&&console.error(q),e(q)}}else e({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
+function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",d)})})})}):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(b,c,e,g){var d=this,f=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=
+b.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(b).getElementsByTagName("svg");if(0<c.length){var f=parseFloat(c[0].getAttribute("width")),k=parseFloat(c[0].getAttribute("height"));if(isNaN(f)||isNaN(k))try{var l=c[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(l[2]),k=parseFloat(l[3])}catch(D){f=f||100,k=k||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,k)}else g({message:mxResources.get("invalidInput")})}catch(D){g(D)}})}catch(v){g(v)}};
+"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(b,c,e,g){function d(b,d,c){c1=b>>2;c2=(b&3)<<4|d>>4;c3=(d&15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+
b);b-=26;return 0==b?"-":1==b?"_":"?"}var k=new XMLHttpRequest;k.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(b){r="";for(i=0;i<b.length;i+=3)r=i+2==b.length?r+d(b.charCodeAt(i),b.charCodeAt(i+1),0):i+1==b.length?r+d(b.charCodeAt(i),0,0):r+d(b.charCodeAt(i),b.charCodeAt(i+1),b.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(b))),!0);"txt"!=c&&(k.responseType="blob");k.onload=function(b){if(200<=this.status&&300>this.status)if("txt"==
-c)e(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,g=c.height;if(0==b&&0==g){var k=d.result,l=k.indexOf(","),m=decodeURIComponent(escape(atob(k.substring(l+1)))),p=mxUtils.parseXml(m).getElementsByTagName("svg");0<p.length&&(b=parseFloat(p[0].getAttribute("width")),g=parseFloat(p[0].getAttribute("height")))}e(d.result,b,g)}catch(C){f(C)}};c.src=d.result};d.onerror=function(b){f(b)}}else f(b)};k.onerror=
-function(b){f(b)};k.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,g=null;d.getModel().beginUpdate();try{g=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(g,!0)}finally{d.getModel().endUpdate()}return g};EditorUi.prototype.insertTextAt=function(b,c,e,f,k,m,n,t){m=null!=m?m:!0;n=null!=n?n:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
-" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var g=Editor.extractGraphModelFromPdf(b);if(null!=g&&0<g.length)return this.importXml(g,c,e,m,!0,t)}if("data:image/png;base64,"==
-b.substring(0,22)&&(g=this.extractGraphModelFromPng(b),null!=g&&0<g.length))return this.importXml(g,c,e,m,!0,t);if("data:image/svg+xml;"==b.substring(0,19))try{g=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(g=b.substring(b.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0)):g=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(g,c,e,m,!0,t);if(0<l.length)return l}catch(F){}this.loadImage(b,mxUtils.bind(this,function(g){if("data:"==b.substring(0,
-5))this.resizeImage(g,b,mxUtils.bind(this,function(b,g,f){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),n,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/g.width,this.maxImageSize/g.height)),k=Math.round(g.width*f);g=Math.round(g.height*f);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),
-k,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var g=null;d.getModel().beginUpdate();try{g=d.insertVertex(d.getDefaultParent(),null,b,d.snap(c),d.snap(e),1,1,"text;"+(f?"html=1;":"")),d.updateCellSize(g),d.fireEvent(new mxEventObject("textInserted","cells",[g]))}finally{d.getModel().endUpdate()}d.setSelectionCell(g)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,
-c,e,m,null,t);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,m,null,t))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(c),d.snap(e),1,1,"text;whiteSpace=wrap;"+(f?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==b.charAt(0)&&b.indexOf(">")==
-b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");k.value=b;d.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var p=d.getPreferredSizeForCell(k,this.maxTextWidth);k.geometry.width=p.width;k.geometry.height=p.height}Graph.isLink(k.value)&&d.setLinkForCell(k,k.value);k.geometry.width+=d.gridSize;k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=
+c)e(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,f=c.height;if(0==b&&0==f){var k=d.result,l=k.indexOf(","),m=decodeURIComponent(escape(atob(k.substring(l+1)))),n=mxUtils.parseXml(m).getElementsByTagName("svg");0<n.length&&(b=parseFloat(n[0].getAttribute("width")),f=parseFloat(n[0].getAttribute("height")))}e(d.result,b,f)}catch(C){g(C)}};c.src=d.result};d.onerror=function(b){g(b)}}else g(b)};k.onerror=
+function(b){g(b)};k.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(b,c,e,g,k,n,p,t){n=null!=n?n:!0;p=null!=p?p:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
+" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var f=Editor.extractGraphModelFromPdf(b);if(null!=f&&0<f.length)return this.importXml(f,c,e,n,!0,t)}if("data:image/png;base64,"==
+b.substring(0,22)&&(f=this.extractGraphModelFromPng(b),null!=f&&0<f.length))return this.importXml(f,c,e,n,!0,t);if("data:image/svg+xml;"==b.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(f=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(f,c,e,n,!0,t);if(0<l.length)return l}catch(E){}this.loadImage(b,mxUtils.bind(this,function(f){if("data:"==b.substring(0,
+5))this.resizeImage(f,b,mxUtils.bind(this,function(b,f,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),p,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),k=Math.round(f.width*g);f=Math.round(f.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),
+k,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,b,d.snap(c),d.snap(e),1,1,"text;"+(g?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,
+c,e,n,null,t);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,n,null,t))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(c),d.snap(e),1,1,"text;whiteSpace=wrap;"+(g?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==b.charAt(0)&&b.indexOf(">")==
+b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");k.value=b;d.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var m=d.getPreferredSizeForCell(k,this.maxTextWidth);k.geometry.width=m.width;k.geometry.height=m.height}Graph.isLink(k.value)&&d.setLinkForCell(k,k.value);k.geometry.width+=d.gridSize;k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=
function(b){var d=-1;do b/=1024,d++;while(1024<b);return Math.max(b,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var d=b.indexOf(";");0<d&&(b=b.substring(0,d)+b.substring(b.indexOf(",",d+1)))}return b};EditorUi.prototype.isRemoteFileFormat=function(b,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)};EditorUi.prototype.isLucidChartData=function(b){return null!=b&&('{"state":"{\\"Properties\\":'==
b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.importLocalFile=function(b,c){if(b&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=
!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(b,d){StorageFile.listFiles(this,"F",b,d)});window.openBrowserFile=mxUtils.bind(this,function(b,d,c){StorageFile.getFileContent(this,b,d,c)});window.deleteBrowserFile=mxUtils.bind(this,function(b,d,c){StorageFile.deleteFile(this,b,d,c)});if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!b}window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,
-function(b,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var c=new Blob([b],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),null,d)}else this.editor.graph.setSelectionCells(this.importXml(b,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var g=this.dialog,f=g.close;this.dialog.close=mxUtils.bind(this,
-function(b){Editor.useLocalStorage=e;f.apply(g,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,e){var d=this,g=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(b).then(function(g){if(0==Object.keys(g.files).length)e();else{var f=0,k,l=!1;g.forEach(function(b,d){var g=d.name.toLowerCase();"diagram/diagram.xml"==g?(l=!0,d.async("string").then(function(b){0==b.indexOf("<mxfile ")?
-c(b):e()})):0==g.indexOf("versions/")&&(g=parseInt(g.substr(9)),g>f&&(f=g,k=d))});0<f?k.async("string").then(function(g){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(g,b.name)?d.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):e())}),b.name):e()}):l||e()}},function(b){e(b)}):e()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?g():(this.loadingExtensions=
-!0,mxscript("js/extensions.min.js",g))};EditorUi.prototype.importFile=function(b,c,e,f,k,m,n,t,B,x,E,A){x=null!=x?x:!0;var d=!1,g=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,n)):d=this.importXml(b,e,f,x,null,null!=A?mxEvent.isControlDown(A):null);null!=t&&t(d)});"image"==c.substring(0,5)?(B=!1,"image/png"==c.substring(0,9)&&(c=E?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(g=this.importXml(c,e,f,x,
-null,null!=A?mxEvent.isControlDown(A):null),B=!0)),B||(c=this.editor.graph,E=b.indexOf(";"),0<E&&(b=b.substring(0,E)+b.substring(b.indexOf(",",E+1))),x&&c.isGridEnabled()&&(e=c.snap(e),f=c.snap(f)),g=[c.insertVertex(null,null,"",e,f,k,m,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=B&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?
-(d=!0,this.importVisio(B,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,n)?(d=!0,this.parseFile(null!=B?B:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=t&&t(null))}),n)):0==b.indexOf("PK")&&null!=B?(d=!0,this.importZipFile(B,l,mxUtils.bind(this,function(){g=this.insertTextAt(this.validateFileData(b),e,f,!0,null,x);t(g)}))):/(\.v(sd|dx))($|\?)/i.test(n)||/(\.vs(s|x))($|\?)/i.test(n)||
-(g=this.insertTextAt(this.validateFileData(b),e,f,!0,null,x,null,null!=A?mxEvent.isControlDown(A):null));d||null==t||t(g);return g};EditorUi.prototype.importFiles=function(b,c,e,f,k,m,n,t,B,x,E,A,F){f=null!=f?f:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,g=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var p=E||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>p){l=!0;break}var u=mxUtils.bind(this,
-function(){var l=this.editor.graph,p=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,g,f,k,l,m,p){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,l)),null):this.importFile(b,c,e,g,f,k,l,m,p,d,A,F)}catch(ca){return this.handleError(ca),null}});m=null!=m?m:mxUtils.bind(this,function(b){l.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,u=q,v=[],C=mxUtils.bind(this,function(b,
-d){v[b]=d;if(0==--u){this.spinner.stop();if(null!=t)t(v);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<v.length;e++){var g=v[e]();null!=g&&(c=c.concat(g))}}finally{l.getModel().endUpdate()}}m(c)}}),y=0;y<q;y++)mxUtils.bind(this,function(d){var m=b[d];if(null!=m){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==n||n(m))if("image/"==m.type.substring(0,6))if("image/svg"==m.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+
-1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],M=A?null:u.getAttribute("content");null!=M&&"<"!=M.charAt(0)&&"%"!=M.charAt(0)&&(M=unescape(window.atob?atob(M):Base64.decode(M,!0)));null!=M&&"%"==M.charAt(0)&&(M=decodeURIComponent(M));null==M||"<mxfile "!==M.substring(0,8)&&"<mxGraphModel "!==M.substring(0,14)?C(d,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var g=b[0],n=g.getAttribute("width"),
-u=g.getAttribute("height"),n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN,u=null!=u&&"%"!=u.charAt(u.length-1)?parseFloat(u):NaN,x=g.getAttribute("viewBox");if(null==x||0==x.length)g.setAttribute("viewBox","0 0 "+n+" "+u);else if(isNaN(n)||isNaN(u)){var A=x.split(" ");3<A.length&&(n=parseFloat(A[2]),u=parseFloat(A[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(g));var C=Math.min(1,Math.min(f/Math.max(1,n)),f/Math.max(1,u)),M=k(q,m.type,c+d*p,e+d*p,Math.max(1,Math.round(n*C)),Math.max(1,Math.round(u*
-C)),m.name);if(isNaN(n)||isNaN(u)){var y=new Image;y.onload=mxUtils.bind(this,function(){n=Math.max(1,y.width);u=Math.max(1,y.height);M[0].geometry.width=n;M[0].geometry.height=u;g.setAttribute("viewBox","0 0 "+n+" "+u);q=Editor.createSvgDataUri(mxUtils.getXml(g));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));l.setCellStyles("image",q,[M[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(g))}return M}}}catch(ba){}return null})):C(d,mxUtils.bind(this,function(){return k(M,
-"text/xml",c+d*p,e+d*p,0,0,m.name)}))}else C(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==m.type){var y=A?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var D=new Image;D.src=b.target.result;C(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*p,e+d*p,D.width,D.height,m.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,b.target.result,mxUtils.bind(this,function(b,l,n){C(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=g&&this.isResampleImageSize(m.size,E)?Math.min(1,Math.min(f/l,f/n)):1;return k(b,m.type,c+d*p,e+d*p,Math.round(l*q),Math.round(n*q),m.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),g,f,E,m.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,k(q,m.type,c+d*p,e+d*p,240,160,m.name,function(b){C(d,function(){return b})},m)});/(\.v(dx|sdx?))($|\?)/i.test(m.name)||/(\.vs(x|sx?))($|\?)/i.test(m.name)?k(null,m.type,c+d*p,e+d*p,240,160,m.name,function(b){C(d,function(){return b})},m):"image"==m.type.substring(0,5)||"application/pdf"==m.type?q.readAsDataURL(m):q.readAsText(m)}})(y)});if(l){l=
-[];for(q=0;q<b.length;q++)l.push(b[q]);b=l;this.confirmImageResize(function(b){g=b;u()},B)}else u()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,g=function(e,g){if(e||c)mxSettings.setResizeImages(e?g:null),mxSettings.save();d();b(g)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
-function(b){g(b,!0)},function(b){g(b,!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):g(!1,e)};EditorUi.prototype.parseFile=function(b,c,e){e=null!=e?e:b.name;var d=new FormData;d.append("format","xml");d.append("upfile",b,e);var g=new XMLHttpRequest;g.open("POST",
-OPEN_URL);g.onreadystatechange=function(){c(g)};g.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(m){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,f,k,m,n){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),g=Math.max(1,b.height);if(f&&this.isResampleImageSize(null!=n?n:c.length,m))try{var l=Math.max(d/k,g/k);if(1<l){var p=Math.round(d/l),q=Math.round(g/
-l),t=document.createElement("canvas");t.width=p;t.height=q;t.getContext("2d").drawImage(b,0,0,p,q);var v=t.toDataURL();if(v.length<c.length){var L=document.createElement("canvas");L.width=p;L.height=q;var H=L.toDataURL();v!==H&&(c=v,d=p,g=q)}}}catch(K){}e(c,d,g)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:
-120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(p){if(null!=e)e(p);else throw p;}};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,g){var f=JSON.parse(g);e=
-new TextareaDialog(b,mxResources.get("plantUml")+":",f.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,f.format,function(g,k,l){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==f.format)c.labelChanged(d,"<pre>"+g+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(g),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=k,m.height=l,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",
-JSON.stringify({data:e,format:f.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(d,e,g){var f=JSON.parse(g);e=new TextareaDialog(b,mxResources.get("mermaid")+":",f.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(e,f.config,function(g,k,l){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",
-g,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,k),m.height=Math.max(m.height,l),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,config:f.config},null,2))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;c.cellEditor.startEditing=function(d,g){try{var f=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=
-f)this.editPlantUmlData(d,g,f);else if(f=this.graph.getAttributeForCell(d,"mermaidData"),null!=f)this.editMermaidData(d,g,f);else{var k=c.getCellStyle(d);"1"==mxUtils.getValue(k,"metaEdit","0")?b.showDataDialog(d):e.apply(this,arguments)}}catch(R){b.handleError(R)}};c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(N){b.handleError(N)}return c};var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,
+function(b,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var c=new Blob([b],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),null,d)}else this.editor.graph.setSelectionCells(this.importXml(b,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var f=this.dialog,g=f.close;this.dialog.close=mxUtils.bind(this,
+function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,e){var d=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(b).then(function(f){if(0==Object.keys(f.files).length)e();else{var g=0,k,l=!1;f.forEach(function(b,d){var f=d.name.toLowerCase();"diagram/diagram.xml"==f?(l=!0,d.async("string").then(function(b){0==b.indexOf("<mxfile ")?
+c(b):e()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>g&&(g=f,k=d))});0<g?k.async("string").then(function(f){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(f,b.name)?d.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):e())}),b.name):e()}):l||e()}},function(b){e(b)}):e()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=
+!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(b,c,e,g,k,n,p,t,y,x,H,D){x=null!=x?x:!0;var d=!1,f=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,p)):d=this.importXml(b,e,g,x,null,null!=D?mxEvent.isControlDown(D):null);null!=t&&t(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=H?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,
+null,null!=D?mxEvent.isControlDown(D):null),y=!0)),y||(c=this.editor.graph,H=b.indexOf(";"),0<H&&(b=b.substring(0,H)+b.substring(b.indexOf(",",H+1))),x&&c.isGridEnabled()&&(e=c.snap(e),g=c.snap(g)),f=[c.insertVertex(null,null,"",e,g,k,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=y&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?
+(d=!0,this.importVisio(y,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,p)?(d=!0,this.parseFile(null!=y?y:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=t&&t(null))}),p)):0==b.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,l,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x);t(f)}))):/(\.v(sd|dx))($|\?)/i.test(p)||/(\.vs(s|x))($|\?)/i.test(p)||
+(f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x,null,null!=D?mxEvent.isControlDown(D):null));d||null==t||t(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,p,t,y,x,H,D,E){g=null!=g?g:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,f=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var m=H||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>m){l=!0;break}var u=mxUtils.bind(this,
+function(){var l=this.editor.graph,m=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,f,g,k,l,m,n){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,l)),null):this.importFile(b,c,e,f,g,k,l,m,n,d,D,E)}catch(ca){return this.handleError(ca),null}});n=null!=n?n:mxUtils.bind(this,function(b){l.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,u=q,v=[],C=mxUtils.bind(this,function(b,
+d){v[b]=d;if(0==--u){this.spinner.stop();if(null!=t)t(v);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<v.length;e++){var f=v[e]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}n(c)}}),y=0;y<q;y++)mxUtils.bind(this,function(d){var n=b[d];if(null!=n){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==p||p(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+
+1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],N=D?null:u.getAttribute("content");null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(N,!0)));null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N));null==N||"<mxfile "!==N.substring(0,8)&&"<mxGraphModel "!==N.substring(0,14)?C(d,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var f=b[0],p=f.getAttribute("width"),
+x=f.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,u=f.getAttribute("viewBox");if(null==u||0==u.length)f.setAttribute("viewBox","0 0 "+p+" "+x);else if(isNaN(p)||isNaN(x)){var C=u.split(" ");3<C.length&&(p=parseFloat(C[2]),x=parseFloat(C[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(f));var N=Math.min(1,Math.min(g/Math.max(1,p)),g/Math.max(1,x)),D=k(q,n.type,c+d*m,e+d*m,Math.max(1,Math.round(p*N)),Math.max(1,Math.round(x*
+N)),n.name);if(isNaN(p)||isNaN(x)){var y=new Image;y.onload=mxUtils.bind(this,function(){p=Math.max(1,y.width);x=Math.max(1,y.height);D[0].geometry.width=p;D[0].geometry.height=x;f.setAttribute("viewBox","0 0 "+p+" "+x);q=Editor.createSvgDataUri(mxUtils.getXml(f));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));l.setCellStyles("image",q,[D[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return D}}}catch(ba){}return null})):C(d,mxUtils.bind(this,function(){return k(N,
+"text/xml",c+d*m,e+d*m,0,0,n.name)}))}else C(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==n.type){var y=D?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var B=new Image;B.src=b.target.result;C(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*m,e+d*m,B.width,B.height,n.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,b.target.result,mxUtils.bind(this,function(b,l,p){C(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(n.size,H)?Math.min(1,Math.min(g/l,g/p)):1;return k(b,n.type,c+d*m,e+d*m,Math.round(l*q),Math.round(p*q),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),f,g,H,n.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,k(q,n.type,c+d*m,e+d*m,240,160,n.name,function(b){C(d,function(){return b})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?k(null,n.type,c+d*m,e+d*m,240,160,n.name,function(b){C(d,function(){return b})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?q.readAsDataURL(n):q.readAsText(n)}})(y)});if(l){l=
+[];for(q=0;q<b.length;q++)l.push(b[q]);b=l;this.confirmImageResize(function(b){f=b;u()},y)}else u()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(e,f){if(e||c)mxSettings.setResizeImages(e?f:null),mxSettings.save();d();b(f)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
+function(b){f(b,!0)},function(b){f(b,!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,e)};EditorUi.prototype.parseFile=function(b,c,e){e=null!=e?e:b.name;var d=new FormData;d.append("format","xml");d.append("upfile",b,e);var f=new XMLHttpRequest;f.open("POST",
+OPEN_URL);f.onreadystatechange=function(){c(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(n){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,g,k,n,p){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),f=Math.max(1,b.height);if(g&&this.isResampleImageSize(null!=p?p:c.length,n))try{var l=Math.max(d/k,f/k);if(1<l){var m=Math.round(d/l),q=Math.round(f/
+l),t=document.createElement("canvas");t.width=m;t.height=q;t.getContext("2d").drawImage(b,0,0,m,q);var v=t.toDataURL();if(v.length<c.length){var L=document.createElement("canvas");L.width=m;L.height=q;var G=L.toDataURL();v!==G&&(c=v,d=m,f=q)}}}catch(K){}e(c,d,f)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:
+120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(q){if(null!=e)e(q);else throw q;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,f){var g=JSON.parse(f);e=
+new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,g.format,function(f,k,l){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(d,"<pre>"+f+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(f),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=k,m.height=l,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",
+JSON.stringify({data:e,format:g.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(e,g.config,function(f,k,l){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",
+f,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,k),m.height=Math.max(m.height,l),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;c.cellEditor.startEditing=function(d,f){try{var g=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=
+g)this.editPlantUmlData(d,f,g);else if(g=this.graph.getAttributeForCell(d,"mermaidData"),null!=g)this.editMermaidData(d,f,g);else{var k=c.getCellStyle(d);"1"==mxUtils.getValue(k,"metaEdit","0")?b.showDataDialog(d):e.apply(this,arguments)}}catch(S){b.handleError(S)}};c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(M){b.handleError(M)}return c};var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,
arguments);null!=d&&null!=d.src&&Graph.isPageLink(d.src)&&(d={originalSrc:d.src});return d};var p=c.setBackgroundImage;c.setBackgroundImage=function(d){null!=d&&null!=d.originalSrc&&(d=b.createImageForPageLink(d.originalSrc,b.currentPage));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,
-function(b,d){var e=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=e){var g=e.indexOf(",");if(0<g)for(var e=e.substring(g+1),g=d.getProperty("patches"),f=0;f<g.length;f++)if(null!=g[f][EditorUi.DIFF_UPDATE]&&null!=g[f][EditorUi.DIFF_UPDATE][e]){c.refreshBackgroundImage();c.view.validateBackgroundImage();break}}}));var m=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,d){var c=m.apply(this,arguments);null==c||null==c.originalSrc||d||(c={src:c.originalSrc});return c};
-var n=this.clearDefaultStyle;this.clearDefaultStyle=function(){n.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var t=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==
-urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return t.apply(this,arguments)};var B=c.addClickHandler;c.addClickHandler=function(b,d,e){var g=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=g&&g(b,d)};B.call(this,b,d,e)};f.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,
-null,!0);if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(d,c,e){b.editor.graph.isSelectionEmpty()?x.apply(this,arguments):b.menus.addMenuItems(d,"delete - cut copy copyAsImage - duplicate".split(" "),null,e)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var E=c.getExportVariables;c.getExportVariables=
-function(){var d=E.apply(this,arguments),c=b.getCurrentFile();null!=c&&(d.filename=c.getTitle());d.pagecount=null!=b.pages?b.pages.length:1;d.page=null!=b.currentPage?b.currentPage.getName():"";d.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return d};var A=c.getGlobalVariable;c.getGlobalVariable=function(d){var c=b.getCurrentFile();return"filename"==d&&null!=c?c.getTitle():"page"==d&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==d?null!=b.currentPage&&
-null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==d?null!=b.pages?b.pages.length:1:A.apply(this,arguments)};var F=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var g=d.getAttribute("href");if(null==g||!c.isCustomLink(g)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))F.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(g),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var d=b.defaultFilename,
-c=b.getCurrentFile();null!=c&&(d=null!=c.getTitle()?c.getTitle():d);return d};var I=this.actions.get("print");I.setEnabled(!mxClient.IS_IOS||!navigator.standalone);I.visible=I.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),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,
+function(b,d){var e=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=e){var f=e.indexOf(",");if(0<f)for(var e=e.substring(f+1),f=d.getProperty("patches"),g=0;g<f.length;g++)if(null!=f[g][EditorUi.DIFF_UPDATE]&&null!=f[g][EditorUi.DIFF_UPDATE][e]){c.refreshBackgroundImage();c.view.validateBackgroundImage();break}}}));var n=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,d){var c=n.apply(this,arguments);null==c||null==c.originalSrc||d||(c={src:c.originalSrc});return c};
+var t=this.clearDefaultStyle;this.clearDefaultStyle=function(){t.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var u=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==
+urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return u.apply(this,arguments)};var y=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=f&&f(b,d)};y.call(this,b,d,e)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,
+null,!0);if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(d,c,e){b.editor.graph.isSelectionEmpty()?x.apply(this,arguments):b.menus.addMenuItems(d,"delete - cut copy copyAsImage - duplicate".split(" "),null,e)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var H=c.getExportVariables;c.getExportVariables=
+function(){var d=H.apply(this,arguments),c=b.getCurrentFile();null!=c&&(d.filename=c.getTitle());d.pagecount=null!=b.pages?b.pages.length:1;d.page=null!=b.currentPage?b.currentPage.getName():"";d.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return d};var D=c.getGlobalVariable;c.getGlobalVariable=function(d){var c=b.getCurrentFile();return"filename"==d&&null!=c?c.getTitle():"page"==d&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==d?null!=b.currentPage&&
+null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==d?null!=b.pages?b.pages.length:1:D.apply(this,arguments)};var E=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isCustomLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))E.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var d=b.defaultFilename,
+c=b.getCurrentFile();null!=c&&(d=null!=c.getTitle()?c.getTitle():d);return d};var J=this.actions.get("print");J.setEnabled(!mxClient.IS_IOS||!navigator.standalone);J.visible=J.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),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),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&c.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(b){var d=c.cellEditor.text2,e=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(d,
-"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(d));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,g,f,k){c.insertImage(b,f,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},
-mxEvent.isControlDown(b));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)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var e=Math.max(1,b.width);b=Math.max(1,b.height);var g=this.maxImageSize,g=Math.min(1,Math.min(g/Math.max(1,e)),g/Math.max(1,b));c.insertImage(decodeURIComponent(d),e*g,b*g)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=
-mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(I=this.editor.graph.view,I.setUnit(mxSettings.getUnit()),I.addListener("unitChanged",function(b,d){mxSettings.setUnit(d.getProperty("unit"));mxSettings.save()}),
-this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,I.unit),this.refresh());if("1"==urlParams.styledev){I=document.getElementById("geFooter");null!=I&&(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)})),I.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,d){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 L=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:L.apply(this,arguments)}}I=document.getElementById("geInfo");null!=I&&I.parentNode.removeChild(I);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var H=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=H&&(H.parentNode.removeChild(H),
-H=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==H&&(!mxClient.IS_IE||10<document.documentMode)&&(H=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=H&&(H.parentNode.removeChild(H),H=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),
-e=c.view.translate,g=c.view.scale,f=d.x/g-e.x,k=d.y/g-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(k=f=null),this.importFiles(b.dataTransfer.files,f,k,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(k=f=0);var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,
-null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,f,k,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var p=null,e=d.getElementsByTagName("img");null!=e&&1==e.length?(m=e[0].getAttribute("src"),null==m&&(m=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(p=!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):
-(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var n=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,f,k,!0,p,null,n,mxEvent.isControlDown(b)))});p&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){n=b;q()},mxEvent.isControlDown(b)):q()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);
-var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",f,k,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(l,f,k,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,k,!0))}}b.stopPropagation();
-b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=d.clipboardData||d.originalEvent.clipboardData,e=!1,g=0;g<c.types.length;g++)if("text/"===c.types[g].substring(0,5)){e=!0;break}if(!e){var f=c.items;for(index in f){var k=
-f[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,g,f,k){b.insertImage(d,f,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var n=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],n.x,n.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(B){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){e.innerHTML=
+"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(d));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,f,g,k){c.insertImage(b,g,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},
+mxEvent.isControlDown(b));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)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var e=Math.max(1,b.width);b=Math.max(1,b.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,e)),f/Math.max(1,b));c.insertImage(decodeURIComponent(d),e*f,b*f)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=
+mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(J=this.editor.graph.view,J.setUnit(mxSettings.getUnit()),J.addListener("unitChanged",function(b,d){mxSettings.setUnit(d.getProperty("unit"));mxSettings.save()}),
+this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,J.unit),this.refresh());if("1"==urlParams.styledev){J=document.getElementById("geFooter");null!=J&&(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)})),J.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,d){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 L=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:L.apply(this,arguments)}}J=document.getElementById("geInfo");null!=J&&J.parentNode.removeChild(J);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var G=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=G&&(G.parentNode.removeChild(G),
+G=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=G&&(G.parentNode.removeChild(G),G=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),
+e=c.view.translate,f=c.view.scale,g=d.x/f-e.x,k=d.y/f-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(k=g=null),this.importFiles(b.dataTransfer.files,g,k,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(k=g=0);var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,
+null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,k,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var n=null,e=d.getElementsByTagName("img");null!=e&&1==e.length?(m=e[0].getAttribute("src"),null==m&&(m=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(n=!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):
+(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var p=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,k,!0,n,null,p,mxEvent.isControlDown(b)))});n&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){p=b;q()},mxEvent.isControlDown(b)):q()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);
+var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,k,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(l,g,k,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),g,k,!0))}}b.stopPropagation();
+b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=d.clipboardData||d.originalEvent.clipboardData,e=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){e=!0;break}if(!e){var g=c.items;for(index in g){var k=
+g[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,f,g,k){b.insertImage(d,g,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var p=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],p.x,p.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){e.innerHTML=
"&nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,e=document.createElement("div");e.setAttribute("autocomplete","off");e.setAttribute("autocorrect","off");e.setAttribute("autocapitalize","off");e.setAttribute("spellcheck","false");e.style.textRendering="optimizeSpeed";e.style.fontFamily="monospace";e.style.wordBreak="break-all";e.style.background="transparent";e.style.color="transparent";e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow=
-"hidden";e.style.display="block";e.style.fontSize="1";e.style.zIndex="-1";e.style.resize="none";e.style.outline="none";e.style.width="1px";e.style.height="1px";mxUtils.setOpacity(e,0);e.contentEditable=!0;e.innerHTML="&nbsp;";var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||
-c.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||f||(e.style.left=c.container.scrollLeft+10+"px",e.style.top=c.container.scrollTop+10+"px",c.container.appendChild(e),f=!0,e.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var d=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!f||224!=d&&17!=
-d&&91!=d&&93!=d||(f=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),e.parentNode.removeChild(e),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e),b()}catch(v){this.handleError(v)}}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e,!0),b()}catch(v){this.handleError(v)}}));mxEvent.addListener(e,
+"hidden";e.style.display="block";e.style.fontSize="1";e.style.zIndex="-1";e.style.resize="none";e.style.outline="none";e.style.width="1px";e.style.height="1px";mxUtils.setOpacity(e,0);e.contentEditable=!0;e.innerHTML="&nbsp;";var g=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||
+c.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||g||(e.style.left=c.container.scrollLeft+10+"px",e.style.top=c.container.scrollTop+10+"px",c.container.appendChild(e),g=!0,e.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var d=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!g||224!=d&&17!=
+d&&91!=d&&93!=d||(g=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),e.parentNode.removeChild(e),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e),b()}catch(v){this.handleError(v)}}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e,!0),b()}catch(v){this.handleError(v)}}));mxEvent.addListener(e,
"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(e.innerHTML="&nbsp;",e.focus(),null!=b.clipboardData&&this.pasteCells(b,e,!0,!0),mxEvent.isConsumed(b)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,e,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==e?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(b){var d=Graph.prototype.getLinkTitle.apply(this,arguments);
if(Graph.isPageLink(b)){var c=b.indexOf(",");0<c&&(d=this.getPageById(b.substring(c+1)),d=null!=d?d.getName():mxResources.get("pageNotFound"))}else"data:"==b.substring(0,5)&&(d=mxResources.get("action"));return d};EditorUi.prototype.handleCustomLink=function(b){if(Graph.isPageLink(b)){var d=b.indexOf(",");if(b=this.getPageById(b.substring(d+1)))this.selectPage(b);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(b)};EditorUi.prototype.isSettingsEnabled=
function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(b){b.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged",
@@ -3597,256 +3599,256 @@ function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClie
mxUtils.bind(this,function(b,c){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(b,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.addListener("gridColorChanged",
mxUtils.bind(this,function(b,c){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(b,c){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(b,c,e){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var e=this.createImageDataUri(b,c,"png"),g=parseInt(d.getAttribute("width")),f=parseInt(d.getAttribute("height"));this.writeImageToClipboard(e,g,f,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(B){this.handleError(B)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=e?e:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!0,null,0<b.length?b:null)}catch(q){this.handleError(q)}};EditorUi.prototype.writeImageToClipboard=function(b,c,e,f){var d=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](f)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=
-mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),g=mxUtils.getXml(d.encodeCells(e));mxUtils.setTextContent(b,encodeURIComponent(g));c?(d.removeCells(e,!1),d.lastPasteXml=null):(d.lastPasteXml=g,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),
-c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,e,f){var d=this.editor.graph,g=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var k=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))g=this.importXml(b,k,k),d.setSelectionCells(g);else if(c&&1==d.getSelectionCount()){k=d.getStartEditingCell(d.getSelectionCell(),f);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,
-b,[k]);else{d.model.beginUpdate();try{d.labelChanged(k,b),Graph.isLink(b)&&d.setLinkForCell(k,b)}finally{d.model.endUpdate()}}d.setSelectionCell(k)}else g=d.getInsertPoint(),d.isMouseInsertPoint()&&(k=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),g=this.insertTextAt(b,g.x+k,g.y+k,!0),d.setSelectionCells(g);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return g};EditorUi.prototype.pasteCells=
-function(b,c,e,f){if(!mxEvent.isConsumed(b)){var d=c,g=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var k=b.clipboardData.getData("text/plain"),l=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var n=decodeURIComponent(k);this.isCompatibleString(n)&&(l=!0,k=n)}l=l?null:b.clipboardData.getData("text/html");null!=l&&0<l.length?(d=this.parseHtmlData(l),g="text/plain"!=d.getAttribute("data-type")):null!=k&&0<k.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,
+this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var e=this.createImageDataUri(b,c,"png"),f=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));this.writeImageToClipboard(e,f,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=e?e:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+null,null,null,10,null,null,!0,null,0<b.length?b:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(b,c,e,g){var d=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](g)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=
+mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),f=mxUtils.getXml(d.encodeCells(e));mxUtils.setTextContent(b,encodeURIComponent(f));c?(d.removeCells(e,!1),d.lastPasteXml=null):(d.lastPasteXml=f,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),
+c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,e,g){var d=this.editor.graph,f=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var k=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))f=this.importXml(b,k,k),d.setSelectionCells(f);else if(c&&1==d.getSelectionCount()){k=d.getStartEditingCell(d.getSelectionCell(),g);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,
+b,[k]);else{d.model.beginUpdate();try{d.labelChanged(k,b),Graph.isLink(b)&&d.setLinkForCell(k,b)}finally{d.model.endUpdate()}}d.setSelectionCell(k)}else f=d.getInsertPoint(),d.isMouseInsertPoint()&&(k=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),f=this.insertTextAt(b,f.x+k,f.y+k,!0),d.setSelectionCells(f);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return f};EditorUi.prototype.pasteCells=
+function(b,c,e,g){if(!mxEvent.isConsumed(b)){var d=c,f=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var k=b.clipboardData.getData("text/plain"),l=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(l=!0,k=m)}l=l?null:b.clipboardData.getData("text/html");null!=l&&0<l.length?(d=this.parseHtmlData(l),f="text/plain"!=d.getAttribute("data-type")):null!=k&&0<k.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,
l))}k=d.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))e=k[0].getAttribute("data-lucid-content"),null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(b){var d=this.editor.graph;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var c=d.pasteCounter*d.gridSize;d.setSelectionCells(this.importXml(b,c,c));d.scrollCellToVisible(d.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),
-mxEvent.consume(b));else{g=g?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);l=!1;try{var q=g.lastIndexOf("%3E");0<=q&&q<g.length-3&&(g=g.substring(0,q+3))}catch(A){}try{k=d.getElementsByTagName("span"),n=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(g),this.isCompatibleString(n)&&(l=!0,g=n)}catch(A){}try{if(null!=g&&0<g.length){this.pasteXml(g,f,l,b);try{mxEvent.consume(b)}catch(A){}}else if(!e){var t=this.editor.graph;
-t.lastPasteXml=null;t.pasteCounter=0}}catch(A){this.handleError(A)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var d=null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10<document.documentMode&&
+mxEvent.consume(b));else{f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);l=!1;try{var p=f.lastIndexOf("%3E");0<=p&&p<f.length-3&&(f=f.substring(0,p+3))}catch(D){}try{k=d.getElementsByTagName("span"),m=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(f),this.isCompatibleString(m)&&(l=!0,f=m)}catch(D){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,l,b);try{mxEvent.consume(b)}catch(D){}}else if(!e){var t=this.editor.graph;
+t.lastPasteXml=null;t.pasteCounter=0}}catch(D){this.handleError(D)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var d=null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10<document.documentMode&&
12>document.documentMode)&&(d=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[c],"drop",mxUtils.bind(this,function(b){null!=d&&(d.parentNode.removeChild(d),d=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);
else{var c=this.extractGraphModelFromEvent(b);if(null==c){var e=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?e.getData("text/html"):null,null!=c&&0<c.length?(e=document.createElement("div"),e.innerHTML=this.editor.graph.sanitizeHtml(c),e=e.getElementsByTagName("img"),0<e.length&&
(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(c)&&
-(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var d=0,c=0,e,f;if(null==b){f=document.body;var k=document.documentElement;e=(f.clientWidth||k.clientWidth)-3;f=Math.max(f.clientHeight||0,k.clientHeight)-
-3}else d=b.offsetTop,c=b.offsetLeft,e=b.clientWidth,f=b.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=d+"px";k.style.left=c+"px";k.style.width=Math.max(0,e-3)+"px";k.style.height=Math.max(0,f-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=
-function(b){b=mxUtils.parseXml(b);var d=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=d){var c=new mxCodec(d.ownerDocument),e=new mxGraphModel;c.decode(d,e);d=e.getChildAt(e.getRoot(),0);for(c=0;c<e.getChildCount(d);c++)b.push(e.getChildAt(d,c))}return b};EditorUi.prototype.openFileHandle=function(b,c,e,f,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var d=
-mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,f)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(e,mxUtils.bind(this,
+(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var d=0,c=0,e,g;if(null==b){g=document.body;var k=document.documentElement;e=(g.clientWidth||k.clientWidth)-3;g=Math.max(g.clientHeight||0,k.clientHeight)-
+3}else d=b.offsetTop,c=b.offsetLeft,e=b.clientWidth,g=b.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=d+"px";k.style.left=c+"px";k.style.width=Math.max(0,e-3)+"px";k.style.height=Math.max(0,g-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=
+function(b){b=mxUtils.parseXml(b);var d=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=d){var c=new mxCodec(d.ownerDocument),e=new mxGraphModel;c.decode(d,e);d=e.getChildAt(e.getRoot(),0);for(c=0;c<e.getChildCount(d);c++)b.push(e.getChildAt(d,c))}return b};EditorUi.prototype.openFileHandle=function(b,c,e,g,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var d=
+mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,g)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(e,mxUtils.bind(this,
function(b){this.spinner.stop();d(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(e,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?d(b.responseText):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
-else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,f)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(u){this.handleError(u,
-mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,f)}));else{if("image/png"==e.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==e.type){var g=Editor.extractGraphModelFromPdf(b);null!=g&&(k=null,f=!0,b=g)}this.spinner.stop();this.openLocalFile(b,c,f,k,null!=k?e:null)}}};EditorUi.prototype.openFiles=function(b,
+else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,g)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(u){this.handleError(u,
+mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,g)}));else{if("image/png"==e.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==e.type){var f=Editor.extractGraphModelFromPdf(b);null!=f&&(k=null,g=!0,b=f)}this.spinner.stop();this.openLocalFile(b,c,g,k,null!=k?e:null)}}};EditorUi.prototype.openFiles=function(b,
c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(v){this.handleError(v)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};
-EditorUi.prototype.openLocalFile=function(b,c,e,f,k){var d=this.getCurrentFile(),g=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(b);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,e,f,k))});if(null!=b&&0<b.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=f)?g():(mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||null!=f)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()})));else throw Error(mxResources.get("notADiagramFile"));
-};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],e;for(e in b)c.push(e);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var e=this.editor.graph,g=e.getCellStyle(b);
-d(mxStencilRegistry.getBasenameForStencil(g[mxConstants.STYLE_SHAPE]));e.model.isEdge(b)&&(d(mxMarker.getPackageForType(g[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(g[mxConstants.STYLE_ENDARROW])));for(var g=e.model.getChildCount(b),f=0;f<g;f++)this.addBasenamesForCell(e.model.getChildAt(b,f),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=
+EditorUi.prototype.openLocalFile=function(b,c,e,g,k){var d=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(b);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,e,g,k))});if(null!=b&&0<b.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)?f():(mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp||null!=g)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));
+};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],e;for(e in b)c.push(e);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var e=this.editor.graph,f=e.getCellStyle(b);
+d(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));e.model.isEdge(b)&&(d(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=e.model.getChildCount(b),g=0;g<f;g++)this.addBasenamesForCell(e.model.getChildAt(b,g),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=
b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=b?"":"none";this.editor.graph.setEnabled(b);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=b?"":"hidden",this.ruler.vRuler.container.style.visibility=b?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden");b||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),
-null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(b,c,e,f){this.spinner.stop();
-this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,b,{}));this.mode=App.MODE_EMBED;this.setFileData(b);if(f)try{var d=this.editor.graph;d.setGridEnabled(!1);d.pageVisible=!1;var g=d.model.cells,k;for(k in g){var l=g[k];null!=l&&null!=l.style&&(l.style+=";sketch=1;"+(-1==l.style.indexOf("fontFamily=")||-1<l.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(B){console.log(B)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=e?e:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
+null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(b,c,e,g){this.spinner.stop();
+this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,b,{}));this.mode=App.MODE_EMBED;this.setFileData(b);if(g)try{var d=this.editor.graph;d.setGridEnabled(!1);d.pageVisible=!1;var f=d.model.cells,k;for(k in f){var l=f[k];null!=l&&null!=l.style&&(l.style+=";sketch=1;"+(-1==l.style.indexOf("fontFamily=")||-1<l.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=e?e:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var d=this.editor.graph;return{event:b,pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(b){var d=null,c=!1,
-e=!1,f=null,k=mxUtils.bind(this,function(b,d){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){if(g.source==(window.opener||window.parent)){var k=g.data,l=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==
-b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(ra){}return b});if("json"==urlParams.proto){var m=!1;try{k=JSON.parse(k)}catch(Q){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?
-mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var p=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):k.ok,function(b){null!=b?n.postMessage(JSON.stringify({event:"prompt",value:b,message:k}),"*"):n.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),
-"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(p.container,300,80,!0,!1);p.init();return}if("draft"==k.action){var q=l(k.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),
-"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{p.init()}catch(Q){n.postMessage(JSON.stringify({event:"draft",error:Q.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();
-var t=1==k.enableRecent,u=1==k.enableSearch,v=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var C=this.getCurrentUser(),B=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=C?C.id:
-null,t?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,u?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(B.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=
-new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,f){d=d||this.emptyDiagramXml;null!=k.callback?n.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:f,builtIn:!0,message:k}),"*"):(b(d,g,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,
-"Network Error!")})}):null,u?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){n.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(p.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();
-b&&this.actions.get("exit").funct()}));p.init();return}if("textContent"==k.action){var S=this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:S,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var R=null!=k.messageKey?mxResources.get(k.messageKey):
-k.message;null==k.show||k.show?this.spinner.spin(document.body,R):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var M=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var P=this.editor.graph,G=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var d=this.createLoadMessage("export");d.format=
-k.format;d.message=k;d.data=b;d.xml=M;n.postMessage(JSON.stringify(d),"*")}),D=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(M)));P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);G(b)}),y=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(M),c=!1);if(null!=
-this.pages&&this.currentPage.getId()!=y){for(var W=P.getGlobalVariable,P=this.createTemporaryGraph(P.getStylesheet()),J,O=0;O<this.pages.length;O++)if(this.pages[O].getId()==y){J=this.updatePageRoot(this.pages[O]);break}null==J&&(J=this.currentPage);P.getGlobalVariable=function(b){return"page"==b?J.getName():"pagenumber"==b?1:W.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(J.root)}if(null!=k.layerIds){for(var aa=P.model,ma=aa.getChildCells(aa.getRoot()),p={},O=0;O<
-k.layerIds.length;O++)p[k.layerIds[O]]=!0;for(O=0;O<ma.length;O++)aa.setVisible(ma[O],p[ma[O].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){D(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){D(null)}),null,null,k.scale,k.transparent,k.shadow,null,P,k.border,null,k.grid,k.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=y?"&pageId="+y:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):
-"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(M))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?G("data:image/png;base64,"+b.getText()):D(null)}),mxUtils.bind(this,function(){D(null)}))}}else{null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(k.xml),c=!1);R=this.createLoadMessage("export");R.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();R.xml=
-mxUtils.getXml(ga);R.data=this.getFileData(null,null,!0,null,null,null,ga);R.format=k.format}else if("html"==k.format)M=this.editor.getGraphXml(),R.data=this.getHtml(M,this.editor.graph),R.xml=mxUtils.getXml(M),R.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ha=null!=k.background?k.background:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);R.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);R.format="svg";var na=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);
-this.spinner.stop();R.data=Editor.createSvgDataUri(b);n.postMessage(JSON.stringify(R),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(R.xml,this.editor.graph,null,!0,na,null,null,k.embedImages,ha,k.scale,k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);
-var X=this.editor.graph.getSvg(ha,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme);(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(X);this.embedFonts(X,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){na(mxUtils.getXml(b))})):na(mxUtils.getXml(b))}))}return}n.postMessage(JSON.stringify(R),"*")}return}if("load"==k.action){m=k.toSketch;e=1==
+e=!1,g=null,k=mxUtils.bind(this,function(b,d){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,l=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==
+b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(ta){}return b});if("json"==urlParams.proto){var m=!1;try{k=JSON.parse(k)}catch(Q){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?
+mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var n=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):k.ok,function(b){null!=b?p.postMessage(JSON.stringify({event:"prompt",value:b,message:k}),"*"):p.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),
+"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(n.container,300,80,!0,!1);n.init();return}if("draft"==k.action){var q=l(k.xml);this.spinner.stop();n=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),
+"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(n.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{n.init()}catch(Q){p.postMessage(JSON.stringify({event:"draft",error:Q.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();
+var t=1==k.enableRecent,u=1==k.enableSearch,v=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var C=this.getCurrentUser(),y=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;p.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=C?C.id:
+null,t?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,u?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}n=
+new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,g){d=d||this.emptyDiagramXml;null!=k.callback?p.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:g,builtIn:!0,message:k}),"*"):(b(d,f,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,
+"Network Error!")})}):null,u?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){p.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(n.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();
+b&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==k.action){var P=this.getDiagramTextContent();p.postMessage(JSON.stringify({event:"textContent",data:P,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var S=null!=k.messageKey?mxResources.get(k.messageKey):
+k.message;null==k.show||k.show?this.spinner.spin(document.body,S):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var N=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var R=this.editor.graph,F=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var d=this.createLoadMessage("export");d.format=
+k.format;d.message=k;d.data=b;d.xml=N;p.postMessage(JSON.stringify(d),"*")}),B=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(N)));R!=this.editor.graph&&R.container.parentNode.removeChild(R.container);F(b)}),A=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(N),c=!1);if(null!=
+this.pages&&this.currentPage.getId()!=A){for(var W=R.getGlobalVariable,R=this.createTemporaryGraph(R.getStylesheet()),I,O=0;O<this.pages.length;O++)if(this.pages[O].getId()==A){I=this.updatePageRoot(this.pages[O]);break}null==I&&(I=this.currentPage);R.getGlobalVariable=function(b){return"page"==b?I.getName():"pagenumber"==b?1:W.apply(this,arguments)};document.body.appendChild(R.container);R.model.setRoot(I.root)}if(null!=k.layerIds){for(var aa=R.model,na=aa.getChildCells(aa.getRoot()),n={},O=0;O<
+k.layerIds.length;O++)n[k.layerIds[O]]=!0;for(O=0;O<na.length;O++)aa.setVisible(na[O],n[na[O].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){B(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){B(null)}),null,null,k.scale,k.transparent,k.shadow,null,R,k.border,null,k.grid,k.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=A?"&pageId="+A:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):
+"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?F("data:image/png;base64,"+b.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(k.xml),c=!1);S=this.createLoadMessage("export");S.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();S.xml=
+mxUtils.getXml(ga);S.data=this.getFileData(null,null,!0,null,null,null,ga);S.format=k.format}else if("html"==k.format)N=this.editor.getGraphXml(),S.data=this.getHtml(N,this.editor.graph),S.xml=mxUtils.getXml(N),S.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ha=null!=k.background?k.background:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);S.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);S.format="svg";var oa=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);
+this.spinner.stop();S.data=Editor.createSvgDataUri(b);p.postMessage(JSON.stringify(S),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(S.xml,this.editor.graph,null,!0,oa,null,null,k.embedImages,ha,k.scale,k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);
+var X=this.editor.graph.getSvg(ha,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme);(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(X);this.embedFonts(X,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){oa(mxUtils.getXml(b))})):oa(mxUtils.getXml(b))}))}return}p.postMessage(JSON.stringify(S),"*")}return}if("load"==k.action){m=k.toSketch;e=1==
k.autosave;this.hideDialog();null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified);null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit);null!=k.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=k.noSaveBtn);null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=k.noExitBtn);null!=k.title&&null!=this.buttonContainer&&(q=document.createElement("span"),mxUtils.write(q,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
"12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(q),this.embedFilenameSpan=q);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(Q){}k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):
-null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var ca=this.getCurrentFile();null!=ca&&(q=l(k.xml),null!=q&&""!=q&&ca.mergeFile(new LocalFile(this,q),function(){n.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){n.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(n):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,g.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):
-n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(Q){this.handleError(Q)}}var oa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),V=mxUtils.bind(this,function(g,k){c=!0;try{b(g,k,null,m)}catch(fa){this.handleError(fa)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");f=oa();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=oa();if(e!=
-f&&!c){var g=this.createLoadMessage("autosave");g.xml=e;(window.opener||window.parent).postMessage(JSON.stringify(g),"*")}f=e}),this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",d),this.addListener("backgroundImageChanged",d),this.addListener("foldingEnabledChanged",d),
-this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=g;n.postMessage(JSON.stringify(l),"*")}});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+
-1)),function(b){V(b,g)},mxUtils.bind(this,function(b){this.handleError(b)}),l)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&V(b.responseText,g)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,
-mxUtils.bind(this,function(b){V(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=l(k),V(k,g)):this.loadDescriptor(k,mxUtils.bind(this,function(b){V(oa(),g)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var n=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";n.postMessage(k,"*");if("json"==urlParams.proto){var t=
-this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,arguments);n.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";
-var e=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var f="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,f);c.setAttribute("title",f);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
+null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var ca=this.getCurrentFile();null!=ca&&(q=l(k.xml),null!=q&&""!=q&&ca.mergeFile(new LocalFile(this,q),function(){p.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){p.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(p):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):
+p.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(Q){this.handleError(Q)}}var pa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),V=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,m)}catch(fa){this.handleError(fa)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");g=pa();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=pa();if(e!=
+g&&!c){var f=this.createLoadMessage("autosave");f.xml=e;(window.opener||window.parent).postMessage(JSON.stringify(f),"*")}g=e}),this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",d),this.addListener("backgroundImageChanged",d),this.addListener("foldingEnabledChanged",d),
+this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;p.postMessage(JSON.stringify(l),"*")}});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+
+1)),function(b){V(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),l)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&V(b.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,
+mxUtils.bind(this,function(b){V(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=l(k),V(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){V(pa(),f)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var p=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";p.postMessage(k,"*");if("json"==urlParams.proto){var t=
+this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,arguments);p.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";
+var e=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,g);c.setAttribute("title",g);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),e=c);"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),e="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
mxUtils.write(c,e),c.setAttribute("title",e),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),e=c);e.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.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(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,e=d.getSelectionCells(),g=0;g<b.length;g++){var f=new window[b[g].layout](d);
-if(null!=b[g].config)for(var k in b[g].config)f[k]=b[g].config[k];this.executeLayout(function(){f.execute(d.getDefaultParent(),0==e.length?null:e)},g==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],g=[],f={};if(0<d.length){var k={},n=null,t=null,x=null,E=null,A=null,F=null,I=null,L=null,H=null,K="",C="auto",N="auto",S=null,R=null,M=40,P=40,G=100,D=0,y=this.editor.graph;y.getGraphBounds();for(var W=function(){null!=c?c(qa):(y.setSelectionCells(qa),y.scrollCellToVisible(y.getSelectionCell()))},
-J=y.getFreeInsertPoint(),O=J.x,aa=J.y,J=aa,ma=null,ga="auto",H=null,ha=[],na=null,X=null,ca=0;ca<d.length&&"#"==d[ca].charAt(0);){b=d[ca];for(ca++;ca<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[ca].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[ca].substring(1)),ca++;if("#"!=b.charAt(1)){var oa=b.indexOf(":");if(0<oa){var V=mxUtils.trim(b.substring(1,oa)),Q=mxUtils.trim(b.substring(oa+1));"label"==V?ma=y.sanitizeHtml(Q):"labelname"==V&&0<Q.length&&"-"!=Q?A=Q:"labels"==V&&0<Q.length&&"-"!=
-Q?F=JSON.parse(Q):"style"==V?t=Q:"parentstyle"==V?I=Q:"stylename"==V&&0<Q.length&&"-"!=Q?E=Q:"styles"==V&&0<Q.length&&"-"!=Q?x=JSON.parse(Q):"vars"==V&&0<Q.length&&"-"!=Q?n=JSON.parse(Q):"identity"==V&&0<Q.length&&"-"!=Q?L=Q:"parent"==V&&0<Q.length&&"-"!=Q?H=Q:"namespace"==V&&0<Q.length&&"-"!=Q?K=Q:"width"==V?C=Q:"height"==V?N=Q:"left"==V&&0<Q.length?S=Q:"top"==V&&0<Q.length?R=Q:"ignore"==V?X=Q.split(","):"connect"==V?ha.push(JSON.parse(Q)):"link"==V?na=Q:"padding"==V?D=parseFloat(Q):"edgespacing"==
-V?M=parseFloat(Q):"nodespacing"==V?P=parseFloat(Q):"levelspacing"==V?G=parseFloat(Q):"layout"==V&&(ga=Q)}}}if(null==d[ca])throw Error(mxResources.get("invalidOrMissingFile"));for(var ra=this.editor.csvToArray(d[ca]),V=oa=null,Q=[],Y=0;Y<ra.length;Y++)L==ra[Y]&&(oa=Y),H==ra[Y]&&(V=Y),Q.push(mxUtils.trim(ra[Y]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ma&&(ma="%"+Q[0]+"%");if(null!=ha)for(var fa=0;fa<ha.length;fa++)null==k[ha[fa].to]&&(k[ha[fa].to]={});L=[];for(Y=ca+1;Y<
-d.length;Y++){var ia=this.editor.csvToArray(d[Y]);if(null==ia){var pa=40<d[Y].length?d[Y].substring(0,40)+"...":d[Y];throw Error(pa+" ("+Y+"):\n"+mxResources.get("containsValidationErrors"));}0<ia.length&&L.push(ia)}y.model.beginUpdate();try{for(Y=0;Y<L.length;Y++){var ia=L[Y],U=null,ja=null!=oa?K+ia[oa]:null;null!=ja&&(U=y.model.getCell(ja));var d=null!=U,ba=new mxCell(ma,new mxGeometry(O,J,0,0),t||"whiteSpace=wrap;html=1;");ba.vertex=!0;ba.id=ja;for(var la=0;la<ia.length;la++)y.setAttributeForCell(ba,
-Q[la],ia[la]);if(null!=A&&null!=F){var da=F[ba.getAttribute(A)];null!=da&&y.labelChanged(ba,da)}if(null!=E&&null!=x){var ua=x[ba.getAttribute(E)];null!=ua&&(ba.style=ua)}y.setAttributeForCell(ba,"placeholders","1");ba.style=y.replacePlaceholders(ba,ba.style,n);d&&(y.model.setGeometry(U,ba.geometry),y.model.setStyle(U,ba.style),0>mxUtils.indexOf(g,U)&&g.push(U));U=ba;if(!d)for(fa=0;fa<ha.length;fa++)k[ha[fa].to][U.getAttribute(ha[fa].to)]=U;null!=na&&"link"!=na&&(y.setLinkForCell(U,U.getAttribute(na)),
-y.setAttributeForCell(U,na,null));y.fireEvent(new mxEventObject("cellsInserted","cells",[U]));var ya=this.editor.graph.getPreferredSizeForCell(U);U.vertex&&(null!=S&&null!=U.getAttribute(S)&&(U.geometry.x=O+parseFloat(U.getAttribute(S))),null!=R&&null!=U.getAttribute(R)&&(U.geometry.y=aa+parseFloat(U.getAttribute(R))),"@"==C.charAt(0)&&null!=U.getAttribute(C.substring(1))?U.geometry.width=parseFloat(U.getAttribute(C.substring(1))):U.geometry.width="auto"==C?ya.width+D:parseFloat(C),"@"==N.charAt(0)&&
-null!=U.getAttribute(N.substring(1))?U.geometry.height=parseFloat(U.getAttribute(N.substring(1))):U.geometry.height="auto"==N?ya.height+D:parseFloat(N),J+=U.geometry.height+P);d?(null==f[ja]&&(f[ja]=[]),f[ja].push(U)):(H=null!=V?y.model.getCell(K+ia[V]):null,e.push(U),null!=H?(H.style=y.replacePlaceholders(H,I,n),y.addCell(U,H)):g.push(y.addCell(U)))}for(var ta=g.slice(),qa=g.slice(),fa=0;fa<ha.length;fa++)for(var za=ha[fa],Y=0;Y<e.length;Y++){var U=e[Y],va=mxUtils.bind(this,function(b,d,c){var e=
-d.getAttribute(c.from);if(null!=e&&(y.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),g=0;g<e.length;g++){var f=k[c.to][e[g]];if(null!=f){var l=c.label;null!=c.fromlabel&&(l=(d.getAttribute(c.fromlabel)||"")+(l||""));null!=c.sourcelabel&&(l=y.replacePlaceholders(d,c.sourcelabel,n)+(l||""));null!=c.tolabel&&(l=(l||"")+(f.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(l=(l||"")+y.replacePlaceholders(f,c.targetlabel,n));var m="target"==c.placeholders==!c.invert?f:b,m=null!=c.style?
-y.replacePlaceholders(m,c.style,n):y.createCurrentEdgeStyle(),l=y.insertEdge(null,null,l||"",c.invert?f:b,c.invert?b:f,m);if(null!=c.labels)for(m=0;m<c.labels.length;m++){var p=c.labels[m],q=new mxCell(p.label||m,new mxGeometry(null!=p.x?p.x:0,null!=p.y?p.y:0,0,0),"resizable=0;html=1;");q.vertex=!0;q.connectable=!1;q.geometry.relative=!0;null!=p.placeholders&&(q.value=y.replacePlaceholders("target"==p.placeholders==!c.invert?f:b,q.value,n));if(null!=p.dx||null!=p.dy)q.geometry.offset=new mxPoint(null!=
-p.dx?p.dx:0,null!=p.dy?p.dy:0);l.insert(q)}qa.push(l);mxUtils.remove(c.invert?b:f,ta)}}});va(U,U,za);if(null!=f[U.id])for(la=0;la<f[U.id].length;la++)va(U,f[U.id][la],za)}if(null!=X)for(Y=0;Y<e.length;Y++)for(U=e[Y],la=0;la<X.length;la++)y.setAttributeForCell(U,mxUtils.trim(X[la]),null);if(0<g.length){var T=new mxParallelEdgeLayout(y);T.spacing=M;T.checkOverlap=!0;var Aa=function(){0<T.spacing&&T.execute(y.getDefaultParent());for(var b=0;b<g.length;b++){var d=y.getCellGeometry(g[b]);d.x=Math.round(y.snap(d.x));
-d.y=Math.round(y.snap(d.y));"auto"==C&&(d.width=Math.round(y.snap(d.width)));"auto"==N&&(d.height=Math.round(y.snap(d.height)))}};if("["==ga.charAt(0)){var ka=W;y.view.validate();this.executeLayoutList(JSON.parse(ga),function(){Aa();ka()});W=null}else if("circle"==ga){var Ba=new mxCircleLayout(y);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var wa=Ba.isVertexIgnored;Ba.isVertexIgnored=function(b){return wa.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){Ba.execute(y.getDefaultParent());
-Aa()},!0,W);W=null}else if("horizontaltree"==ga||"verticaltree"==ga||"auto"==ga&&qa.length==2*g.length-1&&1==ta.length){y.view.validate();var Ca=new mxCompactTreeLayout(y,"horizontaltree"==ga);Ca.levelDistance=P;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(y.getDefaultParent(),0<ta.length?ta[0]:null)},!0,W);W=null}else if("horizontalflow"==ga||"verticalflow"==ga||"auto"==ga&&1==ta.length){y.view.validate();var Da=new mxHierarchicalLayout(y,"horizontalflow"==ga?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);Da.intraCellSpacing=P;Da.parallelEdgeSpacing=M;Da.interRankCellSpacing=G;Da.disableEdgeStyle=!1;this.executeLayout(function(){Da.execute(y.getDefaultParent(),qa);y.moveCells(qa,O,aa)},!0,W);W=null}else if("organic"==ga||"auto"==ga&&qa.length>g.length){y.view.validate();var xa=new mxFastOrganicLayout(y);xa.forceConstant=3*P;xa.disableEdgeStyle=!1;xa.resetEdges=!1;var Ea=xa.isVertexIgnored;xa.isVertexIgnored=function(b){return Ea.apply(this,arguments)||0>mxUtils.indexOf(g,
-b)};this.executeLayout(function(){xa.execute(y.getDefaultParent());Aa()},!0,W);W=null}}this.hideDialog()}finally{y.model.endUpdate()}null!=W&&W()}}catch(Z){this.handleError(Z)}};EditorUi.prototype.getSearch=function(b){var d="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var c="?",e;for(e in urlParams)0>mxUtils.indexOf(b,e)&&null!=urlParams[e]&&(d+=c+e+"="+urlParams[e],c="&")}else d=window.location.search;return d};EditorUi.prototype.getUrl=function(b){b=
-null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(b=0==d?b+"?":b+"&",null!=urlParams[e]&&(b+=e+"="+urlParams[e],d++))}return b};EditorUi.prototype.showLinkDialog=function(b,c,e,f,k){b=new LinkDialog(this,b,c,e,!0,f,k);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prototype.getServiceCount=
+mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,e=d.getSelectionCells(),f=0;f<b.length;f++){var g=new window[b[f].layout](d);
+if(null!=b[f].config)for(var k in b[f].config)g[k]=b[f].config[k];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==e.length?null:e)},f==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],f=[],g={};if(0<d.length){var k={},p=null,t=null,x=null,H=null,D=null,E=null,J=null,L=null,G=null,K="",C="auto",M="auto",P=null,S=null,N=40,R=40,F=100,B=0,A=this.editor.graph;A.getGraphBounds();for(var W=function(){null!=c?c(sa):(A.setSelectionCells(sa),A.scrollCellToVisible(A.getSelectionCell()))},
+I=A.getFreeInsertPoint(),O=I.x,aa=I.y,I=aa,na=null,ga="auto",G=null,ha=[],oa=null,X=null,ca=0;ca<d.length&&"#"==d[ca].charAt(0);){b=d[ca];for(ca++;ca<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[ca].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[ca].substring(1)),ca++;if("#"!=b.charAt(1)){var pa=b.indexOf(":");if(0<pa){var V=mxUtils.trim(b.substring(1,pa)),Q=mxUtils.trim(b.substring(pa+1));"label"==V?na=A.sanitizeHtml(Q):"labelname"==V&&0<Q.length&&"-"!=Q?D=Q:"labels"==V&&0<Q.length&&"-"!=
+Q?E=JSON.parse(Q):"style"==V?t=Q:"parentstyle"==V?J=Q:"stylename"==V&&0<Q.length&&"-"!=Q?H=Q:"styles"==V&&0<Q.length&&"-"!=Q?x=JSON.parse(Q):"vars"==V&&0<Q.length&&"-"!=Q?p=JSON.parse(Q):"identity"==V&&0<Q.length&&"-"!=Q?L=Q:"parent"==V&&0<Q.length&&"-"!=Q?G=Q:"namespace"==V&&0<Q.length&&"-"!=Q?K=Q:"width"==V?C=Q:"height"==V?M=Q:"left"==V&&0<Q.length?P=Q:"top"==V&&0<Q.length?S=Q:"ignore"==V?X=Q.split(","):"connect"==V?ha.push(JSON.parse(Q)):"link"==V?oa=Q:"padding"==V?B=parseFloat(Q):"edgespacing"==
+V?N=parseFloat(Q):"nodespacing"==V?R=parseFloat(Q):"levelspacing"==V?F=parseFloat(Q):"layout"==V&&(ga=Q)}}}if(null==d[ca])throw Error(mxResources.get("invalidOrMissingFile"));for(var ta=this.editor.csvToArray(d[ca]),V=pa=null,Q=[],Y=0;Y<ta.length;Y++)L==ta[Y]&&(pa=Y),G==ta[Y]&&(V=Y),Q.push(mxUtils.trim(ta[Y]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==na&&(na="%"+Q[0]+"%");if(null!=ha)for(var fa=0;fa<ha.length;fa++)null==k[ha[fa].to]&&(k[ha[fa].to]={});L=[];for(Y=ca+1;Y<
+d.length;Y++){var ia=this.editor.csvToArray(d[Y]);if(null==ia){var ra=40<d[Y].length?d[Y].substring(0,40)+"...":d[Y];throw Error(ra+" ("+Y+"):\n"+mxResources.get("containsValidationErrors"));}0<ia.length&&L.push(ia)}A.model.beginUpdate();try{for(Y=0;Y<L.length;Y++){var ia=L[Y],U=null,ja=null!=pa?K+ia[pa]:null;null!=ja&&(U=A.model.getCell(ja));var d=null!=U,ba=new mxCell(na,new mxGeometry(O,I,0,0),t||"whiteSpace=wrap;html=1;");ba.vertex=!0;ba.id=ja;for(var ma=0;ma<ia.length;ma++)A.setAttributeForCell(ba,
+Q[ma],ia[ma]);if(null!=D&&null!=E){var da=E[ba.getAttribute(D)];null!=da&&A.labelChanged(ba,da)}if(null!=H&&null!=x){var qa=x[ba.getAttribute(H)];null!=qa&&(ba.style=qa)}A.setAttributeForCell(ba,"placeholders","1");ba.style=A.replacePlaceholders(ba,ba.style,p);d&&(A.model.setGeometry(U,ba.geometry),A.model.setStyle(U,ba.style),0>mxUtils.indexOf(f,U)&&f.push(U));U=ba;if(!d)for(fa=0;fa<ha.length;fa++)k[ha[fa].to][U.getAttribute(ha[fa].to)]=U;null!=oa&&"link"!=oa&&(A.setLinkForCell(U,U.getAttribute(oa)),
+A.setAttributeForCell(U,oa,null));A.fireEvent(new mxEventObject("cellsInserted","cells",[U]));var ya=this.editor.graph.getPreferredSizeForCell(U);U.vertex&&(null!=P&&null!=U.getAttribute(P)&&(U.geometry.x=O+parseFloat(U.getAttribute(P))),null!=S&&null!=U.getAttribute(S)&&(U.geometry.y=aa+parseFloat(U.getAttribute(S))),"@"==C.charAt(0)&&null!=U.getAttribute(C.substring(1))?U.geometry.width=parseFloat(U.getAttribute(C.substring(1))):U.geometry.width="auto"==C?ya.width+B:parseFloat(C),"@"==M.charAt(0)&&
+null!=U.getAttribute(M.substring(1))?U.geometry.height=parseFloat(U.getAttribute(M.substring(1))):U.geometry.height="auto"==M?ya.height+B:parseFloat(M),I+=U.geometry.height+R);d?(null==g[ja]&&(g[ja]=[]),g[ja].push(U)):(G=null!=V?A.model.getCell(K+ia[V]):null,e.push(U),null!=G?(G.style=A.replacePlaceholders(G,J,p),A.addCell(U,G)):f.push(A.addCell(U)))}for(var ua=f.slice(),sa=f.slice(),fa=0;fa<ha.length;fa++)for(var za=ha[fa],Y=0;Y<e.length;Y++){var U=e[Y],va=mxUtils.bind(this,function(b,d,c){var e=
+d.getAttribute(c.from);if(null!=e&&(A.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),f=0;f<e.length;f++){var g=k[c.to][e[f]];if(null!=g){var l=c.label;null!=c.fromlabel&&(l=(d.getAttribute(c.fromlabel)||"")+(l||""));null!=c.sourcelabel&&(l=A.replacePlaceholders(d,c.sourcelabel,p)+(l||""));null!=c.tolabel&&(l=(l||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(l=(l||"")+A.replacePlaceholders(g,c.targetlabel,p));var m="target"==c.placeholders==!c.invert?g:b,m=null!=c.style?
+A.replacePlaceholders(m,c.style,p):A.createCurrentEdgeStyle(),l=A.insertEdge(null,null,l||"",c.invert?g:b,c.invert?b:g,m);if(null!=c.labels)for(m=0;m<c.labels.length;m++){var n=c.labels[m],q=new mxCell(n.label||m,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");q.vertex=!0;q.connectable=!1;q.geometry.relative=!0;null!=n.placeholders&&(q.value=A.replacePlaceholders("target"==n.placeholders==!c.invert?g:b,q.value,p));if(null!=n.dx||null!=n.dy)q.geometry.offset=new mxPoint(null!=
+n.dx?n.dx:0,null!=n.dy?n.dy:0);l.insert(q)}sa.push(l);mxUtils.remove(c.invert?b:g,ua)}}});va(U,U,za);if(null!=g[U.id])for(ma=0;ma<g[U.id].length;ma++)va(U,g[U.id][ma],za)}if(null!=X)for(Y=0;Y<e.length;Y++)for(U=e[Y],ma=0;ma<X.length;ma++)A.setAttributeForCell(U,mxUtils.trim(X[ma]),null);if(0<f.length){var T=new mxParallelEdgeLayout(A);T.spacing=N;T.checkOverlap=!0;var Aa=function(){0<T.spacing&&T.execute(A.getDefaultParent());for(var b=0;b<f.length;b++){var d=A.getCellGeometry(f[b]);d.x=Math.round(A.snap(d.x));
+d.y=Math.round(A.snap(d.y));"auto"==C&&(d.width=Math.round(A.snap(d.width)));"auto"==M&&(d.height=Math.round(A.snap(d.height)))}};if("["==ga.charAt(0)){var ka=W;A.view.validate();this.executeLayoutList(JSON.parse(ga),function(){Aa();ka()});W=null}else if("circle"==ga){var Ba=new mxCircleLayout(A);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var wa=Ba.isVertexIgnored;Ba.isVertexIgnored=function(b){return wa.apply(this,arguments)||0>mxUtils.indexOf(f,b)};this.executeLayout(function(){Ba.execute(A.getDefaultParent());
+Aa()},!0,W);W=null}else if("horizontaltree"==ga||"verticaltree"==ga||"auto"==ga&&sa.length==2*f.length-1&&1==ua.length){A.view.validate();var Ca=new mxCompactTreeLayout(A,"horizontaltree"==ga);Ca.levelDistance=R;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(A.getDefaultParent(),0<ua.length?ua[0]:null)},!0,W);W=null}else if("horizontalflow"==ga||"verticalflow"==ga||"auto"==ga&&1==ua.length){A.view.validate();var Da=new mxHierarchicalLayout(A,"horizontalflow"==ga?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);Da.intraCellSpacing=R;Da.parallelEdgeSpacing=N;Da.interRankCellSpacing=F;Da.disableEdgeStyle=!1;this.executeLayout(function(){Da.execute(A.getDefaultParent(),sa);A.moveCells(sa,O,aa)},!0,W);W=null}else if("organic"==ga||"auto"==ga&&sa.length>f.length){A.view.validate();var xa=new mxFastOrganicLayout(A);xa.forceConstant=3*R;xa.disableEdgeStyle=!1;xa.resetEdges=!1;var Ea=xa.isVertexIgnored;xa.isVertexIgnored=function(b){return Ea.apply(this,arguments)||0>mxUtils.indexOf(f,
+b)};this.executeLayout(function(){xa.execute(A.getDefaultParent());Aa()},!0,W);W=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=W&&W()}}catch(Z){this.handleError(Z)}};EditorUi.prototype.getSearch=function(b){var d="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var c="?",e;for(e in urlParams)0>mxUtils.indexOf(b,e)&&null!=urlParams[e]&&(d+=c+e+"="+urlParams[e],c="&")}else d=window.location.search;return d};EditorUi.prototype.getUrl=function(b){b=
+null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(b=0==d?b+"?":b+"&",null!=urlParams[e]&&(b+=e+"="+urlParams[e],d++))}return b};EditorUi.prototype.showLinkDialog=function(b,c,e,g,k){b=new LinkDialog(this,b,c,e,!0,g,k);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prototype.getServiceCount=
function(b){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||d++;null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;null!=this.gitHub&&d++;null!=this.gitLab&&d++;null!=this.notion&&d++;b&&isLocalStorage&&"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var b=this.getCurrentFile(),c=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();
this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var e=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!e);this.actions.get("print").setEnabled(!e);this.menus.get("exportAs").setEnabled(!e);this.menus.get("embed").setEnabled(!e);e="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(e);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(e),
this.menus.get("newLibrary").setEnabled(e));b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);this.actions.get("undo").setEnabled(this.canUndo()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&b);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);
this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();
-return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),e=this.isDiagramActive(),f=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(e);this.actions.get("editData").setEnabled(0<
-f.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(e);this.actions.get("connectionArrows").setEnabled(e);this.actions.get("connectionPoints").setEnabled(e);this.actions.get("copyStyle").setEnabled(e&&!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(e&&0<f.length);this.actions.get("editGeometry").setEnabled(0<f.length&&b.getModel().isVertex(f[0]));this.actions.get("createShape").setEnabled(e);this.actions.get("createRevision").setEnabled(e);this.actions.get("moveToFolder").setEnabled(null!=
+return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),e=this.isDiagramActive(),g=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(e);this.actions.get("editData").setEnabled(0<
+g.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(e);this.actions.get("connectionArrows").setEnabled(e);this.actions.get("connectionPoints").setEnabled(e);this.actions.get("copyStyle").setEnabled(e&&!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(e&&0<g.length);this.actions.get("editGeometry").setEnabled(0<g.length&&b.getModel().isVertex(g[0]));this.actions.get("createShape").setEnabled(e);this.actions.get("createRevision").setEnabled(e);this.actions.get("moveToFolder").setEnabled(null!=
c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(e&&(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("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());c=this.actions.get("findReplace");c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());this.actions.get("editShape").setEnabled(e&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var t=EditorUi.prototype.destroy;
-EditorUi.prototype.destroy=function(){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(b,c,e,f,k,m,n,t){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(f,
-k,m)),"image/svg+xml");else{var g=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),p=Math.floor(l.width*k/d.view.scale),q=Math.floor(l.height*k/d.view.scale);if(g.length<=MAX_REQUEST_SIZE&&p*q<MAX_AREA)if(b.hideDialog(),"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var u={globalVars:d.getExportVariables()};t&&(u.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+
-(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(u))+(0<n?"&dpi="+n:"")+"&bg="+(null!=f?f:"none")+"&w="+p+"&h="+q+"&border="+m+"&xml="+encodeURIComponent(g))})}else"png"==e?b.exportImage(k,null==f||"none"==f,!0,!1,!1,m,!0,!1,null,t,n):b.exportImage(k,!1,!0,!1,!1,m,!0,!1,"jpeg",t);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=
-this.pages)for(var e=0;e<this.pages.length;e++){var f=b;this.currentPage!=this.pages[e]&&(f=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[e]),f.model.setRoot(this.pages[e].root));c+=this.pages[e].getName()+" "+f.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,
-mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";f.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var n=mxSettings.getCustomLibraries();for(b=0;b<n.length;b++){var t=n[b];if("R"==t.substring(0,1)){var B=JSON.parse(decodeURIComponent(t.substring(1)));k[B[0]]=
-{id:B[0],title:B[1],downloadUrl:B[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(b){f.innerHTML="";if(0==b.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<b.length;c++){var e=b[c];k[e.id]&&(d[e.id]=e);var g=this.addCheckbox(f,e.title,k[e.id]);(function(b,c){mxEvent.addListener(c,"change",function(){this.checked?d[b.id]=b:delete d[b.id]})})(e,g)}},mxUtils.bind(this,
-function(b){f.innerHTML="";var d=document.createElement("div");d.style.padding="8px";d.style.textAlign="center";mxUtils.write(d,mxResources.get("error")+": ");mxUtils.write(d,null!=b&&null!=b.message?b.message:mxResources.get("unknownError"));f.appendChild(d)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var b=0,c;for(c in d)null==k[c]&&(b++,mxUtils.bind(this,function(d){this.remoteInvoke("getFileContent",[d.downloadUrl],
-null,mxUtils.bind(this,function(c){b--;0==b&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,d))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(d[c]));for(c in k)d[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));0==b&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,
+EditorUi.prototype.destroy=function(){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(b,c,e,g,k,p,t,u){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(g,
+k,p)),"image/svg+xml");else{var f=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*k/d.view.scale),n=Math.floor(l.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA)if(b.hideDialog(),"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var q={globalVars:d.getExportVariables()};u&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+
+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<t?"&dpi="+t:"")+"&bg="+(null!=g?g:"none")+"&w="+m+"&h="+n+"&border="+p+"&xml="+encodeURIComponent(f))})}else"png"==e?b.exportImage(k,null==g||"none"==g,!0,!1,!1,p,!0,!1,null,u,t):b.exportImage(k,!1,!0,!1,!1,p,!0,!1,"jpeg",u);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=
+this.pages)for(var e=0;e<this.pages.length;e++){var g=b;this.currentPage!=this.pages[e]&&(g=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[e]),g.model.setRoot(this.pages[e].root));c+=this.pages[e].getName()+" "+g.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,
+mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";g.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var p=mxSettings.getCustomLibraries();for(b=0;b<p.length;b++){var t=p[b];if("R"==t.substring(0,1)){var y=JSON.parse(decodeURIComponent(t.substring(1)));k[y[0]]=
+{id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(b){g.innerHTML="";if(0==b.length)g.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<b.length;c++){var e=b[c];k[e.id]&&(d[e.id]=e);var f=this.addCheckbox(g,e.title,k[e.id]);(function(b,c){mxEvent.addListener(c,"change",function(){this.checked?d[b.id]=b:delete d[b.id]})})(e,f)}},mxUtils.bind(this,
+function(b){g.innerHTML="";var d=document.createElement("div");d.style.padding="8px";d.style.textAlign="center";mxUtils.write(d,mxResources.get("error")+": ");mxUtils.write(d,null!=b&&null!=b.message?b.message:mxResources.get("unknownError"));g.appendChild(d)}));c.appendChild(g);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var b=0,c;for(c in d)null==k[c]&&(b++,mxUtils.bind(this,function(d){this.remoteInvoke("getFileContent",[d.downloadUrl],
+null,mxUtils.bind(this,function(c){b--;0==b&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,d))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(d[c]));for(c in k)d[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));0==b&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,
340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(b){this.remoteWin=b;for(var d=0;d<this.remoteInvokeQueue.length;d++)b.postMessage(this.remoteInvokeQueue[d],
-"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(b){var d=b.msgMarkers,c=this.remoteInvokeCallbacks[d.callbackId];if(null==c)throw Error("No callback for "+(null!=d?d.callbackId:"null"));b.error?c.error&&c.error(b.error.errResp):c.callback&&c.callback.apply(this,b.resp);this.remoteInvokeCallbacks[d.callbackId]=null};EditorUi.prototype.remoteInvoke=function(b,c,e,f,k){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),l=mxUtils.bind(this,function(){window.clearTimeout(g);d&&f.apply(this,arguments)}),n=mxUtils.bind(this,function(){window.clearTimeout(g);d&&k.apply(this,arguments)});e=e||{};e.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:l,error:n});b=JSON.stringify({event:"remoteInvoke",funtionName:b,functionArgs:c,msgMarkers:e});null!=this.remoteWin?this.remoteWin.postMessage(b,"*"):this.remoteInvokeQueue.push(b)};EditorUi.prototype.handleRemoteInvoke=function(b,
-c){var d=mxUtils.bind(this,function(d,c){var e={event:"remoteInvokeResponse",msgMarkers:b.msgMarkers};null!=c?e.error={errResp:c}:null!=d&&(e.resp=d);this.remoteWin.postMessage(JSON.stringify(e),"*")});try{var e=b.funtionName,g=this.remoteInvokableFns[e];if(null!=g&&"function"===typeof this[e]){if(g.allowedDomains){for(var f=!1,k=0;k<g.allowedDomains.length;k++)if(c=="https://"+g.allowedDomains[k]){f=!0;break}if(!f){d(null,"Invalid Call: "+e+" is not allowed.");return}}var n=b.functionArgs;Array.isArray(n)||
-(n=[]);if(g.isAsync)n.push(function(){d(Array.prototype.slice.apply(arguments))}),n.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,n);else{var t=this[e].apply(this,n);d([t])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(x){d(null,"Invalid Call: An error occurred, "+x.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=
+"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(b){var d=b.msgMarkers,c=this.remoteInvokeCallbacks[d.callbackId];if(null==c)throw Error("No callback for "+(null!=d?d.callbackId:"null"));b.error?c.error&&c.error(b.error.errResp):c.callback&&c.callback.apply(this,b.resp);this.remoteInvokeCallbacks[d.callbackId]=null};EditorUi.prototype.remoteInvoke=function(b,c,e,g,k){var d=!0,f=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
+this.timeout),l=mxUtils.bind(this,function(){window.clearTimeout(f);d&&g.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(f);d&&k.apply(this,arguments)});e=e||{};e.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:l,error:m});b=JSON.stringify({event:"remoteInvoke",funtionName:b,functionArgs:c,msgMarkers:e});null!=this.remoteWin?this.remoteWin.postMessage(b,"*"):this.remoteInvokeQueue.push(b)};EditorUi.prototype.handleRemoteInvoke=function(b,
+c){var d=mxUtils.bind(this,function(d,c){var e={event:"remoteInvokeResponse",msgMarkers:b.msgMarkers};null!=c?e.error={errResp:c}:null!=d&&(e.resp=d);this.remoteWin.postMessage(JSON.stringify(e),"*")});try{var e=b.funtionName,f=this.remoteInvokableFns[e];if(null!=f&&"function"===typeof this[e]){if(f.allowedDomains){for(var g=!1,k=0;k<f.allowedDomains.length;k++)if(c=="https://"+f.allowedDomains[k]){g=!0;break}if(!g){d(null,"Invalid Call: "+e+" is not allowed.");return}}var p=b.functionArgs;Array.isArray(p)||
+(p=[]);if(f.isAsync)p.push(function(){d(Array.prototype.slice.apply(arguments))}),p.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,p);else{var t=this[e].apply(this,p);d([t])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(x){d(null,"Invalid Call: An error occurred, "+x.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=
function(b){try{var d=e.result;1>b.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>b.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),d.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(v){null!=c&&c(v)}};e.onsuccess=mxUtils.bind(this,function(d){var c=e.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
-(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(b){if(!b||"1"==urlParams.forceMigration){var c=document.createElement("iframe");c.style.display="none";c.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(c);var d=!0,e=!1,g,f=0,k=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){f++;m()}),m=mxUtils.bind(this,function(){try{if(f>=g.length)k();else{var b=g[f];StorageFile.getFileContent(this,b,mxUtils.bind(this,function(d){null==d||".scratchpad"==b&&d==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(C){console.log(C)}}),n=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,
-size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(C){console.log(C)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var f={};try{f=JSON.parse(b.data)}catch(N){}"init"==f.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||e||
-(d?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(g=f.resp[0],d=!1,m()):k():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?n(f.resp[0]):l())}}catch(N){console.log(N)}});window.addEventListener("message",b)}})));b(c);c.onversionchange=function(){c.close()}});e.onerror=c;e.onblocked=function(){}}catch(p){null!=c&&c(p)}else null!=c&&c()}else b(this.database)};EditorUi.prototype.setDatabaseItem=function(b,c,e,f,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=
-[k],b=[b],c=[c]);var g=d.transaction(k,"readwrite");g.oncomplete=e;g.onerror=f;for(d=0;d<k.length;d++)g.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(u){null!=f&&f(u)}}),f)};EditorUi.prototype.removeDatabaseItem=function(b,c,e,f){this.openDatabase(mxUtils.bind(this,function(d){f=f||"objects";Array.isArray(f)||(f=[f],b=[b]);d=d.transaction(f,"readwrite");d.oncomplete=c;d.onerror=e;for(var g=0;g<f.length;g++)d.objectStore(f[g])["delete"](b[g])}),e)};EditorUi.prototype.getDatabaseItem=
-function(b,c,e,f){this.openDatabase(mxUtils.bind(this,function(d){try{f=f||"objects";var g=d.transaction([f],"readonly").objectStore(f).get(b);g.onsuccess=function(){c(g.result)};g.onerror=e}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.getDatabaseItems=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var g=d.transaction([e],"readonly").objectStore(e).openCursor(IDBKeyRange.lowerBound(0)),f=[];g.onsuccess=function(c){null==c.target.result?b(f):(f.push(c.target.result.value),
-c.target.result["continue"]())};g.onerror=c}catch(v){null!=c&&c(v)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var g=d.transaction([e],"readonly").objectStore(e).getAllKeys();g.onsuccess=function(){b(g.result)};g.onerror=c}catch(m){null!=c&&c(m)}}),c)};EditorUi.prototype.commentsSupported=function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=
+(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(b){if(!b||"1"==urlParams.forceMigration){var c=document.createElement("iframe");c.style.display="none";c.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(c);var d=!0,e=!1,f,g=0,k=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){g++;m()}),m=mxUtils.bind(this,function(){try{if(g>=f.length)k();else{var b=f[g];StorageFile.getFileContent(this,b,mxUtils.bind(this,function(d){null==d||".scratchpad"==b&&d==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(C){console.log(C)}}),p=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,
+size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(C){console.log(C)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var g={};try{g=JSON.parse(b.data)}catch(M){}"init"==g.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||
+(d?null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?(f=g.resp[0],d=!1,m()):k():null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?p(g.resp[0]):l())}}catch(M){console.log(M)}});window.addEventListener("message",b)}})));b(c);c.onversionchange=function(){c.close()}});e.onerror=c;e.onblocked=function(){}}catch(q){null!=c&&c(q)}else null!=c&&c()}else b(this.database)};EditorUi.prototype.setDatabaseItem=function(b,c,e,g,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=
+[k],b=[b],c=[c]);var f=d.transaction(k,"readwrite");f.oncomplete=e;f.onerror=g;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(u){null!=g&&g(u)}}),g)};EditorUi.prototype.removeDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){g=g||"objects";Array.isArray(g)||(g=[g],b=[b]);d=d.transaction(g,"readwrite");d.oncomplete=c;d.onerror=e;for(var f=0;f<g.length;f++)d.objectStore(g[f])["delete"](b[f])}),e)};EditorUi.prototype.getDatabaseItem=
+function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){try{g=g||"objects";var f=d.transaction([g],"readonly").objectStore(g).get(b);f.onsuccess=function(){c(f.result)};f.onerror=e}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.getDatabaseItems=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).openCursor(IDBKeyRange.lowerBound(0)),g=[];f.onsuccess=function(c){null==c.target.result?b(g):(g.push(c.target.result.value),
+c.target.result["continue"]())};f.onerror=c}catch(v){null!=c&&c(v)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).getAllKeys();f.onsuccess=function(){b(f.result)};f.onerror=c}catch(n){null!=c&&c(n)}}),c)};EditorUi.prototype.commentsSupported=function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=
this.getCurrentFile();return null!=b?b.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(b,c){var d=this.getCurrentFile();null!=d?d.getComments(b,c):b([])};EditorUi.prototype.addComment=function(b,c,e){var d=this.getCurrentFile();null!=d?d.addComment(b,c,e):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var b=this.getCurrentFile();return null!=b?
b.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var b=this.getCurrentFile();return null!=b?b.canComment():!0};EditorUi.prototype.newComment=function(b,c){var d=this.getCurrentFile();return null!=d?d.newComment(b,c):new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var b=this.getCurrentFile();return null!=b&&b.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(b,c){var d=this.getCurrentFile();null!=
-d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,e,f,k,m,n,t){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(b,c,e,f,k,m,n,t)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,f,k,m,n,t,B,x,E,A,F,I,L,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,f,k,m,n,t,B,x,E,A,F,I,L,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
-return this.editor.convertImages(b,c,e,f)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=function(b,c,e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,e,f)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,e,f,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,c,e,f,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var e=localStorage.key(c),f=localStorage.getItem(e);if(0<e.length&&(".scratchpad"==e||"."!=e.charAt(0))&&0<f.length){var k=
-"<mxfile "===f.substring(0,8)||"<?xml"===f.substring(0,5)||"\x3c!--[if IE]>"===f.substring(0,12),f="<mxlibrary>"===f.substring(0,11);(k||f)&&b.push(e)}}return b};EditorUi.prototype.getLocalStorageFile=function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,c,e,k,f,n){function t(){for(var b=A.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==A&&c++;F.style.display=0==c?"block":"none"}function d(b,c,d,e){function g(){c.removeChild(l);c.removeChild(m);k.style.display="block";f.style.display="block"}B={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var f=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
-"geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=b.content;c.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),t()):g();B=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";b.content=l.value;mxUtils.write(f,b.content);g();d(b);B=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
-function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(p.click(),mxEvent.consume(b)):27==b.keyCode&&(n.click(),mxEvent.consume(b)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);c.insertBefore(m,f);k.style.display="none";f.style.display="none";l.focus()}function g(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),g=b.timeSince(e);null==g&&(g=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
-[g],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function l(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function q(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function p(b){b.style.border="";b.removeChild(b.busyImg)}function m(c,e,f,k,n){function x(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
-"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});E.appendChild(f);e&&(f.style.display="none")}function C(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=G;b(c);return{pdiv:e,replies:d}}function M(e,f,g,n,t){function u(){l(M);c.addReply(x,function(b){x.id=b;c.replies.push(x);p(M);g&&g()},function(c){A();q(M);b.handleError(c,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},n,t)}function A(){d(x,M,function(b){u()},!0)}var v=C().pdiv,x=b.newComment(e,b.getCurrentUser());x.pCommentId=c.id;null==c.replies&&(c.replies=[]);var M=m(x,c.replies,v,k+1);f?A():u()}if(n||!c.isResolved){F.style.display="none";var G=document.createElement("div");G.className="geCommentContainer";G.setAttribute("data-commentId",c.id);G.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(G.style.backgroundColor="ghostWhite");
-var P=document.createElement("div");P.className="geCommentHeader";var I=document.createElement("img");I.className="geCommentUserImg";I.src=c.user.pictureUrl||Editor.userImage;P.appendChild(I);I=document.createElement("div");I.className="geCommentHeaderTxt";P.appendChild(I);var R=document.createElement("div");R.className="geCommentUsername";mxUtils.write(R,c.user.displayName||"");I.appendChild(R);R=document.createElement("div");R.className="geCommentDate";R.setAttribute("data-commentId",c.id);g(c,
-R);I.appendChild(R);G.appendChild(P);P=document.createElement("div");P.className="geCommentTxt";mxUtils.write(P,c.content||"");G.appendChild(P);c.isLocked&&(G.style.opacity="0.5");P=document.createElement("div");P.className="geCommentActions";var E=document.createElement("ul");E.className="geCommentActionsList";P.appendChild(E);v||c.isLocked||0!=k&&!u||x(mxResources.get("reply"),function(){M("",!0)},c.isResolved);I=b.getCurrentUser();null==I||I.id!=c.user.id||v||c.isLocked||(x(mxResources.get("edit"),
-function(){function e(){d(c,G,function(){l(G);c.editComment(c.content,function(){p(G)},function(c){q(G);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),x(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(G);c.deleteComment(function(b){if(!0===b){b=G.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=G.querySelectorAll(".geCommentAction");for(b=
-0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);p(G);G.style.opacity="0.5"}else{d=C(c).replies;for(b=0;b<d.length;b++)A.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}F.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(c){q(G);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));v||c.isLocked||0!=k||x(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
-b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=C(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);H||(f[k].style.display="none")}t()}c.isResolved?M(mxResources.get("reOpened")+": ",!0,
-d,!1,!0):M(mxResources.get("markedAsResolved"),!1,d,!0)});G.appendChild(P);null!=f?A.insertBefore(G,f.nextSibling):A.appendChild(G);for(f=0;null!=c.replies&&f<c.replies.length;f++)P=c.replies[f],P.isResolved=c.isResolved,m(P,c.replies,null,k+1,n);null!=B&&(B.comment.id==c.id?(n=c.content,c.content=B.comment.content,d(c,G,B.saveCallback,B.deleteOnCancel),c.content=n):null==B.comment.id&&B.comment.pCommentId==c.id&&(A.appendChild(B.div),d(B.comment,B.div,B.saveCallback,B.deleteOnCancel)));return G}}
-var v=!b.canComment(),u=b.canReplyToReplies(),B=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var E=EditorUi.compactUi?"26px":"30px",A=document.createElement("div");A.className="geCommentsList";A.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";A.style.bottom=parseInt(E)+7+"px";x.appendChild(A);var F=document.createElement("span");F.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(F,mxResources.get("noCommentsFound"));var I=document.createElement("div");I.className="geToolbarContainer geCommentsToolbar";I.style.height=E;I.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";I.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";E=document.createElement("a");E.className="geButton";if(!v){var L=E.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;K.push(c);p(g)},function(c){q(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=m(f,K,null,0);e();c.preventDefault();mxEvent.consume(c)});I.appendChild(L)}L=E.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
-var H=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(b){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";C();b.preventDefault();mxEvent.consume(b)});I.appendChild(L);b.commentsRefreshNeeded()&&(L=E.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(b){C();
-b.preventDefault();mxEvent.consume(b)}),I.appendChild(L));b.commentsSaveNeeded()&&(E=E.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',E.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(b){n();b.preventDefault();mxEvent.consume(b)}),I.appendChild(E));x.appendChild(I);var K=[],C=mxUtils.bind(this,function(){this.hasError=!1;if(null!=B)try{B.div=B.div.cloneNode(!0);
-var c=B.div.querySelector(".geCommentEditTxtArea"),e=B.div.querySelector(".geCommentEditBtns");B.comment.content=c.value;c.parentNode.removeChild(c);e.parentNode.removeChild(e)}catch(M){b.handleError(M)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";u=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
-new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});A.innerHTML="";A.appendChild(F);F.style.display="block";K=b;for(b=0;b<K.length;b++)c(K[b].replies),m(K[b],K,null,0,H);null!=B&&null==B.comment.id&&null==B.comment.pCommentId&&(A.appendChild(B.div),d(B.comment,B.div,B.saveCallback,B.deleteOnCancel))},mxUtils.bind(this,function(b){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
-": "+b.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});C();this.refreshComments=C;I=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(g(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=A.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var f=c[e];d[f.getAttribute("data-commentId")]=f}for(e=0;e<K.length;e++)b(K[e])}});setInterval(I,6E4);this.refreshCommentsTime=I;this.window=
-new mxWindow(mxResources.get("comments"),x,c,e,k,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
-document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var N=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",N);this.destroy=function(){mxEvent.removeListener(window,"resize",N);this.window.destroy()}},ConfirmDialog=function(b,c,e,
-k,f,n,t,d,g,l,q){var p=document.createElement("div");p.style.textAlign="center";q=null!=q?q:44;var m=document.createElement("div");m.style.padding="6px";m.style.overflow="auto";m.style.maxHeight=q+"px";m.style.lineHeight="1.2em";mxUtils.write(m,c);p.appendChild(m);null!=l&&(m=document.createElement("div"),m.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",l),m.appendChild(c),p.appendChild(m));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
-"nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k(v.checked)});n.className="geBtn";null!=d&&(n.innerHTML=d+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");b.editor.cancelFirst&&l.appendChild(n);var u=mxUtils.button(f||mxResources.get("ok"),function(){b.hideDialog();null!=e&&e(v.checked)});l.appendChild(u);null!=t?(u.innerHTML=
-t+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(n);p.appendChild(l);g?(l.style.marginTop="10px",m=document.createElement("p"),m.style.marginTop="20px",m.style.marginBottom="0px",m.appendChild(v),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),m.appendChild(f),p.appendChild(m),mxEvent.addListener(f,
-"click",function(b){v.checked=!v.checked;mxEvent.consume(b)})):l.style.marginTop="12px";this.init=function(){u.focus()};this.container=p};function DiagramPage(b,c){this.node=b;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,e,g,k,p,t,u){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
+return this.editor.loadUrl(b,c,e,g,k,p,t,u)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
+return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,g,k,p,t,u,y,x,H,D,E,J,L,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,p,t,u,y,x,H,D,E,J,L,G)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+return this.editor.convertImages(b,c,e,g)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,e,g)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
+return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,c,e,g,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var e=localStorage.key(c),g=localStorage.getItem(e);if(0<e.length&&(".scratchpad"==e||"."!=e.charAt(0))&&0<g.length){var k=
+"<mxfile "===g.substring(0,8)||"<?xml"===g.substring(0,5)||"\x3c!--[if IE]>"===g.substring(0,12),g="<mxlibrary>"===g.substring(0,11);(k||g)&&b.push(e)}}return b};EditorUi.prototype.getLocalStorageFile=function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,c,e,k,g,p){function t(){for(var b=D.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==D&&c++;E.style.display=0==c?"block":"none"}function d(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}y={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var m=document.createElement("div");m.className="geCommentEditBtns";var p=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),t()):f();y=null});p.className="geCommentEditBtn";m.appendChild(p);var n=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);y=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
+function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(n.click(),mxEvent.consume(b)):27==b.keyCode&&(p.click(),mxEvent.consume(b)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";m.appendChild(n);c.insertBefore(m,g);k.style.display="none";g.style.display="none";l.focus()}function f(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
+[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function l(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function m(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function q(b){b.style.border="";b.removeChild(b.busyImg)}function n(c,e,g,k,p){function C(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
+"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});H.appendChild(f);e&&(f.style.display="none")}function x(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=F;b(c);return{pdiv:e,replies:d}}function N(e,f,g,p,t){function u(){l(D);c.addReply(N,function(b){N.id=b;c.replies.push(N);q(D);g&&g()},function(c){v();m(D);b.handleError(c,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},p,t)}function v(){d(N,D,function(b){u()},!0)}var C=x().pdiv,N=b.newComment(e,b.getCurrentUser());N.pCommentId=c.id;null==c.replies&&(c.replies=[]);var D=n(N,c.replies,C,k+1);f?v():u()}if(p||!c.isResolved){E.style.display="none";var F=document.createElement("div");F.className="geCommentContainer";F.setAttribute("data-commentId",c.id);F.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(F.style.backgroundColor="ghostWhite");
+var R=document.createElement("div");R.className="geCommentHeader";var S=document.createElement("img");S.className="geCommentUserImg";S.src=c.user.pictureUrl||Editor.userImage;R.appendChild(S);S=document.createElement("div");S.className="geCommentHeaderTxt";R.appendChild(S);var J=document.createElement("div");J.className="geCommentUsername";mxUtils.write(J,c.user.displayName||"");S.appendChild(J);J=document.createElement("div");J.className="geCommentDate";J.setAttribute("data-commentId",c.id);f(c,
+J);S.appendChild(J);F.appendChild(R);R=document.createElement("div");R.className="geCommentTxt";mxUtils.write(R,c.content||"");F.appendChild(R);c.isLocked&&(F.style.opacity="0.5");R=document.createElement("div");R.className="geCommentActions";var H=document.createElement("ul");H.className="geCommentActionsList";R.appendChild(H);v||c.isLocked||0!=k&&!u||C(mxResources.get("reply"),function(){N("",!0)},c.isResolved);S=b.getCurrentUser();null==S||S.id!=c.user.id||v||c.isLocked||(C(mxResources.get("edit"),
+function(){function e(){d(c,F,function(){l(F);c.editComment(c.content,function(){q(F)},function(c){m(F);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),C(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(F);c.deleteComment(function(b){if(!0===b){b=F.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=F.querySelectorAll(".geCommentAction");for(b=
+0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);q(F);F.style.opacity="0.5"}else{d=x(c).replies;for(b=0;b<d.length;b++)D.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}E.style.display=0==D.getElementsByTagName("div").length?"block":"none"}},function(c){m(F);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));v||c.isLocked||0!=k||C(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
+b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=x(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);G||(f[k].style.display="none")}t()}c.isResolved?N(mxResources.get("reOpened")+": ",!0,
+d,!1,!0):N(mxResources.get("markedAsResolved"),!1,d,!0)});F.appendChild(R);null!=g?D.insertBefore(F,g.nextSibling):D.appendChild(F);for(g=0;null!=c.replies&&g<c.replies.length;g++)R=c.replies[g],R.isResolved=c.isResolved,n(R,c.replies,null,k+1,p);null!=y&&(y.comment.id==c.id?(p=c.content,c.content=y.comment.content,d(c,F,y.saveCallback,y.deleteOnCancel),c.content=p):null==y.comment.id&&y.comment.pCommentId==c.id&&(D.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return F}}
+var v=!b.canComment(),u=b.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var H=EditorUi.compactUi?"26px":"30px",D=document.createElement("div");D.className="geCommentsList";D.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D.style.bottom=parseInt(H)+7+"px";x.appendChild(D);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(E,mxResources.get("noCommentsFound"));var J=document.createElement("div");J.className="geToolbarContainer geCommentsToolbar";J.style.height=H;J.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";J.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";H=document.createElement("a");H.className="geButton";if(!v){var L=H.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;K.push(c);q(g)},function(c){m(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=n(f,K,null,0);e();c.preventDefault();mxEvent.consume(c)});J.appendChild(L)}L=H.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
+var G=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(b){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";C();b.preventDefault();mxEvent.consume(b)});J.appendChild(L);b.commentsRefreshNeeded()&&(L=H.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(b){C();
+b.preventDefault();mxEvent.consume(b)}),J.appendChild(L));b.commentsSaveNeeded()&&(H=H.cloneNode(),H.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',H.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(H.style.filter="invert(100%)"),mxEvent.addListener(H,"click",function(b){p();b.preventDefault();mxEvent.consume(b)}),J.appendChild(H));x.appendChild(J);var K=[],C=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
+var c=y.div.querySelector(".geCommentEditTxtArea"),e=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);e.parentNode.removeChild(e)}catch(N){b.handleError(N)}D.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";u=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
+new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});D.innerHTML="";D.appendChild(E);E.style.display="block";K=b;for(b=0;b<K.length;b++)c(K[b].replies),n(K[b],K,null,0,G);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(D.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
+": "+b.message:""));this.hasError=!0})):D.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});C();this.refreshComments=C;J=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(f(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=D.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var g=c[e];d[g.getAttribute("data-commentId")]=g}for(e=0;e<K.length;e++)b(K[e])}});setInterval(J,6E4);this.refreshCommentsTime=J;this.window=
+new mxWindow(mxResources.get("comments"),x,c,e,k,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
+document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(b,c,e,
+k,g,p,t,d,f,l,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=m+"px";n.style.lineHeight="1.2em";mxUtils.write(n,c);q.appendChild(n);null!=l&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",l),n.appendChild(c),q.appendChild(n));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
+"nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k(v.checked)});p.className="geBtn";null!=d&&(p.innerHTML=d+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&l.appendChild(p);var u=mxUtils.button(g||mxResources.get("ok"),function(){b.hideDialog();null!=e&&e(v.checked)});l.appendChild(u);null!=t?(u.innerHTML=
+t+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(p);q.appendChild(l);f?(l.style.marginTop="10px",n=document.createElement("p"),n.style.marginTop="20px",n.style.marginBottom="0px",n.appendChild(v),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),n.appendChild(g),q.appendChild(n),mxEvent.addListener(g,
+"click",function(b){v.checked=!v.checked;mxEvent.consume(b)})):l.style.marginTop="12px";this.init=function(){u.focus()};this.container=q};function DiagramPage(b,c){this.node=b;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,c,e){this.ui=b;this.page=c;this.previous=this.name=e}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,c,e){this.ui=b;this.oldIndex=c;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,c,e){this.ui=b;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c),null!=e&&(c.viewState=e,this.neverShown=!1))}
SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){var b=this.ui.currentPage,c=this.ui.editor,e=c.graph,k=Graph.compressNode(c.getGraphXml(!0));mxUtils.setTextContent(b.node,k);b.viewState=e.getViewState();b.root=e.model.root;null!=b.model&&b.model.rootChanged(b.root);e.view.clear(b.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;e.model.prefix=Editor.guid()+"-";e.model.rootChanged(b.root);
e.setViewState(b.viewState);e.gridEnabled=e.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);c.updateGraphComponents();e.view.validate();e.blockMathRender=!0;e.sizeDidChange();e.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());c.graph.fireEvent(new mxEventObject(mxEvent.ROOT));c.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(b,c,e,k,f){SelectPage.call(this,b,e);this.relatedPage=c;this.index=k;this.previousIndex=null;this.noSelect=f}mxUtils.extend(ChangePage,SelectPage);
+function ChangePage(b,c,e,k,g){SelectPage.call(this,b,e);this.relatedPage=c;this.index=k;this.previousIndex=null;this.noSelect=g}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
EditorUi.prototype.getPageIndex=function(b){var c=null;if(null!=this.pages&&null!=b)for(var e=0;e<this.pages.length;e++)if(this.pages[e]==b){c=e;break}return c};EditorUi.prototype.getPageById=function(b){if(null!=this.pages)for(var c=0;c<this.pages.length;c++)if(this.pages[c].getId()==b)return this.pages[c];return null};
EditorUi.prototype.createImageForPageLink=function(b,c){var e=b.indexOf(","),k=null;0<e&&(e=this.getPageById(b.substring(e+1)),null!=e&&e!=c&&(k=this.getImageForPage(e,c),k.originalSrc=b));null==k&&(k={originalSrc:b});return k};
-EditorUi.prototype.getImageForPage=function(b,c){var e=this.editor.graph.getGlobalVariable,k=this.createTemporaryGraph(this.editor.graph.getStylesheet()),f=this.getPageIndex(null!=c?c:this.currentPage);k.getGlobalVariable=function(b){return"pagenumber"==b?f+1:"page"==b&&null!=c?c.getName():e.apply(this,arguments)};document.body.appendChild(k.container);this.updatePageRoot(b);k.model.setRoot(b.root);var n=k.getSvg(),t=k.getGraphBounds();document.body.removeChild(k.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(n)),
+EditorUi.prototype.getImageForPage=function(b,c){var e=this.editor.graph.getGlobalVariable,k=this.createTemporaryGraph(this.editor.graph.getStylesheet()),g=this.getPageIndex(null!=c?c:this.currentPage);k.getGlobalVariable=function(b){return"pagenumber"==b?g+1:"page"==b&&null!=c?c.getName():e.apply(this,arguments)};document.body.appendChild(k.container);this.updatePageRoot(b);k.model.setRoot(b.root);var p=k.getSvg(),t=k.getGraphBounds();document.body.removeChild(k.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(p)),
t.width,t.height,t.x,t.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,c=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var e=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";e!=this.tabContainer.style.height&&this.refresh(!1)}c.apply(b.view,arguments)});var e=null,k=mxUtils.bind(this,function(){this.updateTabContainer();var c=this.currentPage;null!=c&&c!=e&&(null==c.viewState||null==c.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+c.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+c.viewState.scrollTop),e=c);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=
this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,c){for(var e=c.getProperty("edit").changes,d=0;d<e.length;d++)if(e[d]instanceof SelectPage||e[d]instanceof RenamePage||e[d]instanceof MovePage||e[d]instanceof mxRootChange){k();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,c,e){b=null!=b?this.getPageById(b.getId()):null;var k=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,c):(k.setViewState(c),this.editor.updateGraphComponents(),k.view.revalidate(),k.sizeDidChange()),k.container.scrollLeft=k.view.translate.x*k.view.scale+c.scrollLeft,k.container.scrollTop=k.view.translate.y*k.view.scale+c.scrollTop,k.restoreSelection(e))};
-Graph.prototype.createViewState=function(b){var c=b.getAttribute("page"),e=parseFloat(b.getAttribute("pageScale")),k=parseFloat(b.getAttribute("pageWidth")),f=parseFloat(b.getAttribute("pageHeight")),n=b.getAttribute("background"),t=this.parseBackgroundImage(b.getAttribute("backgroundImage")),d=b.getAttribute("extFonts");if(d)try{d=d.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}})}catch(g){console.log("ExtFonts format error: "+g.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:t,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(k)||isNaN(f)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,k,f),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:d||[]}};
+Graph.prototype.createViewState=function(b){var c=b.getAttribute("page"),e=parseFloat(b.getAttribute("pageScale")),k=parseFloat(b.getAttribute("pageWidth")),g=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),t=this.parseBackgroundImage(b.getAttribute("backgroundImage")),d=b.getAttribute("extFonts");if(d)try{d=d.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}})}catch(f){console.log("ExtFonts format error: "+f.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:t,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(k)||isNaN(g)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,k,g),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:d||[]}};
Graph.prototype.saveViewState=function(b,c,e,k){e||(c.setAttribute("grid",null==b||b.gridEnabled?"1":"0"),c.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),c.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),c.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),c.setAttribute("connect",null==b||b.connect?"1":"0"),c.setAttribute("arrows",null==b||b.arrows?"1":"0"),c.setAttribute("page",null==b&&this.defaultPageVisible||null!=b&&b.pageVisible?"1":"0"),c.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));c.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);e=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=e&&(c.setAttribute("pageWidth",e.width),c.setAttribute("pageHeight",e.height));null!=b&&(null!=b.background&&c.setAttribute("background",b.background),k=this.getBackgroundImageObject(b.backgroundImage,k),null!=k&&c.setAttribute("backgroundImage",
JSON.stringify(k)));c.setAttribute("math",null!=b&&b.mathEnabled?"1":"0");c.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&c.setAttribute("extFonts",b.extFonts.map(function(b){return b.name+"^"+b.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
Graph.prototype.setViewState=function(b,c){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
-this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var e=this.extFonts;this.extFonts=b.extFonts||[];if(c&&null!=e)for(var k=0;k<e.length;k++){var f=document.getElementById("extFont_"+e[k].name);null!=f&&f.parentNode.removeChild(f)}for(k=0;k<this.extFonts.length;k++)this.addExtFont(this.extFonts[k].name,this.extFonts[k].url,
+this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var e=this.extFonts;this.extFonts=b.extFonts||[];if(c&&null!=e)for(var k=0;k<e.length;k++){var g=document.getElementById("extFont_"+e[k].name);null!=g&&g.parentNode.removeChild(g)}for(k=0;k<this.extFonts.length;k++)this.addExtFont(this.extFonts[k].name,this.extFonts[k].url,
!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=
"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0,this.hiddenTags=
[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};
-Graph.prototype.addExtFont=function(b,c,e){if(b&&c){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:c});var k="extFont_"+b;if(null==document.getElementById(k))if(0==c.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",c,null,k);else{document.getElementsByTagName("head");var f=document.createElement("style");f.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+c+'");\n}'));f.setAttribute("id",k);document.getElementsByTagName("head")[0].appendChild(f)}if(!e){null==
-this.extFonts&&(this.extFonts=[]);e=this.extFonts;k=!0;for(f=0;f<e.length;f++)if(e[f].name==b){k=!1;break}k&&this.extFonts.push({name:b,url:c})}}};
+Graph.prototype.addExtFont=function(b,c,e){if(b&&c){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:c});var k="extFont_"+b;if(null==document.getElementById(k))if(0==c.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",c,null,k);else{document.getElementsByTagName("head");var g=document.createElement("style");g.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+c+'");\n}'));g.setAttribute("id",k);document.getElementsByTagName("head")[0].appendChild(g)}if(!e){null==
+this.extFonts&&(this.extFonts=[]);e=this.extFonts;k=!0;for(g=0;g<e.length;g++)if(e[g].name==b){k=!1;break}k&&this.extFonts.push({name:b,url:c})}}};
EditorUi.prototype.updatePageRoot=function(b,c){if(null==b.root){var e=this.editor.extractGraphModel(b.node,null,c),k=Editor.extractParserError(e);if(k)throw Error(k);null!=e?(b.graphModelNode=e,b.viewState=this.editor.graph.createViewState(e),k=new mxCodec(e.ownerDocument),b.root=k.decode(e).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){e=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(e))throw Error(k);null!=e&&(b.graphModelNode=
e)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,c,e){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c=null!=c?c:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var k=this.editor.graph.model.createUndoableEdit();k.ignoreEdit=!0;var f=new SelectPage(this,b,e);f.execute();k.add(f);k.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",k))}}catch(n){this.handleError(n)}};
+EditorUi.prototype.selectPage=function(b,c,e){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c=null!=c?c:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var k=this.editor.graph.model.createUndoableEdit();k.ignoreEdit=!0;var g=new SelectPage(this,b,e);g.execute();k.add(g);k.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",k))}}catch(p){this.handleError(p)}};
EditorUi.prototype.selectNextPage=function(b){var c=this.currentPage;null!=c&&null!=this.pages&&(c=mxUtils.indexOf(this.pages,c),b?this.selectPage(this.pages[mxUtils.mod(c+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(c-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(b,c){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:this.createPage(null,this.createPageId());c=null!=c?c:this.pages.length;var e=new ChangePage(this,b,b,c);this.editor.graph.model.execute(e)}return b};EditorUi.prototype.createPageId=function(){var b;do b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,c){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),c);e.setName(null!=b?b:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var b={},c=0;c<this.pages.length;c++){var e=this.pages[c].getName();null!=e&&0<e.length&&(b[e]=e)}c=this.pages.length;do e=mxResources.get("pageWithNumber",[++c]);while(null!=b[e]);return e};
-EditorUi.prototype.removePage=function(b){try{var c=this.editor.graph,e=mxUtils.indexOf(this.pages,b);if(c.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c.model.beginUpdate();try{var k=this.currentPage;k==b&&1<this.pages.length?(e==this.pages.length-1?e--:e++,k=this.pages[e]):1>=this.pages.length&&(k=this.insertPage(),c.model.execute(new RenamePage(this,k,mxResources.get("pageWithNumber",[1]))));c.model.execute(new ChangePage(this,b,k))}finally{c.model.endUpdate()}}}catch(f){this.handleError(f)}return b};
-EditorUi.prototype.duplicatePage=function(b,c){var e=null;try{var k=this.editor.graph;if(k.isEnabled()){k.isEditing()&&k.stopEditing();var f=b.node.cloneNode(!1);f.removeAttribute("id");var n={},t=k.createCellLookup([k.model.root]),e=new DiagramPage(f);e.root=k.cloneCell(k.model.root,null,n);e.viewState=k.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(c);e=this.insertPage(e,mxUtils.indexOf(this.pages,
-b)+1);k.updateCustomLinks(k.createCellMapping(n,t),[e.root])}}catch(d){this.handleError(d)}return e};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var c=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,b,c))}),mxResources.get("rename"));this.showDialog(c.container,300,80,!0,!0);c.init()}return b};
+EditorUi.prototype.removePage=function(b){try{var c=this.editor.graph,e=mxUtils.indexOf(this.pages,b);if(c.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c.model.beginUpdate();try{var k=this.currentPage;k==b&&1<this.pages.length?(e==this.pages.length-1?e--:e++,k=this.pages[e]):1>=this.pages.length&&(k=this.insertPage(),c.model.execute(new RenamePage(this,k,mxResources.get("pageWithNumber",[1]))));c.model.execute(new ChangePage(this,b,k))}finally{c.model.endUpdate()}}}catch(g){this.handleError(g)}return b};
+EditorUi.prototype.duplicatePage=function(b,c){var e=null;try{var k=this.editor.graph;if(k.isEnabled()){k.isEditing()&&k.stopEditing();var g=b.node.cloneNode(!1);g.removeAttribute("id");var p={},t=k.createCellLookup([k.model.root]),e=new DiagramPage(g);e.root=k.cloneCell(k.model.root,null,p);e.viewState=k.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(c);e=this.insertPage(e,mxUtils.indexOf(this.pages,
+b)+1);k.updateCustomLinks(k.createCellMapping(p,t),[e.root])}}catch(d){this.handleError(d)}return e};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var c=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,b,c))}),mxResources.get("rename"));this.showDialog(c.container,300,80,!0,!0);c.init()}return b};
EditorUi.prototype.movePage=function(b,c){this.editor.graph.model.execute(new MovePage(this,b,c))};EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,c=document.createElement("div");c.style.position="relative";c.style.display="inline-block";c.style.verticalAlign="top";c.style.height=this.tabContainer.style.height;c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.fontSize="13px";c.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,k=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-e)/this.pages.length)+
-1),f=null,n=0;n<this.pages.length;n++)mxUtils.bind(this,function(d,e){this.pages[d]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){b.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),f=d):mxEvent.consume(c)}));mxEvent.addListener(e,"dragend",mxUtils.bind(this,function(b){f=null;b.stopPropagation();
-b.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(b){null!=f&&(b.dataTransfer.dropEffect="move");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(b){null!=f&&d!=f&&this.movePage(f,d);b.stopPropagation();b.preventDefault()}));c.appendChild(e)})(n,this.createTabForPage(this.pages[n],k,this.pages[n]!=this.currentPage,n+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);k=this.createPageMenuTab();this.tabContainer.appendChild(k);
+1),g=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(d,e){this.pages[d]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){b.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=d):mxEvent.consume(c)}));mxEvent.addListener(e,"dragend",mxUtils.bind(this,function(b){g=null;b.stopPropagation();
+b.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(b){null!=g&&(b.dataTransfer.dropEffect="move");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(b){null!=g&&d!=g&&this.movePage(g,d);b.stopPropagation();b.preventDefault()}));c.appendChild(e)})(p,this.createTabForPage(this.pages[p],k,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);k=this.createPageMenuTab();this.tabContainer.appendChild(k);
k=null;this.isPageInsertTabVisible()&&(k=this.createPageInsertTab(),this.tabContainer.appendChild(k));if(c.clientWidth>this.tabContainer.clientWidth-e){null!=k&&(k.style.position="absolute",k.style.right="0px",c.style.marginRight="30px");var t=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");t.style.position="absolute";t.style.right=this.editor.chromeless?"29px":"55px";t.style.fontSize="13pt";this.tabContainer.appendChild(t);var d=this.createControlTab(4,"&nbsp;&#10095;");d.style.position="absolute";
-d.style.right=this.editor.chromeless?"0px":"29px";d.style.fontSize="13pt";this.tabContainer.appendChild(d);var g=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=g+"px";mxEvent.addListener(t,"click",mxUtils.bind(this,function(b){c.scrollLeft-=Math.max(20,g-20);mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(b)}));mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,
-c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){c.scrollLeft+=Math.max(20,g-20);mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(b)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+d.style.right=this.editor.chromeless?"0px":"29px";d.style.fontSize="13pt";this.tabContainer.appendChild(d);var f=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=f+"px";mxEvent.addListener(t,"click",mxUtils.bind(this,function(b){c.scrollLeft-=Math.max(20,f-20);mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(b)}));mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,
+c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){c.scrollLeft+=Math.max(20,f-20);mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(b)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var c=document.createElement("div");c.style.display="inline-block";c.style.whiteSpace="nowrap";c.style.boxSizing="border-box";c.style.position="relative";c.style.overflow="hidden";c.style.textAlign="center";c.style.marginLeft="-1px";c.style.height=this.tabContainer.clientHeight+"px";c.style.padding="12px 4px 8px 4px";c.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";c.style.borderTopStyle="none";c.style.borderBottomStyle="none";c.style.backgroundColor=
this.tabContainer.style.backgroundColor;c.style.cursor="move";c.style.color="gray";b&&(mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(b){this.editor.graph.isMouseDown||(c.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(b))})),mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(b){c.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(b)})));return c};
EditorUi.prototype.createControlTab=function(b,c,e){e=this.createTab(null!=e?e:!0);e.style.lineHeight=this.tabContainerHeight+"px";e.style.paddingTop=b+"px";e.style.cursor="pointer";e.style.width="30px";e.innerHTML=c;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
EditorUi.prototype.createPageMenuTab=function(b){b=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;margin-top:5px;width:21px;height:21px;"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(mxUtils.bind(this,function(b,c){for(var d=0;d<
this.pages.length;d++)mxUtils.bind(this,function(d){var e=b.addItem(this.pages[d].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[d])}),c),f=this.pages[d].getId();e.setAttribute("title",this.pages[d].getName()+(null!=f?" ("+f+")":"")+" ["+(d+1)+"]");this.pages[d]==this.currentPage&&b.addCheckmark(e,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){b.addSeparator(c);b.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),c);var e=
this.currentPage;null!=e&&(b.addSeparator(c),d=e.getName(),b.addItem(mxResources.get("removeIt",[d]),null,mxUtils.bind(this,function(){this.removePage(e)}),c),b.addItem(mxResources.get("renameIt",[d]),null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),c),b.addSeparator(c),b.addItem(mxResources.get("duplicateIt",[d]),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),c))}}));c.div.className+=" geMenubarMenu";c.smartSeparators=!0;c.showDisabled=
-!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var k=mxEvent.getClientX(b),f=mxEvent.getClientY(b);c.popup(k,f,null,b);this.setCurrentMenu(c);mxEvent.consume(b)}));return b};
+!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var k=mxEvent.getClientX(b),g=mxEvent.getClientY(b);c.popup(k,g,null,b);this.setCurrentMenu(c);mxEvent.consume(b)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){this.insertPage();mxEvent.consume(b)}));return b};
-EditorUi.prototype.createTabForPage=function(b,c,e,k){e=this.createTab(e);var f=b.getName()||mxResources.get("untitled"),n=b.getId();e.setAttribute("title",f+(null!=n?" ("+n+")":"")+" ["+k+"]");mxUtils.write(e,f);e.style.maxWidth=c+"px";e.style.width=c+"px";this.addTabListeners(b,e);42<c&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(b,c){mxEvent.disableContextMenu(c);var e=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(c){this.renamePage(b);mxEvent.consume(c)}));var k=!1,f=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){k=null!=this.currentMenu;f=b==this.currentPage;e.isMouseDown||f||this.selectPage(b)}),null,mxUtils.bind(this,function(n){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(n)&&f||mxEvent.isPopupTrigger(n))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!k){var t=new mxPopupMenu(this.createPageMenu(b));t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);this.resetCurrentMenu();t.destroy()});var d=mxEvent.getClientX(n),g=mxEvent.getClientY(n);t.popup(d,g,null,n);this.setCurrentMenu(t,c)}mxEvent.consume(n)}}))};
-EditorUi.prototype.getLinkForPage=function(b,c,e){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var k=this.getCurrentFile();if(null!=k&&k.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var f=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),f=f+((0==f.length?"?":"&")+"page-id="+b.getId());null!=c&&(f+="&"+c.join("&"));return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+f+"#"+k.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(b,c){return mxUtils.bind(this,function(e,k){var f=this.editor.graph;e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),k);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),k);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,c)}),k);null!=this.getLinkForPage(b)&&(e.addSeparator(k),e.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,e,d,g,k,q){c=this.createUrlParameters(c,e,d,g,k,q);d||c.push("hide-pages=1");f.isSelectionEmpty()||(d=f.getBoundingBox(f.getSelectionCells()),e=f.view.translate,k=f.view.scale,d.width/=k,d.height/=k,d.x=d.x/k-e.x,d.y=d.y/k-e.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
-g=new EmbedDialog(this,this.getLinkForPage(b,c,g));this.showDialog(g.container,440,240,!0,!0);g.init()}))})));e.addSeparator(k);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),k);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(k),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
+EditorUi.prototype.createTabForPage=function(b,c,e,k){e=this.createTab(e);var g=b.getName()||mxResources.get("untitled"),p=b.getId();e.setAttribute("title",g+(null!=p?" ("+p+")":"")+" ["+k+"]");mxUtils.write(e,g);e.style.maxWidth=c+"px";e.style.width=c+"px";this.addTabListeners(b,e);42<c&&(e.style.textOverflow="ellipsis");return e};
+EditorUi.prototype.addTabListeners=function(b,c){mxEvent.disableContextMenu(c);var e=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(c){this.renamePage(b);mxEvent.consume(c)}));var k=!1,g=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){k=null!=this.currentMenu;g=b==this.currentPage;e.isMouseDown||g||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(p)&&g||mxEvent.isPopupTrigger(p))){e.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!k){var t=new mxPopupMenu(this.createPageMenu(b));t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);this.resetCurrentMenu();t.destroy()});var d=mxEvent.getClientX(p),f=mxEvent.getClientY(p);t.popup(d,f,null,p);this.setCurrentMenu(t,c)}mxEvent.consume(p)}}))};
+EditorUi.prototype.getLinkForPage=function(b,c,e){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var k=this.getCurrentFile();if(null!=k&&k.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var g=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),g=g+((0==g.length?"?":"&")+"page-id="+b.getId());null!=c&&(g+="&"+c.join("&"));return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+g+"#"+k.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(b,c){return mxUtils.bind(this,function(e,k){var g=this.editor.graph;e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),k);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),k);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,c)}),k);null!=this.getLinkForPage(b)&&(e.addSeparator(k),e.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,e,d,f,k,m){c=this.createUrlParameters(c,e,d,f,k,m);d||c.push("hide-pages=1");g.isSelectionEmpty()||(d=g.getBoundingBox(g.getSelectionCells()),e=g.view.translate,k=g.view.scale,d.width/=k,d.height/=k,d.x=d.x/k-e.x,d.y=d.y/k-e.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
+f=new EmbedDialog(this,this.getLinkForPage(b,c,f));this.showDialog(f.container,440,240,!0,!0);f.init()}))})));e.addSeparator(k);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),k);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(k),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),k))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){b=k.oldIndex;k.oldIndex=k.newIndex;k.newIndex=b;return k};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){b=k.previous;k.previous=k.name;k.name=b;return k};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),c="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");b.afterEncode=function(b,k,f){f.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(f.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&f.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(b,e){return 0>mxUtils.indexOf(c,
-b)?e:void 0})),null!=k.relatedPage.root&&b.encodeCell(k.relatedPage.root,f));return f};b.beforeDecode=function(b,c,f){f.ui=b.ui;f.relatedPage=f.ui.getPageById(c.getAttribute("relatedPage"));if(null==f.relatedPage){var e=c.ownerDocument.createElement("diagram");e.setAttribute("id",c.getAttribute("relatedPage"));e.setAttribute("name",c.getAttribute("name"));f.relatedPage=new DiagramPage(e);e=c.getAttribute("viewState");null!=e&&(f.relatedPage.viewState=JSON.parse(e),c.removeAttribute("viewState"));
-c=c.cloneNode(!0);e=c.firstChild;if(null!=e)for(f.relatedPage.root=b.decodeCell(e,!1),f=e.nextSibling,e.parentNode.removeChild(e),e=f;null!=e;){f=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var k=e.getAttribute("id");null==b.lookup(k)&&b.decodeCell(e)}e.parentNode.removeChild(e);e=f}}return c};b.afterDecode=function(b,c,f){f.index=f.previousIndex;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,e,n,t,d){e=null!=e?e:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var f=n.slice(),k=0;k<n.length;k++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[k]),"treeFolding","0")&&this.foldTreeCell(c,n[k]);n=f;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=
-function(b,c){this.model.beginUpdate();try{var e=[];this.traverse(c,!0,mxUtils.bind(this,function(b,f){var d=null!=f&&this.isTreeEdge(f);d&&e.push(f);b==c||null!=f&&!d||e.push(b);return(null==f||d)&&(b==c||!this.model.isCollapsed(b))}));this.model.setCollapsed(c,b);for(var f=0;f<e.length;f++)this.model.setVisible(e[f],!b)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(b){return!this.isEdgeIgnored(b)};Graph.prototype.getTreeEdges=function(b,c,e,t,d,g){return this.model.filterCells(this.getEdges(b,
-c,e,t,d,g),mxUtils.bind(this,function(b){return this.isTreeEdge(b)}))};Graph.prototype.getIncomingTreeEdges=function(b,c){return this.getTreeEdges(b,c,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(b,c){return this.getTreeEdges(b,c,!1,!0,!1)};var c=EditorUi.prototype.init;EditorUi.prototype.init=function(){c.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(b){return B.isVertex(b)&&e(b)}function c(b){var c=
-!1;null!=b&&(c="1"==u.getCurrentCellStyle(b).treeMoving);return c}function e(b){var c=!1;null!=b&&(b=B.getParent(b),c=u.view.getState(b),c="tree"==(null!=c?c.style:u.getCellStyle(b)).containerType);return c}function t(b){var c=!1;null!=b&&(b=B.getParent(b),c=u.view.getState(b),u.view.getState(b),c=null!=(null!=c?c.style:u.getCellStyle(b)).childLayout);return c}function d(b){b=u.view.getState(b);if(null!=b){var c=u.getIncomingTreeEdges(b.cell);if(0<c.length&&(c=u.view.getState(c[0]),null!=c&&(c=c.absolutePoints,
-null!=c&&0<c.length&&(c=c[c.length-1],null!=c)))){if(c.y==b.y&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_SOUTH;if(c.y==b.y+b.height&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_NORTH;if(c.x>b.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function g(b,c){c=null!=c?c:!0;u.model.beginUpdate();try{var e=u.model.getParent(b),f=u.getIncomingTreeEdges(b),g=u.cloneCells([f[0],b]);u.model.setTerminal(g[0],u.model.getTerminal(f[0],
-!0),!0);var k=d(b),l=e.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;u.view.currentRoot!=e&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var m=u.view.getState(b),n=u.view.scale;if(null!=m){var p=mxRectangle.fromRectangle(m);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?p.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*n:p.y+=(c?
-b.geometry.height+10:-g[1].geometry.height-10)*n;var t=u.getOutgoingTreeEdges(u.model.getTerminal(f[0],!0));if(null!=t){for(var q=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,A=l=f=0;A<t.length;A++){var v=u.model.getTerminal(t[A],!1);if(k==d(v)){var x=u.view.getState(v);v!=b&&null!=x&&(q&&c!=x.getCenterX()<m.getCenterX()||!q&&c!=x.getCenterY()<m.getCenterY())&&mxUtils.intersects(p,x)&&(f=10+Math.max(f,(Math.min(p.x+p.width,x.x+x.width)-Math.max(p.x,x.x))/n),l=10+Math.max(l,(Math.min(p.y+
-p.height,x.y+x.height)-Math.max(p.y,x.y))/n))}}q?l=0:f=0;for(A=0;A<t.length;A++)if(v=u.model.getTerminal(t[A],!1),k==d(v)&&(x=u.view.getState(v),v!=b&&null!=x&&(q&&c!=x.getCenterX()<m.getCenterX()||!q&&c!=x.getCenterY()<m.getCenterY()))){var C=[];u.traverse(x.cell,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&C.push(c);(null==c||d)&&C.push(b);return null==c||d});u.moveCells(C,(c?1:-1)*f,(c?1:-1)*l)}}}return u.addCells(g,e)}finally{u.model.endUpdate()}}function l(b){u.model.beginUpdate();try{var c=
-d(b),e=u.getIncomingTreeEdges(b),f=u.cloneCells([e[0],b]);u.model.setTerminal(e[0],f[1],!1);u.model.setTerminal(f[0],f[1],!0);u.model.setTerminal(f[0],b,!1);var g=u.model.getParent(b),k=g.geometry,l=[];u.view.currentRoot!=g&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);u.traverse(b,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var m=b.geometry.width+40,n=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?m=0:c==mxConstants.DIRECTION_NORTH?
-(m=0,n=-n):c==mxConstants.DIRECTION_WEST?(m=-m,n=0):c==mxConstants.DIRECTION_EAST&&(n=0);u.moveCells(l,m,n);return u.addCells(f,g)}finally{u.model.endUpdate()}}function q(b,c){u.model.beginUpdate();try{var e=u.model.getParent(b),f=u.getIncomingTreeEdges(b),g=d(b);0==f.length&&(f=[u.createEdge(e,null,"",null,null,u.createCurrentEdgeStyle())],g=c);var k=u.cloneCells([f[0],b]);u.model.setTerminal(k[0],b,!0);if(null==u.model.getTerminal(k[0],!1)){u.model.setTerminal(k[0],k[1],!1);var l=u.getCellStyle(k[1]).newEdgeStyle;
-if(null!=l)try{var m=JSON.parse(l),n;for(n in m)u.setCellStyles(n,m[n],[k[0]]),"edgeStyle"==n&&"elbowEdgeStyle"==m[n]&&u.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(ca){}}var f=u.getOutgoingTreeEdges(b),p=e.geometry,l=[];u.view.currentRoot==e&&(p=new mxRectangle);for(m=0;m<f.length;m++){var t=u.model.getTerminal(f[m],!1);null!=t&&l.push(t)}var q=u.view.getBounds(l),A=u.view.translate,v=u.view.scale;g==mxConstants.DIRECTION_SOUTH?
-(k[1].geometry.x=null==q?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(q.x+q.width)/v-A.x-p.x+10,k[1].geometry.y+=k[1].geometry.height-p.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==q?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(q.x+q.width)/v-A.x+-p.x+10,k[1].geometry.y-=k[1].geometry.height+p.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+p.x+40):k[1].geometry.x+(k[1].geometry.width-p.x+40),k[1].geometry.y=null==q?b.geometry.y+
-(b.geometry.height-k[1].geometry.height)/2:(q.y+q.height)/v-A.y+-p.y+10);return u.addCells(k,e)}finally{u.model.endUpdate()}}function p(b,c,d){b=u.getOutgoingTreeEdges(b);d=u.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=u.view.getState(u.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
-d.y-d.height})}return e}function m(b,c){var e=d(b),f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST)==f&&e!=c?v.actions.get("selectParent").funct():e==c?(f=u.getOutgoingTreeEdges(b),null!=f&&0<f.length&&u.setSelectionCell(u.model.getTerminal(f[0],!1))):(e=u.getIncomingTreeEdges(b),null!=e&&0<e.length&&(f=p(u.model.getTerminal(e[0],!0),f,b),e=u.view.getState(b),null!=e&&(e=mxUtils.indexOf(f,e),0<=e&&(e+=c==mxConstants.DIRECTION_NORTH||
-c==mxConstants.DIRECTION_WEST?-1:1,0<=e&&e<=f.length-1&&u.setSelectionCell(f[e].cell)))))}var v=this,u=v.editor.graph,B=u.getModel(),x=v.menus.createPopupMenu;v.menus.createPopupMenu=function(c,d,e){x.apply(this,arguments);if(1==u.getSelectionCount()){d=u.getSelectionCell();var f=u.getOutgoingTreeEdges(d);c.addSeparator();0<f.length&&(b(u.getSelectionCell())&&this.addMenuItems(c,["selectChildren"],null,e),this.addMenuItems(c,["selectDescendants"],null,e));b(u.getSelectionCell())?(c.addSeparator(),
+(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),c="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");b.afterEncode=function(b,k,g){g.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(g.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&g.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(b,e){return 0>mxUtils.indexOf(c,
+b)?e:void 0})),null!=k.relatedPage.root&&b.encodeCell(k.relatedPage.root,g));return g};b.beforeDecode=function(b,c,g){g.ui=b.ui;g.relatedPage=g.ui.getPageById(c.getAttribute("relatedPage"));if(null==g.relatedPage){var e=c.ownerDocument.createElement("diagram");e.setAttribute("id",c.getAttribute("relatedPage"));e.setAttribute("name",c.getAttribute("name"));g.relatedPage=new DiagramPage(e);e=c.getAttribute("viewState");null!=e&&(g.relatedPage.viewState=JSON.parse(e),c.removeAttribute("viewState"));
+c=c.cloneNode(!0);e=c.firstChild;if(null!=e)for(g.relatedPage.root=b.decodeCell(e,!1),g=e.nextSibling,e.parentNode.removeChild(e),e=g;null!=e;){g=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var k=e.getAttribute("id");null==b.lookup(k)&&b.decodeCell(e)}e.parentNode.removeChild(e);e=g}}return c};b.afterDecode=function(b,c,g){g.index=g.previousIndex;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,e,p,t,d){e=null!=e?e:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var f=p.slice(),g=0;g<p.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[g]),"treeFolding","0")&&this.foldTreeCell(c,p[g]);p=f;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
+function(b,c){this.model.beginUpdate();try{var e=[];this.traverse(c,!0,mxUtils.bind(this,function(b,f){var d=null!=f&&this.isTreeEdge(f);d&&e.push(f);b==c||null!=f&&!d||e.push(b);return(null==f||d)&&(b==c||!this.model.isCollapsed(b))}));this.model.setCollapsed(c,b);for(var g=0;g<e.length;g++)this.model.setVisible(e[g],!b)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(b){return!this.isEdgeIgnored(b)};Graph.prototype.getTreeEdges=function(b,c,e,t,d,f){return this.model.filterCells(this.getEdges(b,
+c,e,t,d,f),mxUtils.bind(this,function(b){return this.isTreeEdge(b)}))};Graph.prototype.getIncomingTreeEdges=function(b,c){return this.getTreeEdges(b,c,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(b,c){return this.getTreeEdges(b,c,!1,!0,!1)};var c=EditorUi.prototype.init;EditorUi.prototype.init=function(){c.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(b){return y.isVertex(b)&&e(b)}function c(b){var c=
+!1;null!=b&&(c="1"==u.getCurrentCellStyle(b).treeMoving);return c}function e(b){var c=!1;null!=b&&(b=y.getParent(b),c=u.view.getState(b),c="tree"==(null!=c?c.style:u.getCellStyle(b)).containerType);return c}function t(b){var c=!1;null!=b&&(b=y.getParent(b),c=u.view.getState(b),u.view.getState(b),c=null!=(null!=c?c.style:u.getCellStyle(b)).childLayout);return c}function d(b){b=u.view.getState(b);if(null!=b){var c=u.getIncomingTreeEdges(b.cell);if(0<c.length&&(c=u.view.getState(c[0]),null!=c&&(c=c.absolutePoints,
+null!=c&&0<c.length&&(c=c[c.length-1],null!=c)))){if(c.y==b.y&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_SOUTH;if(c.y==b.y+b.height&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_NORTH;if(c.x>b.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(b,c){c=null!=c?c:!0;u.model.beginUpdate();try{var e=u.model.getParent(b),f=u.getIncomingTreeEdges(b),g=u.cloneCells([f[0],b]);u.model.setTerminal(g[0],u.model.getTerminal(f[0],
+!0),!0);var k=d(b),l=e.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;u.view.currentRoot!=e&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var m=u.view.getState(b),p=u.view.scale;if(null!=m){var n=mxRectangle.fromRectangle(m);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?n.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*p:n.y+=(c?
+b.geometry.height+10:-g[1].geometry.height-10)*p;var q=u.getOutgoingTreeEdges(u.model.getTerminal(f[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,v=l=f=0;v<q.length;v++){var C=u.model.getTerminal(q[v],!1);if(k==d(C)){var x=u.view.getState(C);C!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY())&&mxUtils.intersects(n,x)&&(f=10+Math.max(f,(Math.min(n.x+n.width,x.x+x.width)-Math.max(n.x,x.x))/p),l=10+Math.max(l,(Math.min(n.y+
+n.height,x.y+x.height)-Math.max(n.y,x.y))/p))}}t?l=0:f=0;for(v=0;v<q.length;v++)if(C=u.model.getTerminal(q[v],!1),k==d(C)&&(x=u.view.getState(C),C!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY()))){var D=[];u.traverse(x.cell,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&D.push(c);(null==c||d)&&D.push(b);return null==c||d});u.moveCells(D,(c?1:-1)*f,(c?1:-1)*l)}}}return u.addCells(g,e)}finally{u.model.endUpdate()}}function l(b){u.model.beginUpdate();try{var c=
+d(b),e=u.getIncomingTreeEdges(b),f=u.cloneCells([e[0],b]);u.model.setTerminal(e[0],f[1],!1);u.model.setTerminal(f[0],f[1],!0);u.model.setTerminal(f[0],b,!1);var g=u.model.getParent(b),k=g.geometry,l=[];u.view.currentRoot!=g&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);u.traverse(b,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var m=b.geometry.width+40,p=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?m=0:c==mxConstants.DIRECTION_NORTH?
+(m=0,p=-p):c==mxConstants.DIRECTION_WEST?(m=-m,p=0):c==mxConstants.DIRECTION_EAST&&(p=0);u.moveCells(l,m,p);return u.addCells(f,g)}finally{u.model.endUpdate()}}function m(b,c){u.model.beginUpdate();try{var e=u.model.getParent(b),f=u.getIncomingTreeEdges(b),g=d(b);0==f.length&&(f=[u.createEdge(e,null,"",null,null,u.createCurrentEdgeStyle())],g=c);var k=u.cloneCells([f[0],b]);u.model.setTerminal(k[0],b,!0);if(null==u.model.getTerminal(k[0],!1)){u.model.setTerminal(k[0],k[1],!1);var l=u.getCellStyle(k[1]).newEdgeStyle;
+if(null!=l)try{var m=JSON.parse(l),p;for(p in m)u.setCellStyles(p,m[p],[k[0]]),"edgeStyle"==p&&"elbowEdgeStyle"==m[p]&&u.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(ca){}}var f=u.getOutgoingTreeEdges(b),n=e.geometry,l=[];u.view.currentRoot==e&&(n=new mxRectangle);for(m=0;m<f.length;m++){var q=u.model.getTerminal(f[m],!1);null!=q&&l.push(q)}var t=u.view.getBounds(l),v=u.view.translate,x=u.view.scale;g==mxConstants.DIRECTION_SOUTH?
+(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/x-v.x-n.x+10,k[1].geometry.y+=k[1].geometry.height-n.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/x-v.x+-n.x+10,k[1].geometry.y-=k[1].geometry.height+n.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+n.x+40):k[1].geometry.x+(k[1].geometry.width-n.x+40),k[1].geometry.y=null==t?b.geometry.y+
+(b.geometry.height-k[1].geometry.height)/2:(t.y+t.height)/x-v.y+-n.y+10);return u.addCells(k,e)}finally{u.model.endUpdate()}}function q(b,c,d){b=u.getOutgoingTreeEdges(b);d=u.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=u.view.getState(u.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
+d.y-d.height})}return e}function n(b,c){var e=d(b),f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST)==f&&e!=c?v.actions.get("selectParent").funct():e==c?(f=u.getOutgoingTreeEdges(b),null!=f&&0<f.length&&u.setSelectionCell(u.model.getTerminal(f[0],!1))):(e=u.getIncomingTreeEdges(b),null!=e&&0<e.length&&(f=q(u.model.getTerminal(e[0],!0),f,b),e=u.view.getState(b),null!=e&&(e=mxUtils.indexOf(f,e),0<=e&&(e+=c==mxConstants.DIRECTION_NORTH||
+c==mxConstants.DIRECTION_WEST?-1:1,0<=e&&e<=f.length-1&&u.setSelectionCell(f[e].cell)))))}var v=this,u=v.editor.graph,y=u.getModel(),x=v.menus.createPopupMenu;v.menus.createPopupMenu=function(c,d,e){x.apply(this,arguments);if(1==u.getSelectionCount()){d=u.getSelectionCell();var f=u.getOutgoingTreeEdges(d);c.addSeparator();0<f.length&&(b(u.getSelectionCell())&&this.addMenuItems(c,["selectChildren"],null,e),this.addMenuItems(c,["selectDescendants"],null,e));b(u.getSelectionCell())?(c.addSeparator(),
0<u.getIncomingTreeEdges(d).length&&this.addMenuItems(c,["selectSiblings","selectParent"],null,e)):0<u.model.getEdgeCount(d)&&this.addMenuItems(c,["selectConnections"],null,e)}};v.actions.addAction("selectChildren",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var b=u.getSelectionCell(),b=u.getOutgoingTreeEdges(b);if(null!=b){for(var c=[],d=0;d<b.length;d++)c.push(u.model.getTerminal(b[d],!1));u.setSelectionCells(c)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&
1==u.getSelectionCount()){var b=u.getSelectionCell(),b=u.getIncomingTreeEdges(b);if(null!=b&&0<b.length&&(b=u.getOutgoingTreeEdges(u.model.getTerminal(b[0],!0)),null!=b)){for(var c=[],d=0;d<b.length;d++)c.push(u.model.getTerminal(b[d],!1));u.setSelectionCells(c)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var b=u.getSelectionCell(),b=u.getIncomingTreeEdges(b);null!=b&&0<b.length&&u.setSelectionCell(u.model.getTerminal(b[0],
!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(b,c){var d=u.getSelectionCell();if(u.isEnabled()&&u.model.isVertex(d)){if(null!=c&&mxEvent.isAltDown(c))u.setSelectionCells(u.model.getTreeEdges(d,null==c||!mxEvent.isShiftDown(c),null==c||!mxEvent.isControlDown(c)));else{var e=[];u.traverse(d,!0,function(b,d){var f=null!=d&&u.isTreeEdge(d);f&&e.push(d);null!=d&&!f||null!=c&&mxEvent.isShiftDown(c)||e.push(b);return null==d||f})}u.setSelectionCells(e)}},null,null,"Alt+Shift+D");
-var E=u.removeCells;u.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];B.isEdge(k)&&e(k)&&(f.push(k),k=B.getTerminal(k,!1));if(b(k)){var l=[];u.traverse(k,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=u.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
-f;return E.apply(this,arguments)};v.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var A=u.duplicateCells;u.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=u.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=u.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=A.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
-u.getIncomingTreeEdges(l[f]),k=u.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var n=this.cloneCell(k[0]);this.addEdge(n,u.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var F=u.moveCells;u.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var n=g,p=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var t=0;t<c.length;t++)if(b(c[t])||u.model.isEdge(c[t])&&null==u.model.getTerminal(c[t],
-!0)){g=u.model.getParent(c[t]);break}if(null!=n&&g!=n&&null!=this.view.getState(c[0])){var q=u.getIncomingTreeEdges(c[0]);if(0<q.length){var A=u.view.getState(u.model.getTerminal(q[0],!0));if(null!=A){var v=u.view.getState(n);null!=v&&(d=(v.getCenterX()-A.getCenterX())/u.view.scale,e=(v.getCenterY()-A.getCenterY())/u.view.scale)}}}}m=F.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(t=0;t<m.length;t++)if(this.model.isEdge(m[t]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[t],
-!0))&&this.model.setTerminal(m[t],n,!0);else if(b(c[t])&&(q=u.getIncomingTreeEdges(c[t]),0<q.length))if(!f)b(n)&&0>mxUtils.indexOf(c,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],n,!0);else if(0==u.getIncomingTreeEdges(m[t]).length){p=n;if(null==p||p==u.model.getParent(c[t]))p=u.model.getTerminal(q[0],!0);f=this.cloneCell(q[0]);this.addEdge(f,u.getDefaultParent(),p,m[t])}}finally{this.model.endUpdate()}return m};if(null!=v.sidebar){var I=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=
-function(c,d,e,f){var g=u.model,k=null;g.beginUpdate();try{if(k=I.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=u.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var L={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},H=v.onKeyDown;v.onKeyDown=function(c){try{if(u.isEnabled()&&
-!u.isEditing()&&b(u.getSelectionCell())&&1==u.getSelectionCount()){var d=null;0<u.getIncomingTreeEdges(u.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?l(u.getSelectionCell()):q(u.getSelectionCell()):13==c.which&&(d=g(u.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&u.model.isEdge(d[0])?u.setSelectionCell(u.model.getTerminal(d[0],!1)):u.setSelectionCell(d[d.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(u.view.getState(u.getSelectionCell())),
-u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=L[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(m(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(m(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(m(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(m(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(c))}}catch(D){v.handleError(D)}mxEvent.isConsumed(c)||H.apply(this,arguments)};var K=u.connectVertex;u.connectVertex=function(c,e,f,k,m,n,p){var t=u.getIncomingTreeEdges(c);if(b(c)){var A=d(c),v=A==mxConstants.DIRECTION_EAST||A==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return A==e||0==t.length?q(c,e):v==x?l(c):g(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return K.apply(this,arguments)};u.getSubtree=function(d){var e=
+var H=u.removeCells;u.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];y.isEdge(k)&&e(k)&&(f.push(k),k=y.getTerminal(k,!1));if(b(k)){var l=[];u.traverse(k,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=u.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
+f;return H.apply(this,arguments)};v.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var D=u.duplicateCells;u.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=u.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=u.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=D.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
+u.getIncomingTreeEdges(l[f]),k=u.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var p=this.cloneCell(k[0]);this.addEdge(p,u.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var E=u.moveCells;u.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var p=g,n=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||u.model.isEdge(c[q])&&null==u.model.getTerminal(c[q],
+!0)){g=u.model.getParent(c[q]);break}if(null!=p&&g!=p&&null!=this.view.getState(c[0])){var t=u.getIncomingTreeEdges(c[0]);if(0<t.length){var v=u.view.getState(u.model.getTerminal(t[0],!0));if(null!=v){var x=u.view.getState(p);null!=x&&(d=(x.getCenterX()-v.getCenterX())/u.view.scale,e=(x.getCenterY()-v.getCenterY())/u.view.scale)}}}}m=E.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(p)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
+!0))&&this.model.setTerminal(m[q],p,!0);else if(b(c[q])&&(t=u.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(p)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],p,!0);else if(0==u.getIncomingTreeEdges(m[q]).length){n=p;if(null==n||n==u.model.getParent(c[q]))n=u.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,u.getDefaultParent(),n,m[q])}}finally{this.model.endUpdate()}return m};if(null!=v.sidebar){var J=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=
+function(c,d,e,f){var g=u.model,k=null;g.beginUpdate();try{if(k=J.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=u.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var L={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},G=v.onKeyDown;v.onKeyDown=function(c){try{if(u.isEnabled()&&
+!u.isEditing()&&b(u.getSelectionCell())&&1==u.getSelectionCount()){var d=null;0<u.getIncomingTreeEdges(u.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?l(u.getSelectionCell()):m(u.getSelectionCell()):13==c.which&&(d=f(u.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&u.model.isEdge(d[0])?u.setSelectionCell(u.model.getTerminal(d[0],!1)):u.setSelectionCell(d[d.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(u.view.getState(u.getSelectionCell())),
+u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=L[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(n(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(n(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(n(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(n(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(c))}}catch(B){v.handleError(B)}mxEvent.isConsumed(c)||G.apply(this,arguments)};var K=u.connectVertex;u.connectVertex=function(c,e,g,k,p,n,q){var t=u.getIncomingTreeEdges(c);if(b(c)){var v=d(c),x=v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST,C=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return v==e||0==t.length?m(c,e):x==C?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return K.apply(this,arguments)};u.getSubtree=function(d){var e=
[d];!c(d)&&!b(d)||t(d)||u.traverse(d,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);(c(this.state.cell)||b(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(b){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(b);
-this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(b)})))};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.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 S=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){S.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var R=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){R.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=e.apply(this,arguments),c=this.graph;return b.concat([this.addEntry("tree container",
+this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(b)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.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 P=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){P.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var S=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){S.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=e.apply(this,arguments),c=this.graph;return b.concat([this.addEntry("tree container",
function(){var b=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");b.vertex=!0;var c=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);b.insert(e);b.insert(c);b.insert(d);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var b=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
b.vertex=!0;var c=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');c.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);var f=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-f.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);f.insertEdge(k,!1);var p=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-p.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");m.geometry.relative=!0;m.edge=!0;c.insertEdge(m,!0);p.insertEdge(m,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-v.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;c.insertEdge(u,!0);v.insertEdge(u,!1);b.insert(e);b.insert(k);b.insert(m);b.insert(u);b.insert(c);b.insert(d);b.insert(f);b.insert(p);b.insert(v);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=new mxCell("Central Idea",
+d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);g.insertEdge(k,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+q.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");n.geometry.relative=!0;n.edge=!0;c.insertEdge(n,!0);q.insertEdge(n,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+v.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;c.insertEdge(u,!0);v.insertEdge(u,!1);b.insert(e);b.insert(k);b.insert(n);b.insert(u);b.insert(c);b.insert(d);b.insert(g);b.insert(q);b.insert(v);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=new mxCell("Central Idea",
new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');b.vertex=!0;return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var b=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var b=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree orgchart organization division",function(){var b=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
b.vertex=!0;var e=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.setAttributeForCell(e,"treeRoot","1");e.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;e.insertEdge(f,!0);d.insertEdge(f,!1);var k=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');k.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-q.geometry.relative=!0;q.edge=!0;e.insertEdge(q,!0);k.insertEdge(q,!1);b.insert(f);b.insert(q);b.insert(e);b.insert(d);b.insert(k);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree root",function(){var b=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.setAttributeForCell(b,"treeRoot",
+d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;e.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!0);g.insertEdge(k,!1);b.insert(f);b.insert(k);b.insert(e);b.insert(d);b.insert(g);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree root",function(){var b=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.setAttributeForCell(b,"treeRoot",
"1");b.vertex=!0;return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree division",function(){var b=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
c.geometry.setTerminalPoint(new mxPoint(0,0),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree sub sections",function(){var b=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");e.geometry.setTerminalPoint(new mxPoint(110,-40),!0);e.geometry.relative=
@@ -3863,32 +3865,32 @@ this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,argume
Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').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.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="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
-EditorUi.prototype.setDarkMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(b);mxSettings.settings.darkMode=b;mxSettings.save();this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var f=document.createElement("link");f.setAttribute("rel","stylesheet");f.setAttribute("href",STYLE_PATH+"/dark.css");f.setAttribute("charset","UTF-8");f.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=
+EditorUi.prototype.setDarkMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(b);mxSettings.settings.darkMode=b;mxSettings.save();this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var g=document.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("href",STYLE_PATH+"/dark.css");g.setAttribute("charset","UTF-8");g.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=
function(b){if(Editor.darkMode!=b){var c=this.editor.graph;Editor.darkMode=b;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";this.setGridColor(Editor.isDarkMode()?c.view.defaultDarkGridColor:c.view.defaultGridColor);c.defaultPageBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";c.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";c.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";c.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";c.loadStylesheet();
null!=this.actions.layersWindow&&(b=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,b&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Dialog.backdropColor=Editor.isDarkMode()?"#2a2a2a":"white";
StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;
-document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";n.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==f.parentNode&&document.getElementsByTagName("head")[0].appendChild(f):null!=f.parentNode&&f.parentNode.removeChild(f)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }":
+document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";p.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==g.parentNode&&document.getElementsByTagName("head")[0].appendChild(g):null!=g.parentNode&&g.parentNode.removeChild(g)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?"#2a2a2a":"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"html .geStatusAlertOrange, html .geStatusAlert { margin-top: -2px; }a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var n=document.createElement("style");n.type="text/css";n.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(n);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=
-function(){return!1};var t=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");t.apply(this,arguments)};var d=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){d.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var g=
-Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(b,c){null!=c.shortcut&&900>e&&!mxClient.IS_IOS?b.firstChild.nextSibling.setAttribute("title",c.shortcut):g.apply(this,arguments)};var l=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){l.apply(this,arguments);if(null!=this.userElement){var b=this.userElement;b.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+b.style.display;b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage=
-"url("+Editor.userImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";b.style.cssFloat="right";b.setAttribute("title",mxResources.get("changeUser"));"none"!=b.style.display&&(b.style.display="inline-block")}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText=
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"html .geStatusAlertOrange, html .geStatusAlert { margin-top: -2px; }a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var p=document.createElement("style");p.type="text/css";p.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(p);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=
+function(){return!1};var t=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");t.apply(this,arguments)};var d=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){d.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var f=
+Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(b,c){null!=c.shortcut&&900>e&&!mxClient.IS_IOS?b.firstChild.nextSibling.setAttribute("title",c.shortcut):f.apply(this,arguments)};var l=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){l.apply(this,arguments);if(null!=this.userElement){var b=this.userElement;b.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+b.style.display;b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage=
+"url("+Editor.userImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";b.style.cssFloat="right";b.setAttribute("title",mxResources.get("changeUser"));"none"!=b.style.display&&(b.style.display="inline-block")}};var m=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){m.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText=
"display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.shareImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop=
"4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var b=document.createElement("div");b.style.display="inline-block";b.style.position="relative";b.style.marginTop="6px";b.style.marginRight="4px";var c=document.createElement("a");c.className="geMenuItem gePrimaryBtn";c.style.marginLeft="8px";c.style.padding="6px";if("1"==urlParams.noSaveBtn){var d="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,d);c.setAttribute("title",
d);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),
c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,d),c.setAttribute("title",d),c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),
-b.appendChild(c));this.buttonContainer.appendChild(b);this.buttonContainer.style.top="6px"}};var p=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(b,c){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,b)){var d=mxUtils.getOffset(this.editorUi.picker);d.x+=this.editorUi.picker.offsetWidth+4;d.y+=b.offsetTop-c.height/2+16;return d}var e=p.apply(this,arguments),d=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);e.x+=d.x-16;e.y+=
-d.y;return e};var m=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(b,c,d){var e=this.editorUi.editor.graph;b.smartSeparators=!0;m.apply(this,arguments);"1"==urlParams.sketch?e.isEnabled()&&(b.addSeparator(),1==e.getSelectionCount()?this.addMenuItems(b,["-","lockUnlock"],null,d):this.addSubmenu("view",b,null,mxResources.get("options"))):1==e.getSelectionCount()?(e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(b,e.isCellCollapsed(c)?["expand"]:["collapse"],null,d),
+b.appendChild(c));this.buttonContainer.appendChild(b);this.buttonContainer.style.top="6px"}};var q=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(b,c){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,b)){var d=mxUtils.getOffset(this.editorUi.picker);d.x+=this.editorUi.picker.offsetWidth+4;d.y+=b.offsetTop-c.height/2+16;return d}var e=q.apply(this,arguments),d=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);e.x+=d.x-16;e.y+=
+d.y;return e};var n=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(b,c,d){var e=this.editorUi.editor.graph;b.smartSeparators=!0;n.apply(this,arguments);"1"==urlParams.sketch?e.isEnabled()&&(b.addSeparator(),1==e.getSelectionCount()?this.addMenuItems(b,["-","lockUnlock"],null,d):this.addSubmenu("view",b,null,mxResources.get("options"))):1==e.getSelectionCount()?(e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(b,e.isCellCollapsed(c)?["expand"]:["collapse"],null,d),
this.addMenuItems(b,["collapsible","-","lockUnlock","enterGroup"],null,d),b.addSeparator(),this.addSubmenu("layout",b)):e.isSelectionEmpty()&&e.isEnabled()?(b.addSeparator(),this.addMenuItems(b,["editData"],null,d),b.addSeparator(),this.addSubmenu("layout",b),this.addSubmenu("view",b,null,mxResources.get("options")),b.addSeparator(),this.addSubmenu("insert",b),this.addMenuItems(b,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(b,["-","lockUnlock"],null,d)};var v=Menus.prototype.addPopupMenuEditItems;
Menus.prototype.addPopupMenuEditItems=function(b,c,d){v.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(b,["copyAsImage"],null,d)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&
(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);u.apply(this,arguments)};
-var B=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(b){B.apply(this,arguments);if(b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=c||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};
+var y=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(b){y.apply(this,arguments);if(b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=c||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};
EditorUi.prototype.chromelessWindowResize=function(){};var x=Menus.prototype.init;Menus.prototype.init=function(){x.apply(this,arguments);var d=this.editorUi,e=d.editor.graph;d.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";d.actions.get("createShape").label=mxResources.get("shape")+"...";d.actions.get("outline").label=mxResources.get("outline")+"...";d.actions.get("layers").label=mxResources.get("layers")+"...";d.actions.get("tags").label=mxResources.get("tags")+"...";d.actions.get("forkme").visible=
"1"!=urlParams.sketch;d.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;var f=d.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(b){d.setDarkMode(!Editor.darkMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.isDarkMode()});d.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){e.popupMenuHandler.hideMenu();d.showImportCsvDialog()}));d.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var b=
new ParseDialog(d,"Insert from Text");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var b=new ParseDialog(d,"Insert from Text","formatSql");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){c(d)},null,null,Editor.ctrlKey+"+Shift+K"));d.actions.put("toggleFormat",new Action(mxResources.get("format")+
@@ -3905,7 +3907,7 @@ c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&d.menus.addMen
e){"1"==urlParams.sketch?(d.menus.addMenuItems(b,["insertFreehand"],e),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(b,["insertTemplate"],e)):(c.apply(this,arguments),d.menus.addSubmenu("table",b,e),b.addSeparator(e));d.menus.addMenuItems(b,["-","toggleShapes"],e)}})();var n="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,c,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(d,e,f);d.showDialog(b.container,
620,420,!0,!1);b.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,c){for(var d=0;d<n.length;d++)"-"==n[d]?b.addSeparator(c):p(b,c,mxResources.get(n[d])+"...",n[d])})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){d.menus.addMenuItems(b,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var e=d.menus.addMenuItem(b,"mathematicalTypesetting",c);d.menus.addLinkToItem(e,"https://www.diagrams.net/doc/faq/math-typesetting")}d.menus.addMenuItems(b,
["copyConnect","collapseExpand","-"],c);e=d.getCurrentFile();null!=e&&null!=d.fileNode&&(e=null!=e.getTitle()?e.getTitle():d.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["properties"],c));d.menus.addMenuItems(b,["pageScale"],c);"1"!=urlParams.sketch?d.menus.addMenuItems(b,["-","fullscreen","toggleDarkMode"],c):d.menus.addMenuItems(b,["pageSetup","-","layers","tags"],c)})))};EditorUi.prototype.installFormatToolbar=function(b){var c=this.editor.graph,d=document.createElement("div");
-d.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var E=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(b,
+d.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var H=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(b,
c,d){var e=n.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));n.menus.menuCreated(e,f,"geMenuItem");null!=d?(f.style.backgroundImage="url("+d+")",f.style.backgroundPosition=
"center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML=""):c||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function f(b,c,d,e,f,g){var k=document.createElement("a");k.className="geMenuItem";k.style.display="inline-block";k.style.boxSizing="border-box";k.style.height="30px";k.style.padding=
"6px";k.style.position="relative";k.style.verticalAlign="top";k.style.top="0px";"1"==urlParams.sketch&&(k.style.borderStyle="none",k.style.boxShadow="none",k.style.padding="6px",k.style.margin="0px");null!=n.statusContainer?q.insertBefore(k,n.statusContainer):q.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",k.style.backgroundSize="24px 24px",k.style.width="34px"):mxUtils.write(k,b);mxEvent.addListener(k,
@@ -3914,123 +3916,126 @@ b),b());return k}function g(b,c,d){d=document.createElement("div");d.className="
null!=c&&mxUtils.setOpacity(d,c);null!=n.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(d,n.statusContainer):q.appendChild(d);return d}function k(){for(var b=q.firstChild;null!=b;){var c=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=c}t=q.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>e||"1"==urlParams.sketch,k=null;b||(k=d("diagram"));if("1"==urlParams.sketch)aa.style.left=58>O.offsetTop-
O.offsetHeight/2?"70px":"10px";else if(c=b?d("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,null!=c&&(k=c),g([k,f(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),n.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":
null),f(mxResources.get("format"),n.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+n.actions.get("formatPanel").shortcut+")",n.actions.get("image"),b?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
-null)],b?60:null),c=d("insert",!0,b?W:null),g([c,f(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),b?qa:null)],b?60:null),411<=e&&(g([ua,ya],60),520<=e&&(g([ta,640<=e?f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Q,ra):null,640<=e?f("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Y,fa):null],60),720<=e))){var l=f("",U.funct,null,mxResources.get("dark"),U,Editor.isDarkMode()?ba:ja);l.style.opacity=
+null)],b?60:null),c=d("insert",!0,b?W:null),g([c,f(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),b?sa:null)],b?60:null),411<=e&&(g([qa,ya],60),520<=e&&(g([ua,640<=e?f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Q,ta):null,640<=e?f("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Y,fa):null],60),720<=e))){var l=f("",U.funct,null,mxResources.get("dark"),U,Editor.isDarkMode()?ba:ja);l.style.opacity=
"0.4";n.addListener("darkModeChanged",mxUtils.bind(this,function(){l.style.backgroundImage="url("+(Editor.isDarkMode()?ba:ja)+")"}));null!=n.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(l,n.statusContainer):q.appendChild(l)}null!=k&&(mxEvent.disableContextMenu(k),mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&n.appIconClicked(b)}),null,null));c=n.menus.get("language");
null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.sketch?(null==wa&&(c=u.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor="pointer",
-c.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(c),wa=c),n.buttonContainer.style.paddingRight="34px"):(n.buttonContainer.style.paddingRight="4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}E.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark:mxSettings.settings.darkMode);var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?
+c.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(c),wa=c),n.buttonContainer.style.paddingRight="34px"):(n.buttonContainer.style.paddingRight="4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}H.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark:mxSettings.settings.darkMode);var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?
"63px":"32px";this.sidebar=this.createSidebar(l);"1"==urlParams.sketch&&this.toggleScratchpad();if("1"!=urlParams.sketch&&1E3<=e||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])c(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==urlParams.sketch||1E3<=e)if(b(this,!0),"1"==
urlParams.sketch){this.formatWindow.window.setClosable(!1);var m=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){m.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=parseInt(this.div.style.left)-150+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",
mxUtils.bind(this,function(b){mxEvent.getSource(b)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var n=this,p=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));n.defaultLibraryName=mxResources.get("untitledLibrary");var q=document.createElement("div");q.className="geMenubarContainer";var t=null,u=new Menubar(n,q);n.statusContainer=n.createStatusContainer();n.statusContainer.style.position="relative";n.statusContainer.style.maxWidth=
"";n.statusContainer.style.marginTop="7px";n.statusContainer.style.marginLeft="6px";n.statusContainer.style.color="gray";n.statusContainer.style.cursor="default";var v=n.hideCurrentMenu;n.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var x=n.descriptorChanged;n.descriptorChanged=function(){x.apply(this,arguments);var b=n.getCurrentFile();if(null!=b&&null!=b.getTitle()){var c=b.getMode();"google"==c?c="googleDrive":"github"==c?c="gitHub":"gitlab"==
c?c="gitLab":"onedrive"==c&&(c="oneDrive");c=mxResources.get(c);q.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else q.removeAttribute("title")};n.setStatusText(n.editor.getStatus());q.appendChild(n.statusContainer);n.buttonContainer=document.createElement("div");n.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";q.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=
-document.createElement("div");n.tabContainer.className="geTabContainer";n.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=n.diagramContainer.parentNode,B=document.createElement("div");B.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";n.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var y=n.menus.get("viewZoom"),W="1"!=urlParams.sketch?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":
+document.createElement("div");n.tabContainer.className="geTabContainer";n.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=n.diagramContainer.parentNode,y=document.createElement("div");y.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";n.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var A=n.menus.get("viewZoom"),W="1"!=urlParams.sketch?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMywxMWg4VjNIM1YxMXogTTUsNWg0djRINVY1eiIvPjxwYXRoIGQ9Ik0xMywzdjhoOFYzSDEzeiBNMTksOWgtNFY1aDRWOXoiLz48cGF0aCBkPSJNMywyMWg4di04SDNWMjF6IE01LDE1aDR2NEg1VjE1eiIvPjxwb2x5Z29uIHBvaW50cz0iMTgsMTMgMTYsMTMgMTYsMTYgMTMsMTYgMTMsMTggMTYsMTggMTYsMjEgMTgsMjEgMTgsMTggMjEsMTggMjEsMTYgMTgsMTYiLz48L2c+PC9nPjwvc3ZnPg==",
-J="1"==urlParams.sketch?document.createElement("div"):null,O="1"==urlParams.sketch?document.createElement("div"):null,aa="1"==urlParams.sketch?document.createElement("div"):null;n.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.refreshBackgroundImage();
-p.view.validateBackground()}));Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=n.hoverIcons){var ma=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||ma.apply(this,arguments)}}if(null!=p.freehand){var ga=p.freehand.createStyle;p.freehand.createStyle=function(b){return ga.apply(this,
-arguments)+"sketch=0;"}}if("1"==urlParams.sketch){O.className="geToolbarContainer";J.className="geToolbarContainer";aa.className="geToolbarContainer";q.className="geToolbarContainer";n.picker=O;var ha=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){ha||(n.statusContainer.style.display="none")});var na=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",
-b):n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&null==n.statusContainer.firstChild.getAttribute("class")){null!=n.statusContainer.firstChild?na(n.statusContainer.firstChild.getAttribute("title")):na(n.editor.getStatus());var b=n.getCurrentFile(),b=null!=b?b.savingStatusKey:DrawioFile.prototype.savingStatusKey;
-null!=n.notificationBtn&&n.notificationBtn.getAttribute("title")==mxResources.get(b)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(b))+'..."src="'+IMAGE_PATH+'/spin.gif">',n.statusContainer.style.display="inline-block",ha=!0):(n.statusContainer.style.display="none",ha=!1)}else n.statusContainer.style.display="inline-block",na(null),ha=!0}));T=d("diagram",null,IMAGE_PATH+"/drawlogo.svg");T.style.boxShadow="none";T.style.opacity="0.4";T.style.padding="6px";T.style.margin=
+I="1"==urlParams.sketch?document.createElement("div"):null,O="1"==urlParams.sketch?document.createElement("div"):null,aa="1"==urlParams.sketch?document.createElement("div"):null;n.addListener("darkModeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.refreshBackgroundImage();
+p.view.validateBackground()}));Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=n.hoverIcons){var na=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||na.apply(this,arguments)}}if(null!=p.freehand){var ga=p.freehand.createStyle;p.freehand.createStyle=function(b){return ga.apply(this,
+arguments)+"sketch=0;"}}if("1"==urlParams.sketch){O.className="geToolbarContainer";I.className="geToolbarContainer";aa.className="geToolbarContainer";q.className="geToolbarContainer";n.picker=O;var ha=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){ha||(n.statusContainer.style.display="none")});var oa=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",
+b):n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&null==n.statusContainer.firstChild.getAttribute("class")){null!=n.statusContainer.firstChild?oa(n.statusContainer.firstChild.getAttribute("title")):oa(n.editor.getStatus());var b=n.getCurrentFile(),b=null!=b?b.savingStatusKey:DrawioFile.prototype.savingStatusKey;
+null!=n.notificationBtn&&n.notificationBtn.getAttribute("title")==mxResources.get(b)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(b))+'..."src="'+IMAGE_PATH+'/spin.gif">',n.statusContainer.style.display="inline-block",ha=!0):(n.statusContainer.style.display="none",ha=!1)}else n.statusContainer.style.display="inline-block",oa(null),ha=!0}));T=d("diagram",null,IMAGE_PATH+"/drawlogo.svg");T.style.boxShadow="none";T.style.opacity="0.4";T.style.padding="6px";T.style.margin=
"0px";aa.appendChild(T);mxEvent.disableContextMenu(T);mxEvent.addGestureListeners(T,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position="";n.statusContainer.style.display="none";n.statusContainer.style.margin="0px";n.statusContainer.style.padding="6px 0px";n.statusContainer.style.maxWidth=Math.min(e-240,280)+"px";n.statusContainer.style.display=
"inline-block";n.statusContainer.style.textOverflow="ellipsis";n.buttonContainer.style.position="";n.buttonContainer.style.paddingRight="0px";n.buttonContainer.style.display="inline-block";var X=document.createElement("a");X.style.padding="0px";X.style.boxShadow="none";X.className="geMenuItem";X.style.display="inline-block";X.style.width="40px";X.style.height="12px";X.style.marginBottom="-2px";X.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";X.style.backgroundPosition="top center";
-X.style.backgroundRepeat="no-repeat";X.setAttribute("title","Minimize");var ca=!1,oa=mxUtils.bind(this,function(){O.innerHTML="";if(!ca){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default";b.style.margin="2px 0px";O.appendChild(b);mxUtils.br(O);return b};c(n.sidebar.createVertexTemplate("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",
+X.style.backgroundRepeat="no-repeat";X.setAttribute("title","Minimize");var ca=!1,pa=mxUtils.bind(this,function(){O.innerHTML="";if(!ca){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default";b.style.margin="2px 0px";O.appendChild(b);mxUtils.br(O);return b};c(n.sidebar.createVertexTemplate("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;",
40,20,"Text",mxResources.get("text"),!0,!0,null,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(n.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;fontSize=24;pointerEvents=1;"+("0"!=urlParams.rough?"sketch=1;jiggle=2;":""),140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));
c(n.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(n.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),"edgeStyle=none;curved=1;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=open;sourcePerimeterSpacing=8;targetPerimeterSpacing=8;fontSize=16;"+
("0"!=urlParams.rough?"sketch=1;":""));b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));b=b.clone();b.style+="shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,20),
!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(n.actions.get("insertFreehand"),mxResources.get("freehand"),"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==");
var d=n.actions.get("toggleShapes");b(d,mxResources.get("shapes")+" ("+d.shortcut+")",W);b(n.actions.get("insertTemplate"),mxResources.get("template"),"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEzIDExaC0ydjNIOHYyaDN2M2gydi0zaDN2LTJoLTN6bTEtOUg2Yy0xLjEgMC0yIC45LTIgMnYxNmMwIDEuMS44OSAyIDEuOTkgMkgxOGMxLjEgMCAyLS45IDItMlY4bC02LTZ6bTQgMThINlY0aDd2NWg1djExeiIvPjwvc3ZnPg==")}O.appendChild(X)});
-mxEvent.addListener(X,"click",mxUtils.bind(this,function(){ca?(mxUtils.setPrefixedStyle(O.style,"transform","translate(0, -50%)"),O.style.padding="8px 6px 4px",O.style.top="50%",O.style.bottom="",O.style.height="",X.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",X.style.width="40px",X.style.height="12px",X.setAttribute("title","Minimize"),ca=!1,oa()):(O.innerHTML="",O.appendChild(X),mxUtils.setPrefixedStyle(O.style,"transform","translate(0, 0)"),O.style.top="",O.style.bottom="12px",
-O.style.padding="0px",O.style.height="24px",X.style.height="24px",X.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==)",X.setAttribute("title",mxResources.get("insert")),X.style.width="24px",ca=!0)}));oa();n.addListener("darkModeChanged",mxUtils.bind(this,function(){oa()}))}else n.editor.addListener("statusChanged",
-mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));if(null!=y){var V=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?n.actions.get("customZoom").funct():n.actions.get("smartFit").funct()},Q=n.actions.get("zoomIn"),ra="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4=",
+mxEvent.addListener(X,"click",mxUtils.bind(this,function(){ca?(mxUtils.setPrefixedStyle(O.style,"transform","translate(0, -50%)"),O.style.padding="8px 6px 4px",O.style.top="50%",O.style.bottom="",O.style.height="",X.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",X.style.width="40px",X.style.height="12px",X.setAttribute("title","Minimize"),ca=!1,pa()):(O.innerHTML="",O.appendChild(X),mxUtils.setPrefixedStyle(O.style,"transform","translate(0, 0)"),O.style.top="",O.style.bottom="12px",
+O.style.padding="0px",O.style.height="24px",X.style.height="24px",X.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==)",X.setAttribute("title",mxResources.get("insert")),X.style.width="24px",ca=!0)}));pa();n.addListener("darkModeChanged",mxUtils.bind(this,function(){pa()}))}else n.editor.addListener("statusChanged",
+mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));if(null!=A){var V=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?n.actions.get("customZoom").funct():n.actions.get("smartFit").funct()},Q=n.actions.get("zoomIn"),ta="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4=",
Y=n.actions.get("zoomOut"),fa="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg==",
-ia=n.actions.get("resetView"),pa=n.actions.get("fullscreen"),U=n.actions.get("toggleDarkMode"),ja="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik05LjM3LDUuNTFDOS4xOSw2LjE1LDkuMSw2LjgyLDkuMSw3LjVjMCw0LjA4LDMuMzIsNy40LDcuNCw3LjRjMC42OCwwLDEuMzUtMC4wOSwxLjk5LTAuMjdDMTcuNDUsMTcuMTksMTQuOTMsMTksMTIsMTkgYy0zLjg2LDAtNy0zLjE0LTctN0M1LDkuMDcsNi44MSw2LjU1LDkuMzcsNS41MXogTTEyLDNjLTQuOTcsMC05LDQuMDMtOSw5czQuMDMsOSw5LDlzOS00LjAzLDktOWMwLTAuNDYtMC4wNC0wLjkyLTAuMS0xLjM2IGMtMC45OCwxLjM3LTIuNTgsMi4yNi00LjQsMi4yNmMtMi45OCwwLTUuNC0yLjQyLTUuNC01LjRjMC0xLjgxLDAuODktMy40MiwyLjI2LTQuNEMxMi45MiwzLjA0LDEyLjQ2LDMsMTIsM0wxMiwzeiIvPjwvc3ZnPg==",
+ia=n.actions.get("resetView"),ra=n.actions.get("fullscreen"),U=n.actions.get("toggleDarkMode"),ja="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik05LjM3LDUuNTFDOS4xOSw2LjE1LDkuMSw2LjgyLDkuMSw3LjVjMCw0LjA4LDMuMzIsNy40LDcuNCw3LjRjMC42OCwwLDEuMzUtMC4wOSwxLjk5LTAuMjdDMTcuNDUsMTcuMTksMTQuOTMsMTksMTIsMTkgYy0zLjg2LDAtNy0zLjE0LTctN0M1LDkuMDcsNi44MSw2LjU1LDkuMzcsNS41MXogTTEyLDNjLTQuOTcsMC05LDQuMDMtOSw5czQuMDMsOSw5LDlzOS00LjAzLDktOWMwLTAuNDYtMC4wNC0wLjkyLTAuMS0xLjM2IGMtMC45OCwxLjM3LTIuNTgsMi4yNi00LjQsMi4yNmMtMi45OCwwLTUuNC0yLjQyLTUuNC01LjRjMC0xLjgxLDAuODktMy40MiwyLjI2LTQuNEMxMi45MiwzLjA0LDEyLjQ2LDMsMTIsM0wxMiwzeiIvPjwvc3ZnPg==",
ba="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxwYXRoIGQ9Ik0xMiw5YzEuNjUsMCwzLDEuMzUsMywzcy0xLjM1LDMtMywzcy0zLTEuMzUtMy0zUzEwLjM1LDksMTIsOSBNMTIsN2MtMi43NiwwLTUsMi4yNC01LDVzMi4yNCw1LDUsNXM1LTIuMjQsNS01IFMxNC43Niw3LDEyLDdMMTIsN3ogTTIsMTNsMiwwYzAuNTUsMCwxLTAuNDUsMS0xcy0wLjQ1LTEtMS0xbC0yLDBjLTAuNTUsMC0xLDAuNDUtMSwxUzEuNDUsMTMsMiwxM3ogTTIwLDEzbDIsMGMwLjU1LDAsMS0wLjQ1LDEtMSBzLTAuNDUtMS0xLTFsLTIsMGMtMC41NSwwLTEsMC40NS0xLDFTMTkuNDUsMTMsMjAsMTN6IE0xMSwydjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMVYyYzAtMC41NS0wLjQ1LTEtMS0xUzExLDEuNDUsMTEsMnogTTExLDIwdjJjMCwwLjU1LDAuNDUsMSwxLDFzMS0wLjQ1LDEtMXYtMmMwLTAuNTUtMC40NS0xLTEtMUMxMS40NSwxOSwxMSwxOS40NSwxMSwyMHogTTUuOTksNC41OGMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDAgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBzMC4zOS0xLjAzLDAtMS40MUw1Ljk5LDQuNTh6IE0xOC4zNiwxNi45NSBjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MWwxLjA2LDEuMDZjMC4zOSwwLjM5LDEuMDMsMC4zOSwxLjQxLDBjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDEgTDE4LjM2LDE2Ljk1eiBNMTkuNDIsNS45OWMwLjM5LTAuMzksMC4zOS0xLjAzLDAtMS40MWMtMC4zOS0wLjM5LTEuMDMtMC4zOS0xLjQxLDBsLTEuMDYsMS4wNmMtMC4zOSwwLjM5LTAuMzksMS4wMywwLDEuNDEgczEuMDMsMC4zOSwxLjQxLDBMMTkuNDIsNS45OXogTTcuMDUsMTguMzZjMC4zOS0wLjM5LDAuMzktMS4wMywwLTEuNDFjLTAuMzktMC4zOS0xLjAzLTAuMzktMS40MSwwbC0xLjA2LDEuMDYgYy0wLjM5LDAuMzktMC4zOSwxLjAzLDAsMS40MXMxLjAzLDAuMzksMS40MSwwTDcuMDUsMTguMzZ6Ii8+PC9zdmc+",
-la=n.actions.get("undo"),da=n.actions.get("redo"),ua=f("",la.funct,null,mxResources.get("undo")+" ("+la.shortcut+")",la,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),ya=f("",da.funct,null,mxResources.get("redo")+
-" ("+da.shortcut+")",da,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),ta=f("",V,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ia,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48cGF0aCBkPSJNNiwxNmgxMlY4SDZWMTZ6IE04LDEwaDh2NEg4VjEweiBNNCwxNUgydjNjMCwxLjEsMC45LDIsMiwyaDN2LTJINFYxNXogTTQsNmgzVjRINEMyLjksNCwyLDQuOSwyLDZ2M2gyVjZ6IE0yMCw0aC0zdjJoM3YzIGgyVjZDMjIsNC45LDIxLjEsNCwyMCw0eiBNMjAsMThoLTN2MmgzYzEuMSwwLDItMC45LDItMnYtM2gtMlYxOHoiLz48L2c+PC9zdmc+"),
-ia=f("",pa.funct,null,mxResources.get("fullscreen"),pa,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),qa="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==";
-if(null!=J){var za=n.actions.get("delete"),va=f("",za.funct,null,mxResources.get("delete"),za,qa);va.style.opacity="0.1";aa.appendChild(va);za.addListener("stateChanged",function(){va.style.opacity=za.enabled?"0.4":"0.1"});y=function(){ua.style.display=0<n.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";ya.style.display=ua.style.display;ua.style.opacity=la.enabled?"0.4":"0.1";ya.style.opacity=da.enabled?"0.4":"0.1"};aa.appendChild(ua);aa.appendChild(ya);la.addListener("stateChanged",
-y);da.addListener("stateChanged",y);y();null!=urlParams.layers&&(y=n.actions.get("layers"),y=f("",y.funct,null,mxResources.get("layers"),y,Editor.layersLargeImage),y.className+=" geInverted",y.style.opacity="0.4",J.appendChild(y));null!=urlParams.tags&&(y=n.actions.get("tags"),y=f("",y.funct,null,mxResources.get("tags"),y,Editor.tagsLargeImage),y.className+=" geInverted",y.style.opacity="0.4",J.appendChild(y));y=n.actions.get("outline");y=f("",y.funct,null,mxResources.get("outline"),y,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==");
-y.style.opacity="0.4";J.appendChild(y);y=f("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Y,fa);y.style.opacity="0.4";J.appendChild(y);var T=document.createElement("div");T.innerHTML="100%";T.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");T.style.display="inline-block";T.style.cursor="pointer";T.style.textAlign="center";T.style.whiteSpace="nowrap";T.style.paddingRight="10px";T.style.textDecoration="none";T.style.verticalAlign=
-"top";T.style.padding="6px 0";T.style.fontSize="14px";T.style.width="40px";T.style.opacity="0.4";J.appendChild(T);mxEvent.addListener(T,"click",V);V=f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Q,ra);V.style.opacity="0.4";J.appendChild(V);var Aa=f("",U.funct,null,mxResources.get("dark"),U,Editor.isDarkMode()?ba:ja);Aa.style.opacity="0.4";J.appendChild(Aa);n.addListener("darkModeChanged",mxUtils.bind(this,function(){Aa.style.backgroundImage="url("+(Editor.isDarkMode()?
-ba:ja)+")"}));pa.visible&&(ia.style.opacity="0.4",J.appendChild(ia));var ka=this.createPageMenuTab(!1);ka.style.display="none";ka.style.position="";ka.style.marginLeft="";ka.style.top="";ka.style.left="";ka.style.height="100%";ka.style.lineHeight="";ka.style.borderStyle="none";ka.style.padding="3px 0";ka.style.margin="0px";ka.style.background="";ka.style.border="";ka.style.boxShadow="none";ka.style.verticalAlign="top";ka.firstChild.style.height="100%";ka.firstChild.style.opacity="0.6";ka.firstChild.style.margin=
-"0px";J.appendChild(ka);n.addListener("fileDescriptorChanged",function(){ka.style.display="1"==urlParams.pages||null!=n.pages&&1<n.pages.length?"inline-block":"none"});n.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";aa.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-J.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";B.appendChild(aa);B.appendChild(J);O.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";B.appendChild(O);window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,
-"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(B)}else q.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;",this.tabContainer.style.right="70px",T=u.addMenu("100%",y.funct),T.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)"),T.style.whiteSpace="nowrap",T.style.paddingRight="10px",T.style.textDecoration="none",T.style.textDecoration="none",T.style.overflow="hidden",
-T.style.visibility="hidden",T.style.textAlign="center",T.style.cursor="pointer",T.style.height=parseInt(n.tabContainerHeight)-1+"px",T.style.lineHeight=parseInt(n.tabContainerHeight)+1+"px",T.style.position="absolute",T.style.display="block",T.style.fontSize="12px",T.style.width="59px",T.style.right="0px",T.style.bottom="0px",T.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",T.style.backgroundPosition="right 6px center",T.style.backgroundRepeat="no-repeat",B.appendChild(T);pa=mxUtils.bind(this,
-function(){T.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);n.editor.addListener("resetGraphView",pa);n.editor.addListener("pageSelected",pa);var Ba=n.setGraphEnabled;n.setGraphEnabled=function(){Ba.apply(this,arguments);null!=this.tabContainer&&(T.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==J?this.tabContainerHeight+"px":"0px")}}B.appendChild(q);
-B.appendChild(n.diagramContainer);l.appendChild(B);n.updateTabContainer();null==J&&B.appendChild(n.tabContainer);var wa=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();
-null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,c,e,k,f,n,t){this.file=b;this.id=c;this.content=e;this.modifiedDate=k;this.createdDate=f;this.isResolved=n;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,c,e,k,f){c()};DrawioComment.prototype.editComment=function(b,c,e){c()};DrawioComment.prototype.deleteComment=function(b,c){b()};DrawioUser=function(b,c,e,k,f){this.id=b;this.email=c;this.displayName=e;this.pictureUrl=k;this.locale=f};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found \nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
-Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(b,c,e){this.init(b,c,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
+ma=n.actions.get("undo"),da=n.actions.get("redo"),qa=f("",ma.funct,null,mxResources.get("undo")+" ("+ma.shortcut+")",ma,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),ya=f("",da.funct,null,mxResources.get("redo")+
+" ("+da.shortcut+")",da,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),ua=f("",V,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ia,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48cGF0aCBkPSJNNiwxNmgxMlY4SDZWMTZ6IE04LDEwaDh2NEg4VjEweiBNNCwxNUgydjNjMCwxLjEsMC45LDIsMiwyaDN2LTJINFYxNXogTTQsNmgzVjRINEMyLjksNCwyLDQuOSwyLDZ2M2gyVjZ6IE0yMCw0aC0zdjJoM3YzIGgyVjZDMjIsNC45LDIxLjEsNCwyMCw0eiBNMjAsMThoLTN2MmgzYzEuMSwwLDItMC45LDItMnYtM2gtMlYxOHoiLz48L2c+PC9zdmc+"),
+ia=f("",ra.funct,null,mxResources.get("fullscreen"),ra,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),sa="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==";
+if(null!=I){var za=n.actions.get("delete"),va=f("",za.funct,null,mxResources.get("delete"),za,sa);va.style.opacity="0.1";aa.appendChild(va);za.addListener("stateChanged",function(){va.style.opacity=za.enabled?"0.4":"0.1"});A=function(){qa.style.display=0<n.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";ya.style.display=qa.style.display;qa.style.opacity=ma.enabled?"0.4":"0.1";ya.style.opacity=da.enabled?"0.4":"0.1"};aa.appendChild(qa);aa.appendChild(ya);ma.addListener("stateChanged",
+A);da.addListener("stateChanged",A);A();null!=urlParams.layers&&(A=n.actions.get("layers"),A=f("",A.funct,null,mxResources.get("layers"),A,Editor.layersLargeImage),A.className+=" geInverted",A.style.opacity="0.4",I.appendChild(A));null!=urlParams.tags&&(A=n.actions.get("tags"),A=f("",A.funct,null,mxResources.get("tags"),A,Editor.tagsLargeImage),A.className+=" geInverted",A.style.opacity="0.4",I.appendChild(A));A=n.actions.get("outline");A=f("",A.funct,null,mxResources.get("outline"),A,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==");
+A.style.opacity="0.4";I.appendChild(A);A=f("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Y,fa);A.style.opacity="0.4";I.appendChild(A);var T=document.createElement("div");T.innerHTML="100%";T.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+" (Enter)");T.style.display="inline-block";T.style.cursor="pointer";T.style.textAlign="center";T.style.whiteSpace="nowrap";T.style.paddingRight="10px";T.style.textDecoration="none";T.style.verticalAlign=
+"top";T.style.padding="6px 0";T.style.fontSize="14px";T.style.width="40px";T.style.opacity="0.4";I.appendChild(T);mxEvent.addListener(T,"click",V);V=f("",Q.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Q,ta);V.style.opacity="0.4";I.appendChild(V);var Aa=f("",U.funct,null,mxResources.get("dark"),U,Editor.isDarkMode()?ba:ja);Aa.style.opacity="0.4";I.appendChild(Aa);n.addListener("darkModeChanged",mxUtils.bind(this,function(){Aa.style.backgroundImage="url("+(Editor.isDarkMode()?
+ba:ja)+")"}));ra.visible&&(ia.style.opacity="0.4",I.appendChild(ia));var ka=this.createPageMenuTab(!1);ka.style.display="none";ka.style.position="";ka.style.marginLeft="";ka.style.top="";ka.style.left="";ka.style.height="100%";ka.style.lineHeight="";ka.style.borderStyle="none";ka.style.padding="3px 0";ka.style.margin="0px";ka.style.background="";ka.style.border="";ka.style.boxShadow="none";ka.style.verticalAlign="top";ka.firstChild.style.height="100%";ka.firstChild.style.opacity="0.6";ka.firstChild.style.margin=
+"0px";I.appendChild(ka);n.addListener("fileDescriptorChanged",function(){ka.style.display="1"==urlParams.pages||null!=n.pages&&1<n.pages.length?"inline-block":"none"});n.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";aa.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+I.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";y.appendChild(aa);y.appendChild(I);O.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";y.appendChild(O);window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,
+"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(y)}else q.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;",this.tabContainer.style.right="70px",T=u.addMenu("100%",A.funct),T.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)"),T.style.whiteSpace="nowrap",T.style.paddingRight="10px",T.style.textDecoration="none",T.style.textDecoration="none",T.style.overflow="hidden",
+T.style.visibility="hidden",T.style.textAlign="center",T.style.cursor="pointer",T.style.height=parseInt(n.tabContainerHeight)-1+"px",T.style.lineHeight=parseInt(n.tabContainerHeight)+1+"px",T.style.position="absolute",T.style.display="block",T.style.fontSize="12px",T.style.width="59px",T.style.right="0px",T.style.bottom="0px",T.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",T.style.backgroundPosition="right 6px center",T.style.backgroundRepeat="no-repeat",y.appendChild(T);ra=mxUtils.bind(this,
+function(){T.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ra);n.editor.addListener("resetGraphView",ra);n.editor.addListener("pageSelected",ra);var Ba=n.setGraphEnabled;n.setGraphEnabled=function(){Ba.apply(this,arguments);null!=this.tabContainer&&(T.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==I?this.tabContainerHeight+"px":"0px")}}y.appendChild(q);
+y.appendChild(n.diagramContainer);l.appendChild(y);n.updateTabContainer();null==I&&y.appendChild(n.tabContainer);var wa=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();
+null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,c,e,k,g,p,t){this.file=b;this.id=c;this.content=e;this.modifiedDate=k;this.createdDate=g;this.isResolved=p;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,c,e,k,g){c()};DrawioComment.prototype.editComment=function(b,c,e){c()};DrawioComment.prototype.deleteComment=function(b,c){b()};DrawioUser=function(b,c,e,k,g){this.id=b;this.email=c;this.displayName=e;this.pictureUrl=k;this.locale=g};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found \nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(b,c,e){this.init(b,c,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
GraphViewer.prototype.init=function(b,c,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,
-"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;
-this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=c&&(this.xmlDocument=c.ownerDocument,this.xmlNode=c,this.xml=mxUtils.getXml(c),null!=b)){var k=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var e=this.graph.view.getDrawPane().ownerSVGElement;
-this.graph.view.getCanvas();null!=this.graphConfig.border?e.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(e.style.padding="8px");e.style.boxSizing="border-box";e.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var b=this.view.graphBounds,c=this.view.translate;e.setAttribute("viewBox",b.x+c.x-this.panDx+" "+(b.y+c.y-this.panDy)+" "+(b.width+1)+" "+(b.height+1));this.container.style.backgroundColor=e.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,
-"bounds",b))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(b){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);
-this.xmlNode!=c&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(b){return d.getImageUrl(b)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var f=this.xmlNode.getElementsByTagName("diagram");if(0<f.length){if(null!=this.pageId)for(var k=0;k<f.length;k++)if(this.pageId==f[k].getAttribute("id")){this.currentPage=k;break}var n=this.graph.getGlobalVariable,
-d=this;this.graph.getGlobalVariable=function(b){var c=f[d.currentPage];return"page"==b?c.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==b?d.currentPage+1:"pagecount"==b?f.length:n.apply(this,arguments)}}}this.diagrams=[];var p=null;this.selectPage=function(b){this.handlingResize||(this.currentPage=mxUtils.mod(b,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(b){b=this.getIndexById(b);var c=0<=b;c&&this.selectPage(b);
-return c};var k=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=p&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),p=this.xmlNode)}),m=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(b){if(null!=b&&Graph.isPageLink(b.src)){var c=b.src,e=c.indexOf(",");0<e&&(e=d.getIndexById(c.substring(e+1)),0<=e&&(b=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[e])),b.originalSrc=c))}m.apply(this,arguments)};
-var v=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=v.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale;c.add(new mxRectangle((d.x+b.x)*e,(d.y+b.y)*e,b.width*e,b.height*e))}return c};this.addListener("xmlNodeChanged",k);k();urlParams.page=d.currentPage;k=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||
-1,k=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=
-!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};
-null!=k&&this.setLayersVisible(k);this.graph.customLinkClicked=function(b){if(Graph.isPageLink(b)){var c=b.indexOf(",");d.selectPageById(b.substring(c+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(b);return!0};var u=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return u.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||
-window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof e){var f=this.getObservableParent(b),n=new e(mxUtils.bind(this,function(c){0<b.offsetWidth&&(n.disconnect(),k())}));n.observe(f,{attributes:!0})}else k()}};GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};
+"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:
+this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=c&&(this.xmlDocument=c.ownerDocument,this.xmlNode=c,this.xml=mxUtils.getXml(c),null!=b)){var k=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;if(this.responsive&&
+this.graph.dialect==mxConstants.DIALECT_SVG){var e=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?e.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(e.style.padding="8px");e.style.boxSizing="border-box";e.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var b=this.view.graphBounds,c=this.view.translate;e.setAttribute("viewBox",b.x+c.x-this.panDx+" "+(b.y+c.y-this.panDy)+" "+(b.width+1)+
+" "+(b.height+1));this.container.style.backgroundColor=e.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",b))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(b){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&
+(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=c&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(b){return d.getImageUrl(b)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var f=this.xmlNode.getElementsByTagName("diagram");if(0<f.length){if(null!=this.pageId)for(var g=
+0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var k=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(b){var c=f[d.currentPage];return"page"==b?c.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==b?d.currentPage+1:"pagecount"==b?f.length:k.apply(this,arguments)}}}this.diagrams=[];var p=null;this.selectPage=function(b){this.handlingResize||(this.currentPage=mxUtils.mod(b,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
+this.selectPageById=function(b){b=this.getIndexById(b);var c=0<=b;c&&this.selectPage(b);return c};var g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=p&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),p=this.xmlNode)}),n=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(b){if(null!=b&&Graph.isPageLink(b.src)){var c=b.src,e=c.indexOf(",");0<e&&(e=d.getIndexById(c.substring(e+1)),0<=e&&(b=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[e])),
+b.originalSrc=c))}n.apply(this,arguments)};var v=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=v.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale;c.add(new mxRectangle((d.x+b.x)*e,(d.y+b.y)*e,b.width*e,b.height*e))}return c};this.addListener("xmlNodeChanged",g);g();urlParams.page=d.currentPage;g=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),
+this.graph.view.scale=this.graphConfig.zoom||1,g=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=
+!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),
+scale:this.graph.view.scale};null!=g&&this.setLayersVisible(g);this.graph.customLinkClicked=function(b){if(Graph.isPageLink(b)){var c=b.indexOf(",");d.selectPageById(b.substring(c+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(b);return!0};var u=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return u.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||
+window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof e){var g=this.getObservableParent(b),p=new e(mxUtils.bind(this,function(c){0<b.offsetWidth&&(p.disconnect(),k())}));p.observe(g,{attributes:!0})}else k()}};GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};
GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
GraphViewer.prototype.getImageForGraphModel=function(b){var c=this.graph.getGlobalVariable,e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=function(b){return c.apply(this,arguments)};document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==b)return c;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocument=b.ownerDocument,this.xml=mxUtils.getXml(b),this.xmlNode=b);this.setGraphXml(b)};GraphViewer.prototype.updateGraphXml=function(b){this.setGraphXml(b);this.fireEvent(new mxEventObject("graphChanged"))};
-GraphViewer.prototype.setLayersVisible=function(b){var c=!0;if(!this.autoOrigin){var e=[],k=this.graph.getModel();k.beginUpdate();try{for(var f=0;f<k.getChildCount(k.root);f++){var n=k.getChildAt(k.root,f),c=c&&k.isVisible(n);e.push(k.isVisible(n));k.setVisible(n,null!=b?b[f]:!0)}}finally{k.endUpdate()}}return c?null:e};
+GraphViewer.prototype.setLayersVisible=function(b){var c=!0;if(!this.autoOrigin){var e=[],k=this.graph.getModel();k.beginUpdate();try{for(var g=0;g<k.getChildCount(k.root);g++){var p=k.getChildAt(k.root,g),c=c&&k.isVisible(p);e.push(k.isVisible(p));k.setVisible(p,null!=b?b[g]:!0)}}finally{k.endUpdate()}}return c?null:e};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var c=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),c=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};c&&this.setLayersVisible(c)}};
GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,c=this.graph.getGraphBounds(),e=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var k=mxUtils.bind(this,function(){if(!e){e=!0;var c=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?c.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var c=b.getBoundingClientRect(),f=mxUtils.getScrollOrigin(document.body),
f="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-f.x,top:-f.y},c={left:c.left-f.left,top:c.top-f.top,bottom:c.bottom-f.top,right:c.right-f.left};this.toolbar.style.left=c.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=c.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=c.top+1+"px"):this.toolbar.style.top=c.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());e=!1}}),f=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(c){var d=b.offsetWidth;d==f||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=c?c:this.graphConfig.zoom||
-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},f=d,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());e=!1}}),g=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(c){var d=b.offsetWidth;d==g||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=c?c:this.graphConfig.zoom||
+(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},g=d,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",k),this.graph.addListener("size",k)):new ResizeSensor(this.graph.container,k));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,c.width+2*this.graph.border),
-0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,c.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var n=f=null,k=mxUtils.bind(this,function(){window.clearTimeout(n);this.handlingResize||(n=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",k):new ResizeSensor(this.graph.container,k))}else 9>=document.documentMode||this.graph.addListener("size",
+0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,c.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=g=null,k=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",k):new ResizeSensor(this.graph.container,k))}else 9>=document.documentMode||this.graph.addListener("size",
k);var t=mxUtils.bind(this,function(d){var e=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var k=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==d&&this.allowZoomOut&&(this.allowZoomIn||c.width+2*this.graph.border>b.offsetWidth||c.height+2*this.graph.border>k)?(d=null,null!=k&&c.height+2*this.graph.border>k-2&&(d=(k-2*this.graph.border-2)/c.height),this.fitGraph(d)):this.widthIsEmpty||
-null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-c.x/this.graph.view.scale)+d.x,Math.floor(this.graph.border-c.y/this.graph.view.scale)+d.y),f=b.offsetWidth):this.graph.center((!this.widthIsEmpty||c.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=e});8==document.documentMode?window.setTimeout(t,0):t();this.positionGraph=function(b){c=this.graph.getGraphBounds();f=null;t(b)}};
+null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-c.x/this.graph.view.scale)+d.x,Math.floor(this.graph.border-c.y/this.graph.view.scale)+d.y),g=b.offsetWidth):this.graph.center((!this.widthIsEmpty||c.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=e});8==document.documentMode?window.setTimeout(t,0):t();this.positionGraph=function(b){c=this.graph.getGraphBounds();g=null;t(b)}};
GraphViewer.prototype.crop=function(){var b=this.graph,c=b.getGraphBounds(),e=b.border,k=b.view.scale;b.view.setTranslate(null!=c.x?Math.floor(b.view.translate.x-c.x/k+e):e,null!=c.y?Math.floor(b.view.translate.y-c.y/k+e):e)};GraphViewer.prototype.updateContainerWidth=function(b,c){b.style.width=c+"px"};GraphViewer.prototype.updateContainerHeight=function(b,c){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=c+"px"};
-GraphViewer.prototype.showLayers=function(b,c){var e=this.graphConfig.layers,e=null!=e&&0<e.length?e.split(" "):[],k=this.graphConfig.layerIds,f=null!=k&&0<k.length,n=!1;if(0<e.length||f||null!=c){var t=null!=c?c.getModel():null,n=b.getModel();n.beginUpdate();try{var d=n.getChildCount(n.root);if(null==t){var t=!1,g={};if(f)for(var l=0;l<k.length;l++){var q=n.getCell(k[l]);null!=q&&(t=!0,g[q.id]=!0)}else for(l=0;l<e.length;l++)q=n.getChildAt(n.root,parseInt(e[l])),null!=q&&(t=!0,g[q.id]=!0);for(l=
-0;t&&l<d;l++)q=n.getChildAt(n.root,l),n.setVisible(q,g[q.id]||!1)}else for(l=0;l<d;l++)n.setVisible(n.getChildAt(n.root,l),t.isVisible(t.getChildAt(t.root,l)))}finally{n.endUpdate()}n=!0}return n};
+GraphViewer.prototype.showLayers=function(b,c){var e=this.graphConfig.layers,e=null!=e&&0<e.length?e.split(" "):[],k=this.graphConfig.layerIds,g=null!=k&&0<k.length,p=!1;if(0<e.length||g||null!=c){var t=null!=c?c.getModel():null,p=b.getModel();p.beginUpdate();try{var d=p.getChildCount(p.root);if(null==t){var t=!1,f={};if(g)for(var l=0;l<k.length;l++){var m=p.getCell(k[l]);null!=m&&(t=!0,f[m.id]=!0)}else for(l=0;l<e.length;l++)m=p.getChildAt(p.root,parseInt(e[l])),null!=m&&(t=!0,f[m.id]=!0);for(l=
+0;t&&l<d;l++)m=p.getChildAt(p.root,l),p.setVisible(m,f[m.id]||!1)}else for(l=0;l<d;l++)p.setVisible(p.getChildAt(p.root,l),t.isVisible(t.getChildAt(t.root,l)))}finally{p.endUpdate()}p=!0}return p};
GraphViewer.prototype.addToolbar=function(){function b(b,c,d,f){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",b);null!=d&&g.setAttribute("title",d);g.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",c);null==f||f?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",function(){g.style.backgroundColor=
-"#eee"}),mxUtils.setOpacity(b,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(b);e.appendChild(g);q++;return g}var c=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?c.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(c.style.marginTop=this.toolbarHeight+"px");var e=c.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign=
-"left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,f=null,n=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=f&&(window.clearTimeout(f),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=
-null;f=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";f=null}),100)}),b||200)}),t=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=f&&(window.clearTimeout(f),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,b||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(t(30),n())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",
-function(b){mxEvent.consume(b)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(b){t(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(b){t(100);mxEvent.consume(b)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||t(30)}));var d=this.graph,g=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=d.container.scrollLeft;
-this.scrollTop=d.container.scrollTop},mouseMove:function(b,c){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<g&&Math.abs(this.scrollTop-d.container.scrollTop)<g&&Math.abs(this.startX-c.getGraphX())<g&&Math.abs(this.startY-c.getGraphY())<g&&(0<parseFloat(e.style.opacity||0)?n():t(30))}})}for(var l=this.toolbarItems,q=0,p=null,m=null,v=0;v<l.length;v++){var u=l[v];if("pages"==u){m=c.ownerDocument.createElement("div");m.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";
-mxUtils.setOpacity(m,70);var B=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");B.style.borderRightStyle="none";B.style.paddingLeft="0px";B.style.paddingRight="0px";e.appendChild(m);var x=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";u=mxUtils.bind(this,function(){m.innerHTML=
-"";mxUtils.write(m,this.currentPage+1+" / "+this.diagrams.length);m.style.display=1<this.diagrams.length?"inline-block":"none";B.style.display=m.style.display;x.style.display=m.style.display});this.addListener("graphChanged",u);u()}else if("zoom"==u)this.zoomEnabled&&(b(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(mxUtils.bind(this,
-function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==u){if(this.layersEnabled){var E=this.graph.getModel(),A=b(mxUtils.bind(this,function(b){if(null!=p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var b=this.graph.getGraphBounds(),
-c=this.graph.view;0>b.x||0>b.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale}):null!=this.graph.originalViewState&&0<b.x/c.scale+this.graph.originalViewState.translate.x-c.translate.x&&0<b.y/c.scale+this.graph.originalViewState.translate.y-c.translate.y&&(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState=
-{translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});b=A.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var c=mxUtils.getDocumentScrollOrigin(document);p.style.left=c.x+
-b.left-1+"px";p.style.top=c.y+b.bottom-2+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");E.addListener(mxEvent.CHANGE,function(){A.style.display=1<E.getChildCount(E.root)?"inline-block":"none"});A.style.display=1<E.getChildCount(E.root)?"inline-block":"none"}}else"lightbox"==u?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(u=this.graphConfig["toolbar-buttons"][u],
-null!=u&&(u.elem=b(null==u.enabled||u.enabled?u.handler:function(){},u.image,u.title,u.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*q);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),
-mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*q;var F=c.style.border,I=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,c.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var b=c.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},
-b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};e.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=b.top+1+"px"):e.style.top=b.top+"px";"1px solid transparent"==F&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=
-p&&(p.parentNode.removeChild(p),p=null);c.style.border=F});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==c||b==e||b==p)return;b=b.parentNode}f()});mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",I):I();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&
-I()})).observe(c)};GraphViewer.prototype.disableButton=function(b){var c=this.graphConfig["toolbar-buttons"][b];null!=c&&(mxUtils.setOpacity(c.elem,30),mxEvent.removeListener(c.elem,"click",c.handler),mxEvent.addListener(c.elem,"mouseenter",function(){c.elem.style.backgroundColor="#eee"}))};
-GraphViewer.prototype.addClickHandler=function(b,c){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,k){if(null==k)for(var f=mxEvent.getSource(e);f!=b.container&&null!=f&&null==k;)"a"==f.nodeName.toLowerCase()&&(k=f.getAttribute("href")),f=f.parentNode;null!=c?null==k||b.isCustomLink(k)?mxEvent.consume(e):b.isExternalProtocol(k)||b.isBlankLink(k)||window.setTimeout(function(){c.destroy()},0):null!=k&&null==c&&b.isCustomLink(k)&&
+"#eee"}),mxUtils.setOpacity(b,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(b);e.appendChild(g);m++;return g}var c=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?c.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(c.style.marginTop=this.toolbarHeight+"px");var e=c.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign=
+"left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,g=null,p=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=
+null;g=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";g=null}),100)}),b||200)}),t=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,b||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(t(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",
+function(b){mxEvent.consume(b)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(b){t(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(b){t(100);mxEvent.consume(b)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||t(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=d.container.scrollLeft;
+this.scrollTop=d.container.scrollTop},mouseMove:function(b,c){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-c.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?p():t(30))}})}for(var l=this.toolbarItems,m=0,q=null,n=null,v=null,u=null,y=0;y<l.length;y++){var x=l[y];if("pages"==x){u=c.ownerDocument.createElement("div");u.style.cssText=
+"display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(u,70);var H=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");H.style.borderRightStyle="none";H.style.paddingLeft="0px";H.style.paddingRight="0px";e.appendChild(u);var D=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,
+mxResources.get("nextPage")||"Next Page");D.style.paddingLeft="0px";D.style.paddingRight="0px";x=mxUtils.bind(this,function(){u.innerHTML="";mxUtils.write(u,this.currentPage+1+" / "+this.diagrams.length);u.style.display=1<this.diagrams.length?"inline-block":"none";H.style.display=u.style.display;D.style.display=u.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)this.zoomEnabled&&(b(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||
+"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==x){if(this.layersEnabled){var E=this.graph.getModel(),J=b(mxUtils.bind(this,function(b){if(null!=q)q.parentNode.removeChild(q),
+q=null;else{q=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var b=this.graph.getGraphBounds(),c=this.graph.view;0>b.x||0>b.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale}):null!=this.graph.originalViewState&&0<b.x/c.scale+this.graph.originalViewState.translate.x-c.translate.x&&0<b.y/c.scale+this.graph.originalViewState.translate.y-c.translate.y&&
+(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});b=J.getBoundingClientRect();q.style.width="140px";q.style.padding="2px 0px 2px 0px";q.style.border="1px solid #d0d0d0";q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style.fontSize=
+"11px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var c=mxUtils.getDocumentScrollOrigin(document);q.style.left=c.x+b.left-1+"px";q.style.top=c.y+b.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");E.addListener(mxEvent.CHANGE,function(){J.style.display=1<E.getChildCount(E.root)?"inline-block":"none"});J.style.display=1<E.getChildCount(E.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var L=b(mxUtils.bind(this,
+function(b){null==n&&(n=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),n.div.getElementsByTagName("div")[0].style.position="",n.div.style.maxHeight="160px",n.div.style.maxWidth="120px",n.div.style.padding="2px",n.div.style.overflow="auto",n.div.style.height="auto",n.div.style.position="fixed",n.div.style.fontFamily=Editor.defaultHtmlFont,n.div.style.fontSize="11px",n.div.style.backgroundColor="#eee",n.div.style.color="#000",n.div.style.border="1px solid #d0d0d0",n.div.style.zIndex=
+this.toolbarZIndex+1,mxUtils.setOpacity(n.div,80));if(null!=v)v.parentNode.removeChild(v),v=null;else{v=n.div;mxEvent.addListener(v,"mouseleave",function(){v.parentNode.removeChild(v);v=null});b=L.getBoundingClientRect();var c=mxUtils.getDocumentScrollOrigin(document);v.style.left=c.x+b.left-1+"px";v.style.top=c.y+b.bottom-2+"px";document.body.appendChild(v);n.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");E.addListener(mxEvent.CHANGE,function(){L.style.display=0<this.graph.getAllTags().length?
+"inline-block":"none"});L.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==x?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(x=this.graphConfig["toolbar-buttons"][x],null!=x&&(x.elem=b(null==x.enabled||x.enabled?x.handler:function(){},x.image,x.title,x.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=
+34*m);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*m;var G=c.style.border,K=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?
+"auto":Math.max(this.minToolbarWidth,c.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var b=c.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};e.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=b.bottom-1+"px":"inline"!=
+this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=b.top+1+"px"):e.style.top=b.top+"px";"1px solid transparent"==G&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=q&&(q.parentNode.removeChild(q),q=null);c.style.border=G});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==c||b==e||b==q)return;b=b.parentNode}f()});
+mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",K):K();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&K()})).observe(c)};
+GraphViewer.prototype.disableButton=function(b){var c=this.graphConfig["toolbar-buttons"][b];null!=c&&(mxUtils.setOpacity(c.elem,30),mxEvent.removeListener(c.elem,"click",c.handler),mxEvent.addListener(c.elem,"mouseenter",function(){c.elem.style.backgroundColor="#eee"}))};
+GraphViewer.prototype.addClickHandler=function(b,c){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,k){if(null==k)for(var g=mxEvent.getSource(e);g!=b.container&&null!=g&&null==k;)"a"==g.nodeName.toLowerCase()&&(k=g.getAttribute("href")),g=g.parentNode;null!=c?null==k||b.isCustomLink(k)?mxEvent.consume(e):b.isExternalProtocol(k)||b.isBlankLink(k)||window.setTimeout(function(){c.destroy()},0):null!=k&&null==c&&b.isCustomLink(k)&&
(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&b.customLinkClicked(k)&&(mxUtils.clearSelection(),mxEvent.consume(e))}),mxUtils.bind(this,function(b){null!=c||!this.lightboxClickEnabled||mxEvent.isTouchEvent(b)&&0!=this.toolbarItems.length||this.showLightbox()}))};
-GraphViewer.prototype.showLightbox=function(b,c,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,target:null!=e?e:"blank"};b&&(e.edit=this.graphConfig.edit||"_blank");if(null!=c?c:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
-(e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(b){"ready"==b.data&&b.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(e.dev="1");this.lightboxWindow=
-window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
+GraphViewer.prototype.showLightbox=function(b,c,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,target:null!=e?e:"blank"};b&&(e.edit=this.graphConfig.edit||"_blank");if(null!=c?c:1)e.close=1;this.layersEnabled&&(e.layers=1);this.tagsEnabled&&(e.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=
+this.graphConfig.highlight&&(e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(b){"ready"==b.data&&b.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(e.dev=
+"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("src",Editor.closeImage);c.style.cssText="position:fixed;top:32px;right:32px;";c.style.cursor="pointer";mxEvent.addListener(c,
-"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;
-EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var e=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=e;k.refresh=function(){};var f=mxUtils.bind(this,function(b){27==b.keyCode&&k.destroy()}),
-n=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",f);document.body.removeChild(b);document.body.removeChild(c);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;n.apply(this,arguments)};var t=k.editor.graph,d=t.container;d.style.overflow="hidden";this.lightboxChrome?(d.style.border="1px solid #c0c0c0",d.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",f)):(b.style.display="none",c.style.display="none");var g=this;
-t.getImageFromBundles=function(b){return g.getImageUrl(b)};var l=k.createTemporaryGraph;k.createTemporaryGraph=function(){var b=l.apply(this,arguments);b.getImageFromBundles=function(b){return g.getImageUrl(b)};return b};this.graphConfig.move&&(t.isMoveCellsEvent=function(b){return!0});mxUtils.setPrefixedStyle(d.style,"border-radius","4px");d.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(d.style,
-"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(d.style,"transition","all .25s ease-in-out"));this.addClickHandler(t,k);window.setTimeout(mxUtils.bind(this,function(){d.style.outline="none";d.style.zIndex=this.lightboxZIndex;c.style.zIndex=this.lightboxZIndex;document.body.appendChild(d);document.body.appendChild(c);k.setFileData(this.xml);mxUtils.setPrefixedStyle(d.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;
-document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});k.lightboxFit();k.chromelessResize();this.showLayers(t,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k};
+"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,
+Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var e=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=e;k.refresh=function(){};
+var g=mxUtils.bind(this,function(b){27==b.keyCode&&k.destroy()}),p=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",g);document.body.removeChild(b);document.body.removeChild(c);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;p.apply(this,arguments)};var t=k.editor.graph,d=t.container;d.style.overflow="hidden";this.lightboxChrome?(d.style.border="1px solid #c0c0c0",d.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",
+g)):(b.style.display="none",c.style.display="none");var f=this;t.getImageFromBundles=function(b){return f.getImageUrl(b)};var l=k.createTemporaryGraph;k.createTemporaryGraph=function(){var b=l.apply(this,arguments);b.getImageFromBundles=function(b){return f.getImageUrl(b)};return b};this.graphConfig.move&&(t.isMoveCellsEvent=function(b){return!0});mxUtils.setPrefixedStyle(d.style,"border-radius","4px");d.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";
+mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(d.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(d.style,"transition","all .25s ease-in-out"));this.addClickHandler(t,k);window.setTimeout(mxUtils.bind(this,function(){d.style.outline="none";d.style.zIndex=this.lightboxZIndex;c.style.zIndex=this.lightboxZIndex;document.body.appendChild(d);document.body.appendChild(c);k.setFileData(this.xml);mxUtils.setPrefixedStyle(d.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom=
+"60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});k.lightboxFit();k.chromelessResize();this.showLayers(t,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerHTML="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(b){try{b.innerHTML="",GraphViewer.createViewerForElement(b)}catch(e){b.innerHTML=e.message,null!=window.console&&console.error(e)}})};
-GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var c=document.getElementsByClassName(b);b=[];for(var e=0;e<c.length;e++)b.push(c[e]);return b}for(var k=document.getElementsByTagName("*"),c=[],e=0;e<k.length;e++){var f=k[e].className;null!=f&&0<f.length&&(f=f.split(" "),0<=mxUtils.indexOf(f,b)&&c.push(k[e]))}return c};
-GraphViewer.createViewerForElement=function(b,c){var e=b.getAttribute("data-mxgraph");if(null!=e){var k=JSON.parse(e),f=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(b,e.documentElement,k);null!=c&&c(e)};null!=k.url?GraphViewer.getUrl(k.url,function(b){f(b)}):f(k.xml)}};
+GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var c=document.getElementsByClassName(b);b=[];for(var e=0;e<c.length;e++)b.push(c[e]);return b}for(var k=document.getElementsByTagName("*"),c=[],e=0;e<k.length;e++){var g=k[e].className;null!=g&&0<g.length&&(g=g.split(" "),0<=mxUtils.indexOf(g,b)&&c.push(k[e]))}return c};
+GraphViewer.createViewerForElement=function(b,c){var e=b.getAttribute("data-mxgraph");if(null!=e){var k=JSON.parse(e),g=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(b,e.documentElement,k);null!=c&&c(e)};null!=k.url?GraphViewer.getUrl(k.url,function(b){g(b)}):g(k.xml)}};
GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(c){}};
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,c,e){if(null!=GraphViewer.cachedUrls[b])c(GraphViewer.cachedUrls[b]);else{var k=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;k.open("GET",b);k.onload=function(){c(null!=k.getText?k.getText():k.responseText)};k.onerror=e;k.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(b){return window.setTimeout(b,20)},c=function(e,k){function f(){this.q=[];this.add=function(b){this.q.push(b)};var b,c;this.call=function(){b=0;for(c=this.q.length;b<c;b++)this.q[b].call()}}function n(b,c){return b.currentStyle?b.currentStyle[c]:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue(c):b.style[c]}function t(c,d){if(!c.resizedAttached)c.resizedAttached=
-new f,c.resizedAttached.add(d);else if(c.resizedAttached){c.resizedAttached.add(d);return}c.resizeSensor=document.createElement("div");c.resizeSensor.className="resize-sensor";c.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";c.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-c.appendChild(c.resizeSensor);"static"==n(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],g=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){g.style.width="100000px";g.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,p=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(p))};b(p);var q,t,L,H,K=function(){if((L=c.offsetWidth)!=q||(H=c.offsetHeight)!=t)m=!0,q=L,t=H;l()},C=function(b,c,d){b.attachEvent?
-b.attachEvent("on"+c,d):b.addEventListener(c,d)};C(e,"scroll",K);C(k,"scroll",K)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},g=Object.prototype.toString.call(e),l="[object Array]"===g||"[object NodeList]"===g||"[object HTMLCollection]"===g||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var g=0,q=e.length;g<q;g++)t(e[g],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(b){return window.setTimeout(b,20)},c=function(e,k){function g(){this.q=[];this.add=function(b){this.q.push(b)};var b,c;this.call=function(){b=0;for(c=this.q.length;b<c;b++)this.q[b].call()}}function p(b,c){return b.currentStyle?b.currentStyle[c]:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue(c):b.style[c]}function t(c,d){if(!c.resizedAttached)c.resizedAttached=
+new g,c.resizedAttached.add(d);else if(c.resizedAttached){c.resizedAttached.add(d);return}c.resizeSensor=document.createElement("div");c.resizeSensor.className="resize-sensor";c.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";c.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
+c.appendChild(c.resizeSensor);"static"==p(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],f=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){f.style.width="100000px";f.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(n))};b(n);var q,t,L,G,K=function(){if((L=c.offsetWidth)!=q||(G=c.offsetHeight)!=t)m=!0,q=L,t=G;l()},C=function(b,c,d){b.attachEvent?
+b.attachEvent("on"+c,d):b.addEventListener(c,d)};C(e,"scroll",K);C(k,"scroll",K)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},f=Object.prototype.toString.call(e),l="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var f=0,m=e.length;f<m;f++)t(e[f],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
c.detach=function(b){b.resizeSensor&&(b.removeChild(b.resizeSensor),delete b.resizeSensor,delete b.resizedAttached)};window.ResizeSensor=c})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/mxgraph/mxClient.js b/src/main/webapp/mxgraph/mxClient.js
index 33ec7e31..8aca959d 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"15.1.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+var mxClient={VERSION:"15.1.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||
0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 7f8682ae..e36ea288 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,a,c)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-f163abaa"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"903ce6c0a0d0eaf09f7e764d690d97ea"},{url:"js/extensions.min.js",revision:"a01ac5f5946852a43e5489842ed224c4"},{url:"js/stencils.min.js",revision:"c170a229d8726934c0d6b04c2214a36c"},{url:"js/shapes-14-6-5.min.js",revision:"2a45abd06dfe78e69135e9f87f9b78d3"},{url:"js/math-print.js",revision:"9d98c920695f6c3395da4b68f723e60a"},{url:"index.html",revision:"1a10c0aa90c23524c375f956fd388040"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/grapheditor.css",revision:"a02a5d8342a82adf17798f4eae85befc"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"87d5d01385c5d0f0c4c4f5d0f3532826"},{url:"js/croppie/croppie.min.css",revision:"fc297c9002c79c15a132f13ee3ec427e"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"d79dc2d49e2dc07f688b3672149ae6b7"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"2ce6e99d95113e9ca6b24343cea202e0"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"3c975c94a7e7c611d1c28492072f422d"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"375a89b2a867264a395f384d00eeba13"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"197ed5837ed27992688fc424699a9a78"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"ec6e55011746305549024292f46270bd"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"74878fb4834967aa4a68647cab7888c1"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"293aa21acaf0a3349686f420b2be874a"},{url:"connect/confluence/viewer-init.js",revision:"4a60c6c805cab7bc782f1e52f7818d9f"},{url:"connect/confluence/viewer.js",revision:"c5fb629e12fd3256c23cc8acfaa46f5b"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c7b38b3af4eb7a58ab6dc4791216530e"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"ea920e51a37c0b54d7187e0ee2791b5d"},{url:"connect/confluence/includeDiagram.html",revision:"538252ed4fed6d5e9f4e53b35954c116"},{url:"connect/confluence/macro-editor.js",revision:"e273a48b8e81faac4530bf1a68d75aa0"},{url:"math/MathJax.js",revision:"b2c103388b71bb3d11cbf9aa45fe9b68"},{url:"math/config/TeX-MML-AM_SVG-full.js",revision:"d5cb8ac04050983170ae4af145bc66ff"},{url:"math/jax/output/SVG/fonts/TeX/fontdata.js",revision:"495e5a410955d1b6178870e605890ede"},{url:"math/jax/element/mml/optable/BasicLatin.js",revision:"cac9b2e71382e62270baa55fab07cc13"},{url:"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js",revision:"e3e5e4d5924beed29f0844550b5c8f46"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js",revision:"0767cbad7275b53da128e7e5e1109f7c"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js",revision:"346302a5c5ee00e01c302148c56dbfe3"},{url:"resources/dia.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_am.txt",revision:"ff59ef2ea422e962065b978f74f1989e"},{url:"resources/dia_ar.txt",revision:"b53a2876e65d205d42c0217216db0a0b"},{url:"resources/dia_bg.txt",revision:"5ae6ea7a2b816b32ded88cb15651dbfc"},{url:"resources/dia_bn.txt",revision:"f8775fef4398d0863d1c95b92f778f14"},{url:"resources/dia_bs.txt",revision:"1a5bbe8e6e02b215c7457d9735ada682"},{url:"resources/dia_ca.txt",revision:"d8ac61cb5b3e5d47f9ce8160c8b2f057"},{url:"resources/dia_cs.txt",revision:"aeaa9d93c19d60a9ab385a21d57f025c"},{url:"resources/dia_da.txt",revision:"5e0221a99a3fdf557b5ccf72965d99b2"},{url:"resources/dia_de.txt",revision:"d3ad299dc8cfbd2a34479edfafce74ad"},{url:"resources/dia_el.txt",revision:"80761a88228f85296bfc029bf5340718"},{url:"resources/dia_eo.txt",revision:"4544b6600298fe72d2d516fd135c54fa"},{url:"resources/dia_es.txt",revision:"863e0e73d4cdf95093461ef0157e13e5"},{url:"resources/dia_et.txt",revision:"3a47c1b462102c60e47e0f7d6e07d379"},{url:"resources/dia_eu.txt",revision:"92c451283a83cae2d83460b1b0aaf1c4"},{url:"resources/dia_fa.txt",revision:"c56a53dac116441fac2a6e6a110b4fcf"},{url:"resources/dia_fi.txt",revision:"fcc968a8202ebe596bb4efa31d5c55b7"},{url:"resources/dia_fil.txt",revision:"0c98b10b2ce7660502fab8f8a09216c0"},{url:"resources/dia_fr.txt",revision:"550ba55018af500d82b2ade74f49d6a6"},{url:"resources/dia_gl.txt",revision:"d9dedee9a17ce0e98cac6a641dbd1b17"},{url:"resources/dia_gu.txt",revision:"6d6d7e768e1d255dcb9f9abf87676787"},{url:"resources/dia_he.txt",revision:"404b9e323e5bbbecb63ea4a58385431a"},{url:"resources/dia_hi.txt",revision:"8c4436fda7e9278685d9d5d6e0942ae9"},{url:"resources/dia_hr.txt",revision:"38cf52a7e23c4e8796d0cbb7ea217f7e"},{url:"resources/dia_hu.txt",revision:"e17887d5e7057c80ec1da14fe7749c52"},{url:"resources/dia_id.txt",revision:"32c8349f2744c3b6023fd17742eb1c2c"},{url:"resources/dia_it.txt",revision:"57eba100f012d139d00543c31060cf04"},{url:"resources/dia_ja.txt",revision:"cbb7bea7bd120272c6dfe0d6f0ca85f4"},{url:"resources/dia_kn.txt",revision:"ca9045d8ab0d3c8448228187c8ba77cd"},{url:"resources/dia_ko.txt",revision:"ea4948e5456ac276658b0071172dee82"},{url:"resources/dia_lt.txt",revision:"05955be58d94abc2707dea99394a60db"},{url:"resources/dia_lv.txt",revision:"47aa1bcdd23457cd5f3026db7a357fc9"},{url:"resources/dia_ml.txt",revision:"5735f8afcd3fb73882147629d044e368"},{url:"resources/dia_mr.txt",revision:"8e891bbae07ac6fbe9038e8d19fb66fd"},{url:"resources/dia_ms.txt",revision:"ea1992800627d8e54c54d54d1078cd50"},{url:"resources/dia_my.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_nl.txt",revision:"a158a142f848a44f4b9a86b2c71de770"},{url:"resources/dia_no.txt",revision:"a73fe6de8d13ff09b57022c6152de435"},{url:"resources/dia_pl.txt",revision:"a731cde706b7b10c2bb9b8b804ecf99e"},{url:"resources/dia_pt-br.txt",revision:"6d5aef2fa11b45c7e089a78d8f8077d9"},{url:"resources/dia_pt.txt",revision:"e39267e6c115d3dfff18734d9512396a"},{url:"resources/dia_ro.txt",revision:"e2485ba528fffc006ddc16a2bdbba588"},{url:"resources/dia_ru.txt",revision:"4e4dff4df4bb635eab4648a31718bb71"},{url:"resources/dia_si.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_sk.txt",revision:"aa39fa602751e960c408b51bc4d1e9a3"},{url:"resources/dia_sl.txt",revision:"a1e9ea18592a3520a564da53754435f1"},{url:"resources/dia_sr.txt",revision:"ee7f392d230f3acf9ee64e59912d2240"},{url:"resources/dia_sv.txt",revision:"d1af4adc3abc689e2b2877348fe3a80e"},{url:"resources/dia_sw.txt",revision:"ee11057cc33d2db3915810afa98e4fb8"},{url:"resources/dia_ta.txt",revision:"64633496007987935476811363899867"},{url:"resources/dia_te.txt",revision:"b67de98cc3819f31d6aedc4a8e332d3f"},{url:"resources/dia_th.txt",revision:"bf3564b735dddb73bafa110e1ba4f364"},{url:"resources/dia_tr.txt",revision:"e66e3a8530b0bda46ff6de26598a637b"},{url:"resources/dia_uk.txt",revision:"1ea94afcd9c9383c784ceae2896c8af4"},{url:"resources/dia_vi.txt",revision:"2ea8a953b560713a201dff1d8d3917dd"},{url:"resources/dia_zh-tw.txt",revision:"7a19eef01a4ee231cc05d3b3833bba4f"},{url:"resources/dia_zh.txt",revision:"f609cb57ae40941ae6c8165f89d7aed0"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,a,c)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-f163abaa"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"84eb215d62e5d0aa287b2afe80e57ca9"},{url:"js/extensions.min.js",revision:"6f87c382be5f15c8883b322db19f6375"},{url:"js/stencils.min.js",revision:"c170a229d8726934c0d6b04c2214a36c"},{url:"js/shapes-14-6-5.min.js",revision:"2a45abd06dfe78e69135e9f87f9b78d3"},{url:"js/math-print.js",revision:"9d98c920695f6c3395da4b68f723e60a"},{url:"index.html",revision:"1a10c0aa90c23524c375f956fd388040"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/grapheditor.css",revision:"a02a5d8342a82adf17798f4eae85befc"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"87d5d01385c5d0f0c4c4f5d0f3532826"},{url:"js/croppie/croppie.min.css",revision:"fc297c9002c79c15a132f13ee3ec427e"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"14855f2975c1b1e564977e8dc32479fc"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"2ce6e99d95113e9ca6b24343cea202e0"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"3c975c94a7e7c611d1c28492072f422d"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"375a89b2a867264a395f384d00eeba13"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"197ed5837ed27992688fc424699a9a78"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"ec6e55011746305549024292f46270bd"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"74878fb4834967aa4a68647cab7888c1"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"293aa21acaf0a3349686f420b2be874a"},{url:"connect/confluence/viewer-init.js",revision:"4a60c6c805cab7bc782f1e52f7818d9f"},{url:"connect/confluence/viewer.js",revision:"c5fb629e12fd3256c23cc8acfaa46f5b"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c7b38b3af4eb7a58ab6dc4791216530e"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"ea920e51a37c0b54d7187e0ee2791b5d"},{url:"connect/confluence/includeDiagram.html",revision:"538252ed4fed6d5e9f4e53b35954c116"},{url:"connect/confluence/macro-editor.js",revision:"e273a48b8e81faac4530bf1a68d75aa0"},{url:"math/MathJax.js",revision:"b2c103388b71bb3d11cbf9aa45fe9b68"},{url:"math/config/TeX-MML-AM_SVG-full.js",revision:"d5cb8ac04050983170ae4af145bc66ff"},{url:"math/jax/output/SVG/fonts/TeX/fontdata.js",revision:"495e5a410955d1b6178870e605890ede"},{url:"math/jax/element/mml/optable/BasicLatin.js",revision:"cac9b2e71382e62270baa55fab07cc13"},{url:"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js",revision:"e3e5e4d5924beed29f0844550b5c8f46"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js",revision:"0767cbad7275b53da128e7e5e1109f7c"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js",revision:"346302a5c5ee00e01c302148c56dbfe3"},{url:"resources/dia.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_am.txt",revision:"ff59ef2ea422e962065b978f74f1989e"},{url:"resources/dia_ar.txt",revision:"b53a2876e65d205d42c0217216db0a0b"},{url:"resources/dia_bg.txt",revision:"5ae6ea7a2b816b32ded88cb15651dbfc"},{url:"resources/dia_bn.txt",revision:"f8775fef4398d0863d1c95b92f778f14"},{url:"resources/dia_bs.txt",revision:"1a5bbe8e6e02b215c7457d9735ada682"},{url:"resources/dia_ca.txt",revision:"d8ac61cb5b3e5d47f9ce8160c8b2f057"},{url:"resources/dia_cs.txt",revision:"aeaa9d93c19d60a9ab385a21d57f025c"},{url:"resources/dia_da.txt",revision:"5e0221a99a3fdf557b5ccf72965d99b2"},{url:"resources/dia_de.txt",revision:"d3ad299dc8cfbd2a34479edfafce74ad"},{url:"resources/dia_el.txt",revision:"80761a88228f85296bfc029bf5340718"},{url:"resources/dia_eo.txt",revision:"4544b6600298fe72d2d516fd135c54fa"},{url:"resources/dia_es.txt",revision:"863e0e73d4cdf95093461ef0157e13e5"},{url:"resources/dia_et.txt",revision:"3a47c1b462102c60e47e0f7d6e07d379"},{url:"resources/dia_eu.txt",revision:"92c451283a83cae2d83460b1b0aaf1c4"},{url:"resources/dia_fa.txt",revision:"c56a53dac116441fac2a6e6a110b4fcf"},{url:"resources/dia_fi.txt",revision:"fcc968a8202ebe596bb4efa31d5c55b7"},{url:"resources/dia_fil.txt",revision:"0c98b10b2ce7660502fab8f8a09216c0"},{url:"resources/dia_fr.txt",revision:"550ba55018af500d82b2ade74f49d6a6"},{url:"resources/dia_gl.txt",revision:"d9dedee9a17ce0e98cac6a641dbd1b17"},{url:"resources/dia_gu.txt",revision:"6d6d7e768e1d255dcb9f9abf87676787"},{url:"resources/dia_he.txt",revision:"404b9e323e5bbbecb63ea4a58385431a"},{url:"resources/dia_hi.txt",revision:"8c4436fda7e9278685d9d5d6e0942ae9"},{url:"resources/dia_hr.txt",revision:"38cf52a7e23c4e8796d0cbb7ea217f7e"},{url:"resources/dia_hu.txt",revision:"e17887d5e7057c80ec1da14fe7749c52"},{url:"resources/dia_id.txt",revision:"32c8349f2744c3b6023fd17742eb1c2c"},{url:"resources/dia_it.txt",revision:"57eba100f012d139d00543c31060cf04"},{url:"resources/dia_ja.txt",revision:"cbb7bea7bd120272c6dfe0d6f0ca85f4"},{url:"resources/dia_kn.txt",revision:"ca9045d8ab0d3c8448228187c8ba77cd"},{url:"resources/dia_ko.txt",revision:"ea4948e5456ac276658b0071172dee82"},{url:"resources/dia_lt.txt",revision:"05955be58d94abc2707dea99394a60db"},{url:"resources/dia_lv.txt",revision:"47aa1bcdd23457cd5f3026db7a357fc9"},{url:"resources/dia_ml.txt",revision:"5735f8afcd3fb73882147629d044e368"},{url:"resources/dia_mr.txt",revision:"8e891bbae07ac6fbe9038e8d19fb66fd"},{url:"resources/dia_ms.txt",revision:"ea1992800627d8e54c54d54d1078cd50"},{url:"resources/dia_my.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_nl.txt",revision:"a158a142f848a44f4b9a86b2c71de770"},{url:"resources/dia_no.txt",revision:"a73fe6de8d13ff09b57022c6152de435"},{url:"resources/dia_pl.txt",revision:"a731cde706b7b10c2bb9b8b804ecf99e"},{url:"resources/dia_pt-br.txt",revision:"6d5aef2fa11b45c7e089a78d8f8077d9"},{url:"resources/dia_pt.txt",revision:"e39267e6c115d3dfff18734d9512396a"},{url:"resources/dia_ro.txt",revision:"e2485ba528fffc006ddc16a2bdbba588"},{url:"resources/dia_ru.txt",revision:"4e4dff4df4bb635eab4648a31718bb71"},{url:"resources/dia_si.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_sk.txt",revision:"aa39fa602751e960c408b51bc4d1e9a3"},{url:"resources/dia_sl.txt",revision:"a1e9ea18592a3520a564da53754435f1"},{url:"resources/dia_sr.txt",revision:"ee7f392d230f3acf9ee64e59912d2240"},{url:"resources/dia_sv.txt",revision:"d1af4adc3abc689e2b2877348fe3a80e"},{url:"resources/dia_sw.txt",revision:"ee11057cc33d2db3915810afa98e4fb8"},{url:"resources/dia_ta.txt",revision:"64633496007987935476811363899867"},{url:"resources/dia_te.txt",revision:"b67de98cc3819f31d6aedc4a8e332d3f"},{url:"resources/dia_th.txt",revision:"bf3564b735dddb73bafa110e1ba4f364"},{url:"resources/dia_tr.txt",revision:"e66e3a8530b0bda46ff6de26598a637b"},{url:"resources/dia_uk.txt",revision:"1ea94afcd9c9383c784ceae2896c8af4"},{url:"resources/dia_vi.txt",revision:"2ea8a953b560713a201dff1d8d3917dd"},{url:"resources/dia_zh-tw.txt",revision:"7a19eef01a4ee231cc05d3b3833bba4f"},{url:"resources/dia_zh.txt",revision:"f609cb57ae40941ae6c8165f89d7aed0"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
//# sourceMappingURL=service-worker.js.map
diff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.map
index 7f440788..5096e405 100644
--- a/src/main/webapp/service-worker.js.map
+++ b/src/main/webapp/service-worker.js.map
@@ -1 +1 @@
-{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/cv/_wml09cx4cd5ryt_r7z2tjjm0000gn/T/c3bece899cab5a4cf4a5cdce6a59a996/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/usr/local/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"903ce6c0a0d0eaf09f7e764d690d97ea\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"a01ac5f5946852a43e5489842ed224c4\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"c170a229d8726934c0d6b04c2214a36c\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"2a45abd06dfe78e69135e9f87f9b78d3\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"9d98c920695f6c3395da4b68f723e60a\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"1a10c0aa90c23524c375f956fd388040\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"a02a5d8342a82adf17798f4eae85befc\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"87d5d01385c5d0f0c4c4f5d0f3532826\"\n },\n {\n \"url\": \"js/croppie/croppie.min.css\",\n \"revision\": \"fc297c9002c79c15a132f13ee3ec427e\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"d79dc2d49e2dc07f688b3672149ae6b7\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"2ce6e99d95113e9ca6b24343cea202e0\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"3c975c94a7e7c611d1c28492072f422d\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"375a89b2a867264a395f384d00eeba13\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"197ed5837ed27992688fc424699a9a78\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"ec6e55011746305549024292f46270bd\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"74878fb4834967aa4a68647cab7888c1\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"293aa21acaf0a3349686f420b2be874a\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"4a60c6c805cab7bc782f1e52f7818d9f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"c5fb629e12fd3256c23cc8acfaa46f5b\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c7b38b3af4eb7a58ab6dc4791216530e\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"ea920e51a37c0b54d7187e0ee2791b5d\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"538252ed4fed6d5e9f4e53b35954c116\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"e273a48b8e81faac4530bf1a68d75aa0\"\n },\n {\n \"url\": \"math/MathJax.js\",\n \"revision\": \"b2c103388b71bb3d11cbf9aa45fe9b68\"\n },\n {\n \"url\": \"math/config/TeX-MML-AM_SVG-full.js\",\n \"revision\": \"d5cb8ac04050983170ae4af145bc66ff\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/fontdata.js\",\n \"revision\": \"495e5a410955d1b6178870e605890ede\"\n },\n {\n \"url\": \"math/jax/element/mml/optable/BasicLatin.js\",\n \"revision\": \"cac9b2e71382e62270baa55fab07cc13\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js\",\n \"revision\": \"e3e5e4d5924beed29f0844550b5c8f46\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js\",\n \"revision\": \"0767cbad7275b53da128e7e5e1109f7c\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js\",\n \"revision\": \"346302a5c5ee00e01c302148c56dbfe3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"ff59ef2ea422e962065b978f74f1989e\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"b53a2876e65d205d42c0217216db0a0b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"5ae6ea7a2b816b32ded88cb15651dbfc\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"f8775fef4398d0863d1c95b92f778f14\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"1a5bbe8e6e02b215c7457d9735ada682\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"d8ac61cb5b3e5d47f9ce8160c8b2f057\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"aeaa9d93c19d60a9ab385a21d57f025c\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"5e0221a99a3fdf557b5ccf72965d99b2\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"d3ad299dc8cfbd2a34479edfafce74ad\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"80761a88228f85296bfc029bf5340718\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"4544b6600298fe72d2d516fd135c54fa\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"863e0e73d4cdf95093461ef0157e13e5\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"3a47c1b462102c60e47e0f7d6e07d379\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"92c451283a83cae2d83460b1b0aaf1c4\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"c56a53dac116441fac2a6e6a110b4fcf\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"fcc968a8202ebe596bb4efa31d5c55b7\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"0c98b10b2ce7660502fab8f8a09216c0\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"550ba55018af500d82b2ade74f49d6a6\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"d9dedee9a17ce0e98cac6a641dbd1b17\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"6d6d7e768e1d255dcb9f9abf87676787\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"404b9e323e5bbbecb63ea4a58385431a\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"8c4436fda7e9278685d9d5d6e0942ae9\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"38cf52a7e23c4e8796d0cbb7ea217f7e\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"e17887d5e7057c80ec1da14fe7749c52\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"32c8349f2744c3b6023fd17742eb1c2c\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"57eba100f012d139d00543c31060cf04\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"cbb7bea7bd120272c6dfe0d6f0ca85f4\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"ca9045d8ab0d3c8448228187c8ba77cd\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"ea4948e5456ac276658b0071172dee82\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"05955be58d94abc2707dea99394a60db\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"47aa1bcdd23457cd5f3026db7a357fc9\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"5735f8afcd3fb73882147629d044e368\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"8e891bbae07ac6fbe9038e8d19fb66fd\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"ea1992800627d8e54c54d54d1078cd50\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"a158a142f848a44f4b9a86b2c71de770\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"a73fe6de8d13ff09b57022c6152de435\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"a731cde706b7b10c2bb9b8b804ecf99e\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"6d5aef2fa11b45c7e089a78d8f8077d9\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"e39267e6c115d3dfff18734d9512396a\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"e2485ba528fffc006ddc16a2bdbba588\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"4e4dff4df4bb635eab4648a31718bb71\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"aa39fa602751e960c408b51bc4d1e9a3\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"a1e9ea18592a3520a564da53754435f1\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ee7f392d230f3acf9ee64e59912d2240\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"d1af4adc3abc689e2b2877348fe3a80e\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"ee11057cc33d2db3915810afa98e4fb8\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"64633496007987935476811363899867\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"b67de98cc3819f31d6aedc4a8e332d3f\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"bf3564b735dddb73bafa110e1ba4f364\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"e66e3a8530b0bda46ff6de26598a637b\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"1ea94afcd9c9383c784ceae2896c8af4\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"2ea8a953b560713a201dff1d8d3917dd\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"7a19eef01a4ee231cc05d3b3833bba4f\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"f609cb57ae40941ae6c8165f89d7aed0\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,oCAY2B,CAClC,KACS,yBACK,oCAEd,KACS,gCACK,oCAEd,KACS,8BACK,oCAEd,KACS,mCACK,oCAEd,KACS,4BACK,oCAEd,KACS,sBACK,oCAEd,KACS,qBACK,oCAEd,KACS,kCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,sCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,mCACK,oCAEd,KACS,0CACK,oCAEd,KACS,gDACK,oCAEd,KACS,oDACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kDACK,oCAEd,KACS,6CACK,oCAEd,KACS,kCACK,oCAEd,KACS,qCACK,oCAEd,KACS,kCACK,oCAEd,KACS,oDACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,yCACK,oCAEd,KACS,6CACK,oCAEd,KACS,wCACK,oCAEd,KACS,iDACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,kDACK,oCAEd,KACS,8CACK,oCAEd,KACS,2BACK,oCAEd,KACS,8CACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,+DACK,oCAEd,KACS,2EACK,oCAEd,KACS,wEACK,oCAEd,KACS,6BACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,iCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,uBACK,oCAEd,KACS,gCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,iCACK,oCAEd,KACS,oCACK,oCAEd,KACS,2CACK,oCAEd,KACS,mCACK,oCAEd,KACS,sCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,oCACK,oCAEd,KACS,6CACK,oCAEd,KACS,6CACK,oCAEd,KACS,6BACK,oCAEd,KACS,iCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,gCACK,oCAEd,KACS,wCACK,oCAEd,KACS,oCACK,oCAEd,KACS,mCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,8CACK,oCAEd,KACS,yCACK,oCAEd,KACS,0CACK,oCAEd,KACS,wCACK,oCAEd,KACS,wCACK,oCAEd,KACS,+CACK,oCAEd,KACS,sCACK,oCAEd,KACS,gCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,gCACK,oCAEd,KACS,yBACK,oCAEd,KACS,+BACK,oCAEd,KACS,kCACK,oCAEd,KACS,uCACK,oCAEd,KACS,wCACK,oCAEd,KACS,uCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,qCACK,oCAEd,KACS,2CACK,oCAEd,KACS,qCACK,oCAEd,KACS,oCACK,qCAEb,6BAC8B,CAAC"} \ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/cv/_wml09cx4cd5ryt_r7z2tjjm0000gn/T/db3738b4d898e68b953e42d8c323e0e3/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/usr/local/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"84eb215d62e5d0aa287b2afe80e57ca9\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"6f87c382be5f15c8883b322db19f6375\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"c170a229d8726934c0d6b04c2214a36c\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"2a45abd06dfe78e69135e9f87f9b78d3\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"9d98c920695f6c3395da4b68f723e60a\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"1a10c0aa90c23524c375f956fd388040\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"a02a5d8342a82adf17798f4eae85befc\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"87d5d01385c5d0f0c4c4f5d0f3532826\"\n },\n {\n \"url\": \"js/croppie/croppie.min.css\",\n \"revision\": \"fc297c9002c79c15a132f13ee3ec427e\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"14855f2975c1b1e564977e8dc32479fc\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"2ce6e99d95113e9ca6b24343cea202e0\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"3c975c94a7e7c611d1c28492072f422d\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"375a89b2a867264a395f384d00eeba13\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"197ed5837ed27992688fc424699a9a78\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"ec6e55011746305549024292f46270bd\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"74878fb4834967aa4a68647cab7888c1\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"293aa21acaf0a3349686f420b2be874a\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"4a60c6c805cab7bc782f1e52f7818d9f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"c5fb629e12fd3256c23cc8acfaa46f5b\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c7b38b3af4eb7a58ab6dc4791216530e\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"ea920e51a37c0b54d7187e0ee2791b5d\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"538252ed4fed6d5e9f4e53b35954c116\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"e273a48b8e81faac4530bf1a68d75aa0\"\n },\n {\n \"url\": \"math/MathJax.js\",\n \"revision\": \"b2c103388b71bb3d11cbf9aa45fe9b68\"\n },\n {\n \"url\": \"math/config/TeX-MML-AM_SVG-full.js\",\n \"revision\": \"d5cb8ac04050983170ae4af145bc66ff\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/fontdata.js\",\n \"revision\": \"495e5a410955d1b6178870e605890ede\"\n },\n {\n \"url\": \"math/jax/element/mml/optable/BasicLatin.js\",\n \"revision\": \"cac9b2e71382e62270baa55fab07cc13\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js\",\n \"revision\": \"e3e5e4d5924beed29f0844550b5c8f46\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js\",\n \"revision\": \"0767cbad7275b53da128e7e5e1109f7c\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js\",\n \"revision\": \"346302a5c5ee00e01c302148c56dbfe3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"ff59ef2ea422e962065b978f74f1989e\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"b53a2876e65d205d42c0217216db0a0b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"5ae6ea7a2b816b32ded88cb15651dbfc\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"f8775fef4398d0863d1c95b92f778f14\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"1a5bbe8e6e02b215c7457d9735ada682\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"d8ac61cb5b3e5d47f9ce8160c8b2f057\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"aeaa9d93c19d60a9ab385a21d57f025c\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"5e0221a99a3fdf557b5ccf72965d99b2\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"d3ad299dc8cfbd2a34479edfafce74ad\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"80761a88228f85296bfc029bf5340718\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"4544b6600298fe72d2d516fd135c54fa\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"863e0e73d4cdf95093461ef0157e13e5\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"3a47c1b462102c60e47e0f7d6e07d379\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"92c451283a83cae2d83460b1b0aaf1c4\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"c56a53dac116441fac2a6e6a110b4fcf\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"fcc968a8202ebe596bb4efa31d5c55b7\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"0c98b10b2ce7660502fab8f8a09216c0\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"550ba55018af500d82b2ade74f49d6a6\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"d9dedee9a17ce0e98cac6a641dbd1b17\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"6d6d7e768e1d255dcb9f9abf87676787\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"404b9e323e5bbbecb63ea4a58385431a\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"8c4436fda7e9278685d9d5d6e0942ae9\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"38cf52a7e23c4e8796d0cbb7ea217f7e\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"e17887d5e7057c80ec1da14fe7749c52\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"32c8349f2744c3b6023fd17742eb1c2c\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"57eba100f012d139d00543c31060cf04\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"cbb7bea7bd120272c6dfe0d6f0ca85f4\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"ca9045d8ab0d3c8448228187c8ba77cd\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"ea4948e5456ac276658b0071172dee82\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"05955be58d94abc2707dea99394a60db\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"47aa1bcdd23457cd5f3026db7a357fc9\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"5735f8afcd3fb73882147629d044e368\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"8e891bbae07ac6fbe9038e8d19fb66fd\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"ea1992800627d8e54c54d54d1078cd50\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"a158a142f848a44f4b9a86b2c71de770\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"a73fe6de8d13ff09b57022c6152de435\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"a731cde706b7b10c2bb9b8b804ecf99e\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"6d5aef2fa11b45c7e089a78d8f8077d9\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"e39267e6c115d3dfff18734d9512396a\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"e2485ba528fffc006ddc16a2bdbba588\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"4e4dff4df4bb635eab4648a31718bb71\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"aa39fa602751e960c408b51bc4d1e9a3\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"a1e9ea18592a3520a564da53754435f1\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ee7f392d230f3acf9ee64e59912d2240\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"d1af4adc3abc689e2b2877348fe3a80e\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"ee11057cc33d2db3915810afa98e4fb8\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"64633496007987935476811363899867\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"b67de98cc3819f31d6aedc4a8e332d3f\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"bf3564b735dddb73bafa110e1ba4f364\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"e66e3a8530b0bda46ff6de26598a637b\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"1ea94afcd9c9383c784ceae2896c8af4\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"2ea8a953b560713a201dff1d8d3917dd\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"7a19eef01a4ee231cc05d3b3833bba4f\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"f609cb57ae40941ae6c8165f89d7aed0\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,oCAY2B,CAClC,KACS,yBACK,oCAEd,KACS,gCACK,oCAEd,KACS,8BACK,oCAEd,KACS,mCACK,oCAEd,KACS,4BACK,oCAEd,KACS,sBACK,oCAEd,KACS,qBACK,oCAEd,KACS,kCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,sCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,mCACK,oCAEd,KACS,0CACK,oCAEd,KACS,gDACK,oCAEd,KACS,oDACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kDACK,oCAEd,KACS,6CACK,oCAEd,KACS,kCACK,oCAEd,KACS,qCACK,oCAEd,KACS,kCACK,oCAEd,KACS,oDACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,yCACK,oCAEd,KACS,6CACK,oCAEd,KACS,wCACK,oCAEd,KACS,iDACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,kDACK,oCAEd,KACS,8CACK,oCAEd,KACS,2BACK,oCAEd,KACS,8CACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,+DACK,oCAEd,KACS,2EACK,oCAEd,KACS,wEACK,oCAEd,KACS,6BACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,iCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,uBACK,oCAEd,KACS,gCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,iCACK,oCAEd,KACS,oCACK,oCAEd,KACS,2CACK,oCAEd,KACS,mCACK,oCAEd,KACS,sCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,oCACK,oCAEd,KACS,6CACK,oCAEd,KACS,6CACK,oCAEd,KACS,6BACK,oCAEd,KACS,iCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,gCACK,oCAEd,KACS,wCACK,oCAEd,KACS,oCACK,oCAEd,KACS,mCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,8CACK,oCAEd,KACS,yCACK,oCAEd,KACS,0CACK,oCAEd,KACS,wCACK,oCAEd,KACS,wCACK,oCAEd,KACS,+CACK,oCAEd,KACS,sCACK,oCAEd,KACS,gCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,gCACK,oCAEd,KACS,yBACK,oCAEd,KACS,+BACK,oCAEd,KACS,kCACK,oCAEd,KACS,uCACK,oCAEd,KACS,wCACK,oCAEd,KACS,uCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,qCACK,oCAEd,KACS,2CACK,oCAEd,KACS,qCACK,oCAEd,KACS,oCACK,qCAEb,6BAC8B,CAAC"} \ No newline at end of file